nur-packages

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

commit 014d7955697d19603403f64e7ae9fceb111d78ae
parent 059e7a0d8adb49d5b97b469986b77e8c29a59556
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Fri, 31 May 2024 23:34:35 +0400

Add momepy

Diffstat:
Mpkgs/default.nix | 2++
Apkgs/geospatial/inequality/default.nix | 37+++++++++++++++++++++++++++++++++++++
Apkgs/geospatial/momepy/default.nix | 46++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 85 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -201,6 +201,7 @@ lib.makeScope newScope ( go-pmtiles = callPackage ./geospatial/go-pmtiles { }; go-staticmaps = callPackage ./geospatial/go-staticmaps { }; hecate = callPackage ./geospatial/hecate { inherit (darwin.apple_sdk.frameworks) Security; }; + inequality = callPackage ./geospatial/inequality { }; kealib = callPackage ./geospatial/kealib { }; localtileserver = callPackage ./geospatial/localtileserver { }; mapsoft = callPackage ./geospatial/mapsoft { proj = pkgs.proj_7; }; @@ -209,6 +210,7 @@ lib.makeScope newScope ( mbutiles = callPackage ./geospatial/mbutiles { }; mobroute = callPackage ./geospatial/mobroute { }; mobsql = callPackage ./geospatial/mobsql { }; + momepy = callPackage ./geospatial/momepy { }; orbisgis = callPackage ./geospatial/orbisgis { jre = pkgs.jre8; }; ossim = callPackage ./geospatial/ossim { }; pipfile = callPackage ./geospatial/pipfile { }; diff --git a/pkgs/geospatial/inequality/default.nix b/pkgs/geospatial/inequality/default.nix @@ -0,0 +1,37 @@ +{ + lib, + fetchFromGitHub, + python3Packages, +}: + +python3Packages.buildPythonPackage rec { + pname = "inequality"; + version = "1.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pysal"; + repo = "inequality"; + rev = "v${version}"; + hash = "sha256-dy1/KXnmIh5LnTxuyYfIvtt1p2CIpNQ970o5pTg6diQ="; + }; + + build-system = with python3Packages; [ setuptools-scm ]; + + propagatedBuildInputs = with python3Packages; [ + libpysal + numpy + scipy + ]; + + nativeCheckInputs = with python3Packages; [ pytestCheckHook ]; + + pythonImportsCheck = [ "inequality" ]; + + meta = { + description = "Spatial inequality analysis"; + inherit (src.meta) homepage; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.sikmir ]; + }; +} diff --git a/pkgs/geospatial/momepy/default.nix b/pkgs/geospatial/momepy/default.nix @@ -0,0 +1,46 @@ +{ + lib, + fetchFromGitHub, + python3Packages, + inequality, +}: + +python3Packages.buildPythonPackage rec { + pname = "momepy"; + version = "0.7.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "pysal"; + repo = "momepy"; + rev = "v${version}"; + hash = "sha256-HVp2a0z+5fbfkNSxnTfZPCgG2SJMlKX/zso14M18mCk="; + }; + + build-system = with python3Packages; [ setuptools-scm ]; + + propagatedBuildInputs = with python3Packages; [ + geopandas + libpysal + networkx + packaging + pandas + shapely + tqdm + ]; + + nativeCheckInputs = with python3Packages; [ + inequality + mapclassify + pytestCheckHook + ]; + + pythonImportsCheck = [ "momepy" ]; + + meta = { + description = "Urban Morphology Measuring Toolkit"; + inherit (src.meta) homepage; + license = lib.licenses.bsd3; + maintainers = [ lib.maintainers.sikmir ]; + }; +}