commit bf8879f482d87621211ad26e899f8fbe55bfbe27
parent e242f582c6b3f1d8d553ddb158667855f250e905
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Sat, 18 May 2024 15:09:51 +0400
Add rioxarray
Diffstat:
2 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -248,6 +248,7 @@ lib.makeScope newScope (
rio-mucho = callPackage ./geospatial/rio-mucho { };
rio-stac = callPackage ./geospatial/rio-stac { };
rio-tiler = callPackage ./geospatial/rio-tiler { };
+ rioxarray = callPackage ./geospatial/rioxarray { };
rsgislib = callPackage ./geospatial/rsgislib { };
sasplanet = callPackage ./geospatial/sasplanet { };
server-thread = callPackage ./geospatial/server-thread { };
diff --git a/pkgs/geospatial/rioxarray/default.nix b/pkgs/geospatial/rioxarray/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchFromGitHub, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+ pname = "rioxarray";
+ version = "0.15.5";
+ pyproject = true;
+
+ src = fetchFromGitHub {
+ owner = "corteva";
+ repo = "rioxarray";
+ rev = version;
+ hash = "sha256-bumFZQktgUqo2lyoLtDXkh6Vv5oS/wobqYpvNYy7La0=";
+ };
+
+ nativeBuildInputs = with python3Packages; [ setuptools ];
+
+ propagatedBuildInputs = with python3Packages; [
+ packaging
+ rasterio
+ xarray
+ pyproj
+ numpy
+ ];
+
+ doCheck = false;
+ nativeCheckInputs = with python3Packages; [
+ dask
+ netcdf4
+ pytestCheckHook
+ ];
+
+ pythonImportsCheck = [ "rioxarray" ];
+
+ meta = with lib; {
+ description = "geospatial xarray extension powered by rasterio";
+ inherit (src.meta) homepage;
+ license = licenses.asl20;
+ maintainers = [ maintainers.sikmir ];
+ };
+}