default.nix (2721B)
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.20.1"; 14 15 src = fetchFromGitHub { 16 owner = "developmentseed"; 17 repo = "titiler"; 18 tag = version; 19 hash = "sha256-plArEGrT/yJ0lhLMyR5ekbImBtJfwPdByRP2XwD6quc="; 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 inherit (python3Packages.rio-tiler.meta) broken; 28 }; 29 30 titiler-core = python3Packages.buildPythonPackage { 31 inherit version src meta; 32 pname = "${pname}.core"; 33 sourceRoot = "${src.name}/src/titiler/core"; 34 pyproject = true; 35 36 postPatch = '' 37 substituteInPlace pyproject.toml --replace "fastapi-slim>=0.111.0" "fastapi" 38 ''; 39 40 nativeBuildInputs = with python3Packages; [ pdm-pep517 ]; 41 dependencies = with python3Packages; [ 42 fastapi 43 jinja2 44 rio-tiler 45 geojson-pydantic 46 simplejson 47 ]; 48 doCheck = false; 49 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 50 }; 51 52 titiler-extensions = python3Packages.buildPythonPackage { 53 inherit version src meta; 54 pname = "${pname}.extensions"; 55 sourceRoot = "${src.name}/src/titiler/extensions"; 56 pyproject = true; 57 58 nativeBuildInputs = with python3Packages; [ pdm-pep517 ]; 59 dependencies = with python3Packages; [ 60 rio-cogeo 61 rio-stac 62 titiler-core 63 ]; 64 doCheck = false; 65 nativeCheckInputs = with python3Packages; [ 66 pytestCheckHook 67 jsonschema 68 ]; 69 disabledTests = [ "test_stacExtension" ]; 70 }; 71 72 titiler-mosaic = python3Packages.buildPythonPackage { 73 inherit version src meta; 74 pname = "${pname}.mosaic"; 75 sourceRoot = "${src.name}/src/titiler/mosaic"; 76 pyproject = true; 77 78 nativeBuildInputs = with python3Packages; [ pdm-pep517 ]; 79 dependencies = with python3Packages; [ 80 cogeo-mosaic 81 titiler-core 82 ]; 83 doCheck = false; 84 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 85 }; 86 in 87 python3Packages.buildPythonPackage { 88 inherit 89 pname 90 version 91 src 92 meta 93 ; 94 sourceRoot = "${src.name}/src/titiler/application"; 95 pyproject = true; 96 97 nativeBuildInputs = with python3Packages; [ pdm-pep517 ]; 98 dependencies = with python3Packages; [ 99 python-dotenv 100 rio-cogeo 101 starlette-cramjam 102 titiler-core 103 titiler-extensions 104 titiler-mosaic 105 ]; 106 107 doCheck = false; 108 nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; 109 110 disabledTests = [ "test_mosaic_auth_error" ]; 111 }