mirror of
https://github.com/NixOS/nix
synced 2025-07-10 04:43:53 +02:00
nix-shell/nix-build: Support .drv files again
Fixes #1663. Also handle '!<output-name>' (#1694).
This commit is contained in:
parent
0fc3e581e0
commit
90948a4e3a
6 changed files with 61 additions and 4 deletions
|
@ -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 ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue