2020-08-07 19:09:26 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
source common.sh
|
|
|
|
|
|
|
|
clearStore
|
|
|
|
clearCache
|
|
|
|
|
|
|
|
export REMOTE_STORE=file://$cacheDir
|
|
|
|
|
2020-09-03 22:14:21 +00:00
|
|
|
drv=$(nix-instantiate --experimental-features ca-derivations ./content-addressed.nix -A rootCA --arg seed 1)
|
2020-08-07 19:09:26 +00:00
|
|
|
nix --experimental-features 'nix-command ca-derivations' show-derivation --derivation "$drv" --arg seed 1
|
|
|
|
|
2020-09-03 22:14:21 +00:00
|
|
|
commonArgs=("--experimental-features" "ca-derivations" "./content-addressed.nix" "-A" "rootCA" "--no-out-link")
|
|
|
|
out1=$(nix-build "${commonArgs[@]}" ./content-addressed.nix --arg seed 1)
|
|
|
|
out2=$(nix-build "${commonArgs[@]}" ./content-addressed.nix --arg seed 2)
|
2020-08-07 19:09:26 +00:00
|
|
|
|
|
|
|
test $out1 == $out2
|
2020-09-17 11:36:58 +00:00
|
|
|
|
|
|
|
nix-instantiate --experimental-features ca-derivations ./content-addressed.nix -A rootCA --arg seed 5
|
|
|
|
nix-collect-garbage --experimental-features ca-derivations --option keep-derivations true
|