From f806d5efa01f5cf3be313e68d1b7430a05ab61ed Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Wed, 31 Oct 2018 14:58:28 -0500 Subject: [PATCH] Use nativeBuildInputs for nix-shell Now the nix-shell will generate a nix expression that looks like this: with import {}; runCommand "shell" { nativeBuildInputs = [ (...) (...) (...) ]; } from $ nix-shell --packages ... ... ... Fixes the issue described in https://github.com/NixOS/nixpkgs/issues/38657. --- src/nix-build/nix-build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 618895d387d..9ece6aec505 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -249,7 +249,7 @@ static void _main(int argc, char * * argv) if (packages) { std::ostringstream joined; - joined << "with import { }; (pkgs.runCommandCC or pkgs.runCommand) \"shell\" { buildInputs = [ "; + joined << "with import { }; (pkgs.runCommandCC or pkgs.runCommand) \"shell\" { nativeBuildInputs = [ "; for (const auto & i : left) joined << '(' << i << ") "; joined << "]; } \"\"";