Skip to content

Commit

Permalink
Do not use the sha256 from builtins.fetchTarball
Browse files Browse the repository at this point in the history
Bazel expects the given hash is for the downloaded archive, but nix computes the hash
after unpacking the tarball to the nix store.
  • Loading branch information
avdv committed Dec 4, 2024
1 parent fe62c52 commit 5e0f91b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rules_haskell_tests/tests/run-start-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ function have() {

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

export NIXPKGS_REVISION NIXPKGS_HASH
Expand Down

0 comments on commit 5e0f91b

Please sign in to comment.