nrfutil: fix stub-ld error and drop darwin support #398197

* nrfutil dep segger-jlink does not have darwin support
* fix stub-ld error via autoPatchelfHook
* added ezrizhu as maintainers

authored by ezrizhu.com and committed by isabelroses.com b49a50cc b73a0040

+23 -22
+23 -12
pkgs/by-name/nr/nrfutil/package.nix
··· 2 2 lib, 3 3 stdenvNoCC, 4 4 fetchurl, 5 - makeWrapper, 5 + zlib, 6 6 libusb1, 7 7 segger-jlink-headless, 8 + gcc, 9 + autoPatchelfHook, 10 + versionCheckHook, 8 11 }: 9 12 10 13 let ··· 23 26 inherit (platform) hash; 24 27 }; 25 28 26 - nativeBuildInputs = [ makeWrapper ]; 29 + nativeBuildInputs = [ 30 + autoPatchelfHook 31 + ]; 32 + 33 + buildInputs = [ 34 + zlib 35 + libusb1 36 + gcc.cc.lib 37 + segger-jlink-headless 38 + ]; 27 39 28 40 dontConfigure = true; 29 41 dontBuild = true; ··· 34 46 mkdir -p $out 35 47 mv data/* $out/ 36 48 37 - wrapProgram $out/bin/nrfutil \ 38 - --prefix LD_LIBRARY_PATH : "${ 39 - lib.makeLibraryPath [ 40 - segger-jlink-headless 41 - libusb1 42 - ] 43 - }" 44 - 45 49 runHook postInstall 46 50 ''; 47 51 52 + doInstallCheck = true; 53 + nativeInstallCheckInputs = [ 54 + versionCheckHook 55 + ]; 48 56 passthru.updateScript = ./update.sh; 49 57 50 58 meta = with lib; { ··· 52 60 homepage = "https://www.nordicsemi.com/Products/Development-tools/nRF-Util"; 53 61 changelog = "https://docs.nordicsemi.com/bundle/nrfutil/page/guides/revision_history.html"; 54 62 license = licenses.unfree; 55 - platforms = attrNames supported; 56 - maintainers = with maintainers; [ h7x4 ]; 63 + platforms = lib.attrNames supported; 64 + maintainers = with maintainers; [ 65 + h7x4 66 + ezrizhu 67 + ]; 57 68 mainProgram = "nrfutil"; 58 69 }; 59 70 })
-8
pkgs/by-name/nr/nrfutil/source.nix
··· 4 4 name = "x86_64-unknown-linux-gnu"; 5 5 hash = "sha256-R3OF/340xEab+0zamfwvejY16fjy/3TrzMvQaBlVxHw="; 6 6 }; 7 - x86_64-darwin = { 8 - name = "x86_64-apple-darwin"; 9 - hash = "sha256-cnZkVkTbQ/+ciITPEx2vxxZchCC54T0JOApB4HKp8e0="; 10 - }; 11 - aarch64-darwin = { 12 - name = "aarch64-apple-darwin"; 13 - hash = "sha256-5VxDQ25tW+qTXHwkltpaAm4AnQvA18qGMaflYQzE2pQ="; 14 - }; 15 7 }
-2
pkgs/by-name/nr/nrfutil/update.sh
··· 14 14 declare -A hashes 15 15 16 16 architectures["x86_64-linux"]="x86_64-unknown-linux-gnu" 17 - architectures["x86_64-darwin"]="x86_64-apple-darwin" 18 - architectures["aarch64-darwin"]="aarch64-apple-darwin" 19 17 20 18 BASE_URL="https://files.nordicsemi.com/artifactory/swtools/external/nrfutil" 21 19