From ac256bbda4dd0f392d9db37ce9c4b120ee22e920 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Mon, 23 Mar 2026 07:27:46 +0100 Subject: [PATCH] python3Packages.pint-xarray: fix build & tests Should have been part of 543bdb4a2f22 Co-Authored-By: Doron Behar --- .../python-modules/pint-xarray/default.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/development/python-modules/pint-xarray/default.nix b/pkgs/development/python-modules/pint-xarray/default.nix index 5eab0ba7c153..3c6c404f6c4d 100644 --- a/pkgs/development/python-modules/pint-xarray/default.nix +++ b/pkgs/development/python-modules/pint-xarray/default.nix @@ -2,10 +2,12 @@ lib, buildPythonPackage, fetchFromGitHub, + fetchpatch2, setuptools, setuptools-scm, numpy, pint, + toolz, xarray, pytestCheckHook, }: @@ -27,9 +29,25 @@ buildPythonPackage rec { setuptools-scm ]; + patches = [ + # Fixes 2 test failures. The merge commit of PR: + # https://github.com/xarray-contrib/pint-xarray/pull/367 + (fetchpatch2 { + url = "https://github.com/xarray-contrib/pint-xarray/commit/296ee2e60c671175507de1fe904fa7e4d0a70586.patch?full_index=1"; + hash = "sha256-SS2zQ7fIeLzEUTd+8BW1PFBw8+qed0fLslns1jNpLtA="; + }) + # Similarly to the above, fixes 3 more test failures. See: + # https://github.com/xarray-contrib/pint-xarray/pull/368 + (fetchpatch2 { + url = "https://github.com/xarray-contrib/pint-xarray/commit/6134b61e2cb6b4c46b7b0974a6e499dff2d9e18e.patch?full_index=1"; + hash = "sha256-s1AbaXAeL0sGkj/DWV5145FKGHW4eF+a11w1yg5QENA="; + }) + ]; + dependencies = [ numpy pint + toolz xarray ];