nur-packages

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

default.nix (2668B)


      1 {
      2   lib,
      3   fetchFromGitHub,
      4   python3Packages,
      5   rio-stac,
      6   geojson-pydantic,
      7   rio-cogeo,
      8   starlette-cramjam,
      9   cogeo-mosaic,
     10 }:
     11 let
     12   pname = "titiler";
     13   version = "0.19.1";
     14 
     15   src = fetchFromGitHub {
     16     owner = "developmentseed";
     17     repo = "titiler";
     18     rev = version;
     19     hash = "sha256-Ebz9o0wbUnctIx03ywm0k3t90fnw77fH6XUmv4J2G0c=";
     20   };
     21 
     22   meta = {
     23     description = "A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL";
     24     homepage = "https://developmentseed.org/titiler/";
     25     license = lib.licenses.mit;
     26     maintainers = [ lib.maintainers.sikmir ];
     27   };
     28 
     29   titiler-core = python3Packages.buildPythonPackage {
     30     inherit version src meta;
     31     pname = "${pname}.core";
     32     sourceRoot = "${src.name}/src/titiler/core";
     33     pyproject = true;
     34 
     35     postPatch = ''
     36       substituteInPlace pyproject.toml --replace "fastapi-slim>=0.111.0" "fastapi"
     37     '';
     38 
     39     nativeBuildInputs = with python3Packages; [ pdm-pep517 ];
     40     dependencies = with python3Packages; [
     41       fastapi
     42       jinja2
     43       rio-tiler
     44       geojson-pydantic
     45       simplejson
     46     ];
     47     doCheck = false;
     48     nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
     49   };
     50 
     51   titiler-extensions = python3Packages.buildPythonPackage {
     52     inherit version src meta;
     53     pname = "${pname}.extensions";
     54     sourceRoot = "${src.name}/src/titiler/extensions";
     55     pyproject = true;
     56 
     57     nativeBuildInputs = with python3Packages; [ pdm-pep517 ];
     58     dependencies = with python3Packages; [
     59       rio-cogeo
     60       rio-stac
     61       titiler-core
     62     ];
     63     doCheck = false;
     64     nativeCheckInputs = with python3Packages; [
     65       pytestCheckHook
     66       jsonschema
     67     ];
     68     disabledTests = [ "test_stacExtension" ];
     69   };
     70 
     71   titiler-mosaic = python3Packages.buildPythonPackage {
     72     inherit version src meta;
     73     pname = "${pname}.mosaic";
     74     sourceRoot = "${src.name}/src/titiler/mosaic";
     75     pyproject = true;
     76 
     77     nativeBuildInputs = with python3Packages; [ pdm-pep517 ];
     78     dependencies = with python3Packages; [
     79       cogeo-mosaic
     80       titiler-core
     81     ];
     82     doCheck = false;
     83     nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
     84   };
     85 in
     86 python3Packages.buildPythonPackage {
     87   inherit
     88     pname
     89     version
     90     src
     91     meta
     92     ;
     93   sourceRoot = "${src.name}/src/titiler/application";
     94   pyproject = true;
     95 
     96   nativeBuildInputs = with python3Packages; [ pdm-pep517 ];
     97   dependencies = with python3Packages; [
     98     python-dotenv
     99     rio-cogeo
    100     starlette-cramjam
    101     titiler-core
    102     titiler-extensions
    103     titiler-mosaic
    104   ];
    105 
    106   doCheck = false;
    107   nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
    108 
    109   disabledTests = [ "test_mosaic_auth_error" ];
    110 }