mirror of
https://github.com/NixOS/nix
synced 2025-07-07 22:33:57 +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
|
@ -36,7 +36,7 @@ mkDerivation {
|
|||
echo bar > $dest
|
||||
echo foo > $dest2
|
||||
|
||||
json=$(cat .attrs.json)
|
||||
json=$(cat $ATTRS_JSON_FILE)
|
||||
[[ $json =~ '"narHash":"sha256:1r7yc43zqnzl5b0als5vnyp649gk17i37s7mj00xr8kc47rjcybk"' ]]
|
||||
[[ $json =~ '"narSize":288' ]]
|
||||
[[ $json =~ '"closureSize":288' ]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue