diff options
author | Maxim Ivanov <ivanov.maxim@gmail.com> | 2014-03-29T11·43+0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-03-29T23·52+0100 |
commit | 59c90196850b6ac8c110e54c7f03d6417ed9bf61 (patch) | |
tree | 73102f294440948cd9060b412cc265374c9f65b9 /scripts/nix-build.in | |
parent | 1c2550a2ae826c422cf6d34f1c5c3e687474929d (diff) |
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.
Diffstat (limited to 'scripts/nix-build.in')
-rwxr-xr-x | scripts/nix-build.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in index d74884eadeb0..187371d6e192 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -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); |