summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-11-25 18:20:35 +0100
committerregnat <rg@regnat.ovh>2020-11-27 15:39:24 +0100
commit9bd8184f1fb2e91ac4fb7207abe56f2a30a81d97 (patch)
treeba3eb830b77b51e7dd7e1229e416e9f67cbb36bb /tests
parent13c557fe823549db75c3dc24c99c46e1c4e1378e (diff)
Allow fixed-output derivations to depend on (floating) content-addressed ones
Fix an overlook of https://github.com/NixOS/nix/pull/4056
Diffstat (limited to 'tests')
-rw-r--r--tests/content-addressed.nix11
-rw-r--r--tests/content-addressed.sh1
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/content-addressed.nix b/tests/content-addressed.nix
index 985220f48..61079176f 100644
--- a/tests/content-addressed.nix
+++ b/tests/content-addressed.nix
@@ -63,4 +63,15 @@ rec {
echo ${rootCA}/non-ca-hello > $out/dep
'';
};
+ dependentFixedOutput = mkDerivation {
+ name = "dependent-fixed-output";
+ outputHashMode = "recursive";
+ outputHashAlgo = "sha256";
+ outputHash = "sha256-QvtAMbUl/uvi+LCObmqOhvNOapHdA2raiI4xG5zI5pA=";
+ buildCommand = ''
+ cat ${dependentCA}/dep
+ echo foo > $out
+ '';
+
+ };
}
diff --git a/tests/content-addressed.sh b/tests/content-addressed.sh
index bdab09c86..52f7529b5 100644
--- a/tests/content-addressed.sh
+++ b/tests/content-addressed.sh
@@ -40,6 +40,7 @@ testCutoff () {
#testDerivation dependentCA
testCutoffFor transitivelyDependentCA
testCutoffFor dependentNonCA
+ testCutoffFor dependentFixedOutput
}
testGC () {