commit 53352948e2b03e962d9340b856cef76fcd30d18e
parent ba95c2955ceb02fd65aeff3ccd45d182cacdf8b8
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Tue, 19 Sep 2023 23:00:00 +0400
Add tilekiln
Diffstat:
2 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -243,6 +243,7 @@ lib.makeScope newScope (
tdh = callPackage ./geospatial/tdh { };
terracotta = callPackage ./geospatial/terracotta { };
tile-stitch = callPackage ./geospatial/tile-stitch { };
+ tilekiln = callPackage ./geospatial/tilekiln { };
tilesets-cli = callPackage ./geospatial/tilesets-cli { };
tpkutils = callPackage ./geospatial/tpkutils { };
vt2geojson = callPackage ./geospatial/vt2geojson { };
diff --git a/pkgs/geospatial/tilekiln/default.nix b/pkgs/geospatial/tilekiln/default.nix
@@ -0,0 +1,39 @@
+{ lib, stdenv, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonApplication rec {
+ pname = "tilekiln";
+ version = "0.2.0";
+
+ src = fetchFromGitHub {
+ owner = "pnorman";
+ repo = "tilekiln";
+ rev = version;
+ hash = "sha256-CLeZMfru8hnhotTAmdRc9hG473wD9gc4omD1G1XQkoQ=";
+ };
+
+ postPatch = ''
+ sed -i '/setup_requires=/d' setup.py
+ '' + lib.optionalString stdenv.isDarwin ''
+ sed -i 's/len(os.sched_getaffinity(0))/4/' tilekiln/scripts/__init__.py
+ '';
+
+ propagatedBuildInputs = with python3Packages; [
+ click
+ pyyaml
+ fs
+ jinja2
+ fastapi
+ psycopg
+ psycopg.optional-dependencies.pool
+ uvicorn
+ ];
+
+ nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
+
+ meta = with lib; {
+ description = "A set of command-line utilities to generate and serve Mapbox Vector Tiles (MVTs)";
+ inherit (src.meta) homepage;
+ license = licenses.gpl3Plus;
+ maintainers = [ maintainers.sikmir ];
+ };
+}