package.nix (1183B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 python3Packages, 6 pmtiles, 7 }: 8 9 python3Packages.buildPythonApplication (finalAttrs: { 10 pname = "tilekiln"; 11 version = "0.8.2"; 12 pyproject = true; 13 14 src = fetchFromGitHub { 15 owner = "pnorman"; 16 repo = "tilekiln"; 17 tag = "v${finalAttrs.version}"; 18 hash = "sha256-tsihU/63SC0QO2HIBXkrU2GDKql6X3OF4D2qjxgCOTs="; 19 }; 20 21 postPatch = lib.optionalString stdenv.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 pmtiles 36 prometheus-client 37 psycopg 38 psycopg.optional-dependencies.pool 39 pyyaml 40 tqdm 41 uvicorn 42 ]; 43 44 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 45 46 meta = { 47 description = "A set of command-line utilities to generate and serve Mapbox Vector Tiles (MVTs)"; 48 homepage = "https://github.com/pnorman/tilekiln"; 49 license = lib.licenses.gpl3Plus; 50 maintainers = [ lib.maintainers.sikmir ]; 51 broken = true; # https://github.com/pnorman/tilekiln/issues/73 52 }; 53 })
