hdfview: mark as broken (#346931)

This commit is contained in:
Doron Behar 2024-10-07 07:49:11 +03:00 committed by GitHub
commit 5509aba825
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 86 additions and 34 deletions

View File

@ -1,12 +1,26 @@
{ lib, stdenv, fetchurl, ant, jdk, hdf4, hdf5, makeDesktopItem, copyDesktopItems, strip-nondeterminism, stripJavaArchivesHook }:
{
lib,
stdenv,
fetchFromGitHub,
ant,
jdk,
hdf4,
hdf5,
makeDesktopItem,
copyDesktopItems,
strip-nondeterminism,
stripJavaArchivesHook,
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "hdfview";
version = "3.3.1";
version = "3.3.2";
src = fetchurl {
url = "https://support.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfview-${version}/src/hdfview-${version}.tar.gz";
sha256 = "sha256-WcGYceMOB8gCycJSW4KdApy2gIBgTnE/d0PxGZClUqg=";
src = fetchFromGitHub {
owner = "HDFGroup";
repo = "hdfview";
rev = "refs/tags/v${finalAttrs.version}";
sha256 = "sha256-aJHeknkF38qDH9l+vuzdKFZZTcs/XMjtlHuu/LTF124=";
};
patches = [
@ -46,27 +60,34 @@ stdenv.mkDerivation rec {
desktopName = name;
exec = name;
icon = name;
comment = meta.description;
categories = [ "Science" "DataVisualization" ];
comment = finalAttrs.finalPackage.meta.description;
categories = [
"Science"
"DataVisualization"
];
};
installPhase = ''
runHook preInstall
'' + lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/bin $out/lib
cp -a build/dist/HDFView/bin/HDFView $out/bin/
cp -a build/dist/HDFView/lib/app $out/lib/
cp -a build/dist/HDFView/lib/libapplauncher.so $out/lib/
ln -s ${jdk}/lib/openjdk $out/lib/runtime
installPhase =
''
runHook preInstall
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mkdir -p $out/bin $out/lib
cp -a build/dist/HDFView/bin/HDFView $out/bin/
cp -a build/dist/HDFView/lib/app $out/lib/
cp -a build/dist/HDFView/lib/libapplauncher.so $out/lib/
ln -s ${jdk}/lib/openjdk $out/lib/runtime
mkdir -p $out/share/applications $out/share/icons/hicolor/32x32/apps
cp src/HDFView.png $out/share/icons/hicolor/32x32/apps/
'' + lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
cp -a build/dist/HDFView.app $out/Applications/
'' + ''
runHook postInstall
'';
mkdir -p $out/share/applications $out/share/icons/hicolor/32x32/apps
cp src/HDFView.png $out/share/icons/hicolor/32x32/apps/
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
cp -a build/dist/HDFView.app $out/Applications/
''
+ ''
runHook postInstall
'';
preFixup = ''
# Remove build timestamp from javadoc files
@ -77,8 +98,16 @@ stdenv.mkDerivation rec {
description = "A visual tool for browsing and editing HDF4 and HDF5 files";
license = lib.licenses.free; # BSD-like
homepage = "https://www.hdfgroup.org/downloads/hdfview";
platforms = lib.platforms.linux ++ lib.platforms.darwin;
downloadPage = "https://github.com/HDFGroup/hdfview";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ jiegec ];
mainProgram = "HDFView";
# Startup issue is described here:
# https://github.com/NixOS/nixpkgs/issues/340048 A possible solution is
# suggested here:
# https://forum.hdfgroup.org/t/building-hdfview-3-1-0-on-centos-6-swt-library-not-found/5698
# But it requires us to update swt, which is a bit hard, the swt update is tracked here:
# https://github.com/NixOS/nixpkgs/issues/219771
broken = true;
};
}
})

View File

@ -1,8 +1,31 @@
diff --git a/build.xml b/build.xml
index 70ab3e2..9460321 100644
--- a/build.xml
+++ b/build.xml
@@ -1802,13 +1802,6 @@
diff --git i/build.xml w/build.xml
index 3bbd89b..5834e7c 100644
--- i/build.xml
+++ w/build.xml
@@ -1607,14 +1607,6 @@
<!-- package args for fixed jpackage -->
<target name="createJXPackageMac" depends="createJPackageBase" if="${isXMac}">
- <!-- unlock keychain -->
- <exec executable="security" dir="${dist.dir}" failonerror="true">
- <arg value="unlock-keychain" />
- <arg value="-p" />
- <arg value="${pass.keychain_key}" />
- <arg value="${name.keychain_key}" />
- </exec>
-
<echo> JXPackage the mac application</echo>
<exec executable="${java.home}/bin/jpackage">
<!-- Basic usage -->
@@ -1680,7 +1672,6 @@
<arg value="dmg" />
<arg value="--icon" />
<arg value="${basedir}/package_files/macosx/HDFView.icns" />
- <arg value="--mac-sign" />
<arg value="--mac-package-identifier" />
<arg value="HDFView.hdfgroup.org" />
<arg value="--mac-package-name" />
@@ -2054,13 +2045,6 @@
description="Create the final package for distribution" />
<target name="createJPackageMac" depends="createJPackageBase" if="${isAppMac}">
@ -10,13 +33,13 @@ index 70ab3e2..9460321 100644
- <exec executable="security" dir="${dist.dir}" failonerror="true">
- <arg value="unlock-keychain" />
- <arg value="-p" />
- <arg value="${login.keychain_key}" />
- <arg value="login.keychain" />
- <arg value="${pass.keychain_key}" />
- <arg value="${name.keychain_key}" />
- </exec>
<echo> Create the mac jpackage</echo>
<exec executable="${java.home}/bin/jpackage">
@@ -1864,7 +1857,6 @@
@@ -2116,7 +2100,6 @@
<arg value="app-image" />
<arg value="--icon" />
<arg value="${basedir}/package_files/macosx/HDFView.icns" />