nur-packages

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

commit 3abddd6e5efd8f10d8379ea5117c8ca1a6c4bcab
parent 1848d9c95fbf3041f34de7ffb1201fcca9a0bd5d
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sun,  7 Jul 2024 13:30:33 +0400

Up

Diffstat:
Mpkgs/default.nix | 3---
Dpkgs/development/python-modules/large-image/default.nix | 39---------------------------------------
Dpkgs/development/python-modules/large-image/sources.nix | 29-----------------------------
Mpkgs/geospatial/localtileserver/default.nix | 35++++++++++-------------------------
Mpkgs/geospatial/rio-cogeo/default.nix | 4++--
Mpkgs/geospatial/terracotta/default.nix | 4++--
Mpkgs/geospatial/tilecloud/default.nix | 21++++++++++++++++++---
Mpkgs/geospatial/tilecloud/set-tmpl-path.patch | 19+++++--------------
Mpkgs/geospatial/tilekiln/default.nix | 27+++++++++++++++------------
Mpkgs/geospatial/titiler/default.nix | 8++++++--
Mpkgs/gnss/pygpsclient/default.nix | 4++--
11 files changed, 60 insertions(+), 133 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -101,9 +101,6 @@ lib.makeScope newScope ( geotiler = callPackage ./development/python-modules/geotiler { }; gpxelevations = callPackage ./development/python-modules/gpxelevations { }; jsonseq = callPackage ./development/python-modules/jsonseq { }; - large-image = callPackage ./development/python-modules/large-image { }; - large-image-source-gdal = - (callPackage ./development/python-modules/large-image/sources.nix { }).source-gdal; modbus_tk = callPackage ./development/python-modules/modbus_tk { python3Packages = pkgs.python310Packages; }; diff --git a/pkgs/development/python-modules/large-image/default.nix b/pkgs/development/python-modules/large-image/default.nix @@ -1,39 +0,0 @@ -{ - lib, - python3Packages, - fetchFromGitHub, -}: - -python3Packages.buildPythonPackage rec { - pname = "large-image"; - version = "1.25.0"; - - src = fetchFromGitHub { - owner = "girder"; - repo = "large_image"; - rev = "v${version}"; - hash = "sha256-JJKQ5Dt4T5I4iy2ghUo7URtCNzZKncAih9KSo/6nzbQ="; - }; - - build-system = with python3Packages; [ setuptools-scm ]; - - SETUPTOOLS_SCM_PRETEND_VERSION = version; - - propagatedBuildInputs = with python3Packages; [ - cachetools - palettable - pillow - psutil - numpy - ]; - - doCheck = false; - - meta = { - description = "Python modules to work with large multiresolution images"; - homepage = "http://girder.github.io/large_image/"; - license = lib.licenses.asl20; - maintainers = [ lib.maintainers.sikmir ]; - broken = true; - }; -} diff --git a/pkgs/development/python-modules/large-image/sources.nix b/pkgs/development/python-modules/large-image/sources.nix @@ -1,29 +0,0 @@ -{ - lib, - python3Packages, - large-image, - gdal, -}: - -{ - source-gdal = python3Packages.buildPythonPackage rec { - pname = "large-image-source-gdal"; - inherit (large-image) - version - src - nativeBuildInputs - meta - ; - sourceRoot = "${src.name}/sources/gdal"; - - SETUPTOOLS_SCM_PRETEND_VERSION = version; - - propagatedBuildInputs = with python3Packages; [ - gdal - pyproj - large-image - ]; - - doCheck = false; - }; -} diff --git a/pkgs/geospatial/localtileserver/default.nix b/pkgs/geospatial/localtileserver/default.nix @@ -2,55 +2,41 @@ lib, python3Packages, fetchFromGitHub, - large-image-source-gdal, + rio-cogeo, server-thread, }: python3Packages.buildPythonApplication rec { pname = "localtileserver"; - version = "0.7.0"; + version = "0.10.0"; src = fetchFromGitHub { owner = "banesullivan"; repo = "localtileserver"; - rev = version; - hash = "sha256-sSP9Cl+PJZZ8R8BcOko1yFDBpSLPKj6OpS0ZLLFP4GI="; + rev = "v${version}"; + hash = "sha256-CD8NNNUbF3b+UDc+TfcGJn3EHy7b5k7FxYGB5UpzsG8="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace-fail "large-image[gdal]" "large-image-source-gdal" - ''; - dependencies = with python3Packages; [ click flask flask-caching flask-cors flask-restx - gdal - large-image-source-gdal + rio-tiler + rio-cogeo requests server-thread - scooby setuptools + scooby + werkzeug ]; nativeCheckInputs = 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" + "test_create_tile_client" + "test_is_valid_palette_name" ]; meta = { @@ -58,6 +44,5 @@ python3Packages.buildPythonApplication rec { homepage = "https://localtileserver.banesullivan.com/"; license = lib.licenses.mit; maintainers = [ lib.maintainers.sikmir ]; - broken = true; }; } diff --git a/pkgs/geospatial/rio-cogeo/default.nix b/pkgs/geospatial/rio-cogeo/default.nix @@ -7,14 +7,14 @@ python3Packages.buildPythonPackage rec { pname = "rio-cogeo"; - version = "5.3.2"; + version = "5.3.3"; pyproject = true; src = fetchFromGitHub { owner = "cogeotiff"; repo = "rio-cogeo"; rev = version; - hash = "sha256-PzhUlip2LYO6DhC9O2aeoQGE59QXKq2e0v6/yxeFvjM="; + hash = "sha256-EV0bYS3uc1PtgW/inIQltss0sTYhS4MXirHqzIiuhZQ="; }; build-system = with python3Packages; [ flit ]; diff --git a/pkgs/geospatial/terracotta/default.nix b/pkgs/geospatial/terracotta/default.nix @@ -6,13 +6,13 @@ python3Packages.buildPythonApplication rec { pname = "terracotta"; - version = "0.8.2"; + version = "0.8.4"; src = fetchFromGitHub { owner = "DHI-GRAS"; repo = "terracotta"; rev = "refs/tags/v${version}"; - hash = "sha256-HWNV5MwbylpcJ/u0iFe8gJJLdnvrnK4S8UMSCpuBlqs="; + hash = "sha256-kRix66bnqvVKC6yjsrXDp1bEy4Sh9DJIvCKv0o01HCs="; }; postPatch = '' diff --git a/pkgs/geospatial/tilecloud/default.nix b/pkgs/geospatial/tilecloud/default.nix @@ -7,17 +7,31 @@ python3Packages.buildPythonApplication rec { pname = "tilecloud"; - version = "1.8.2"; + version = "1.12.2"; + pyproject = true; src = fetchFromGitHub { owner = "camptocamp"; repo = "tilecloud"; rev = version; - hash = "sha256-rg85xlmPq5pSrHAjA+9YlkQLndhNha8+OsqbGqe8JSM="; + hash = "sha256-B/TMLif24HYjETyvsXf00/H/ComQjs8P92DQdtygWw4="; }; patches = [ ./set-tmpl-path.patch ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "\"poetry-plugin-drop-python-upper-constraint\"" "" \ + --replace-fail "\"poetry-plugin-tweak-dependencies-version\"," "" \ + --replace-fail "\"poetry-plugin-tweak-dependencies-version>=1.1.0\"," "" \ + --replace-fail "requests = \"2.32.2\"" "requests = \"*\"" + ''; + + build-system = with python3Packages; [ + poetry-core + poetry-dynamic-versioning + ]; + dependencies = with python3Packages; [ azure-storage-blob azure-identity @@ -25,6 +39,7 @@ python3Packages.buildPythonApplication rec { bottle c2cwsgiutils pillow + prometheus_client pyproj requests redis @@ -35,7 +50,7 @@ python3Packages.buildPythonApplication rec { # https://github.com/camptocamp/tilecloud/issues/391 postInstall = '' site_packages=$out/lib/${python3Packages.python.libPrefix}/site-packages - cp -r static tiles views $site_packages + cp -r static tiles $site_packages substituteInPlace $out/bin/tc-viewer --subst-var site_packages ''; diff --git a/pkgs/geospatial/tilecloud/set-tmpl-path.patch b/pkgs/geospatial/tilecloud/set-tmpl-path.patch @@ -1,17 +1,8 @@ -diff --git i/tc-viewer w/tc-viewer -index bf226d2..2ff2735 100755 ---- i/tc-viewer -+++ w/tc-viewer -@@ -7,6 +7,8 @@ import sys - - import bottle - -+bottle.TEMPLATE_PATH = "@site_packages@/views" -+ - from tilecloud import BoundingPyramid, Bounds, Tile, TileCoord, TileStore - from tilecloud.filter.contenttype import ContentTypeAdder - -@@ -146,12 +148,12 @@ def openwebglobe(): +diff --git i/tilecloud/scripts/tc_viewer.py w/tilecloud/scripts/tc_viewer.py +index 1c5e6056..8cabfd10 100755 +--- i/tilecloud/scripts/tc_viewer.py ++++ w/tilecloud/scripts/tc_viewer.py +@@ -112,12 +112,12 @@ def openwebglobe(): @bottle.route("/favicon.ico") def favicon(): diff --git a/pkgs/geospatial/tilekiln/default.nix b/pkgs/geospatial/tilekiln/default.nix @@ -3,35 +3,38 @@ stdenv, fetchFromGitHub, python3Packages, + pmtiles, }: python3Packages.buildPythonApplication rec { pname = "tilekiln"; - version = "0.2.0"; + version = "0.5.1"; + pyproject = true; src = fetchFromGitHub { owner = "pnorman"; repo = "tilekiln"; - rev = version; - hash = "sha256-CLeZMfru8hnhotTAmdRc9hG473wD9gc4omD1G1XQkoQ="; + rev = "v${version}"; + hash = "sha256-t/1oB0vMgbUEBDuwKeKoNwpAmCdqT3CR/M6p1lmurLk="; }; - postPatch = - '' - sed -i '/setup_requires=/d' setup.py - '' - + lib.optionalString stdenv.isDarwin '' - sed -i 's/len(os.sched_getaffinity(0))/4/' tilekiln/scripts/__init__.py - ''; + postPatch = lib.optionalString stdenv.isDarwin '' + sed -i 's/len(os.sched_getaffinity(0))/4/' tilekiln/scripts/{generate,serve}.py + ''; + + build-system = with python3Packages; [ hatchling hatch-vcs ]; dependencies = with python3Packages; [ click - pyyaml + fastapi fs jinja2 - fastapi + pmtiles + prometheus_client psycopg psycopg.optional-dependencies.pool + pyyaml + tqdm uvicorn ]; diff --git a/pkgs/geospatial/titiler/default.nix b/pkgs/geospatial/titiler/default.nix @@ -10,13 +10,13 @@ }: let pname = "titiler"; - version = "0.18.1"; + version = "0.18.5"; src = fetchFromGitHub { owner = "developmentseed"; repo = "titiler"; rev = version; - hash = "sha256-pKG2QTY49TJojxjfRFiRr/k/a+i12N2hIC0M5xOaP9w="; + hash = "sha256-9cQYj5Zfo5ZVlddNDvMmBmDD6m7dt6nPkhNQrMOO89g="; }; meta = { @@ -32,6 +32,10 @@ let sourceRoot = "${src.name}/src/titiler/core"; pyproject = true; + postPatch = '' + substituteInPlace pyproject.toml --replace "fastapi-slim>=0.111.0" "fastapi" + ''; + nativeBuildInputs = with python3Packages; [ pdm-pep517 ]; dependencies = with python3Packages; [ fastapi diff --git a/pkgs/gnss/pygpsclient/default.nix b/pkgs/gnss/pygpsclient/default.nix @@ -7,14 +7,14 @@ python3Packages.buildPythonApplication rec { pname = "pygpsclient"; - version = "1.4.17"; + version = "1.4.18"; pyproject = true; src = fetchFromGitHub { owner = "semuconsulting"; repo = "PyGPSClient"; rev = "v${version}"; - hash = "sha256-kDdicLzjqfFAMU2SxMToBXmIqfRvQ3r/2ACi/cvVIcU="; + hash = "sha256-+j08JvSV1gWyMDs/OZtc81P5o139FZKVgoPfU3d+hpU="; }; build-system = with python3Packages; [ setuptools ];