Merge pull request #297189 from TomaSajt/dataexplorer

dataexplorer: make deterministic and clean up

authored by Pol Dellaiera and committed by GitHub e74650c8 718dae8f

+24 -8
+24 -8
pkgs/applications/science/electronics/dataexplorer/default.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , fetchurl 4 - , jdk 5 4 , ant 5 + , jdk 6 6 , makeWrapper 7 + , strip-nondeterminism 7 8 }: 8 9 9 - stdenv.mkDerivation rec { 10 + stdenv.mkDerivation (finalAttrs: { 10 11 pname = "dataexplorer"; 11 12 version = "3.8.5"; 12 13 13 14 src = fetchurl { 14 - url = "mirror://savannah/dataexplorer/dataexplorer-${version}-src.tar.gz"; 15 - sha256 = "sha256-b68xIZNbzHdPyZwLngcnjcoBtI6AeTdrblz/qx/HbGQ="; 15 + url = "mirror://savannah/dataexplorer/dataexplorer-${finalAttrs.version}-src.tar.gz"; 16 + hash = "sha256-b68xIZNbzHdPyZwLngcnjcoBtI6AeTdrblz/qx/HbGQ="; 16 17 }; 17 18 18 - nativeBuildInputs = [ ant makeWrapper ]; 19 - 20 - buildInputs = [ jdk ]; 19 + nativeBuildInputs = [ 20 + ant 21 + jdk 22 + makeWrapper 23 + strip-nondeterminism 24 + ]; 21 25 22 26 buildPhase = '' 27 + runHook preBuild 23 28 ant -f build/build.xml dist 29 + runHook postBuild 24 30 ''; 25 31 26 32 doCheck = false; ··· 30 36 #''; 31 37 32 38 installPhase = '' 39 + runHook preInstall 40 + 33 41 ant -Dprefix=$out/share/ -f build/build.xml install 34 42 35 43 # The sources contain a wrapper script in $out/share/DataExplorer/DataExplorer ··· 49 57 $out/etc/udev/rules.d/50-Junsi-iCharger-USB.rules 50 58 install -Dvm644 build/misc/GNU_LINUX_SKYRC_UDEV_RULE/50-SkyRC-Charger.rules \ 51 59 $out/etc/udev/rules.d/50-SkyRC-Charger.rules 60 + 61 + runHook postInstall 62 + ''; 63 + 64 + # manually call strip-nondeterminism because using stripJavaArchivesHook takes 65 + # too long to strip bundled jars 66 + postFixup = '' 67 + strip-nondeterminism --type jar $out/share/DataExplorer/{DataExplorer.jar,devices/*.jar} 52 68 ''; 53 69 54 70 meta = with lib; { ··· 63 79 binaryBytecode # contains thirdparty jar files, e.g. javax.json, org.glassfish.json 64 80 ]; 65 81 }; 66 - } 82 + })