gprojector: init at 3.0.2 (#154932)

This commit is contained in:
Alexandra 2022-01-23 04:04:10 +01:00 committed by GitHub
parent c8e1561916
commit 7267839e76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,51 @@
{ stdenvNoCC
, lib
, fetchzip
, jre
, makeDesktopItem
, copyDesktopItems
, makeWrapper
, extraJavaArgs ? "-Xms512M -Xmx2000M"
}:
stdenvNoCC.mkDerivation rec {
pname = "gprojector";
version = "3.0.2";
src = fetchzip {
url = "https://www.giss.nasa.gov/tools/gprojector/download/G.ProjectorJ-${version}.tgz";
sha256 = "sha256-IvGZOYt2d8aWtlAJJzVrwkqOOhaUHUmEDlMeD/0NdwU=";
};
desktopItems = [ (makeDesktopItem {
name = "gprojector";
exec = "gprojector";
desktopName = "G.Projector";
comment = meta.description;
categories = "Science;";
extraEntries = "StartupWMClass = gov-nasa-giss-projector-GProjector";
}) ];
buildInputs = [ jre ];
nativeBuildInputs = [ makeWrapper copyDesktopItems ];
dontConfigure = true;
dontBuild = true;
dontFixup = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r $src/jars $out/share/java
makeWrapper ${jre}/bin/java $out/bin/gprojector --add-flags "-jar $out/share/java/G.Projector.jar" --add-flags "${extraJavaArgs}"
runHook postInstall
'';
meta = {
description = "G.Projector transforms an input map image into any of about 200 global and regional map projections";
homepage = "https://www.giss.nasa.gov/tools/gprojector/";
maintainers = with lib.maintainers; [ alyaeanyx ];
license = lib.licenses.unfree;
inherit (jre.meta) platforms;
};
}

View File

@ -6042,6 +6042,8 @@ with pkgs;
hamlib = hamlib_4;
};
gprojector = callPackage ../applications/science/astronomy/gprojector { };
gptfdisk = callPackage ../tools/system/gptfdisk { };
grafx2 = callPackage ../applications/graphics/grafx2 {};