treewide: add --extra-experimental-features nix-command to nix hash invocations

Changed files
+132 -132
maintainers
pkgs
applications
audio
reaper
blockchains
teos
editors
cudatext
vscode
extensions
_maintainers
ms-vscode.cpptools
graphics
networking
browsers
librewolf
cluster
timoni
by-name
at
atlassian-plugin-sdk
ba
balatro
be
beekeeper-studio
bi
bilibili
bl
bloomeetunes
bo
boundary
bu
buck2
buckets
ch
chatgpt
cl
clojure-lsp
co
coder
confluent-cli
cr
crc
db
dbgate
de
dependabot-cli
dr
draupnir
du
duplicati
dy
dynamodb-local
el
electrs
en
envoy-bin
fe
feishu
fi
fishnet
fl
fluxcd
ga
gauge
go
google-chrome
ha
hamrs-pro
he
hey-mail
ho
hoppscotch
i-
i-dot-ming
ib
ibm-plex
je
jenkins
jetbrains-toolbox
ke
keyguard
li
librewolf-bin-unwrapped
lm
lmstudio
lo
localsend
mi
mihomo-party
mu
mullvad-browser
nb
nbxplorer
om
ombi
pd
pdfium-binaries
pe
perses
ph
phoenixd
pi
pilipalax
pl
platformsh
pr
protoc-gen-grpc-java
qq
re
readarr
rn
rnnoise
ru
rundeck
si
signal-desktop-bin
sp
sparkle
st
standardnotes
stockfish
su
sudachidict
ta
tailwindcss_3
tandoor-recipes
te
termius
th
the-unarchiver
update
to
tor-browser
tr
tradingview
ty
typesense
up
upsun
va
vault-bin
vi
wa
waveterm
we
wechat-uos
wh
whisparr
xu
xunlei-uos
ya
yazi
plugins
zo
zoom-us
development
compilers
dotnet
graalvm
graalvm-oracle
libraries
libcef
science
math
libtorch
python-modules
jaxlib
mypy-boto3
ray
torch
torchaudio
torchvision
types-aiobotocore
tools
continuous-integration
woodpecker
infisical
rover
misc
lilypond
os-specific
linux
batman-adv
minimal-bootstrap
stage0-posix
servers
etcd
3.5
lidarr
tools
admin
ibmcloud-cli
misc
xvfb-run
+2 -2
maintainers/scripts/copy-tarballs.pl
···
if ($hash =~ /^([a-z0-9]+)-([A-Za-z0-9+\/=]+)$/) {
$algo = $1;
-
$hash = `nix hash to-base16 $hash` or die;
+
$hash = `nix --extra-experimental-features nix-command hash to-base16 $hash` or die;
chomp $hash;
}
···
# Convert non-SRI base-64 to base-16.
if ($hash =~ /^[A-Za-z0-9+\/=]+$/) {
-
$hash = `nix hash to-base16 --type '$algo' $hash` or die;
+
$hash = `nix --extra-experimental-features nix-command hash to-base16 --type '$algo' $hash` or die;
chomp $hash;
}
+2 -2
pkgs/applications/audio/reaper/updater.sh
···
function set_hash_for_linux() {
local arch=$1
pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_linux_$arch.tar.xz)
-
pkg_hash=$(nix hash convert "sha256:$pkg_hash")
+
pkg_hash=$(nix --extra-experimental-features nix-command hash convert "sha256:$pkg_hash")
update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-linux --ignore-same-version
}
function set_hash_for_darwin() {
local arch=$1
pkg_hash=$(nix-prefetch-url https://www.reaper.fm/files/${reaper_ver%.*}.x/reaper${reaper_ver/./}_universal.dmg)
-
pkg_hash=$(nix hash convert "sha256:$pkg_hash")
+
pkg_hash=$(nix --extra-experimental-features nix-command hash convert "sha256:$pkg_hash")
update-source-version reaper "${reaper_ver}" "$pkg_hash" --system=$arch-darwin --ignore-same-version
}
+1 -1
pkgs/applications/blockchains/teos/update.sh
···
git -C "$repo" checkout "tags/v${version}"
rm -rf "${repo}/.git"
-
hashcheck=$(nix hash path "$repo")
+
hashcheck=$(nix --extra-experimental-features nix-command hash path "$repo")
(cd "$nixpkgs" && update-source-version teos "$version" "$hashcheck" && update-source-version teos --ignore-same-version --source-key=cargoDeps)
echo
+2 -2
pkgs/applications/editors/cudatext/update.sh
···
url="https://github.com/Alexey-T/CudaText/archive/refs/tags/${version}.tar.gz"
hash=$(nix-prefetch-url --quiet --unpack --type sha256 $url)
-
sriHash=$(nix hash to-sri --type sha256 $hash)
+
sriHash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)
sed -i "s#version = \".*\"#version = \"$version\"#" default.nix
sed -i "s#hash = \".*\"#hash = \"$sriHash\"#" default.nix
···
if [ "$latest" != "$rev" ]; then
url="https://github.com/${owner}/${repo}/archive/refs/tags/${latest}.tar.gz"
hash=$(nix-prefetch-url --quiet --unpack --type sha256 $url)
-
sriHash=$(nix hash to-sri --type sha256 $hash)
+
sriHash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)
jq ".\"${repo}\".rev = \"${latest}\" | .\"${repo}\".hash = \"${sriHash}\"" deps.json | sponge deps.json
fi
done <<< $(jq -r 'to_entries[]|[.key,.value.owner,.value.rev]|@tsv' deps.json)
+1 -1
pkgs/applications/editors/vscode/extensions/_maintainers/update-bin-srcs-lib.sh
···
declare unpackedStorePath
unpackedStorePath="$(nix add-to-store -n "$unpackedStoreName" "$tmpDir")"
declare unpackedSha256
-
unpackedSha256="$(nix hash-path --base32 --type sha256 "$unpackedStorePath")"
+
unpackedSha256="$(nix --extra-experimental-features nix-command hash path --base32 --type sha256 "$unpackedStorePath")"
1>&2 echo "unpackedStorePath='$unpackedStorePath'"
1>&2 echo "unpackedSha256='$unpackedSha256'"
+1 -1
pkgs/applications/editors/vscode/extensions/ms-vscode.cpptools/update_helper.sh
···
unzip -q -d "$tmpDir" "$cpptoolsZipStorePath"
cpptoolsStorePath="$(nix add-to-store -n "$extStoreName" "$tmpDir")"
-
cpptoolsSha256="$(nix hash-path --base32 --type sha512 "$cpptoolsStorePath")"
+
cpptoolsSha256="$(nix --extra-experimental-features nix-command hash path --base32 --type sha512 "$cpptoolsStorePath")"
echo "cpptoolsStorePath='$cpptoolsStorePath'"
echo "cpptoolsSha256='$cpptoolsSha256'"
+1 -1
pkgs/applications/editors/vscode/update-vscode.sh
···
systems=$(nix eval --json -f . vscode.meta.platforms | jq --raw-output '.[]')
for system in $systems; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix eval --raw -f . vscode.src.url --system "$system")))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix eval --raw -f . vscode.src.url --system "$system")))
update-source-version vscode $latestVersion $hash --system=$system --ignore-same-version --ignore-same-hash
done
+1 -1
pkgs/applications/editors/vscode/update-vscodium.sh
···
"aarch64-darwin darwin-arm64 zip" \
"x86_64-darwin darwin-x64 zip"; do
set -- $i
-
hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url "https://github.com/VSCodium/vscodium/releases/download/$latestVersion/VSCodium-$2-$latestVersion.$3"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $(nix-prefetch-url "https://github.com/VSCodium/vscodium/releases/download/$latestVersion/VSCodium-$2-$latestVersion.$3"))
update-source-version vscodium $latestVersion $hash --system=$1 --ignore-same-version
done
+1 -1
pkgs/applications/graphics/tesseract/fetch-language-hashes
···
for lang in $langCodes; do
url=https://github.com/tesseract-ocr/tessdata/raw/$tessdataRev/$lang.traineddata
-
hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url $url 2>/dev/null))
+
hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url $url 2>/dev/null))
echo "$lang = \"$hash\";"
done
+2 -2
pkgs/applications/networking/browsers/librewolf/update.nix
···
repoUrl=https://codeberg.org/librewolf/source.git
nix-prefetch-git $repoUrl --quiet --rev $latestTag --fetch-submodules > $prefetchOut
srcDir=$(jq -r .path < $prefetchOut)
-
srcHash=$(nix hash convert --to sri --hash-algo sha256 $(jq -r .sha256 < $prefetchOut))
+
srcHash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(jq -r .sha256 < $prefetchOut))
ffVersion=$(<$srcDir/version)
lwRelease=$(<$srcDir/release)
···
curl --silent --show-error -o "$HOME"/shasums.asc "$mozillaUrl$ffVersion/SHA512SUMS.asc"
gpgv --keyring="$GNUPGHOME"/pubring.kbx "$HOME"/shasums.asc "$HOME"/shasums
-
ffHash=$(nix hash convert --to sri --hash-algo sha512 $(grep '\.source\.tar\.xz$' "$HOME"/shasums | grep '^[^ ]*' -o))
+
ffHash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha512 $(grep '\.source\.tar\.xz$' "$HOME"/shasums | grep '^[^ ]*' -o))
echo "ffHash=$ffHash"
jq ".source.rev = \"$latestTag\"" $srcJson | sponge $srcJson
+1 -1
pkgs/applications/networking/cluster/timoni/update.sh
···
# update hash
PREV_HASH=$(nix eval --raw -f $NIXPKGS_ROOT/default.nix $ATTR.src.outputHash)
-
NEXT_HASH=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack --type sha256 $(nix eval --raw -f $NIXPKGS_ROOT/default.nix $ATTR.src.url)))
+
NEXT_HASH=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --unpack --type sha256 $(nix eval --raw -f $NIXPKGS_ROOT/default.nix $ATTR.src.url)))
sed -i "s|$PREV_HASH|$NEXT_HASH|" "$FILE"
# update vendor hash
+1 -1
pkgs/by-name/at/atlassian-plugin-sdk/package.nix
···
fi
DOWNLOAD_URL="${mavenGroupIdUrl}/atlassian-plugin-sdk/${version}/atlassian-plugin-sdk-$NEW_VERSION.tar.gz"
-
NIX_HASH=$(nix hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
+
NIX_HASH=$(nix --extra-experimental-features nix-command hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
update-source-version "atlassian-plugin-sdk" "$NEW_VERSION" "$NIX_HASH" "$DOWNLOAD_URL"
'';
+1 -1
pkgs/by-name/ba/balatro/package.nix
···
src = requireFile {
name = "Balatro-${finalAttrs.version}.exe";
url = "https://store.steampowered.com/app/2379780/Balatro/";
-
# Use `nix hash file --sri --type sha256` to get the correct hash
+
# Use `nix --extra-experimental-features nix-command hash file --sri --type sha256` to get the correct hash
hash = "sha256-DXX+FkrM8zEnNNSzesmHiN0V8Ljk+buLf5DE5Z3pP0c=";
};
+1 -1
pkgs/by-name/be/beekeeper-studio/update.sh
···
nix-update beekeeper-studio --version "$latestVersion" || true
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url "$(nix eval -f . --raw beekeeper-studio.src.url --system aarch64-linux)"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url "$(nix eval -f . --raw beekeeper-studio.src.url --system aarch64-linux)"))
update-source-version beekeeper-studio $latestVersion $hash --system=aarch64-linux --ignore-same-version
+2 -2
pkgs/by-name/bi/bilibili/update.sh
···
arm64_hash=$(nix-prefetch-url $arm64_url)
# use friendlier hashes
-
amd64_hash=$(nix hash convert --to sri --hash-algo sha256 "$amd64_hash")
-
arm64_hash=$(nix hash convert --to sri --hash-algo sha256 "$arm64_hash")
+
amd64_hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$amd64_hash")
+
arm64_hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$arm64_hash")
cat >sources.nix <<EOF
# Generated by ./update.sh - do not update manually!
+1 -1
pkgs/by-name/bl/bloomeetunes/update.sh
···
sed -i "s/\(tag = \"v\${version}+\)[0-9]\+/\1${RunNumber}/" "$ROOT/package.nix"
-
hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/HemantKArya/BloomeeTunes/archive/refs/tags/${latestTag}.tar.gz"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/HemantKArya/BloomeeTunes/archive/refs/tags/${latestTag}.tar.gz"))
update-source-version bloomeetunes $latestVersion $hash
curl https://raw.githubusercontent.com/HemantKArya/BloomeeTunes/${latestTag}/pubspec.lock | yq . >$ROOT/pubspec.lock.json
+1 -1
pkgs/by-name/bo/boundary/update.sh
···
local arch=$2
url="https://releases.hashicorp.com/boundary/${version}/boundary_${version}_${arch}.zip"
zip_hash=$(nix-prefetch-url --unpack $url)
-
nix hash to-sri --type sha256 "$zip_hash"
+
nix --extra-experimental-features nix-command hash to-sri --type sha256 "$zip_hash"
}
replace_sha() {
+3 -3
pkgs/by-name/bu/buck2/update.sh
···
rm -f "$HFILE" && touch "$HFILE"
PRELUDE_SHA256HASH="$(nix-prefetch-url --type sha256 "$PRELUDE_DL_URL")"
-
PRELUDE_SRIHASH="$(nix hash to-sri --type sha256 "$PRELUDE_SHA256HASH")"
+
PRELUDE_SRIHASH="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$PRELUDE_SHA256HASH")"
printf "{ \"_comment\": \"@generated by pkgs/by-name/bu/buck2/update.sh\"\n" >> "$HFILE"
printf ", \"_prelude\": \"$PRELUDE_SRIHASH\"\n" >> "$HFILE"
···
for arch in "${ARCHS[@]}"; do
IFS=: read -r arch_name arch_target <<< "$arch"
sha256hash="$(nix-prefetch-url --type sha256 "https://github.com/facebook/buck2/releases/download/${VERSION}/buck2-${arch_target}.zst")"
-
srihash="$(nix hash to-sri --type sha256 "$sha256hash")"
+
srihash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256hash")"
echo ", \"buck2-$arch_name\": \"$srihash\"" >> "$HFILE"
IFS=: read -r arch_name arch_target <<< "$arch"
sha256hash="$(nix-prefetch-url --type sha256 "https://github.com/facebook/buck2/releases/download/${VERSION}/rust-project-${arch_target}.zst")"
-
srihash="$(nix hash to-sri --type sha256 "$sha256hash")"
+
srihash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256hash")"
echo ", \"rust-project-$arch_name\": \"$srihash\"" >> "$HFILE"
done
echo "}" >> "$HFILE"
+1 -1
pkgs/by-name/bu/buckets/package.nix
···
.${system};
# Get hash in sri format
-
# nix-prefetch-url <url> | xargs nix hash convert --hash-algo sha256
+
# nix-prefetch-url <url> | xargs nix --extra-experimental-features nix-command hash convert --hash-algo sha256
hash =
{
x86_64-linux = "sha256-DK5+VT4+OCcJ4Bbv6GGs6R332GMsD1gNEmcz0iaJb1c=";
+1 -1
pkgs/by-name/ch/chatgpt/update.sh
···
LATEST_VERSION=$(echo "$XML_DATA" | xmllint --xpath '/rss/channel/item[1]/*[local-name()="shortVersionString"]/text()' -)
DOWNLOAD_URL=$(echo "$XML_DATA" | xmllint --xpath 'string(//item[1]/enclosure/@url)' -)
-
HASH=$(nix-prefetch-url $DOWNLOAD_URL | xargs nix hash convert --hash-algo sha256)
+
HASH=$(nix-prefetch-url $DOWNLOAD_URL | xargs nix --extra-experimental-features nix-command hash convert --hash-algo sha256)
SOURCE_NIX="$(dirname ${BASH_SOURCE[0]})/source.nix"
+1 -1
pkgs/by-name/cl/clojure-lsp/package.nix
···
old_jar_hash="$(nix-instantiate --strict --json --eval -A clojure-lsp.jar.drvAttrs.outputHash | jq -r .)"
curl -o clojure-lsp-standalone.jar -sL "https://github.com/clojure-lsp/clojure-lsp/releases/download/$latest_version/clojure-lsp-standalone.jar"
-
new_jar_hash="$(nix-hash --flat --type sha256 clojure-lsp-standalone.jar | xargs -n1 nix hash convert --hash-algo sha256)"
+
new_jar_hash="$(nix-hash --flat --type sha256 clojure-lsp-standalone.jar | xargs -n1 nix --extra-experimental-features nix-command hash convert --hash-algo sha256)"
rm -f clojure-lsp-standalone.jar
+1 -1
pkgs/by-name/co/coder/update.sh
···
# Fetch the new hash using nix-prefetch-url
local NEW_HASH=$(nix-prefetch-url --type sha256 $URL)
-
local SRI_HASH=$(nix hash to-sri --type sha256 $NEW_HASH)
+
local SRI_HASH=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $NEW_HASH)
# Update the Nix file with the new hash, using '#' as delimiter and preserving indentation
sed -i "/${channel} = {/,/};/{
+1 -1
pkgs/by-name/co/confluent-cli/update.sh
···
"x86_64-darwin darwin_amd64" \
"aarch64-darwin darwin_arm64"; do
set -- $i
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/$latestVersion/confluent_${latestVersion}_$2.tar.gz"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url "https://s3-us-west-2.amazonaws.com/confluent.cloud/confluent-cli/archives/$latestVersion/confluent_${latestVersion}_$2.tar.gz"))
update-source-version confluent-cli $latestVersion $hash --system=$1 --ignore-same-version
done
+1 -1
pkgs/by-name/cr/crc/update.sh
···
jq -r "map(select(.name == \"${LATEST_TAG_NAME}\")) | .[0] | .commit.sha")
CRC_GIT_PREFETCH=$(nix-prefetch-url --unpack https://github.com/crc-org/crc/archive/${CRC_COMMIT}.tar.gz)
-
CRC_GIT_HASH=$(nix hash convert --to sri --hash-algo sha256 ${CRC_GIT_PREFETCH})
+
CRC_GIT_HASH=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 ${CRC_GIT_PREFETCH})
FILE_MAKEFILE=${WORKDIR}/Makefile
curl --silent https://raw.githubusercontent.com/crc-org/crc/${CRC_COMMIT}/Makefile >$FILE_MAKEFILE
+1 -1
pkgs/by-name/db/dbgate/update.sh
···
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; dbgate.src.url" --system "$system" | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; dbgate.src.url" --system "$system" | tr -d '"')))
update-source-version dbgate $latestVersion $hash --system=$system --ignore-same-version
done
+1 -1
pkgs/by-name/de/dependabot-cli/update.sh
···
fi
SHA256="$(nix-prefetch-url --quiet --unpack https://github.com/dependabot/cli/archive/refs/tags/v${VERSION}.tar.gz)"
-
HASH="$(nix hash convert --hash-algo sha256 --to sri "$SHA256")"
+
HASH="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$SHA256")"
nix-prefetch-docker --json --quiet --final-image-name dependabot-update-job-proxy --final-image-tag "nixpkgs-dependabot-cli-$VERSION" ghcr.io/github/dependabot-update-job-proxy/dependabot-update-job-proxy latest > "$temp_dir/dependabot-update-job-proxy.json"
+1 -1
pkgs/by-name/dr/draupnir/update.sh
···
curl https://raw.githubusercontent.com/the-draupnir-project/Draupnir/v$latestVersion/yarn.lock -o yarn.lock
TMP_PREFETCH_HASH=`prefetch-yarn-deps yarn.lock`
-
NEW_YARN_OFFLINE_HASH=`nix hash to-sri --type sha256 $TMP_PREFETCH_HASH`
+
NEW_YARN_OFFLINE_HASH=`nix --extra-experimental-features nix-command hash to-sri --type sha256 $TMP_PREFETCH_HASH`
cd -
echo "New yarn offline hash: $NEW_YARN_OFFLINE_HASH"
+1 -1
pkgs/by-name/du/duplicati/package.nix
···
"aarch64-linux" = "linux-arm64";
};
_platform = _supportedPlatforms."${stdenv.hostPlatform.system}";
-
# nix hash convert --to sri "sha256:`nix-prefetch-url --unpack https://updates.duplicati.com/stable/duplicati-2.1.0.5_stable_2025-03-04-linux-arm64-cli.zip`"
+
# nix --extra-experimental-features nix-command hash convert --to sri "sha256:`nix-prefetch-url --unpack https://updates.duplicati.com/stable/duplicati-2.1.0.5_stable_2025-03-04-linux-arm64-cli.zip`"
_fileHashForSystem = {
"armv7l-linux" = "sha256-FQQ07M0rwvxNkHPW6iK5WBTKgFrZ4LOP4vgINfmtq4k=";
"x86_64-linux" = "sha256-1QspF/A3hOtqd8bVbSqClJIHUN9gBrd18J5qvZJLkQE=";
+1 -1
pkgs/by-name/dy/dynamodb-local/package.nix
···
fi
DOWNLOAD_URL="https://d1ni2b6xgvw0s0.cloudfront.net/v2.x/dynamodb_local_$NEW_VERSION_DATE.tar.gz"
-
NIX_HASH=$(nix hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
+
NIX_HASH=$(nix --extra-experimental-features nix-command hash to-sri sha256:$(nix-prefetch-url $DOWNLOAD_URL))
update-source-version "dynamodb-local" "$NEW_VERSION" "$NIX_HASH" "$DOWNLOAD_URL"
'';
+1 -1
pkgs/by-name/el/electrs/update.sh
···
git -C $repo verify-tag v${version}
rm -rf $repo/.git
-
hash=$(nix hash path $repo)
+
hash=$(nix --extra-experimental-features nix-command hash path $repo)
(cd "$nixpkgs" && update-source-version electrs "$version" "$hash" && update-source-version electrs --ignore-same-version --source-key=cargoDeps)
echo
+1 -1
pkgs/by-name/en/envoy-bin/update.sh
···
VER="$1"
ARCH="$2"
URL="https://github.com/envoyproxy/envoy/releases/download/v${VER}/envoy-${VER}-linux-${ARCH}"
-
nix hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --type sha256 "$URL")"
+
nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --type sha256 "$URL")"
}
replace_hash() {
+1 -1
pkgs/by-name/fe/feishu/package.nix
···
update_link=$(echo $package_info | jq -r '.data.download_link' | sed 's/lf[0-9]*-ug-sign.feishucdn.com/sf3-cn.feishucdn.com\/obj/;s/?.*$//')
new_version=$(echo $package_info | jq -r '.data.version_number' | sed -n 's/.*@V//p')
sha256_hash=$(nix-prefetch-url $update_link)
-
sri_hash=$(nix hash to-sri --type sha256 $sha256_hash)
+
sri_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $sha256_hash)
update-source-version feishu $new_version $sri_hash $update_link --system=$platform --ignore-same-version --source-key="sources.$platform"
done
'';
+2 -2
pkgs/by-name/fi/fishnet/update.bash
···
grep --perl-regexp --only-matching 'EvalFileDefaultNameBig "\Knn-(\w+).nnue'
)"
new_nnue_big_hash="$(
-
nix hash to-sri --type sha256 "$(
+
nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/${new_nnue_big_file}"
)"
)"
···
grep --perl-regexp --only-matching 'EvalFileDefaultNameSmall "\Knn-(\w+).nnue'
)"
new_nnue_small_hash="$(
-
nix hash to-sri --type sha256 "$(
+
nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/${new_nnue_small_file}"
)"
)"
+3 -3
pkgs/by-name/fl/fluxcd/update.sh
···
if [ ! "$OLD_VERSION" = "$LATEST_VERSION" ]; then
SRC_SHA256=$(nix-prefetch-url --quiet --unpack "https://github.com/fluxcd/flux2/archive/refs/tags/${LATEST_TAG}.tar.gz")
-
SRC_HASH=$(nix hash convert --hash-algo sha256 --to sri "$SRC_SHA256")
+
SRC_HASH=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$SRC_SHA256")
MANIFESTS_SHA256=$(nix-prefetch-url --quiet --unpack "https://github.com/fluxcd/flux2/releases/download/${LATEST_TAG}/manifests.tar.gz")
-
MANIFESTS_HASH=$(nix hash convert --hash-algo sha256 --to sri "$MANIFESTS_SHA256")
+
MANIFESTS_HASH=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$MANIFESTS_SHA256")
setKV () {
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" "${FLUXCD_PATH}/package.nix"
···
set +e
VENDOR_SHA256=$(nix-build --no-out-link -A fluxcd "$NIXPKGS_PATH" 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')
-
VENDOR_HASH=$(nix hash convert --hash-algo sha256 --to sri "$VENDOR_SHA256")
+
VENDOR_HASH=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$VENDOR_SHA256")
set -e
if [ -n "${VENDOR_HASH:-}" ]; then
+2 -2
pkgs/by-name/ga/gauge/plugins/make-gauge-plugin.nix
···
echo "Fetching hash for $system"
hash=$(nix-prefetch-url --type sha256 $url --unpack)
-
sriHash="$(nix hash to-sri --type sha256 $hash)"
+
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
yq -iPoj ". + { \"$system\": { \"url\": \"$url\", \"hash\": \"$sriHash\" } }" "$tempfile"
}
···
echo "Fetching hash"
hash=$(nix-prefetch-url --type sha256 $url --unpack)
-
sriHash="$(nix hash to-sri --type sha256 $hash)"
+
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
yq -iPoj ". + { \"url\": \"$url\", \"hash\": \"$sriHash\" }" "$tempfile"
}
+3 -3
pkgs/by-name/go/google-chrome/update.sh
···
local download_url="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${version}-1_amd64.deb"
new_hash="$(nix-prefetch-url "$download_url" 2>/dev/null)"
-
new_sri_hash="$(nix hash to-sri --type sha256 "$new_hash")"
+
new_sri_hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$new_hash")"
sed -i "/^ linux = stdenvNoCC.mkDerivation/,/^ });/s/version = \".*\"/version = \"$version\"/" "$DEFAULT_NIX"
sed -i "/^ linux = stdenvNoCC.mkDerivation/,/^ });/s|hash = \".*\"|hash = \"$new_sri_hash\"|" "$DEFAULT_NIX"
···
manifest_version="$(echo "$response" | xmllint --xpath "string(//manifest/@version)" -)"
local download_url="$url$pkg"
-
new_hash="$(nix hash to-sri --type sha256 "$(nix-prefetch-url "$download_url" 2>/dev/null)")"
-
new_sri_hash="$(nix hash to-sri --type sha256 "$new_hash")"
+
new_hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(nix-prefetch-url "$download_url" 2>/dev/null)")"
+
new_sri_hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$new_hash")"
sed -i "/^ darwin = stdenvNoCC.mkDerivation/,/^ });/s/version = \".*\"/version = \"$manifest_version\"/" "$DEFAULT_NIX"
sed -i "/^ darwin = stdenvNoCC.mkDerivation/,/^ });/s|hash = \".*\"|hash = \"$new_sri_hash\"|" "$DEFAULT_NIX"
+1 -1
pkgs/by-name/ha/hamrs-pro/update.sh
···
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; hamrs-pro.src.url" --system "$system" | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; hamrs-pro.src.url" --system "$system" | tr -d '"')))
update-source-version hamrs-pro $latestVersion $hash --system=$system --ignore-same-version
done
+1 -1
pkgs/by-name/he/hey-mail/package.nix
···
if [[ "x$UPDATE_NIX_OLD_VERSION" != "x$version" ]]; then
revision=$(jq -r .revision <<<"$data")
-
hash=$(nix hash to-sri "sha512:$(jq -r .download_sha512 <<<"$data")")
+
hash=$(nix --extra-experimental-features nix-command hash to-sri "sha512:$(jq -r .download_sha512 <<<"$data")")
update-source-version "$UPDATE_NIX_ATTR_PATH" "$version" "$hash"
update-source-version --ignore-same-hash --version-key=rev "$UPDATE_NIX_ATTR_PATH" "$revision" "$hash"
+1 -1
pkgs/by-name/ho/hoppscotch/update.sh
···
x86_64-linux \
x86_64-darwin \
aarch64-darwin; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import $BASEDIR {}; hoppscotch.src.url" --system "$system" | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import $BASEDIR {}; hoppscotch.src.url" --system "$system" | tr -d '"')))
(cd $BASEDIR && update-source-version hoppscotch $latestVersion $hash --system=$system --ignore-same-version)
done
+1 -1
pkgs/by-name/i-/i-dot-ming/package.nix
···
curl -Lo $tmp/I.Ming.ttf https://raw.githubusercontent.com/ichitenfont/I.Ming/$version/$version/I.Ming-$version.ttf
install -DT -m444 $tmp/I.Ming.ttf $tmp/share/fonts/truetype/I.Ming/I.Ming.ttf
rm $tmp/I.Ming.ttf
-
hash=$(nix hash path --type sha256 --base32 --sri $tmp)
+
hash=$(nix --extra-experimental-features nix-command hash path --type sha256 --base32 --sri $tmp)
sed -i -E \
-e "s/version = \"[0-9.]+\"/version = \"$version\"/" \
-e "s|hash = \".*\"|hash = \"$hash\"|" \
+1 -1
pkgs/by-name/ib/ibm-plex/update.sh
···
for family in "${families[@]}"; do
url="https://github.com/IBM/plex/releases/download/%40ibm%2Fplex-${family}%40${version}/ibm-plex-${family}.zip"
-
printf ' "%s" = "%s";\n' "$family" "$(nix-prefetch-url --unpack "$url" | xargs nix hash convert --hash-algo sha256)" >>"$dirname/hashes.nix"
+
printf ' "%s" = "%s";\n' "$family" "$(nix-prefetch-url --unpack "$url" | xargs nix --extra-experimental-features nix-command hash convert --hash-algo sha256)" >>"$dirname/hashes.nix"
done
printf '}\n' >> "$dirname/hashes.nix"
+1 -1
pkgs/by-name/je/jenkins/package.nix
···
version="$(jq -r .version <<<$core_json)"
sha256="$(jq -r .sha256 <<<$core_json)"
-
hash="$(nix hash to-sri --type sha256 "$sha256")"
+
hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256")"
if [ ! "$oldVersion" = "$version" ]; then
update-source-version jenkins "$version" "$hash"
+1 -1
pkgs/by-name/je/jetbrains-toolbox/update.sh
···
unpack=""
fi
prefetch=$(nix-prefetch-url $unpack "$url")
-
hash=$(nix hash convert --hash-algo sha256 --to sri $prefetch)
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $prefetch)
update-source-version jetbrains-toolbox $latestVersion $hash --system=$system --ignore-same-version
done
+1 -1
pkgs/by-name/ke/keyguard/update.sh
···
exit 0
fi
-
hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/AChep/keyguard-app/archive/refs/tags/${latestTag}.tar.gz"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/AChep/keyguard-app/archive/refs/tags/${latestTag}.tar.gz"))
update-source-version keyguard $latestVersion $hash
sed -i 's/tag = "r[0-9]\+\(\.[0-9]\+\)\?";/tag = "'"$latestTag"'";/g' "$ROOT/package.nix"
+1 -1
pkgs/by-name/li/librewolf-bin-unwrapped/update.sh
···
"x86_64-linux linux-x86_64" \
"aarch64-linux linux-arm64"; do
set -- $i
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(curl ${GITLAB_TOKEN:+-H "Private-Token: $GITLAB_TOKEN"} -sL https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/$latestVersion/librewolf-$latestVersion-$2-package.tar.xz.sha256sum))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(curl ${GITLAB_TOKEN:+-H "Private-Token: $GITLAB_TOKEN"} -sL https://gitlab.com/api/v4/projects/44042130/packages/generic/librewolf/$latestVersion/librewolf-$latestVersion-$2-package.tar.xz.sha256sum))
update-source-version librewolf-bin-unwrapped $latestVersion $hash --system=$1 --ignore-same-version
done
+1 -1
pkgs/by-name/lm/lmstudio/update.sh
···
arch="${1}"
url=$(echo "${packages}" | grep "${2}")
version="$(echo "${url}" | cut -d/ -f6)"
-
hash=$(nix hash convert --hash-algo sha256 "$(nix-prefetch-url "${url}")")
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 "$(nix-prefetch-url "${url}")")
update-source-version lmstudio "${version}" "${hash}" --system="${arch}" --version-key="version_${arch}" \
2> >(tee /dev/stderr) | grep -q "nothing to do" && exit
+2 -2
pkgs/by-name/lo/localsend/update.sh
···
sed -i "s/version = \".*\"/version = \"${latestVersion}\"/" "$ROOT/package.nix"
DARWIN_x64_URL="https://github.com/localsend/localsend/releases/download/v${latestVersion}/LocalSend-${latestVersion}.dmg"
-
DARWIN_X64_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url ${DARWIN_x64_URL}))
+
DARWIN_X64_SHA=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url ${DARWIN_x64_URL}))
sed -i "/darwin/,/hash/{s|hash = \".*\"|hash = \"${DARWIN_X64_SHA}\"|}" "$ROOT/package.nix"
GIT_SRC_URL="https://github.com/localsend/localsend/archive/refs/tags/v${latestVersion}.tar.gz"
-
GIT_SRC_SHA=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack ${GIT_SRC_URL}))
+
GIT_SRC_SHA=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --unpack ${GIT_SRC_URL}))
sed -i "/linux/,/hash/{s|hash = \".*\"|hash = \"${GIT_SRC_SHA}\"|}" "$ROOT/package.nix"
curl https://raw.githubusercontent.com/localsend/localsend/v${latestVersion}/app/pubspec.lock | yq . > $ROOT/pubspec.lock.json
+1 -1
pkgs/by-name/mi/mihomo-party/update.sh
···
"aarch64-linux arm64"; do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/mihomo-party-org/mihomo-party/releases/download/v$latestVersion/mihomo-party-linux-$latestVersion-$2.deb")
-
hash=$(nix hash convert --hash-algo sha256 --to sri $prefetch)
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $prefetch)
update-source-version mihomo-party $latestVersion $hash --system=$1 --ignore-same-version
done
+1 -1
pkgs/by-name/mu/mullvad-browser/update.nix
···
for platform in ${lib.escapeShellArgs meta.platforms}; do
arch="''${platforms[$platform]}"
sha256=$(grep "${name}-$arch-$version.tar.xz" "$HOME/shasums" | head -1 | cut -d" " -f1)
-
hash=$(nix hash to-sri --type sha256 "$sha256")
+
hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256")
update-source-version "${pname}" "$version" "$hash" --ignore-same-version --source-key="sources.$platform"
done
+1 -1
pkgs/by-name/nb/nbxplorer/util/update-common.sh
···
echo "Verifying commit"
git -C $repo verify-commit HEAD
rm -rf $repo/.git
-
newHash=$(nix hash-path $repo)
+
newHash=$(nix --extra-experimental-features nix-command hash path $repo)
rm -rf $tmpdir
echo
+1 -1
pkgs/by-name/om/ombi/update.sh
···
url="https://github.com/Ombi-app/Ombi/releases/download/v$version/$os-$arch.tar.gz"
hash=$(nix-prefetch-url --type sha256 $url)
-
sriHash="$(nix hash to-sri --type sha256 $hash)"
+
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
sed -i "s|$hashKey = \"[a-zA-Z0-9\/+-=]*\";|$hashKey = \"$sriHash\";|g" "$dirname/default.nix"
}
+2 -2
pkgs/by-name/pd/pdfium-binaries/update.sh
···
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack $(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries.src.url" --system "$system" | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack $(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries.src.url" --system "$system" | tr -d '"')))
update-source-version pdfium-binaries $latestVersion $hash --system=$system --ignore-same-version
done
···
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack $(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries-v8.src.url" --system "$system" | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url --unpack $(nix-instantiate --eval -E "with import ./. {}; pdfium-binaries-v8.src.url" --system "$system" | tr -d '"')))
update-source-version pdfium-binaries-v8 $latestVersion $hash --system=$system --ignore-same-version
done
+1 -1
pkgs/by-name/pe/perses/update.sh
···
echo " url = \"${url}\";"
hash="$(nix-prefetch-url "${url}" --name "${UPDATE_NIX_PNAME}-${name,,}-${version}.tar.gz")"
-
hash="$(nix hash convert --hash-algo sha256 "${hash}")"
+
hash="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 "${hash}")"
echo " hash = \"${hash}\";"
+1 -1
pkgs/by-name/ph/phoenixd/update.sh
···
aarch64-linux \
x86_64-darwin \
aarch64-darwin; do
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; phoenixd.src.url" --system "$system" | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; phoenixd.src.url" --system "$system" | tr -d '"')))
update-source-version phoenixd $latestVersion $hash --system=$system --ignore-same-version
done
+1 -1
pkgs/by-name/pi/pilipalax/update.sh
···
sed -i "s/\(tag = \"\${version}+\)[0-9]\+/\1${RunNumber}/" "$ROOT/package.nix"
-
hash=$(nix hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/orz12/PiliPalaX/archive/refs/tags/${latestTag}.tar.gz"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $(nix-prefetch-url --unpack "https://github.com/orz12/PiliPalaX/archive/refs/tags/${latestTag}.tar.gz"))
update-source-version pilipalax $latestVersion $hash
curl https://raw.githubusercontent.com/orz12/PiliPalaX/${latestTag}/pubspec.lock | yq . >$ROOT/pubspec.lock.json
+3 -3
pkgs/by-name/pl/platformsh/update.sh
···
linux_arm64_url=https://github.com/platformsh/cli/releases/download/$version/platform_${version}_linux_arm64.tar.gz
linux_amd64_url=https://github.com/platformsh/cli/releases/download/$version/platform_${version}_linux_amd64.tar.gz
darwin_all_url=https://github.com/platformsh/cli/releases/download/$version/platform_${version}_darwin_all.tar.gz
-
linux_arm64_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_arm64_url"))
-
linux_amd64_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_amd64_url"))
-
darwin_all_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$darwin_all_url"))
+
linux_arm64_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_arm64_url"))
+
linux_amd64_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_amd64_url"))
+
darwin_all_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$darwin_all_url"))
jq -n \
--arg version "$version" \
--arg darwin_all_hash "$darwin_all_hash" \
+1 -1
pkgs/by-name/pr/protoc-gen-grpc-java/update.sh
···
echo '{' >"${HASHES_FILE}"
for arch in "${ARCHS[@]}"; do
url="https://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/${version}/protoc-gen-grpc-java-${version}-${arch}.exe"
-
hash=$(nix hash convert --hash-algo sha256 --to sri "$(nix-prefetch-url "${url}")")
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$(nix-prefetch-url "${url}")")
echo " ${arch} = \"${hash}\";" >>"${HASHES_FILE}"
done
echo '}' >>"${HASHES_FILE}"
+3 -3
pkgs/by-name/qq/qq/update.sh
···
darwin_hash=$(nix-prefetch-url $darwin_url)
# use friendlier hashes
-
darwin_hash=$(nix hash convert --to sri --hash-algo sha256 "$darwin_hash")
+
darwin_hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$darwin_hash")
# linux
···
linux_x86_64_hash=$(nix-prefetch-url $linux_x86_64_url)
# use friendlier hashes
-
linux_aarch64_hash=$(nix hash convert --to sri --hash-algo sha256 "$linux_aarch64_hash")
-
linux_x86_64_hash=$(nix hash convert --to sri --hash-algo sha256 "$linux_x86_64_hash")
+
linux_aarch64_hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$linux_aarch64_hash")
+
linux_x86_64_hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$linux_x86_64_hash")
cat >sources.nix <<EOF
# Generated by ./update.sh - do not update manually!
+1 -1
pkgs/by-name/re/readarr/update.sh
···
url="https://github.com/Readarr/Readarr/releases/download/v$version/Readarr.develop.$version.$os-core-$arch.tar.gz"
hash=$(nix-prefetch-url --type sha256 $url)
-
sriHash="$(nix hash to-sri --type sha256 $hash)"
+
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
sed -i "s|$hashKey = \"[a-zA-Z0-9\/+-=]*\";|$hashKey = \"$sriHash\";|g" "$dirname/package.nix"
}
+1 -1
pkgs/by-name/rn/rnnoise/package.nix
···
#!nix-shell -i bash -p curl jq common-updater-scripts nix nix-prefetch findutils moreutils
prefetch-sri() {
-
nix-prefetch-url "$1" | xargs nix hash to-sri --type sha256
+
nix-prefetch-url "$1" | xargs nix --extra-experimental-features nix-command hash to-sri --type sha256
}
res="$(curl ''${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \
+1 -1
pkgs/by-name/ru/rundeck/package.nix
···
if [[ "x$UPDATE_NIX_OLD_VERSION" != "x$full_version" ]]; then
download_url="https://packagecloud.io/pagerduty/rundeck/packages/java/org.rundeck/rundeck-$full_version.war/artifacts/rundeck-$full_version.war/download?distro_version_id=167"
-
hash=$(curl -L "$download_url" | nix-hash --flat --type sha256 --base32 - | nix hash to-sri --type sha256)
+
hash=$(curl -L "$download_url" | nix-hash --flat --type sha256 --base32 - | nix --extra-experimental-features nix-command hash to-sri --type sha256)
update-source-version "$UPDATE_NIX_ATTR_PATH" "$full_version" "$hash"
fi
'';
+1 -1
pkgs/by-name/si/signal-desktop-bin/update.sh
···
latestVersionAarch64=$(jq -r '.source_package.version' <<< $latestBuildInfoAarch64)
latestPrettyVersionAarch64="${latestVersionAarch64%-*}"
-
darwinHash="$(nix hash convert --hash-algo sha256 --to sri "$(nix-prefetch-url "https://updates.signal.org/desktop/signal-desktop-mac-universal-${latestVersion}.dmg")")"
+
darwinHash="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$(nix-prefetch-url "https://updates.signal.org/desktop/signal-desktop-mac-universal-${latestVersion}.dmg")")"
echo "Updating signal-desktop for x86_64-linux"
update-source-version signal-desktop-bin "$latestVersion" \
+1 -1
pkgs/by-name/sp/sparkle/update.sh
···
fi
nix-update sparkle --version $latestVersion --system x86_64-linux
-
hash=$(nix hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; sparkle.src.url" --system aarch64-linux | tr -d '"')))
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $(nix-prefetch-url $(nix-instantiate --eval -E "with import ./. {}; sparkle.src.url" --system aarch64-linux | tr -d '"')))
update-source-version sparkle $latestVersion $hash --system=aarch64-linux --ignore-same-version
+1 -1
pkgs/by-name/st/standardnotes/update.nix
···
upstreamPlatform="$2"
url=$(getDownloadUrl "$upstreamPlatform")
hash=$(nix-prefetch-url "$url" --type sha512)
-
sriHash=$(nix hash to-sri --type sha512 $hash)
+
sriHash=$(nix --extra-experimental-features nix-command hash to-sri --type sha512 $hash)
setJsonKey .deb[\""$nixPlatform"\"].url "$url"
setJsonKey .deb[\""$nixPlatform"\"].hash "$sriHash"
}
+2 -2
pkgs/by-name/st/stockfish/update.bash
···
new_nnue_big_file="$(grep --perl-regexp --only-matching 'EvalFileDefaultNameBig "\Knn-(\w+).nnue' "$new_src/src/evaluate.h")"
new_nnue_small_file="$(grep --perl-regexp --only-matching 'EvalFileDefaultNameSmall "\Knn-(\w+).nnue' "$new_src/src/evaluate.h")"
new_nnue_big_hash="$(
-
nix hash convert --hash-algo sha256 "$(
+
nix --extra-experimental-features nix-command hash convert --hash-algo sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/$new_nnue_big_file"
)"
)"
new_nnue_small_hash="$(
-
nix hash convert --hash-algo sha256 "$(
+
nix --extra-experimental-features nix-command hash convert --hash-algo sha256 "$(
nix-prefetch-url --type sha256 "https://tests.stockfishchess.org/api/nn/$new_nnue_small_file"
)"
)"
+1 -1
pkgs/by-name/su/sudachidict/update.sh
···
URL="https://github.com/$ORG/$REPO/releases/download/v$VERSION/sudachi-dictionary-$VERSION-$TYPE.zip"
PLAIN_HASH=$(nix-prefetch-url --type sha256 "$URL" --unpack)
-
HASH=$(nix hash convert --hash-algo sha256 --to sri "$PLAIN_HASH")
+
HASH=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$PLAIN_HASH")
sed -i -E "/(${TYPE} = fetchzip \{|^ *url = .*${TYPE}\.zip\";\$)/,/^ *hash = / s|hash = \"[^\"]*\"|hash = \"$HASH\"|" package.nix
done
+1 -1
pkgs/by-name/ta/tailwindcss_3/update.sh
···
echo "Updating tailwindcss_3 for $NIXPLAT"
URL="https://github.com/tailwindlabs/tailwindcss/releases/download/v${LATEST_VERSION}/tailwindcss-${TAILWINDPLAT}"
-
HASH=$(nix hash to-sri --type sha256 "$(nix-prefetch-url --type sha256 "$URL")")
+
HASH=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(nix-prefetch-url --type sha256 "$URL")")
sed -i "s,$NIXPLAT = \"sha256.*\",$NIXPLAT = \"${HASH}\"," "$ROOT/package.nix"
}
+1 -1
pkgs/by-name/ta/tandoor-recipes/update.sh
···
popd
# Use friendlier hashes
-
yarn_hash=$(nix hash to-sri --type sha256 "$yarn_hash")
+
yarn_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$yarn_hash")
common="./pkgs/applications/misc/tandoor-recipes/common.nix"
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" $common
+1 -1
pkgs/by-name/te/termius/package.nix
···
if [[ "x$UPDATE_NIX_OLD_VERSION" != "x$version" ]]; then
revision=$(jq -r .revision <<<"$data")
-
hash=$(nix hash to-sri "sha512:$(jq -r .download_sha512 <<<"$data")")
+
hash=$(nix --extra-experimental-features nix-command hash to-sri "sha512:$(jq -r .download_sha512 <<<"$data")")
update-source-version "$UPDATE_NIX_ATTR_PATH" "$version" "$hash"
update-source-version --ignore-same-hash --version-key=revision "$UPDATE_NIX_ATTR_PATH" "$revision" "$hash"
+1 -1
pkgs/by-name/th/the-unarchiver/update/update.mjs
···
process.exit(1);
}
const hash = child_process
-
.execSync(`nix hash convert --hash-algo sha256 --to sri ${prefetchHash}`)
+
.execSync(`nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri ${prefetchHash}`)
.toString()
.trim();
/** @type {Info} */
+1 -1
pkgs/by-name/to/tor-browser/update.nix
···
for platform in ${lib.escapeShellArgs meta.platforms}; do
arch="''${platforms[$platform]}"
sha256=$(grep "${name}-$arch-$version.tar.xz" "$HOME/shasums" | head -1 | cut -d" " -f1)
-
hash=$(nix hash to-sri --type sha256 "$sha256")
+
hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256")
update-source-version "${pname}" "$version" "$hash" --ignore-same-version --source-key="sources.$platform"
done
+1 -1
pkgs/by-name/tr/tradingview/update.sh
···
# "revision" is the actual version identifier; "version" is for human consumption.
revision="${snap_info[0]}"
sha512="${snap_info[1]}"
-
sri=$(nix hash to-sri --type "sha512" $sha512)
+
sri=$(nix --extra-experimental-features nix-command hash to-sri --type "sha512" $sha512)
upstream_version="${snap_info[2]}"
last_updated="${snap_info[3]}"
+1 -1
pkgs/by-name/ty/typesense/update.sh
···
arch="${platforms[$platform]}"
url="https://dl.typesense.org/releases/${version}/typesense-server-${version}-${arch}.tar.gz"
sha256hash="$(nix-prefetch-url --type sha256 "$url")"
-
hash="$(nix hash to-sri --type sha256 "$sha256hash")"
+
hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256hash")"
echo "$(jq --arg arch "$arch" \
--arg platform "$platform" \
--arg hash "$hash" \
+3 -3
pkgs/by-name/up/upsun/update.sh
···
linux_arm64_url=https://github.com/platformsh/cli/releases/download/$version/upsun_${version}_linux_arm64.tar.gz
linux_amd64_url=https://github.com/platformsh/cli/releases/download/$version/upsun_${version}_linux_amd64.tar.gz
darwin_all_url=https://github.com/platformsh/cli/releases/download/$version/upsun_${version}_darwin_all.tar.gz
-
linux_arm64_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_arm64_url"))
-
linux_amd64_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_amd64_url"))
-
darwin_all_hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$darwin_all_url"))
+
linux_arm64_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_arm64_url"))
+
linux_amd64_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$linux_amd64_url"))
+
darwin_all_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$darwin_all_url"))
jq -n \
--arg version "$version" \
--arg darwin_all_hash "$darwin_all_hash" \
+1 -1
pkgs/by-name/va/vault-bin/update-bin.sh
···
local arch=$2
url="https://releases.hashicorp.com/vault/${version}/vault_${version}_${arch}.zip"
zip_hash=$(nix-prefetch-url --unpack $url)
-
nix hash to-sri --type sha256 "$zip_hash"
+
nix --extra-experimental-features nix-command hash to-sri --type sha256 "$zip_hash"
}
replace_sha() {
+1 -1
pkgs/by-name/vi/vivaldi/update-vivaldi.sh
···
update_hash() {
url="https://downloads.vivaldi.com/stable/vivaldi-stable_$version-1_$2.deb"
-
hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$url"))
+
hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "$url"))
update-source-version vivaldi "$version" "$hash" --system=$1 --ignore-same-version
}
+2 -2
pkgs/by-name/wa/waveterm/update.sh
···
"aarch64-linux arm64"; do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/wavetermdev/waveterm/releases/download/v$latestVersion/waveterm-linux-$2-$latestVersion.deb")
-
hash=$(nix hash convert --hash-algo sha256 --to sri $prefetch)
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $prefetch)
update-source-version waveterm $latestVersion $hash --system=$1 --ignore-same-version
done
···
"aarch64-darwin arm64"; do
set -- $i
prefetch=$(nix-prefetch-url "https://github.com/wavetermdev/waveterm/releases/download/v$latestVersion/Wave-darwin-$2-$latestVersion.zip")
-
hash=$(nix hash convert --hash-algo sha256 --to sri $prefetch)
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $prefetch)
update-source-version waveterm $latestVersion $hash --system=$1 --ignore-same-version
done
+1 -1
pkgs/by-name/we/wechat-uos/update.sh
···
}
')
url+=("https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_"$version"_"$i".deb")
-
hash+=("$(nix hash to-sri --type sha256 $sha256sum)")
+
hash+=("$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $sha256sum)")
done
cat >sources.nix <<EOF
+1 -1
pkgs/by-name/wh/whisparr/update.sh
···
echo "Updating the hash for the \`${system}\` system..."
url="https://whisparr.servarr.com/v1/update/nightly/updatefile?runtime=netcore&version=${version}&arch=${arch}&os=${os}"
hash=$(nix-prefetch-url --type sha256 --name "whisparr-$system-$version.tar.gz" "$url")
-
sriHash="$(nix hash to-sri --type sha256 "$hash")"
+
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$hash")"
sed -i "s#$hashKey = \"[a-zA-Z0-9\/+-=]*\"#$hashKey = \"$sriHash\"#" "$dirname/package.nix"
}
+1 -1
pkgs/by-name/xu/xunlei-uos/update.sh
···
}
')
url+=("https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.xunlei.download/com.xunlei.download_"$version"_"$i".deb")
-
hash+=("$(nix hash convert --to sri --hash-algo sha256 $sha256sum)")
+
hash+=("$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 $sha256sum)")
done
cat >sources.nix <<EOF
+2 -2
pkgs/by-name/ya/yazi/plugins/update.py
···
new_hash = run_command(f"nix-prefetch-url --unpack --type sha256 {prefetch_url} 2>/dev/null")
if not new_hash.startswith("sha256-"):
-
new_hash = run_command(f"nix hash to-sri --type sha256 {new_hash} 2>/dev/null")
+
new_hash = run_command(f"nix --extra-experimental-features nix-command hash to-sri --type sha256 {new_hash} 2>/dev/null")
if not new_hash.startswith("sha256-"):
print("Warning: Failed to get SRI hash directly, trying alternative method...")
raw_hash = run_command(f"nix-prefetch-url --type sha256 {prefetch_url} 2>/dev/null")
-
new_hash = run_command(f"nix hash to-sri --type sha256 {raw_hash} 2>/dev/null")
+
new_hash = run_command(f"nix --extra-experimental-features nix-command hash to-sri --type sha256 {raw_hash} 2>/dev/null")
except Exception as e:
raise RuntimeError(f"Error calculating hash: {e}")
+3 -3
pkgs/by-name/zo/zoom-us/update.sh
···
# causes cross compiling headaches; using nix-prefetch-url with
# hard-coded URLs is simpler. Keep these URLs in sync with the ones
# in package.nix where `srcs` is defined.
-
hash_aarch64_darwin=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_aarch64_darwin}/zoomusInstallerFull.pkg?archType=arm64"))
-
hash_x86_64_darwin=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_x86_64_darwin}/zoomusInstallerFull.pkg"))
-
hash_x86_64_linux=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_x86_64_linux}/zoom_x86_64.pkg.tar.xz"))
+
hash_aarch64_darwin=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_aarch64_darwin}/zoomusInstallerFull.pkg?archType=arm64"))
+
hash_x86_64_darwin=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_x86_64_darwin}/zoomusInstallerFull.pkg"))
+
hash_x86_64_linux=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 "https://zoom.us/client/${version_x86_64_linux}/zoom_x86_64.pkg.tar.xz"))
echo >&2 "=== Updating package.nix ..."
# update-source-version expects to be at the root of nixpkgs
+4 -4
pkgs/development/compilers/dotnet/update.sh
···
[[ -z "$url" || -z "$hash" ]] && continue
-
hash=$(nix hash convert --to sri --hash-algo sha512 "$hash")
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha512 "$hash")
echo " $rid = {
url = \"$url\";
···
if hash=$(curl -s --head "$url" -o /dev/null -w '%header{x-ms-meta-sha512}') && [[ -n "$hash" ]]; then
# Undocumented fast path for nuget.org
# https://github.com/NuGet/NuGetGallery/issues/9433#issuecomment-1472286080
-
hash=$(nix hash convert --to sri --hash-algo sha512 "$hash")
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha512 "$hash")
elif {
catalog_url=$(curl -sL --compressed "${nuget_registration_base_url}${pkg,,}/${version,,}.json" | jq -r ".catalogEntry") && [[ -n "$catalog_url" ]] &&
catalog=$(curl -sL "$catalog_url") && [[ -n "$catalog" ]] &&
···
hash=$(jq -er '.packageHash' <<<"$catalog") && [[ -n "$hash" ]]
}; then
# Documented but slower path (requires 2 requests)
-
hash=$(nix hash convert --to sri --hash-algo "${hash_algorithm,,}" "$hash")
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo "${hash_algorithm,,}" "$hash")
elif hash=$(nix-prefetch-url "$url" --type sha512); then
# Fallback to downloading and hashing locally
echo "Failed to fetch hash from nuget for $url, falling back to downloading locally" >&2
-
hash=$(nix hash convert --to sri --hash-algo sha512 "$hash")
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha512 "$hash")
else
echo "Failed to fetch hash for $url" >&2
exit 1
+1 -1
pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix
···
# https://www.oracle.com/java/technologies/javase/graalvm-jdk23-archive-downloads.html
# Then run this script:
# $ rg -No "(https://.+)\"" -r '$1' pkgs/development/compilers/graalvm/graalvm-oracle/hashes.nix | \
-
# parallel -k 'echo {}; nix hash convert --hash-algo sha256 --to sri $(curl -s {}.sha256)'
+
# parallel -k 'echo {}; nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $(curl -s {}.sha256)'
{
"23" = {
"aarch64-linux" = {
+1 -1
pkgs/development/libraries/libcef/update.sh
···
for platform in "${platforms[@]}"; do
read -r system arch <<< "$platform"
url="https://cef-builds.spotifycdn.com/cef_binary_${cef_version}+g${git_revision}+chromium-${chromium_version}_linux${arch}_minimal.tar.bz2"
-
hash=$(nix hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --quiet "$url")")
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$(nix-prefetch-url --quiet "$url")")
update-source-version libcef "$cef_version" "$hash" --system="$system" --ignore-same-version
done
+1 -1
pkgs/development/libraries/science/math/libtorch/prefetch.sh
···
name=$(echo "$url_and_key" | cut -d' ' -f3)
echo "prefetching ${url}..."
-
hash=$(nix hash to-sri --type sha256 $(nix-prefetch-url --unpack "$url" --name "$name"))
+
hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --unpack "$url" --name "$name"))
echo " $key = {" >> $hashfile
echo " name = \"$name\";" >> $hashfile
+1 -1
pkgs/development/python-modules/jaxlib/prefetch.sh
···
url=$(NIX_PATH=.. nix-instantiate --eval -E "$expr" | jq -r)
echo "$url"
sha256=$(nix-prefetch-url "$url")
-
nix hash convert --to sri --hash-algo sha256 "$sha256"
+
nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$sha256"
echo
}
+1 -1
pkgs/development/python-modules/mypy-boto3/update.sh
···
if [ "${version}" != "${old_version}" ]; then
url="https://pypi.io/packages/source/m/${package//-/_}/${package//-/_}-${version}.tar.gz"
hash=$(nix-prefetch-url --type sha256 $url)
-
sri_hash="$(nix hash to-sri --type sha256 $hash)"
+
sri_hash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
awk -i inplace -v pkg="\"$package_short_name\"" -v new_version="$version" -v new_sha256="$sri_hash" '
# Match the line containing the package name
+1 -1
pkgs/development/python-modules/ray/prefetch.sh
···
url=$(NIX_PATH=.. nix-instantiate --eval -E "$expr" | jq -r)
sha256=$(nix-prefetch-url "$url")
-
hash=$(nix hash convert --to sri --hash-algo sha256 "$sha256")
+
hash=$(nix --extra-experimental-features nix-command hash convert --to sri --hash-algo sha256 "$sha256")
echo -e " cp${1} = \"${hash}\";" >>$outfile
echo
+1 -1
pkgs/development/python-modules/torch/bin/prefetch.sh
···
name=$(echo "$url_and_key" | cut -d' ' -f3)
echo "prefetching ${url}..."
-
hash=$(nix hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
echo " $key = {" >>$hashfile
echo " name = \"$name\";" >>$hashfile
+1 -1
pkgs/development/python-modules/torchaudio/prefetch.sh
···
name=$(echo "$url_and_key" | cut -d' ' -f3)
echo "prefetching ${url}..."
-
hash=$(nix hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
echo " $key = {" >>$hashfile
echo " name = \"$name\";" >>$hashfile
+1 -1
pkgs/development/python-modules/torchvision/prefetch.sh
···
name=$(echo "$url_and_key" | cut -d' ' -f3)
echo "prefetching ${url}..."
-
hash=$(nix hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
+
hash=$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 $(nix-prefetch-url "$url" --name "$name"))
echo " $key = {" >>$hashfile
echo " name = \"$name\";" >>$hashfile
+1 -1
pkgs/development/python-modules/types-aiobotocore/update.sh
···
url="https://pypi.io/packages/source/t/${package}/${package//-/_}-${version}.tar.gz"
hash=$(nix-prefetch-url --type sha256 $url)
-
sri_hash="$(nix hash convert --hash-algo sha256 --to sri $hash)"
+
sri_hash="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $hash)"
package_short="${package#types-aiobotocore-}"
awk -i inplace -v pkg="$package" -v pkg_short="$package_short" -v ver="$version" -v hash="$sri_hash" '
+1 -1
pkgs/development/tools/continuous-integration/woodpecker/update.sh
···
# Woodpecker repository
src_hash=$(nix-prefetch-url --type sha256 --unpack "https://github.com/woodpecker-ci/woodpecker/releases/download/v$version/woodpecker-src.tar.gz")
-
src_hash=$(nix hash to-sri --type sha256 "$src_hash")
+
src_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$src_hash")
sed -i -E -e "s#srcHash = \".*\"#srcHash = \"$src_hash\"#" common.nix
+1 -1
pkgs/development/tools/infisical/update.sh
···
for arch in "${ARCHS[@]}"; do
IFS=: read -r arch_name arch_target <<< "$arch"
sha256hash="$(nix-prefetch-url --type sha256 "https://github.com/infisical/infisical/releases/download/${RELEASE_NAME}/infisical_${VERSION}_${arch_target}.tar.gz")"
-
srihash="$(nix hash to-sri --type sha256 "$sha256hash")"
+
srihash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$sha256hash")"
echo ", \"$arch_name\": \"$srihash\"" >> "$HFILE"
done
echo "}" >> "$HFILE"
+1 -1
pkgs/development/tools/rover/update.sh
···
} < <(nix-prefetch-url "$rover_tar_url" --unpack --type sha256 --print-path)
# Convert hash to SRI representation
-
rover_sri_hash=$(nix hash to-sri --type sha256 "$rover_hash")
+
rover_sri_hash=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$rover_hash")
# Update rover version.
sed --in-place \
+1 -1
pkgs/misc/lilypond/update.sh
···
# update hash
PREV=$(nix eval --raw -f default.nix $ATTR.src.outputHash)
-
NEXT=$(nix hash to-sri --type sha256 $(nix-prefetch-url --type sha256 --unpack $(nix eval --raw -f default.nix $ATTR.src.url)))
+
NEXT=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $(nix-prefetch-url --type sha256 --unpack $(nix eval --raw -f default.nix $ATTR.src.url)))
sed -i "s|$PREV|$NEXT|" "$FILE"
+1 -1
pkgs/os-specific/linux/batman-adv/version.nix
···
# To get these, run:
#
# ```
-
# for tool in alfred batctl batman-adv; do nix-prefetch-url https://downloads.open-mesh.org/batman/releases/batman-adv-2025.2/$tool-2025.2.tar.gz --type sha256 | xargs nix hash convert --hash-algo sha256 --to sri; done
+
# for tool in alfred batctl batman-adv; do nix-prefetch-url https://downloads.open-mesh.org/batman/releases/batman-adv-2025.2/$tool-2025.2.tar.gz --type sha256 | xargs nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri; done
# ```
sha256 = {
alfred = "sha256-Q0fR5LB5Svv2sXGoV7mjx9UaKR/FTxbNrZLH99HNtRo=";
+1 -1
pkgs/os-specific/linux/minimal-bootstrap/stage0-posix/bootstrap-sources.nix
···
Run the following command:
```
-
nix hash path $(nix build --print-out-paths -f '<nixpkgs>' make-minimal-bootstrap-sources)
+
nix --extra-experimental-features nix-command hash path $(nix build --print-out-paths -f '<nixpkgs>' make-minimal-bootstrap-sources)
```
# Why do we need this `.nar` archive?
+1 -1
pkgs/servers/etcd/3.5/update.sh
···
if [ ! "$OLD_VERSION" = "$LATEST_VERSION" ]; then
echo "Attempting to update etcd from $OLD_VERSION to $LATEST_VERSION"
ETCD_SRC_HASH=$(nix-prefetch-url --quiet --unpack https://github.com/etcd-io/etcd/archive/refs/tags/${LATEST_TAG}.tar.gz)
-
ETCD_SRC_HASH=$(nix hash to-sri --type sha256 $ETCD_SRC_HASH)
+
ETCD_SRC_HASH=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $ETCD_SRC_HASH)
setKV () {
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" "$ETCD_PATH/default.nix"
+1 -1
pkgs/servers/lidarr/update.sh
···
url="https://github.com/Lidarr/Lidarr/releases/download/v$version/Lidarr.master.$version.$os-core-$arch.tar.gz"
hash=$(nix-prefetch-url --type sha256 $url)
-
sriHash="$(nix hash to-sri --type sha256 $hash)"
+
sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)"
sed -i "s|$hashKey = \"[a-zA-Z0-9\/+-=]*\";|$hashKey = \"$sriHash\";|g" "$dirname/default.nix"
}
+1 -1
pkgs/tools/admin/ibmcloud-cli/update.sh
···
aarch64-darwin; do
tmp=$(mktemp -d)
curl -fsSL -o $tmp/ibmcloud-cli $(nix-instantiate --eval -E "with import ./. {}; ibmcloud-cli.src.url" --system "$system" | tr -d '"')
-
hash=$(nix hash file $tmp/ibmcloud-cli)
+
hash=$(nix --extra-experimental-features nix-command hash file $tmp/ibmcloud-cli)
update-source-version ibmcloud-cli $latestVersion $hash --system=$system --ignore-same-version
rm -rf $tmp
done
+1 -1
pkgs/tools/misc/xvfb-run/update.sh
···
info=$(nix-prefetch-git --quiet --url "https://github.com/archlinux/svntogit-packages" --rev "refs/heads/packages/xorg-server")
rev=$(jq -r '.rev' <<< "$info")
-
sha256=$(nix hash to-sri --type sha256 "$(jq -r '.sha256' <<< "$info")")
+
sha256=$(nix --extra-experimental-features nix-command hash to-sri --type sha256 "$(jq -r '.sha256' <<< "$info")")
dir=$(jq -r '.path' <<< "$info")
newXvfbsha=$(sha256sum "$dir/trunk/xvfb-run")