summary refs log tree commit diff
path: root/pkgs/development/python-modules/xnd/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/xnd/default.nix')
-rw-r--r--pkgs/development/python-modules/xnd/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/xnd/default.nix b/pkgs/development/python-modules/xnd/default.nix
index 3657997f5a7..eac1153b4f5 100644
--- a/pkgs/development/python-modules/xnd/default.nix
+++ b/pkgs/development/python-modules/xnd/default.nix
@@ -1,5 +1,6 @@
 { lib
 , stdenv
+, fetchpatch
 , buildPythonPackage
 , python
 , ndtypes
@@ -15,6 +16,17 @@ buildPythonPackage {
 
   propagatedBuildInputs = [ ndtypes ];
 
+  buildInputs = [ libndtypes ];
+
+  patches = [
+    # python311 fixes which are on main. remove on update
+    (fetchpatch {
+      name = "python311.patch";
+      url = "https://github.com/xnd-project/xnd/commit/e1a06d9f6175f4f4e1da369b7e907ad6b2952c00.patch";
+      hash = "sha256-xzrap+FL5be13bVdsJ3zeV7t57ZC4iyhuZhuLsOzHyE=";
+    })
+  ];
+
   postPatch = ''
     substituteInPlace setup.py \
       --replace 'include_dirs = ["libxnd", "ndtypes/python/ndtypes"] + INCLUDES' \