package.nix (1214B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 python3Packages, 6 pmtiles, 7 }: 8 9 python3Packages.buildPythonApplication (finalAttrs: { 10 pname = "tilekiln"; 11 version = "0.8.4"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "pnorman"; 16 repo = "tilekiln"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-ymdkXZVqlwH4P8bXwpcXlpyf33T090vGduLyTG/lhj4="; 19 }; 20 21 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 22 sed -i 's/len(os.sched_getaffinity(0))/4/' tilekiln/scripts/{generate,serve}.py 23 ''; 24 25 build-system = with python3Packages; [ 26 hatchling 27 hatch-vcs 28 ]; 29 30 dependencies = with python3Packages; [ 31 click 32 fastapi 33 fs 34 jinja2 35 setuptools_80 36 pmtiles 37 prometheus-client 38 psycopg 39 psycopg.optional-dependencies.pool 40 pyyaml 41 tqdm 42 uvicorn 43 ]; 44 45 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 46 47 meta = { 48 description = "A set of command-line utilities to generate and serve Mapbox Vector Tiles (MVTs)"; 49 homepage = "https://github.com/pnorman/tilekiln"; 50 license = lib.licenses.gpl3Plus; 51 maintainers = [ lib.maintainers.sikmir ]; 52 broken = true; # https://github.com/pnorman/tilekiln/issues/73 53 }; 54 })
