1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-30 01:20:40 +00:00
nixpkgs/pkgs/tools/misc/hdfview/default.nix
volth 46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00

40 lines
1 KiB
Nix

{ stdenv, fetchurl, ant, javac, hdf_java }:
stdenv.mkDerivation rec {
pname = "hdfview";
version = "2.14";
src = fetchurl {
url = "https://support.hdfgroup.org/ftp/HDF5/hdf-java/current/src/${pname}-${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;
};
}