diff options
Diffstat (limited to 'tests/nix-shell.sh')
-rw-r--r-- | tests/nix-shell.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index f0f34a5f8705..f7cac6ecf8ef 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -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" ] |