2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, ant, javac, hdf_java }:
|
2017-08-22 01:59:37 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "hdfview";
|
2017-08-22 01:59:37 +01:00
|
|
|
version = "2.14";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://support.hdfgroup.org/ftp/HDF5/hdf-java/current/src/${pname}-${version}.tar.gz";
|
2017-08-22 01:59:37 +01:00
|
|
|
sha256 = "0lv9djfm7hnp14mcyzbiax3xjb8vkbzhh7bdl6cvgy53pc08784p";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ ant javac ];
|
|
|
|
|
|
|
|
HDFLIBS = hdf_java;
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
ant run
|
|
|
|
ant package
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
# exclude jre
|
|
|
|
cp -r build/HDF_Group/HDFView/*/{lib,share} $out/
|
|
|
|
mkdir $out/bin
|
|
|
|
cp -r build/HDF_Group/HDFView/*/hdfview.sh $out/bin/hdfview
|
|
|
|
chmod +x $out/bin/hdfview
|
|
|
|
substituteInPlace $out/bin/hdfview \
|
|
|
|
--replace "@JAVABIN@" "${javac}/bin/" \
|
|
|
|
--replace "@INSTALLDIR@" "$out"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A visual tool for browsing and editing HDF4 and HDF5 files";
|
|
|
|
license = stdenv.lib.licenses.free; # BSD-like
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://support.hdfgroup.org/products/java/index.html";
|
2017-08-22 01:59:37 +01:00
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|