From 59c90196850b6ac8c110e54c7f03d6417ed9bf61 Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Sat, 29 Mar 2014 11:43:11 +0000 Subject: 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. --- scripts/nix-build.in | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/nix-build.in b/scripts/nix-build.in index d74884eade..187371d6e1 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); -- cgit 1.4.1