From b4b622dacb618a7ff2cbf4b9a3ba986b7071fcf4 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Thu, 16 Jan 2025 10:27:44 +0100 Subject: [PATCH] rke2: use nurl instead of nix-prefetch in update script There was an eval error when prefetching go dependencies with `nix-prefetch`. Since nix-prefetch hasn't got an update in a long time, I replaced it with `nurl`. --- pkgs/applications/networking/cluster/rke2/update-script.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/rke2/update-script.sh b/pkgs/applications/networking/cluster/rke2/update-script.sh index 32be34c591a6..14965a066140 100755 --- a/pkgs/applications/networking/cluster/rke2/update-script.sh +++ b/pkgs/applications/networking/cluster/rke2/update-script.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p curl git gnugrep gnused yq-go nix-prefetch go +#!nix-shell -i bash -p curl git gnugrep gnused yq-go nurl go SHELL_FLAGS=$(set +o) set -x -eu -o pipefail @@ -54,8 +54,7 @@ cat << EOF > "${WORKDIR}/${CHANNEL_NAME}/versions.nix" EOF set +e -RKE2_VENDOR_HASH=$(nix-prefetch -I nixpkgs=$(git rev-parse --show-toplevel) \ - "{ sha256 }: rke2_${CHANNEL_NAME}.goModules.overrideAttrs (_: { vendorHash = sha256; })") +RKE2_VENDOR_HASH=$(nurl -e "(import $(git rev-parse --show-toplevel) {}).rke2_${CHANNEL_NAME}.goModules") set -e if [ -n "${RKE2_VENDOR_HASH:-}" ]; then