Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkgs/by-name/ci/cider-2/updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ cd ../../../..

if [[ "${1-default}" != "--deps-only" ]]; then
SHA="$(nix-prefetch-url --quiet --unpack --type sha256 $DEB_URL)"
SRI=$(nix --experimental-features nix-command hash to-sri "sha256:$SHA")
SRI=$(nix-hash --to-sri "sha256:$SHA")
update-source-version cider-2 "$NEW_VERSION" "$SRI"
fi
2 changes: 1 addition & 1 deletion pkgs/by-name/er/erlang-language-platform/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for release in $releases; do
IFS=: read -r name url <<< "$release"
hash_name=$(echo "$name" | sed 's/.tar.gz$//')
hash_prefetched=$(nix-prefetch-url --type sha256 "$url")
hash_sri=$(nix hash to-sri --type sha256 "$hash_prefetched")
hash_sri=$(nix-hash --to-sri --type sha256 "$hash_prefetched")
echo "$hash_name" "$hash_sri"
done |
jq -sR 'rtrimstr("\n") | split("\n") | map(split(" ") | {(.[0]): .[1]}) | add' > hashes.json
2 changes: 1 addition & 1 deletion pkgs/by-name/et/etcd_3_6/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ OLD_VERSION="$(nix-instantiate --eval -E "with import $NIXPKGS_PATH {}; \
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-hash --to-sri --type sha256 $ETCD_SRC_HASH)

setKV () {
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" "$ETCD_PATH/default.nix"
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ki/kiro/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ echo "Updating to version: $max_version"
echo "Calculating hashes..."
for platform in "${!platform_urls[@]}"; do
echo " Calculating hash for $platform..."
platform_hashes["$platform"]=$(nix hash convert --hash-algo sha256 "$(nix-prefetch-url "${platform_urls[$platform]}")")
platform_hashes["$platform"]=$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url "${platform_urls[$platform]}")")
done

# Update package.nix and generate sources.json
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/li/libhsts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd "$(dirname "$0")"

chromium_version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/chromium/chromium/tags" | jq -r 'map(select(.prerelease | not)) | .[1].name')
sha256=$(nix-prefetch-url "https://raw.github.com/chromium/chromium/$chromium_version/net/http/transport_security_state_static.json")
hash=$(nix hash convert --to sri "$sha256")
hash=$(nix-hash --to-sri --type sha256 "$sha256")

sed -e "0,/chromium_version/s/chromium_version = \".*\"/chromium_version = \"$chromium_version\"/" \
-e "0,/hash/s/hash = \".*\"/sha256 = \"$hash\"/" \
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ry/ryubing/updater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cd ../../../..

if [[ "${1-default}" != "--deps-only" ]]; then
SHA="$(nix-prefetch-git https://git.ryujinx.app/ryubing/ryujinx --rev "$NEW_VERSION" --quiet | jq -r '.sha256')"
SRI=$(nix --experimental-features nix-command hash to-sri "sha256:$SHA")
SRI=$(nix-hash --to-sri "sha256:$SHA")
update-source-version ryubing "$NEW_VERSION" "$SRI"
fi

Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/ta/tabnine/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)

function prefetch-sri() {
nix-prefetch-url "$1" 2>/dev/null |
xargs nix --experimental-features nix-command hash to-sri --type sha256
xargs nix-hash --to-sri --type sha256
}

declare -A platforms=(
Expand Down
2 changes: 1 addition & 1 deletion pkgs/development/compilers/dart/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ update-source-version dart $latestVersion --file=$MY_PATH/sources.nix

systems=$(nix eval --json -f . dart.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 . dart.src.url --system "$system")))
hash=$(nix-hash --to-sri --type sha256 $(nix-prefetch-url $(nix eval --raw -f . dart.src.url --system "$system")))
update-source-version dart $latestVersion $hash --file=$MY_PATH/sources.nix --system=$system --ignore-same-version --ignore-same-hash
done
2 changes: 1 addition & 1 deletion pkgs/os-specific/windows/mingw-w64/update.nu
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def main [] {

# Prefetch to get the new hash
let new_hash = nix-prefetch-url --type sha256 $new_url
| nix hash to-sri --type sha256 $in
| nix-hash --to-sri --type sha256 $in

# Set the hash
replace ./pkgs/os-specific/windows/mingw-w64/headers.nix $current_hash $new_hash
Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/windows/msvcSdk/update.nu
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def main [] {

xwin --accept-license --cache-dir $dir --manifest $"($PATH | path join manifest.json)" --arch $arch splat --preserve-ms-arch-notation

let hash = nix hash path ($dir | path join splat)
let hash = nix-hash --sri --type sha256 ($dir | path join splat)

{arch: $arch, hash: $hash}
} | transpose -r -d
Expand Down
Loading