Fix nix-shell for derivation with multiple outputs

If derivation declares multiple outputs and first (default) output
if not "out", then "nix-instantiate" calls return path with output
names appended after "!". Than suffix must be stripped before
ant path checks are done.
This commit is contained in:
Maxim Ivanov 2014-03-29 11:43:11 +00:00 committed by Eelco Dolstra
parent 1c2550a2ae
commit 59c9019685
1 changed files with 1 additions and 0 deletions

View File

@ -196,6 +196,7 @@ foreach my $expr (@exprs) {
if ($runEnv) {
die "$0: a single derivation is required\n" if scalar @drvPaths != 1;
my $drvPath = $drvPaths[0];
$drvPath = (split '!',$drvPath)[0];
$drvPath = readlink $drvPath or die "cannot read symlink `$drvPath'" if -l $drvPath;
my $drv = derivationFromPath($drvPath);