From 9e2a2f3ac95ff7f037b9992606ee2297d151e146 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Wed, 29 Nov 2023 16:57:25 +0100 Subject: [PATCH 1/2] python3Packages.rasterio: add patches to build with GDAL 3.8.0 --- .../development/python-modules/rasterio/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index e0f393ff6134..859e72ec050e 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -10,6 +10,7 @@ , certifi , cython_3 , fetchFromGitHub +, fetchpatch , gdal , hypothesis , matplotlib @@ -40,6 +41,18 @@ buildPythonPackage rec { hash = "sha256-Tp6BSU33FaszrIXQgU0Asb7IMue0C939o/atAKz+3Q4="; }; + patches = [ + # fix tests failing with GDAL 3.8.0 + (fetchpatch { + url = "https://github.com/rasterio/rasterio/commit/54ec554a6d9ee52207ad17dee42cbc51c613f709.diff"; + hash = "sha256-Vjt9HRYNAWyj0myMdtSUENbcLjACfzegEClzZb4BxY8="; + }) + (fetchpatch { + url = "https://github.com/rasterio/rasterio/commit/5a72613c58d1482bf297d08cbacf27992f52b2c4.diff"; + hash = "sha256-bV6rh3GBmeqq9+Jff2b8/1wOuyF3Iqducu2eN4CT3lM="; + }) + ]; + nativeBuildInputs = [ cython_3 gdal From 5cc41dbdb9069c3205bbcf5a91f8d44e27950e18 Mon Sep 17 00:00:00 2001 From: Ivan Mincik Date: Wed, 29 Nov 2023 17:01:58 +0100 Subject: [PATCH 2/2] python3Packages.rasterio: alphabetical reordering of dependencies --- .../python-modules/rasterio/default.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/rasterio/default.nix b/pkgs/development/python-modules/rasterio/default.nix index 859e72ec050e..0e216ce18508 100644 --- a/pkgs/development/python-modules/rasterio/default.nix +++ b/pkgs/development/python-modules/rasterio/default.nix @@ -1,26 +1,27 @@ { lib +, buildPythonPackage +, fetchFromGitHub +, fetchpatch +, pytestCheckHook +, pythonOlder , stdenv + , affine , attrs , boto3 -, buildPythonPackage +, certifi , click , click-plugins , cligj -, certifi , cython_3 -, fetchFromGitHub -, fetchpatch , gdal , hypothesis -, matplotlib , ipython +, matplotlib , numpy , oldest-supported-numpy , packaging , pytest-randomly -, pytestCheckHook -, pythonOlder , setuptools , shapely , snuggs @@ -65,13 +66,13 @@ buildPythonPackage rec { propagatedBuildInputs = [ affine attrs + certifi click click-plugins cligj - certifi numpy - snuggs setuptools + snuggs ]; passthru.optional-dependencies = { @@ -90,8 +91,8 @@ buildPythonPackage rec { boto3 hypothesis packaging - pytest-randomly pytestCheckHook + pytest-randomly shapely ];