Unverified Commit 717e8f90 authored by Robert Scott's avatar Robert Scott Committed by GitHub
Browse files

Merge pull request #268058 from a-n-n-a-l-e-e/xnd-python311

python311Packages.xnd: fix python311 build with upstream patch
parents 605b6f5e 8e46a64e
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
{ 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' \