mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
Set environment variables for .attrs.json & .attrs.sh
This way no derivation has to expect that these files are in the `cwd` during the build. This is problematic for `nix-shell` where these files would have to be inserted into the nix-shell's `cwd` which can become problematic with e.g. recursive `nix-shell`. To remain backwards-compatible, the location inside the build sandbox will be kept, however using these files directly should be deprecated from now on.
This commit is contained in:
parent
3b5429aec1
commit
3944a120ec
4 changed files with 11 additions and 10 deletions
|
@ -10,7 +10,5 @@ nix-build structured-attrs.nix -A all -o $TEST_ROOT/result
|
|||
[[ $(cat $TEST_ROOT/result-dev/foo) = foo ]]
|
||||
|
||||
export NIX_BUILD_SHELL=$SHELL
|
||||
[[ ! -e '.attrs.json' ]]
|
||||
env NIX_PATH=nixpkgs=shell.nix nix-shell structured-attrs-shell.nix \
|
||||
--run 'test -e .attrs.json; test "3" = "$(jq ".my.list|length" < .attrs.json)"'
|
||||
[[ ! -e '.attrs.json' ]]
|
||||
--run 'test -e .attrs.json; test "3" = "$(jq ".my.list|length" < $ATTRS_JSON_FILE)"'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue