Unverified Commit 3f1b89fc authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

nrfutil: 7.11.1 -> 7.13.0 (#343227)

undefined
parents 6d809637 19635fef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
  };

+4 −4
Original line number Diff line number Diff line
{
  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=";
  };
}
+4 −5
Original line number Diff line number Diff line
#!/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

{