From 59c90196850b6ac8c110e54c7f03d6417ed9bf61 Mon Sep 17 00:00:00 2001 From: Maxim Ivanov Date: Sat, 29 Mar 2014 11:43:11 +0000 Subject: [PATCH] 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 d74884ead..187371d6e 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);