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