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