commit 554fc957e4999bd703c4de6767ad2b7e01413366
parent c926c12ed9981421872edecca377f65986f9b082
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date: Tue, 18 May 2021 22:17:49 +0300
Add rasterio
Diffstat:
2 files changed, 29 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -103,6 +103,7 @@ lib.makeScope newScope (
mikatools = callPackage ./development/python-modules/mikatools { };
pymbtiles = callPackage ./development/python-modules/pymbtiles { };
python-hfst = callPackage ./development/python-modules/python-hfst { };
+ rasterio = callPackage ./development/python-modules/rasterio { };
s2sphere = callPackage ./development/python-modules/s2sphere { };
wikitextprocessor = callPackage ./development/python-modules/wikitextprocessor { };
diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix
@@ -0,0 +1,28 @@
+{ lib, fetchFromGitHub, python3Packages, gdal }:
+
+python3Packages.buildPythonPackage rec {
+ pname = "rasterio";
+ version = "1.2.3";
+
+ src = fetchFromGitHub {
+ owner = "mapbox";
+ repo = pname;
+ rev = version;
+ hash = "sha256-IR3WHDYUEJbLdscVRmbTUbH/5WswVTJlwlnGLNrI5A8=";
+ };
+
+ nativeBuildInputs = [ gdal python3Packages.cython ];
+
+ propagatedBuildInputs = with python3Packages; [ affine attrs boto3 click-plugins cligj matplotlib numpy snuggs setuptools ];
+
+ checkInputs = with python3Packages; [ pytestCheckHook hypothesis ];
+
+ installCheckPhase = "$out/bin/rio --version";
+
+ meta = with lib; {
+ description = "Rasterio reads and writes geospatial raster datasets";
+ homepage = "https://rasterio.readthedocs.io/";
+ license = licenses.bsd3;
+ maintainers = [ maintainers.sikmir ];
+ };
+}