aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorldesgoui <ldesgoui@gmail.com>2021-07-31 16:55:53 +0200
committerldesgoui <ldesgoui@gmail.com>2021-07-31 17:25:10 +0200
commit6eeb6f9c8494f5d5ef5e4dd228c9121bcbe2c29f (patch)
tree86362266680e6cda3884165cb9a907e575bd8d63 /src/nix-build
parent2b67cb7b8c8ac7953f7e341d760bdb3c021fe765 (diff)
nix-shell -p: pass --arg values as nixpkgs params
Diffstat (limited to 'src/nix-build')
-rwxr-xr-xsrc/nix-build/nix-build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index 848b108dd..9e3538394 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -269,7 +269,7 @@ static void main_nix_build(int argc, char * * argv)
if (packages) {
std::ostringstream joined;
- joined << "with import <nixpkgs> { }; (pkgs.runCommandCC or pkgs.runCommand) \"shell\" { buildInputs = [ ";
+ joined << "{...}@args: with import <nixpkgs> args; (pkgs.runCommandCC or pkgs.runCommand) \"shell\" { buildInputs = [ ";
for (const auto & i : left)
joined << '(' << i << ") ";
joined << "]; } \"\"";