nixpkgs/pkgs/tools/misc/panoply/default.nix
2024-06-01 15:58:09 +02:00

39 lines
983 B
Nix

{ lib, stdenvNoCC, fetchurl, makeWrapper, jre } :
stdenvNoCC.mkDerivation rec {
pname = "panoply";
version = "5.4.1";
src = fetchurl {
url = "https://www.giss.nasa.gov/tools/panoply/download/PanoplyJ-${version}.tgz";
sha256 = "sha256-C/9kFWDpv4bzqpsUcGpZn7P+fqU6teU39HibYhhva3o=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
jarbase=$out/share/panoply
mkdir -p $out/bin $jarbase/jars
sed -i "s:^SCRIPTDIR.*:SCRIPTDIR=$jarbase:" panoply.sh
cp panoply.sh $out/bin/panoply
cp -r jars $jarbase
wrapProgram "$out/bin/panoply" --prefix PATH : "${jre}/bin"
runHook postHook
'';
meta = with lib; {
description = "netCDF, HDF and GRIB Data Viewer";
homepage = "https://www.giss.nasa.gov/tools/panoply";
platforms = platforms.linux;
maintainers = [ maintainers.markuskowa ];
license = licenses.unfree; # Package does not state a license
mainProgram = "panoply";
};
}