default.nix (1049B)
1 { 2 lib, 3 stdenv, 4 fetchfromgh, 5 unzip, 6 jre, 7 makeWrapper, 8 }: 9 10 stdenv.mkDerivation (finalAttrs: { 11 pname = "planetiler"; 12 version = "0.7.0"; 13 14 src = fetchfromgh { 15 owner = "onthegomap"; 16 repo = "planetiler"; 17 version = "v${finalAttrs.version}"; 18 name = "planetiler.jar"; 19 hash = "sha256-rq5cihkU65xtVkrTvVrT7lPoy+Q92aOawYUWxd5LObI="; 20 }; 21 22 dontUnpack = true; 23 24 nativeBuildInputs = [ makeWrapper ]; 25 26 buildInputs = [ jre ]; 27 28 installPhase = '' 29 install -dm755 $out/bin 30 install -Dm644 $src $out/share/java/planetiler.jar 31 32 makeWrapper ${jre}/bin/java $out/bin/planetiler \ 33 --add-flags "-jar $out/share/java/planetiler.jar" 34 ''; 35 36 meta = { 37 description = "Flexible tool to build planet-scale vector tilesets from OpenStreetMap data"; 38 homepage = "https://github.com/onthegomap/planetiler"; 39 sourceProvenance = with lib.sourceTypes; [ binaryBytecode ]; 40 license = lib.licenses.asl20; 41 maintainers = [ lib.maintainers.sikmir ]; 42 platforms = jre.meta.platforms; 43 skip.ci = true; 44 }; 45 })