Skip to content

Commit

Permalink
k3s: use nurl instead of nix-prefetch in update script
Browse files Browse the repository at this point in the history
The changes introduced with #354367
lead currently to an evaluation error when prefetching vendored go
dependencies with `nix-prefetch`. Although this is probably a bug in
`nix-prefetch`, I prefer to use `nurl` instead as it does the same
thing, seems better maintained and doesn't block k3s updates even longer.
  • Loading branch information
rorosen committed Nov 18, 2024
1 parent 799661e commit e2048ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/networking/cluster/k3s/update-script.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e2048ac

Please sign in to comment.