nix-shell -p: Use runCommandCC

This restores pre-17.03 behaviour by making gcc available.

(Ported from 9b63bb88c8)
This commit is contained in:
Eelco Dolstra 2017-10-13 17:28:04 +02:00
parent 3c52567b3e
commit 76431e0a26
No known key found for this signature in database
GPG Key ID: 8170B4726D7198DE

View File

@ -226,7 +226,7 @@ die "$0: -p and -E are mutually exclusive\n" if $packages && $fromAr
if ($packages) {
push @instArgs, "--expr";
@exprs = (
'with import <nixpkgs> { }; runCommand "shell" { buildInputs = [ '
'with import <nixpkgs> { }; (pkgs.runCommandCC or pkgs.runCommand) "shell" { buildInputs = [ '
. (join " ", map { "($_)" } @exprs) . ']; } ""');
} elsif (!$fromArgs) {
@exprs = ("shell.nix") if scalar @exprs == 0 && $runEnv && -e "shell.nix";