mirror of
https://github.com/NixOS/nix
synced 2025-07-12 19:05:08 +02:00
Beef up floating CA derivations test a bit
This commit is contained in:
parent
e7d93e7ece
commit
145915eb39
2 changed files with 29 additions and 15 deletions
|
@ -4,16 +4,29 @@ with import ./config.nix;
|
|||
# A simple content-addressed derivation.
|
||||
# The derivation can be arbitrarily modified by passing a different `seed`,
|
||||
# but the output will always be the same
|
||||
mkDerivation {
|
||||
name = "simple-content-addressed";
|
||||
buildCommand = ''
|
||||
set -x
|
||||
echo "Building a CA derivation"
|
||||
echo "The seed is ${toString seed}"
|
||||
mkdir -p $out
|
||||
echo "Hello World" > $out/hello
|
||||
'';
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
rec {
|
||||
rootLegacy = mkDerivation {
|
||||
name = "simple-content-addressed";
|
||||
buildCommand = ''
|
||||
set -x
|
||||
echo "Building a legacy derivation"
|
||||
mkdir -p $out
|
||||
echo "Hello World" > $out/hello
|
||||
'';
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
};
|
||||
rootCA = mkDerivation {
|
||||
name = "dependent";
|
||||
buildCommand = ''
|
||||
echo "building a CA derivation"
|
||||
echo "The seed is ${toString seed}"
|
||||
mkdir -p $out
|
||||
echo ${rootLegacy}/hello > $out/dep
|
||||
'';
|
||||
__contentAddressed = true;
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue