about summary refs log tree commit diff
path: root/src/nix-build
diff options
context:
space:
mode:
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 b4206033cf5f..bb031d515134 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -325,7 +325,7 @@ int main(int argc, char ** argv)
         if (packages) {
             instArgs.push_back("--expr");
             std::ostringstream joined;
-            joined << "with import <nixpkgs> { }; runCommand \"shell\" { buildInputs = [ ";
+            joined << "with import <nixpkgs> { }; (pkgs.runCommandCC or pkgs.runCommand) \"shell\" { buildInputs = [ ";
             for (const auto & i : exprs)
                 joined << '(' << i << ") ";
             joined << "]; } \"\"";