From 72cdb2246305abf2bd3cbc88d2c72ea6040fcef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 1 Jul 2025 19:31:14 +0200 Subject: [PATCH] add script to update nar hashes in tests --- scripts/update-tests-hash | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/update-tests-hash diff --git a/scripts/update-tests-hash b/scripts/update-tests-hash new file mode 100755 index 00000000..f2508b9a --- /dev/null +++ b/scripts/update-tests-hash @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Helper script to update the tests flake hash +set -euo pipefail + +# Go to the root of the repository +cd "$(dirname "$0")/.." + +echo "Updating tests.narHash..." >&2 + +# Update the flake lock file +nix --extra-experimental-features 'flakes nix-command' flake lock ./tests + +# Generate the hash +nix --extra-experimental-features 'flakes nix-command' hash path ./tests > ./tests.narHash + +echo "Hash updated successfully: $(cat tests.narHash)" \ No newline at end of file