aboutsummaryrefslogtreecommitdiff
path: root/tests/content-addressed.nix
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-07 19:09:26 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-07 19:51:55 +0000
commite913a2989fd7dfabfd93c89fd4295386eda4277f (patch)
treecb59783b9ef1db080fec0c45070b8badbbc15dba /tests/content-addressed.nix
parentf7ba16f9cbc27b141f1797a7c4f1fd3243f31683 (diff)
Squashed get CA derivations building
Diffstat (limited to 'tests/content-addressed.nix')
-rw-r--r--tests/content-addressed.nix19
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";
+}