about summary refs log tree commit diff
path: root/tests/nix-build.sh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-11-24T17·07+0100
committerEelco Dolstra <edolstra@gmail.com>2017-11-24T17·08+0100
commit90948a4e3a64492b7d117d93657221fa7b598e6e (patch)
treed339dad0dd12db1132d3484a6cad199c13a78b82 /tests/nix-build.sh
parent0fc3e581e0585e377d4b42e343b0487606add547 (diff)
nix-shell/nix-build: Support .drv files again
Fixes #1663.

Also handle '!<output-name>' (#1694).
Diffstat (limited to 'tests/nix-build.sh')
-rw-r--r--tests/nix-build.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/nix-build.sh b/tests/nix-build.sh
index dc0e99c73621..395264863196 100644
--- a/tests/nix-build.sh
+++ b/tests/nix-build.sh
@@ -2,7 +2,7 @@ source common.sh
 
 clearStore
 
-nix-build dependencies.nix -o $TEST_ROOT/result
+outPath=$(nix-build dependencies.nix -o $TEST_ROOT/result)
 test "$(cat $TEST_ROOT/result/foobar)" = FOOBAR
 
 # The result should be retained by a GC.
@@ -17,3 +17,9 @@ test -e $target/foobar
 rm $TEST_ROOT/result
 nix-store --gc
 if test -e $target/foobar; then false; fi
+
+outPath2=$(nix-build $(nix-instantiate dependencies.nix) --no-out-link)
+[[ $outPath = $outPath2 ]]
+
+outPath2=$(nix-build $(nix-instantiate dependencies.nix)!out --no-out-link)
+[[ $outPath = $outPath2 ]]