Skip to content

Commit

Permalink
nrfutil: 7.11.1 -> 7.13.0 (NixOS#343227)
Browse files Browse the repository at this point in the history
undefined
  • Loading branch information
pbsds authored Sep 20, 2024
2 parents 6d80963 + 19635fe commit 3f1b89f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion pkgs/by-name/nr/nrfutil/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

Expand Down
8 changes: 4 additions & 4 deletions pkgs/by-name/nr/nrfutil/source.nix
Original file line number Diff line number Diff line change
@@ -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=";
};
}
9 changes: 4 additions & 5 deletions pkgs/by-name/nr/nrfutil/update.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 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))"

Expand All @@ -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

{
Expand Down

0 comments on commit 3f1b89f

Please sign in to comment.