multiviewer-for-f1: fix updateScript (#497406)
This commit is contained in:
@@ -100,7 +100,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
|
||||
passthru.updateScript = writeScript "update-multiviewer-for-f1" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl common-updater-scripts
|
||||
#!nix-shell -i bash -p curl jq common-updater-scripts
|
||||
set -eu -o pipefail
|
||||
|
||||
# Get latest API for packages, store so we only make one request
|
||||
@@ -114,10 +114,10 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
if [ "$version" != "${finalAttrs.version}" ]
|
||||
then
|
||||
# Pre-calculate package hash
|
||||
hash=$(nix-prefetch-url --type sha256 $link)
|
||||
hash=$(nix-hash --type sha256 --to-sri $(nix-prefetch-url --type sha256 $link))
|
||||
|
||||
# Update ID and version in source
|
||||
update-source-version ${finalAttrs.pname} "$id" --version-key=id
|
||||
sed -i "s/id = \"[0-9]*\"/id = \"$id\"/" ${__curPos.file}
|
||||
update-source-version ${finalAttrs.pname} "$version" "$hash" --system=x86_64-linux
|
||||
fi
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user