2017-08-22 02:59:37 +02:00
|
|
|
{ stdenv, fetchurl, cmake, ant, javac, hdf_java }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "hdfview-${version}";
|
|
|
|
version = "2.14";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://support.hdfgroup.org/ftp/HDF5/hdf-java/current/src/${name}.tar.gz";
|
2017-08-22 02:59:37 +02: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
|
|
|
|
homepage = https://support.hdfgroup.org/products/java/index.html;
|
|
|
|
platforms = stdenv.lib.platforms.linux;
|
|
|
|
};
|
|
|
|
}
|