nur-packages

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

commit 985f4fc7bd51887daa89686670dfa385f57f7a03
parent 54c0d4e528ccae550a7c59338afa94685636837f
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sun, 22 May 2022 15:37:32 +0300

Add titiler

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/geospatial/titiler/default.nix | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -200,6 +200,7 @@ lib.makeScope newScope ( tilesets-cli = callPackage ./geospatial/tilesets-cli { }; tpkutils = callPackage ./geospatial/tpkutils { }; vt2geojson = callPackage ./geospatial/vt2geojson { }; + titiler = callPackage ./geospatial/titiler { }; ### GNSS diff --git a/pkgs/geospatial/titiler/default.nix b/pkgs/geospatial/titiler/default.nix @@ -0,0 +1,63 @@ +{ lib, fetchFromGitHub, python3Packages +, rio-tiler, geojson-pydantic, rio-cogeo, starlette-cramjam, cogeo-mosaic }: +let + pname = "titiler"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "developmentseed"; + repo = pname; + rev = version; + hash = "sha256-BfN/d2FEFTIuiOHxKltn1SHUdOzDrAkbJcEQANY6UtA="; + }; + + meta = with lib; { + description = "A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL"; + homepage = "https://developmentseed.org/titiler/"; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + }; + + titiler-core = python3Packages.buildPythonPackage { + inherit version src meta; + pname = "${pname}.core"; + sourceRoot = "${src.name}/src/titiler/core"; + + propagatedBuildInputs = with python3Packages; [ + fastapi + rio-tiler + geojson-pydantic + ]; + checkInputs = with python3Packages; [ pytestCheckHook ]; + }; + + titiler-mosaic = python3Packages.buildPythonPackage { + inherit version src meta; + pname = "${pname}.mosaic"; + sourceRoot = "${src.name}/src/titiler/mosaic"; + + propagatedBuildInputs = with python3Packages; [ + cogeo-mosaic + titiler-core + ]; + checkInputs = with python3Packages; [ pytestCheckHook ]; + }; +in +python3Packages.buildPythonPackage { + inherit pname version src meta; + sourceRoot = "${src.name}/src/titiler/application"; + + propagatedBuildInputs = with python3Packages; [ + python-dotenv + rio-cogeo + starlette-cramjam + titiler-core + titiler-mosaic + ]; + + checkInputs = with python3Packages; [ pytestCheckHook ]; + + disabledTests = [ + "test_mosaic_auth_error" + ]; +}