diff --git a/pkgs/by-name/nr/nrfutil/package.nix b/pkgs/by-name/nr/nrfutil/package.nix index 9cafd07b5c45c..b72c55b55736b 100644 --- a/pkgs/by-name/nr/nrfutil/package.nix +++ b/pkgs/by-name/nr/nrfutil/package.nix @@ -19,7 +19,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { inherit (source) version; src = fetchurl { - url = "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-${platform.name}-${finalAttrs.version}.tar.gz"; + url = "https://files.nordicsemi.com/artifactory/swtools/external/nrfutil/packages/nrfutil/nrfutil-${platform.name}-${finalAttrs.version}.tar.gz"; inherit (platform) hash; }; diff --git a/pkgs/by-name/nr/nrfutil/source.nix b/pkgs/by-name/nr/nrfutil/source.nix index f768ac96bb885..6d48b72741205 100644 --- a/pkgs/by-name/nr/nrfutil/source.nix +++ b/pkgs/by-name/nr/nrfutil/source.nix @@ -1,15 +1,15 @@ { - version = "7.11.1"; + version = "7.13.0"; x86_64-linux = { name = "x86_64-unknown-linux-gnu"; - hash = "sha256-faF/iA07wWiAuxeqEZciIYlnoWe4LKCtDxD0BwIyeYw="; + hash = "sha256-R3OF/340xEab+0zamfwvejY16fjy/3TrzMvQaBlVxHw="; }; x86_64-darwin = { name = "x86_64-apple-darwin"; - hash = "sha256-EImYXMIvxPgzaGuAOWi4O6mG5S1awdGSX0HQgT1iHaI="; + hash = "sha256-cnZkVkTbQ/+ciITPEx2vxxZchCC54T0JOApB4HKp8e0="; }; aarch64-darwin = { name = "aarch64-apple-darwin"; - hash = "sha256-jgigeJRHH/c761wYGMHhtRHE59ms7obZPxiH5pKeoeQ="; + hash = "sha256-5VxDQ25tW+qTXHwkltpaAm4AnQvA18qGMaflYQzE2pQ="; }; } diff --git a/pkgs/by-name/nr/nrfutil/update.sh b/pkgs/by-name/nr/nrfutil/update.sh index bd3bbadbfde59..a7efb9d49aae8 100755 --- a/pkgs/by-name/nr/nrfutil/update.sh +++ b/pkgs/by-name/nr/nrfutil/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p jq nix nix-prefetch-github xq-xml +#!nix-shell -i bash -p jq nix nix-prefetch-github nixpkgs="$(git rev-parse --show-toplevel || (printf 'Could not find root of nixpkgs repo\nAre we running from within the nixpkgs git repo?\n' >&2; exit 1))" @@ -17,12 +17,11 @@ architectures["x86_64-linux"]="x86_64-unknown-linux-gnu" architectures["x86_64-darwin"]="x86_64-apple-darwin" architectures["aarch64-darwin"]="aarch64-apple-darwin" -binary_list=$(curl "https://developer.nordicsemi.com/.pc-tools/nrfutil/" | xq -q "#files" | grep -o -E 'nrfutil-(x86_64|aarch64)-.*?.gz' | cut -d' ' -f 1) +BASE_URL="https://files.nordicsemi.com/artifactory/swtools/external/nrfutil" for a in ${!architectures[@]}; do - versions["$a"]=$(echo "$binary_list" | grep "${architectures[${a}]}" | sed -r "s/nrfutil-${architectures[${a}]}-(.*?).tar.gz/\\1/" | tail -n 1) - echo "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-${architectures[${a}]}-${versions[${a}]}.tar.gz" - hashes["$a"]=$(narhash "https://developer.nordicsemi.com/.pc-tools/nrfutil/nrfutil-${architectures[${a}]}-${versions[${a}]}.tar.gz") + versions["$a"]=$(curl "$BASE_URL/index/${architectures[${a}]}/index.json" | jq -r '.packages.nrfutil.latest_version') + hashes["$a"]=$(narhash "$BASE_URL/packages/nrfutil/nrfutil-${architectures[${a}]}-${versions[${a}]}.tar.gz") done {