1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
nix/tests/functional/derivation/advanced-attributes-defaults.nix
John Ericson 307dbe9914 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.
2025-04-14 13:43:46 -04:00

27 lines
437 B
Nix

{ contentAddress }:
let
caArgs =
if contentAddress then
{
__contentAddressed = true;
outputHashMode = "recursive";
outputHashAlgo = "sha256";
}
else
{ };
derivation' = args: derivation (caArgs // args);
system = "my-system";
in
derivation' {
inherit system;
name = "advanced-attributes-defaults";
builder = "/bin/bash";
args = [
"-c"
"echo hello > $out"
];
}