1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Check the flake epoch

Closes #2883.
This commit is contained in:
Eelco Dolstra 2019-05-22 14:31:40 +02:00
parent 3cecf3f39c
commit e414bde6f9
4 changed files with 18 additions and 4 deletions

View file

@ -146,7 +146,7 @@ nix build -o $TEST_ROOT/result file://$flake2Dir:bar
# Test whether indirect dependencies work.
nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:xyzzy
# Add dependency to flake3
# Add dependency to flake3.
rm $flake3Dir/flake.nix
cat > $flake3Dir/flake.nix <<EOF
@ -174,3 +174,7 @@ nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:sth
# Check whether it saved the lockfile
[[ ! (-z $(git -C $flake3Dir diff master)) ]]
# Unsupported epochs should be an error.
sed -i $flake3Dir/flake.nix -e s/2019/2030/
nix build -o $TEST_ROOT/result --flake-registry $registry $flake3Dir:sth 2>&1 | grep 'unsupported epoch'