diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-25 11:16:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 11:16:06 +0100 |
commit | e74650c878c73852cae258bbd47490dc016f1e97 (patch) | |
tree | efc5c03ae8e9098774ed40733125c64bfa2ae0e2 /pkgs/applications/science | |
parent | 718dae8fbd77b3dbfb524fb847c28a32e7ccabc5 (diff) | |
parent | 38eb40b7f18ea6377967f06b715c8ef2649e5e91 (diff) |
Merge pull request #297189 from TomaSajt/dataexplorer
dataexplorer: make deterministic and clean up
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r-- | pkgs/applications/science/electronics/dataexplorer/default.nix | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/pkgs/applications/science/electronics/dataexplorer/default.nix b/pkgs/applications/science/electronics/dataexplorer/default.nix index aa471d2bfcafc..224d804ee1f69 100644 --- a/pkgs/applications/science/electronics/dataexplorer/default.nix +++ b/pkgs/applications/science/electronics/dataexplorer/default.nix @@ -1,26 +1,32 @@ { lib , stdenv , fetchurl -, jdk , ant +, jdk , makeWrapper +, strip-nondeterminism }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "dataexplorer"; version = "3.8.5"; src = fetchurl { - url = "mirror://savannah/dataexplorer/dataexplorer-${version}-src.tar.gz"; - sha256 = "sha256-b68xIZNbzHdPyZwLngcnjcoBtI6AeTdrblz/qx/HbGQ="; + url = "mirror://savannah/dataexplorer/dataexplorer-${finalAttrs.version}-src.tar.gz"; + hash = "sha256-b68xIZNbzHdPyZwLngcnjcoBtI6AeTdrblz/qx/HbGQ="; }; - nativeBuildInputs = [ ant makeWrapper ]; - - buildInputs = [ jdk ]; + nativeBuildInputs = [ + ant + jdk + makeWrapper + strip-nondeterminism + ]; buildPhase = '' + runHook preBuild ant -f build/build.xml dist + runHook postBuild ''; doCheck = false; @@ -30,6 +36,8 @@ stdenv.mkDerivation rec { #''; installPhase = '' + runHook preInstall + ant -Dprefix=$out/share/ -f build/build.xml install # The sources contain a wrapper script in $out/share/DataExplorer/DataExplorer @@ -49,6 +57,14 @@ stdenv.mkDerivation rec { $out/etc/udev/rules.d/50-Junsi-iCharger-USB.rules install -Dvm644 build/misc/GNU_LINUX_SKYRC_UDEV_RULE/50-SkyRC-Charger.rules \ $out/etc/udev/rules.d/50-SkyRC-Charger.rules + + runHook postInstall + ''; + + # manually call strip-nondeterminism because using stripJavaArchivesHook takes + # too long to strip bundled jars + postFixup = '' + strip-nondeterminism --type jar $out/share/DataExplorer/{DataExplorer.jar,devices/*.jar} ''; meta = with lib; { @@ -63,4 +79,4 @@ stdenv.mkDerivation rec { binaryBytecode # contains thirdparty jar files, e.g. javax.json, org.glassfish.json ]; }; -} +}) |