diff options
Diffstat (limited to 'pkgs/applications/emulators/rpcs3/update.sh')
-rwxr-xr-x | pkgs/applications/emulators/rpcs3/update.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkgs/applications/emulators/rpcs3/update.sh b/pkgs/applications/emulators/rpcs3/update.sh index 0c8477c5282ba..1efecc7ec88c3 100755 --- a/pkgs/applications/emulators/rpcs3/update.sh +++ b/pkgs/applications/emulators/rpcs3/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash --pure --keep GITHUB_TOKEN -p gnused jq nix-prefetch-git curl cacert +#!nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix gnused jq nix-prefetch-git curl cacert set -eou pipefail @@ -48,12 +48,13 @@ final_ver="$major_ver-$git_ver" echo "INFO: Latest commit is $commit_sha" echo "INFO: Latest version is $final_ver" -nix_sha256=$(nix-prefetch-git --quiet --fetch-submodules https://github.com/RPCS3/rpcs3.git "$commit_sha" | jq -r .sha256) -echo "INFO: SHA256 is $nix_sha256" +nix_hash=$(nix-prefetch-git --quiet --fetch-submodules https://github.com/RPCS3/rpcs3.git "$commit_sha" | jq -r .sha256) +nix_hash=$(nix hash to-sri --type sha256 "$nix_hash") +echo "INFO: Hash is $nix_hash" sed -i -E \ -e "s/rpcs3GitVersion\s*=\s*\"[\.a-z0-9-]+\";$/rpcs3GitVersion = \"${git_ver}\";/g" \ -e "s/rpcs3Version\s*=\s*\"[\.a-z0-9-]+\";$/rpcs3Version = \"${final_ver}\";/g" \ -e "s/rpcs3Revision\s*=\s*\"[a-z0-9]+\";$/rpcs3Revision = \"${commit_sha}\";/g" \ - -e "s/rpcs3Sha256\s*=\s*\"[a-z0-9]+\";$/rpcs3Sha256 = \"${nix_sha256}\";/g" \ + -e "s|rpcs3Hash\s*=\s*\"sha256-.*\";$|rpcs3Hash = \"${nix_hash}\";|g" \ "$ROOT/default.nix" |