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
This commit is contained in:
@@ -2,9 +2,12 @@
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
makeWrapper,
|
||||
zlib,
|
||||
libusb1,
|
||||
segger-jlink-headless,
|
||||
gcc,
|
||||
autoPatchelfHook,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -23,7 +26,16 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
inherit (platform) hash;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
libusb1
|
||||
gcc.cc.lib
|
||||
segger-jlink-headless
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
@@ -34,17 +46,13 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
mkdir -p $out
|
||||
mv data/* $out/
|
||||
|
||||
wrapProgram $out/bin/nrfutil \
|
||||
--prefix LD_LIBRARY_PATH : "${
|
||||
lib.makeLibraryPath [
|
||||
segger-jlink-headless
|
||||
libusb1
|
||||
]
|
||||
}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = with lib; {
|
||||
@@ -52,8 +60,11 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
homepage = "https://www.nordicsemi.com/Products/Development-tools/nRF-Util";
|
||||
changelog = "https://docs.nordicsemi.com/bundle/nrfutil/page/guides/revision_history.html";
|
||||
license = licenses.unfree;
|
||||
platforms = attrNames supported;
|
||||
maintainers = with maintainers; [ h7x4 ];
|
||||
platforms = lib.attrNames supported;
|
||||
maintainers = with maintainers; [
|
||||
h7x4
|
||||
ezrizhu
|
||||
];
|
||||
mainProgram = "nrfutil";
|
||||
};
|
||||
})
|
||||
|
||||
@@ -4,12 +4,4 @@
|
||||
name = "x86_64-unknown-linux-gnu";
|
||||
hash = "sha256-R3OF/340xEab+0zamfwvejY16fjy/3TrzMvQaBlVxHw=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
name = "x86_64-apple-darwin";
|
||||
hash = "sha256-cnZkVkTbQ/+ciITPEx2vxxZchCC54T0JOApB4HKp8e0=";
|
||||
};
|
||||
aarch64-darwin = {
|
||||
name = "aarch64-apple-darwin";
|
||||
hash = "sha256-5VxDQ25tW+qTXHwkltpaAm4AnQvA18qGMaflYQzE2pQ=";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ declare -A versions
|
||||
declare -A hashes
|
||||
|
||||
architectures["x86_64-linux"]="x86_64-unknown-linux-gnu"
|
||||
architectures["x86_64-darwin"]="x86_64-apple-darwin"
|
||||
architectures["aarch64-darwin"]="aarch64-apple-darwin"
|
||||
|
||||
BASE_URL="https://files.nordicsemi.com/artifactory/swtools/external/nrfutil"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user