1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

Test derivation options with content-addressing too

Now, both the unit and functional tests relating to derivation options
are tested both ways -- with input addressing and content-addressing
derivations.

(cherry picked from commit 307dbe9914)
This commit is contained in:
John Ericson 2025-04-14 11:15:56 -04:00
parent 37bcd29e5f
commit f19184191e
37 changed files with 560 additions and 94 deletions

View file

@ -1,6 +1,21 @@
{ contentAddress }:
let
caArgs =
if contentAddress then
{
__contentAddressed = true;
outputHashMode = "recursive";
outputHashAlgo = "sha256";
}
else
{ };
derivation' = args: derivation (caArgs // args);
system = "my-system";
foo = derivation {
foo = derivation' {
inherit system;
name = "foo";
builder = "/bin/bash";
@ -9,7 +24,8 @@ let
"echo foo > $out"
];
};
bar = derivation {
bar = derivation' {
inherit system;
name = "bar";
builder = "/bin/bash";
@ -18,8 +34,9 @@ let
"echo bar > $out"
];
};
in
derivation {
derivation' {
inherit system;
name = "advanced-attributes-structured-attrs";
builder = "/bin/bash";