about 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.nix41
1 files changed, 17 insertions, 24 deletions
diff --git a/pkgs/development/python-modules/xnd/default.nix b/pkgs/development/python-modules/xnd/default.nix
index 93c2c928f86b..8317f30e462b 100644
--- a/pkgs/development/python-modules/xnd/default.nix
+++ b/pkgs/development/python-modules/xnd/default.nix
@@ -1,12 +1,12 @@
-{ lib
-, stdenv
-, fetchpatch
-, buildPythonPackage
-, python
-, ndtypes
-, libndtypes
-, libxnd
-, isPy27
+{
+  lib,
+  stdenv,
+  buildPythonPackage,
+  python,
+  ndtypes,
+  libndtypes,
+  libxnd,
+  isPy27,
 }:
 
 buildPythonPackage {
@@ -19,15 +19,6 @@ buildPythonPackage {
 
   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' \
@@ -38,12 +29,14 @@ buildPythonPackage {
                 'runtime_library_dirs = ["${libndtypes}/lib", "${libxnd}/lib"]' \
   '';
 
-  postInstall = ''
-    mkdir $out/include
-    cp python/xnd/*.h $out/include
-  '' + lib.optionalString stdenv.isDarwin ''
-    install_name_tool -add_rpath ${libxnd}/lib $out/${python.sitePackages}/xnd/_xnd.*.so
-  '';
+  postInstall =
+    ''
+      mkdir $out/include
+      cp python/xnd/*.h $out/include
+    ''
+    + lib.optionalString stdenv.hostPlatform.isDarwin ''
+      install_name_tool -add_rpath ${libxnd}/lib $out/${python.sitePackages}/xnd/_xnd.*.so
+    '';
 
   checkPhase = ''
     pushd python