nixpkgs/pkgs/by-name/op/openjump/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.5 KiB
Nix
Raw Normal View History

{
lib,
stdenv,
fetchurl,
unzip,
2024-05-19 09:15:33 +01:00
makeBinaryWrapper,
coreutils,
gawk,
which,
gnugrep,
findutils,
jre,
}:
2024-05-19 09:13:18 +01:00
stdenv.mkDerivation (finalAttrs: {
pname = "openjump";
2024-10-19 20:05:52 +01:00
version = "2.3.0";
revision = "r5279%5Bd24616e%5D";
src = fetchurl {
2024-05-19 09:13:18 +01:00
url = "mirror://sourceforge/jump-pilot/OpenJUMP/${finalAttrs.version}/OpenJUMP-Portable-${finalAttrs.version}-${finalAttrs.revision}-PLUS.zip";
2024-10-19 20:05:52 +01:00
hash = "sha256-IO44iGnFQt/ir1WlvBrEHjdC+0DZTfJIVAJgRcxrFMI=";
};
# TODO: build from source
unpackPhase = ''
2024-05-19 09:14:10 +01:00
runHook preUnpack
2024-05-17 15:19:13 +01:00
mkdir -p $out/opt
unzip $src -d $out/opt
2024-05-19 09:14:10 +01:00
runHook postUnpack
'';
nativeBuildInputs = [
2024-05-19 09:15:33 +01:00
makeBinaryWrapper
unzip
];
installPhase = ''
2024-05-19 09:14:10 +01:00
runHook preInstall
2024-05-17 15:19:13 +01:00
dir=$(echo $out/opt/OpenJUMP-*)
2024-05-17 15:19:13 +01:00
chmod +x "$dir/bin/oj_linux.sh"
makeWrapper "$dir/bin/oj_linux.sh" $out/bin/OpenJump \
--set JAVA_HOME ${jre} \
--set PATH ${
lib.makeBinPath [
coreutils
gawk
which
gnugrep
findutils
]
}
2024-05-19 09:14:10 +01:00
runHook postInstall
'';
meta = {
description = "Open source Geographic Information System (GIS) written in the Java programming language";
2024-05-17 15:19:13 +01:00
homepage = "http://www.openjump.org/";
2021-01-15 05:42:41 +00:00
license = lib.licenses.gpl2;
2024-05-19 09:14:59 +01:00
mainProgram = "OpenJump";
2024-05-17 15:19:13 +01:00
maintainers = lib.teams.geospatial.members ++ [ lib.maintainers.marcweber ];
platforms = jre.meta.platforms;
2024-05-19 09:14:59 +01:00
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
};
2024-05-19 09:13:18 +01:00
})