mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +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
|
@ -10,6 +10,13 @@ output=$(nix-shell --pure shell.nix -A shellDrv --run \
|
|||
|
||||
[ "$output" = " - foo - bar" ]
|
||||
|
||||
# Test nix-shell on a .drv
|
||||
[[ $(nix-shell --pure $(nix-instantiate shell.nix -A shellDrv) --run \
|
||||
'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]]
|
||||
|
||||
[[ $(nix-shell --pure $(nix-instantiate shell.nix -A shellDrv) --run \
|
||||
'echo "$IMPURE_VAR - $VAR_FROM_STDENV_SETUP - $VAR_FROM_NIX"') = " - foo - bar" ]]
|
||||
|
||||
# Test nix-shell -p
|
||||
output=$(NIX_PATH=nixpkgs=shell.nix nix-shell --pure -p foo bar --run 'echo "$(foo) $(bar)"')
|
||||
[ "$output" = "foo bar" ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue