mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Now, both the unit and functional tests relating to derivation options are tested both ways -- with input addressing and content-addressing derivations.
27 lines
437 B
Nix
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"
|
|
];
|
|
}
|