diff options
author | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2023-12-03 21:06:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 21:06:51 +0100 |
commit | e04c93d430d39d728f0d78f6171ee0d481def8df (patch) | |
tree | cf4949f34df396d2c57f67efdbe9013bfc6e6eef /pkgs/development/tools/misc | |
parent | c2273e116f7651f0deda59f9ebd83063a66a62c0 (diff) | |
parent | 46b2ddd5940a6df98e04fe513f10c0ee31600515 (diff) |
Merge pull request #260762 from panicgh/segger-ozone
segger-ozone: 3.28e -> 3.30b and refactoring
Diffstat (limited to 'pkgs/development/tools/misc')
-rw-r--r-- | pkgs/development/tools/misc/segger-ozone/default.nix | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/pkgs/development/tools/misc/segger-ozone/default.nix b/pkgs/development/tools/misc/segger-ozone/default.nix index 9e048df457678..8109c1e42a368 100644 --- a/pkgs/development/tools/misc/segger-ozone/default.nix +++ b/pkgs/development/tools/misc/segger-ozone/default.nix @@ -1,14 +1,13 @@ -{ stdenv +{ lib +, stdenv , fetchurl +, autoPatchelfHook , fontconfig , freetype -, lib , libICE , libSM -, udev , libX11 , libXcursor -, libXext , libXfixes , libXrandr , libXrender @@ -16,42 +15,45 @@ stdenv.mkDerivation rec { pname = "segger-ozone"; - version = "3.28e"; + version = "3.30b"; - src = fetchurl { - url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${(lib.replaceStrings ["."] [""] version)}_x86_64.tgz"; - sha256 = "BfmKBAKyTA0V31zkwFLrbT0Xob221KfHa6v0VxKFsSI="; - }; + src = { + x86_64-linux = fetchurl { + url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${builtins.replaceStrings ["."] [""] version}_x86_64.tgz"; + hash = "sha256-W8Fo0q58pAn1aB92CjYARcN3vMLEguvsyozsS7VRArQ="; + }; + i686-linux = fetchurl { + url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${builtins.replaceStrings ["."] [""] version}_i386.tgz"; + hash = "sha256-Xq/69lwF2Ll5VdkYMDNRtc0YUUvWc+XR0FHJXxOLNQ4="; + }; + }.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"); + + nativeBuildInputs = [ + autoPatchelfHook + ]; - rpath = lib.makeLibraryPath [ + buildInputs = [ fontconfig freetype libICE libSM - udev libX11 libXcursor - libXext libXfixes libXrandr libXrender - ] - + ":${stdenv.cc.cc.lib}/lib64"; + stdenv.cc.cc.lib + ]; installPhase = '' + runHook preInstall + mkdir -p $out/bin mv Lib lib mv * $out ln -s $out/Ozone $out/bin - ''; - - postFixup = '' - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Ozone" \ - --set-rpath ${rpath}:$out/lib "$out/Ozone" - for file in $(find $out/lib -maxdepth 1 -type f -and -name \*.so\*); do - patchelf --set-rpath ${rpath}:$out/lib $file - done + runHook postInstall ''; meta = with lib; { @@ -80,6 +82,6 @@ stdenv.mkDerivation rec { sourceProvenance = with sourceTypes; [ binaryNativeCode ]; license = licenses.unfree; maintainers = [ maintainers.bmilanov ]; - platforms = [ "x86_64-linux" ]; + platforms = [ "x86_64-linux" "i686-linux" ]; }; } |