mirror of
https://github.com/NixOS/nix
synced 2025-07-09 03:43:54 +02:00
Squashed get CA derivations building
This commit is contained in:
parent
f7ba16f9cb
commit
e913a2989f
29 changed files with 1021 additions and 485 deletions
19
tests/content-addressed.nix
Normal file
19
tests/content-addressed.nix
Normal file
|
@ -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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue