diff --git a/pkgs/tools/misc/hdf5/default.nix b/pkgs/tools/misc/hdf5/default.nix index ea71def36195..eb29e7d914c5 100644 --- a/pkgs/tools/misc/hdf5/default.nix +++ b/pkgs/tools/misc/hdf5/default.nix @@ -55,6 +55,7 @@ stdenv.mkDerivation rec { applications to evolve in their use of HDF5. The HDF5 Technology suite includes tools and applications for managing, manipulating, viewing, and analyzing data in the HDF5 format. ''; + license = stdenv.lib.licenses.free; # BSD-like homepage = https://www.hdfgroup.org/HDF5/; platforms = stdenv.lib.platforms.unix; }; diff --git a/pkgs/tools/misc/hdfjava/default.nix b/pkgs/tools/misc/hdfjava/default.nix new file mode 100644 index 000000000000..553e78c58a7f --- /dev/null +++ b/pkgs/tools/misc/hdfjava/default.nix @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, cmake, javac }: + +stdenv.mkDerivation rec { + name = "hdf-java-${version}"; + version = "3.3.2"; + + src = fetchurl { + url = "http://www.hdfgroup.org/ftp/HDF5/releases/HDF-JAVA/hdfjni-${version}/src/CMake-hdfjava-${version}.tar.gz"; + sha256 = "0m1gp2aspcblqzmpqbdpfp6giskws85ds6p5gz8sx7asyp7wznpr"; + }; + + nativeBuildInputs = [ cmake javac ]; + + configurePhase = "true"; + buildPhase = "./build-hdfjava-unix.sh"; + installPhase = '' + mkdir -p $out + cp -r build/_CPack_Packages/Linux/TGZ/HDFJava-3.3.2-Linux/HDF_Group/HDFJava/${version}/* $out/ + ''; + + meta = { + description = "A Java package that implements HDF4 and HDF5 data objects in an object-oriented form"; + license = stdenv.lib.licenses.free; # BSD-like + homepage = https://support.hdfgroup.org/products/java/index.html; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/tools/misc/hdfview/default.nix b/pkgs/tools/misc/hdfview/default.nix new file mode 100644 index 000000000000..d69a3d2470d9 --- /dev/null +++ b/pkgs/tools/misc/hdfview/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchurl, cmake, ant, javac, hdf_java }: + +stdenv.mkDerivation rec { + name = "hdfview-${version}"; + version = "2.14"; + + src = fetchurl { + url = "http://support.hdfgroup.org/ftp/HDF5/hdf-java/current/src/${name}-${version}.tar.gz"; + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e8f4a853e98..107b5f5e7620 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2464,6 +2464,14 @@ with pkgs; inherit gfortran; }); + hdfview = callPackage ../tools/misc/hdfview { + javac = jdk; + }; + + hdf_java = callPackage ../tools/misc/hdfjava { + javac = jdk; + }; + hecate = callPackage ../applications/editors/hecate { }; heaptrack = libsForQt5.callPackage ../development/tools/profiling/heaptrack {};