diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-19 05:41:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-19 05:41:08 +0100 |
commit | 186c3e34a76f6170e01dcd41f25dee8c2c61c7f3 (patch) | |
tree | 64138e8f3524348a7eca700621966e944062eaca /pkgs/applications | |
parent | ced4e31b4a3a96ca7805546c1ffa03f730a356df (diff) | |
parent | e08f26cdb1e23f47821c32de2d03f8d114289bc0 (diff) |
Merge pull request #296549 from TomaSajt/strip-java-archives-hook
add stripJavaArchivesHook and use treewide
Diffstat (limited to 'pkgs/applications')
8 files changed, 16 insertions, 28 deletions
diff --git a/pkgs/applications/blockchains/bisq-desktop/default.nix b/pkgs/applications/blockchains/bisq-desktop/default.nix index 8e6881f0d7e85..31c044f39c611 100644 --- a/pkgs/applications/blockchains/bisq-desktop/default.nix +++ b/pkgs/applications/blockchains/bisq-desktop/default.nix @@ -9,7 +9,7 @@ , dpkg , writeScript , bash -, strip-nondeterminism +, stripJavaArchivesHook , tor , zip , xz @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { dpkg imagemagick makeWrapper - strip-nondeterminism + stripJavaArchivesHook xz zip findutils @@ -89,7 +89,6 @@ stdenv.mkDerivation rec { tar --sort=name --mtime="@$SOURCE_DATE_EPOCH" -cJf native/linux/x64/tor.tar.xz tor tor_jar_file=$(find ./opt/bisq/lib/app -name "tor-binary-linux64-*.jar") zip -r $tor_jar_file native - strip-nondeterminism ./opt/bisq/lib/app/*.jar ''; installPhase = '' diff --git a/pkgs/applications/misc/calcoo/default.nix b/pkgs/applications/misc/calcoo/default.nix index 5f90b4bb23636..462b56d50ce09 100644 --- a/pkgs/applications/misc/calcoo/default.nix +++ b/pkgs/applications/misc/calcoo/default.nix @@ -2,7 +2,7 @@ , stdenv , fetchzip , ant -, canonicalize-jars-hook +, stripJavaArchivesHook , jdk , makeWrapper }: @@ -18,7 +18,7 @@ stdenv.mkDerivation (finalAttrs: { nativeBuildInputs = [ ant - canonicalize-jars-hook + stripJavaArchivesHook jdk makeWrapper ]; diff --git a/pkgs/applications/misc/mkgmap/default.nix b/pkgs/applications/misc/mkgmap/default.nix index ee0c2043a6b4c..7f97818c7452f 100644 --- a/pkgs/applications/misc/mkgmap/default.nix +++ b/pkgs/applications/misc/mkgmap/default.nix @@ -6,6 +6,7 @@ , jre , ant , makeWrapper +, stripJavaArchivesHook , doCheck ? true , withExamples ? false }: @@ -30,10 +31,6 @@ stdenv.mkDerivation rec { ]; postPatch = with deps; '' - # Fix the output jar timestamps for reproducibility - substituteInPlace build.xml \ - --replace-fail '<jar ' '<jar modificationtime="0" ' - # Manually create version properties file for reproducibility mkdir -p build/classes cat > build/classes/mkgmap-version.properties << EOF @@ -61,7 +58,7 @@ stdenv.mkDerivation rec { '') testInputs} ''; - nativeBuildInputs = [ jdk ant makeWrapper ]; + nativeBuildInputs = [ jdk ant makeWrapper stripJavaArchivesHook ]; buildPhase = '' runHook preBuild diff --git a/pkgs/applications/misc/mkgmap/splitter/default.nix b/pkgs/applications/misc/mkgmap/splitter/default.nix index 010b140e9bf93..801af789d47d8 100644 --- a/pkgs/applications/misc/mkgmap/splitter/default.nix +++ b/pkgs/applications/misc/mkgmap/splitter/default.nix @@ -6,6 +6,7 @@ , jre , ant , makeWrapper +, stripJavaArchivesHook , doCheck ? true }: let @@ -30,10 +31,6 @@ stdenv.mkDerivation rec { ]; postPatch = with deps; '' - # Fix the output jar timestamps for reproducibility - substituteInPlace build.xml \ - --replace-fail '<jar ' '<jar modificationtime="0" ' - # Manually create version properties file for reproducibility mkdir -p build/classes cat > build/classes/splitter-version.properties << EOF @@ -58,7 +55,7 @@ stdenv.mkDerivation rec { '') testInputs} ''; - nativeBuildInputs = [ jdk ant makeWrapper ]; + nativeBuildInputs = [ jdk ant makeWrapper stripJavaArchivesHook ]; buildPhase = '' runHook preBuild diff --git a/pkgs/applications/misc/pattypan/default.nix b/pkgs/applications/misc/pattypan/default.nix index aac0da8b4c40b..c1f5aa84b0eb5 100644 --- a/pkgs/applications/misc/pattypan/default.nix +++ b/pkgs/applications/misc/pattypan/default.nix @@ -7,7 +7,7 @@ , wrapGAppsHook , makeDesktopItem , copyDesktopItems -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -27,7 +27,7 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper wrapGAppsHook copyDesktopItems - canonicalize-jars-hook + stripJavaArchivesHook ]; dontWrapGApps = true; diff --git a/pkgs/applications/networking/remote/dayon/default.nix b/pkgs/applications/networking/remote/dayon/default.nix index a68a6eddd3342..ea46ec131fbc5 100644 --- a/pkgs/applications/networking/remote/dayon/default.nix +++ b/pkgs/applications/networking/remote/dayon/default.nix @@ -6,7 +6,7 @@ , jre , makeWrapper , copyDesktopItems -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -25,7 +25,7 @@ stdenv.mkDerivation (finalAttrs: { jdk makeWrapper copyDesktopItems - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' diff --git a/pkgs/applications/office/jameica/default.nix b/pkgs/applications/office/jameica/default.nix index 683d51bf43f2a..66d2a80c55550 100644 --- a/pkgs/applications/office/jameica/default.nix +++ b/pkgs/applications/office/jameica/default.nix @@ -4,6 +4,7 @@ , makeDesktopItem , makeWrapper , wrapGAppsHook +, stripJavaArchivesHook , ant , jdk , jre @@ -46,13 +47,7 @@ stdenv.mkDerivation rec { hash = "sha256-MSVSd5DyVL+dcfTDv1M99hxickPwT2Pt6QGNsu6DGZI="; }; - postPatch = '' - # Fix jar timestamps for reproducibility - substituteInPlace build/build.xml \ - --replace-fail '<jar ' '<jar modificationtime="0" ' - ''; - - nativeBuildInputs = [ ant jdk wrapGAppsHook makeWrapper ]; + nativeBuildInputs = [ ant jdk wrapGAppsHook makeWrapper stripJavaArchivesHook ]; buildInputs = lib.optionals stdenv.isLinux [ gtk2 glib libXtst ] ++ lib.optional stdenv.isDarwin Cocoa; diff --git a/pkgs/applications/science/biology/trimmomatic/default.nix b/pkgs/applications/science/biology/trimmomatic/default.nix index 53cff76badcee..db19278eaa479 100644 --- a/pkgs/applications/science/biology/trimmomatic/default.nix +++ b/pkgs/applications/science/biology/trimmomatic/default.nix @@ -5,7 +5,7 @@ , jdk , jre , makeWrapper -, canonicalize-jars-hook +, stripJavaArchivesHook }: stdenv.mkDerivation (finalAttrs: { @@ -29,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: { ant jdk makeWrapper - canonicalize-jars-hook + stripJavaArchivesHook ]; buildPhase = '' |