nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1095B)


      1 {
      2   lib,
      3   stdenv,
      4   fetchFromGitHub,
      5   python3Packages,
      6   pmtiles,
      7 }:
      8 
      9 python3Packages.buildPythonApplication rec {
     10   pname = "tilekiln";
     11   version = "0.6.0";
     12   pyproject = true;
     13 
     14   src = fetchFromGitHub {
     15     owner = "pnorman";
     16     repo = "tilekiln";
     17     rev = "v${version}";
     18     hash = "sha256-mKuANJjKIo2LIlT/w9dbGDa+jqofK5Tg36pV2t3DIvw=";
     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   };
     52 }