nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 maven,
4 fetchFromGitHub,
5 makeWrapper,
6 jre,
7}:
8
9maven.buildMavenPackage rec {
10 pname = "gol";
11 version = "1.0.2";
12
13 src = fetchFromGitHub {
14 owner = "clarisma";
15 repo = "gol-tool";
16 tag = version;
17 hash = "sha256-roFtoSpNByNVGkl7ESt5O6b4voVzX8Nbow1dI6Sqgss";
18 };
19
20 mvnHash = "sha256-lKmoftSkyyb/pIthrsJaZ3p9l5V5K3FdK6sOBoZyhe8";
21 mvnParameters = "compile assembly:single -Dmaven.test.skip=true";
22
23 nativeBuildInputs = [ makeWrapper ];
24
25 installPhase = ''
26 runHook preInstall
27
28 mkdir -p $out/{bin,lib}
29 cp target/gol-tool-${version}-jar-with-dependencies.jar $out/lib/gol-tool.jar
30
31 makeWrapper ${jre}/bin/java $out/bin/gol \
32 --add-flags "-cp $out/lib/gol-tool.jar" \
33 --add-flags "com.geodesk.gol.GolTool"
34
35 runHook postInstall
36 '';
37
38 meta = with lib; {
39 description = "Command-line utility for creating and managing Geographic Object Libraries";
40 longDescription = ''
41 Use the GOL command-line utility to:
42 - build and maintain Geographic Object Libraries (GeoDesk's compact database format for OpenStreetMap features)
43 - perform GOQL queries and export the results in a variety of formats.
44 '';
45 homepage = "https://docs.geodesk.com/gol";
46 license = licenses.agpl3Only;
47 maintainers = [ maintainers.starsep ];
48 platforms = platforms.all;
49 };
50}