Merge pull request #297160 from TomaSajt/hdfview

hdfview: make deterministic

authored by Pol Dellaiera and committed by GitHub 718dae8f 23cede97

+24 -1
+10 -1
pkgs/tools/misc/hdfview/default.nix
··· 1 - { lib, stdenv, fetchurl, ant, jdk, hdf4, hdf5, makeDesktopItem, copyDesktopItems }: 1 + { lib, stdenv, fetchurl, ant, jdk, hdf4, hdf5, makeDesktopItem, copyDesktopItems, strip-nondeterminism, stripJavaArchivesHook }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 pname = "hdfview"; ··· 14 14 ./0001-Hardcode-isUbuntu-false-to-avoid-hostname-dependency.patch 15 15 # Disable signing on macOS 16 16 ./disable-mac-signing.patch 17 + # Remove timestamp comment from generated versions.properties file 18 + ./remove-properties-timestamp.patch 17 19 ]; 18 20 19 21 nativeBuildInputs = [ 20 22 ant 21 23 jdk 22 24 copyDesktopItems 25 + strip-nondeterminism 26 + stripJavaArchivesHook 23 27 ]; 24 28 25 29 HDFLIBS = (hdf4.override { javaSupport = true; }).out; ··· 62 66 cp -a build/dist/HDFView.app $out/Applications/ 63 67 '' + '' 64 68 runHook postInstall 69 + ''; 70 + 71 + preFixup = '' 72 + # Remove build timestamp from javadoc files 73 + find $out/lib/app{,/mods}/doc/javadocs -name "*.html" -exec strip-nondeterminism --type javadoc {} + 65 74 ''; 66 75 67 76 meta = {
+14
pkgs/tools/misc/hdfview/remove-properties-timestamp.patch
··· 1 + diff --git a/build.xml b/build.xml 2 + index fcc4931..2afeb6c 100644 3 + --- a/build.xml 4 + +++ b/build.xml 5 + @@ -345,6 +345,9 @@ 6 + <entry key="HDF5_VERSION" value="${hdf5.version}"/> 7 + <entry key="HDFVIEW_VERSION" value="${app.version}"/> 8 + </propertyfile> 9 + + <exec executable="sed" failonerror="true"> 10 + + <arg line="-i /#/d ${classes.dir}/hdf/versions.properties" /> 11 + + </exec> 12 + </target> 13 + 14 + <target name="compile" depends="clean, create-property-file, compileobj, compilehdf4, compilefits, compilenc2, compilehdf5">