k3s: use nurl instead of nix-prefetch in update script (#356772)

This commit is contained in:
Jörg Thalheim 2024-11-18 23:46:35 +01:00 committed by GitHub
commit 25c60ad287
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnugrep gnused jq yq-go nix-prefetch
#!nix-shell -i bash -p curl gnugrep gnused jq nurl yq-go
set -x -eu -o pipefail
@ -141,7 +141,7 @@ cat >versions.nix <<EOF
EOF
set +e
K3S_VENDOR_HASH=$(nix-prefetch -I nixpkgs=${NIXPKGS_ROOT} "{ sha256 }: (import ${NIXPKGS_ROOT}. {}).k3s_1_${MINOR_VERSION}.goModules.overrideAttrs (_: { vendorHash = sha256; })")
K3S_VENDOR_HASH=$(nurl -e "(import ${NIXPKGS_ROOT}. {}).k3s_1_${MINOR_VERSION}.goModules")
set -e
if [ -n "${K3S_VENDOR_HASH:-}" ]; then