aboutsummaryrefslogtreecommitdiff
path: root/tests/functional/failing.nix
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-07 10:46:47 +0100
committereldritch horrors <pennae@lix.systems>2024-03-07 10:46:47 +0100
commit9eb58f5209f9cd1fd18f33b691c6a613075dffc4 (patch)
tree5cf7c86dd196f0f3b5a83d4c4cc962d2b8333349 /tests/functional/failing.nix
parentca03f7cc28ba09cb4db59ca51c52d4e7783f11e0 (diff)
Merge pull request #9032 from Ma27/structured-attrs-env-vars
structured attrs: improve support / usage of NIX_ATTRS_{SH,JSON}_FILE (cherry picked from commit 3c042f3b0b0a7ef9c47bf049f5410dbd4aac9e90) Change-Id: I7e41838338ee1edf31fff6f9e354c3db2bba6c0e
Diffstat (limited to 'tests/functional/failing.nix')
-rw-r--r--tests/functional/failing.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/functional/failing.nix b/tests/functional/failing.nix
index 2a0350d4d..d25e2d6b6 100644
--- a/tests/functional/failing.nix
+++ b/tests/functional/failing.nix
@@ -6,7 +6,10 @@ let
derivation ({
inherit system;
builder = busybox;
- args = ["sh" "-e" args.builder or (builtins.toFile "builder-${args.name}.sh" "if [ -e .attrs.sh ]; then source .attrs.sh; fi; eval \"$buildCommand\"")];
+ args = ["sh" "-e" args.builder or (builtins.toFile "builder-${args.name}.sh" ''
+ if [ -e "$NIX_ATTRS_SH_FILE" ]; then source $NIX_ATTRS_SH_FILE; fi;
+ eval "$buildCommand"
+ '')];
} // removeAttrs args ["builder" "meta"])
// { meta = args.meta or {}; };
in