Skip to content

Commit 5e0f91b

Browse files
committed
Do not use the sha256 from builtins.fetchTarball
Bazel expects the given hash is for the downloaded archive, but nix computes the hash after unpacking the tarball to the nix store.
1 parent fe62c52 commit 5e0f91b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rules_haskell_tests/tests/run-start-script.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ function have() {
3636

3737
if have nix; then
3838
NIXPKGS_REVISION=$( getattr_value "rev" )
39-
NIXPKGS_HASH=$( nix hash to-sri "$(getattr_value "sha256")" )
39+
# N.B. the sha256 hash attribute given to `builtins.fetchTarball` is computed after unpacking
40+
# the archive, it is not the hash of the downloaded artifact
41+
#NIXPKGS_HASH=$( nix hash to-sri "$(getattr_value "sha256")" )
4042
fi
4143

4244
export NIXPKGS_REVISION NIXPKGS_HASH

0 commit comments

Comments
 (0)