nur-packages

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

commit a5f67ace6f40db2c49c5516922ada85d10bea0ca
parent 3820d92165445a6bb76d1a7dcc360851c236f647
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sun, 22 May 2022 23:31:52 +0300

Add localtileserver

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/geospatial/localtileserver/default.nix | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -171,6 +171,7 @@ lib.makeScope newScope ( geojson-pydantic = callPackage ./geospatial/geojson-pydantic { }; go-pmtiles = callPackage ./geospatial/go-pmtiles { }; go-staticmaps = callPackage ./geospatial/go-staticmaps { }; + localtileserver = callPackage ./geospatial/localtileserver { }; mapsoft = callPackage ./geospatial/mapsoft { proj = pkgs.proj_7; }; diff --git a/pkgs/geospatial/localtileserver/default.nix b/pkgs/geospatial/localtileserver/default.nix @@ -0,0 +1,56 @@ +{ lib, python3Packages, fetchFromGitHub, large-image-source-gdal, server-thread, scooby }: + +python3Packages.buildPythonApplication rec { + pname = "localtileserver"; + version = "0.5.8"; + + src = fetchFromGitHub { + owner = "banesullivan"; + repo = pname; + rev = version; + hash = "sha256-wkS2RKTP2idgrD/ohg2Cd4F/trLJ8hmQk8WKSNqFSYY="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "large-image[gdal]" "large-image-source-gdal" + ''; + + propagatedBuildInputs = with python3Packages; [ + click + flask + flask-caching + flask-cors + flask-restx + gdal + large-image-source-gdal + requests + server-thread + scooby + setuptools + ]; + + checkInputs = with python3Packages; [ pytestCheckHook ]; + + disabledTests = [ + "test_get_pine_gulch" + "test_get_san_francisco" + "test_get_oam2" + "test_get_elevation_us" + "test_folium_with_remote_client" + "test_cog_validate" + "test_tileclient_with_vsi" + "test_home_page_with_file" + "test_home_page" + "test_cesium_split_view" + "test_style_json" + "test_multiple_tile_clients_one_server" + ]; + + meta = with lib; { + description = "Local Tile Server for Geospatial Rasters"; + homepage = "https://localtileserver.banesullivan.com/"; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + }; +}