diff options
author | Pol Dellaiera <pol.dellaiera@protonmail.com> | 2024-03-25 11:15:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 11:15:23 +0100 |
commit | 718dae8fbd77b3dbfb524fb847c28a32e7ccabc5 (patch) | |
tree | 0956bb10fe3b04cc88a46fc6fbe254acaa6603d2 /pkgs | |
parent | 23cede97d9430f71c7514e7b81fe01ce468a667c (diff) | |
parent | c360696de9710f01e83d485eae8e6cb36a96db8b (diff) |
Merge pull request #297160 from TomaSajt/hdfview
hdfview: make deterministic
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/tools/misc/hdfview/default.nix | 11 | ||||
-rw-r--r-- | pkgs/tools/misc/hdfview/remove-properties-timestamp.patch | 14 |
2 files changed, 24 insertions, 1 deletions
diff --git a/pkgs/tools/misc/hdfview/default.nix b/pkgs/tools/misc/hdfview/default.nix index 23995e65859a5..b559a494d456f 100644 --- a/pkgs/tools/misc/hdfview/default.nix +++ b/pkgs/tools/misc/hdfview/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, ant, jdk, hdf4, hdf5, makeDesktopItem, copyDesktopItems }: +{ lib, stdenv, fetchurl, ant, jdk, hdf4, hdf5, makeDesktopItem, copyDesktopItems, strip-nondeterminism, stripJavaArchivesHook }: stdenv.mkDerivation rec { pname = "hdfview"; @@ -14,12 +14,16 @@ stdenv.mkDerivation rec { ./0001-Hardcode-isUbuntu-false-to-avoid-hostname-dependency.patch # Disable signing on macOS ./disable-mac-signing.patch + # Remove timestamp comment from generated versions.properties file + ./remove-properties-timestamp.patch ]; nativeBuildInputs = [ ant jdk copyDesktopItems + strip-nondeterminism + stripJavaArchivesHook ]; HDFLIBS = (hdf4.override { javaSupport = true; }).out; @@ -64,6 +68,11 @@ stdenv.mkDerivation rec { runHook postInstall ''; + preFixup = '' + # Remove build timestamp from javadoc files + find $out/lib/app{,/mods}/doc/javadocs -name "*.html" -exec strip-nondeterminism --type javadoc {} + + ''; + meta = { description = "A visual tool for browsing and editing HDF4 and HDF5 files"; license = lib.licenses.free; # BSD-like diff --git a/pkgs/tools/misc/hdfview/remove-properties-timestamp.patch b/pkgs/tools/misc/hdfview/remove-properties-timestamp.patch new file mode 100644 index 0000000000000..8e3790487f2d0 --- /dev/null +++ b/pkgs/tools/misc/hdfview/remove-properties-timestamp.patch @@ -0,0 +1,14 @@ +diff --git a/build.xml b/build.xml +index fcc4931..2afeb6c 100644 +--- a/build.xml ++++ b/build.xml +@@ -345,6 +345,9 @@ + <entry key="HDF5_VERSION" value="${hdf5.version}"/> + <entry key="HDFVIEW_VERSION" value="${app.version}"/> + </propertyfile> ++ <exec executable="sed" failonerror="true"> ++ <arg line="-i /#/d ${classes.dir}/hdf/versions.properties" /> ++ </exec> + </target> + + <target name="compile" depends="clean, create-property-file, compileobj, compilehdf4, compilefits, compilenc2, compilehdf5"> |