Skip to content

Commit

Permalink
Use nativeBuildInputs for nix-shell
Browse files Browse the repository at this point in the history
Now the nix-shell will generate a nix expression that looks like this:

with import <nixpkgs> {};
runCommand "shell" {
  nativeBuildInputs = [
    (...)
    (...)
    (...)
  ];
}

from

$ nix-shell --packages ... ... ...

Fixes the issue described in NixOS/nixpkgs#38657.
  • Loading branch information
matthewbauer committed Oct 31, 2018
1 parent 215b70f commit 3493c4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nix-build/nix-build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,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> { }; runCommand \"shell\" { nativeBuildInputs = [ ";
for (const auto & i : exprs)
joined << '(' << i << ") ";
joined << "]; } \"\"";
Expand Down

0 comments on commit 3493c4a

Please sign in to comment.