571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{ stdenvNoCC
|
|
, lib
|
|
, fetchzip
|
|
, jre
|
|
, makeDesktopItem
|
|
, copyDesktopItems
|
|
, makeWrapper
|
|
, extraJavaArgs ? "-Xms512M -Xmx2000M"
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation rec {
|
|
pname = "gprojector";
|
|
version = "3.1.0";
|
|
|
|
src = fetchzip {
|
|
url = "https://www.giss.nasa.gov/tools/gprojector/download/G.ProjectorJ-${version}.tgz";
|
|
sha256 = "sha256-cMmjyitetXxQzfSBh5ry5tIsLWOnBaaYOD1eQg1IX+w=";
|
|
};
|
|
|
|
desktopItems = [ (makeDesktopItem {
|
|
name = "gprojector";
|
|
exec = "gprojector";
|
|
desktopName = "G.Projector";
|
|
comment = meta.description;
|
|
categories = [ "Science" ];
|
|
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/";
|
|
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
|
|
maintainers = with lib.maintainers; [ alyaeanyx ];
|
|
license = lib.licenses.unfree;
|
|
inherit (jre.meta) platforms;
|
|
};
|
|
}
|