diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-07 19:09:26 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-07 19:51:55 +0000 |
commit | e913a2989fd7dfabfd93c89fd4295386eda4277f (patch) | |
tree | cb59783b9ef1db080fec0c45070b8badbbc15dba /tests/content-addressed.nix | |
parent | f7ba16f9cbc27b141f1797a7c4f1fd3243f31683 (diff) |
Squashed get CA derivations building
Diffstat (limited to 'tests/content-addressed.nix')
-rw-r--r-- | tests/content-addressed.nix | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/content-addressed.nix b/tests/content-addressed.nix new file mode 100644 index 000000000..586e4cba6 --- /dev/null +++ b/tests/content-addressed.nix @@ -0,0 +1,19 @@ +with import ./config.nix; + +{ seed ? 0 }: +# 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"; +} |