aboutsummaryrefslogtreecommitdiff
path: root/tests/build-hook.nix
diff options
context:
space:
mode:
Diffstat (limited to 'tests/build-hook.nix')
-rw-r--r--tests/build-hook.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/build-hook.nix b/tests/build-hook.nix
index eb16676f0..643334caa 100644
--- a/tests/build-hook.nix
+++ b/tests/build-hook.nix
@@ -9,20 +9,20 @@ let
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\"")];
- } // removeAttrs args ["builder" "meta"])
- // { meta = args.meta or {}; };
+ } // removeAttrs args ["builder" "meta" "passthru"])
+ // { meta = args.meta or {}; passthru = args.passthru or {}; };
input1 = mkDerivation {
shell = busybox;
name = "build-remote-input-1";
- buildCommand = "echo FOO > $out";
+ buildCommand = "echo hi-input1; echo FOO > $out";
requiredSystemFeatures = ["foo"];
};
input2 = mkDerivation {
shell = busybox;
name = "build-remote-input-2";
- buildCommand = "echo BAR > $out";
+ buildCommand = "echo hi; echo BAR > $out";
requiredSystemFeatures = ["bar"];
};
@@ -30,6 +30,7 @@ let
shell = busybox;
name = "build-remote-input-3";
buildCommand = ''
+ echo hi-input3
read x < ${input2}
echo $x BAZ > $out
'';
@@ -41,6 +42,7 @@ in
mkDerivation {
shell = busybox;
name = "build-remote";
+ passthru = { inherit input1 input2 input3; };
buildCommand =
''
read x < ${input1}