Merge pull request #260762 from panicgh/segger-ozone

segger-ozone: 3.28e -> 3.30b and refactoring

authored by Peder Bergebakken Sundt and committed by GitHub e04c93d4 c2273e11

+25 -23
+25 -23
pkgs/development/tools/misc/segger-ozone/default.nix
··· 1 - { stdenv 1 + { lib 2 + , stdenv 2 3 , fetchurl 4 + , autoPatchelfHook 3 5 , fontconfig 4 6 , freetype 5 - , lib 6 7 , libICE 7 8 , libSM 8 - , udev 9 9 , libX11 10 10 , libXcursor 11 - , libXext 12 11 , libXfixes 13 12 , libXrandr 14 13 , libXrender ··· 16 15 17 16 stdenv.mkDerivation rec { 18 17 pname = "segger-ozone"; 19 - version = "3.28e"; 18 + version = "3.30b"; 20 19 21 - src = fetchurl { 22 - url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${(lib.replaceStrings ["."] [""] version)}_x86_64.tgz"; 23 - sha256 = "BfmKBAKyTA0V31zkwFLrbT0Xob221KfHa6v0VxKFsSI="; 24 - }; 20 + src = { 21 + x86_64-linux = fetchurl { 22 + url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${builtins.replaceStrings ["."] [""] version}_x86_64.tgz"; 23 + hash = "sha256-W8Fo0q58pAn1aB92CjYARcN3vMLEguvsyozsS7VRArQ="; 24 + }; 25 + i686-linux = fetchurl { 26 + url = "https://www.segger.com/downloads/jlink/Ozone_Linux_V${builtins.replaceStrings ["."] [""] version}_i386.tgz"; 27 + hash = "sha256-Xq/69lwF2Ll5VdkYMDNRtc0YUUvWc+XR0FHJXxOLNQ4="; 28 + }; 29 + }.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}"); 25 30 26 - rpath = lib.makeLibraryPath [ 31 + nativeBuildInputs = [ 32 + autoPatchelfHook 33 + ]; 34 + 35 + buildInputs = [ 27 36 fontconfig 28 37 freetype 29 38 libICE 30 39 libSM 31 - udev 32 40 libX11 33 41 libXcursor 34 - libXext 35 42 libXfixes 36 43 libXrandr 37 44 libXrender 38 - ] 39 - + ":${stdenv.cc.cc.lib}/lib64"; 45 + stdenv.cc.cc.lib 46 + ]; 40 47 41 48 installPhase = '' 49 + runHook preInstall 50 + 42 51 mkdir -p $out/bin 43 52 mv Lib lib 44 53 mv * $out 45 54 ln -s $out/Ozone $out/bin 46 - ''; 47 55 48 - postFixup = '' 49 - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/Ozone" \ 50 - --set-rpath ${rpath}:$out/lib "$out/Ozone" 51 - 52 - for file in $(find $out/lib -maxdepth 1 -type f -and -name \*.so\*); do 53 - patchelf --set-rpath ${rpath}:$out/lib $file 54 - done 56 + runHook postInstall 55 57 ''; 56 58 57 59 meta = with lib; { ··· 80 82 sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 81 83 license = licenses.unfree; 82 84 maintainers = [ maintainers.bmilanov ]; 83 - platforms = [ "x86_64-linux" ]; 85 + platforms = [ "x86_64-linux" "i686-linux" ]; 84 86 }; 85 87 }