diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2023-06-09 13:06:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-09 13:06:47 +0200 |
commit | 381a32981bd9d15da2b06f151c38f1a1229a8800 (patch) | |
tree | 34bd75c80a91042816d81e4028a5dc8957fd90d9 /tests/nix-shell.sh | |
parent | 0e18254aa81b9315c13d6ae736cb38666d19f122 (diff) | |
parent | 3c78920f7358957dba37a379e9d0b062dd3192e2 (diff) |
Merge branch 'master' into angerman/mac-fix-recursive-nix
Diffstat (limited to 'tests/nix-shell.sh')
-rw-r--r-- | tests/nix-shell.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/nix-shell.sh b/tests/nix-shell.sh index 044b96d54..edaa1249b 100644 --- a/tests/nix-shell.sh +++ b/tests/nix-shell.sh @@ -98,6 +98,18 @@ nix develop -f "$shellDotNix" shellDrv -c echo foo |& grepQuiet foo nix print-dev-env -f "$shellDotNix" shellDrv > $TEST_ROOT/dev-env.sh nix print-dev-env -f "$shellDotNix" shellDrv --json > $TEST_ROOT/dev-env.json +# Test with raw drv + +shellDrv=$(nix-instantiate "$shellDotNix" -A shellDrv.out) + +nix develop $shellDrv -c bash -c '[[ -n $stdenv ]]' + +nix print-dev-env $shellDrv > $TEST_ROOT/dev-env2.sh +nix print-dev-env $shellDrv --json > $TEST_ROOT/dev-env2.json + +diff $TEST_ROOT/dev-env{,2}.sh +diff $TEST_ROOT/dev-env{,2}.json + # Ensure `nix print-dev-env --json` contains variable assignments. [[ $(jq -r .variables.arr1.value[2] $TEST_ROOT/dev-env.json) = '3 4' ]] |