Skip to content

Commit

Permalink
rover: use cargoHash instead of cargoSha256 in updateScript
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa committed Jul 3, 2024
1 parent 53d8228 commit b802f3a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkgs/development/tools/rover/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ sed --in-place \
"s|sha256 = \"[a-zA-Z0-9\/+-=]*\"|sha256 = \"$rover_sri_hash\"|" \
"$dirname/default.nix"

# Clear cargoSha256.
# Clear cargoHash.
sed --in-place \
"s|cargoSha256 = \".*\"|cargoSha256 = \"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\"|" \
"s|cargoHash = \".*\"|cargoHash = \"sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\"|" \
"$dirname/default.nix"

# Update cargoSha256
echo "Computing cargoSha256"
cargoSha256=$(
nix-prefetch "{ sha256 }: (import $nixpkgs {}).rover.cargoDeps.overrideAttrs (_: { outputHash = sha256; })"
# Update cargoHash
echo "Computing cargoHash"
cargoHash=$(
nix-prefetch "{ hash }: (import $nixpkgs {}).rover.cargoDeps.overrideAttrs (_: { outputHash = hash; })"
)
sed --in-place \
"s|cargoSha256 = \".*\"|cargoSha256 = \"$cargoSha256\"|" \
"s|cargoHash = \".*\"|cargoHash = \"$cargoHash\"|" \
"$dirname/default.nix"

0 comments on commit b802f3a

Please sign in to comment.