Skip to content

Commit

Permalink
python3Packages.mayavi: fix build with Python 3.11 and clang 16
Browse files Browse the repository at this point in the history
* Apply a patch from upstream that adds Python 3.11 compatibility; and
* Apply a patch that fixes an incompatible function pointer conversion.
  • Loading branch information
reckenrode committed Nov 10, 2023
1 parent 3e7992b commit f409f15
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions pkgs/development/python-modules/mayavi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
, buildPythonPackage
, envisage
, fetchPypi
, fetchpatch
, numpy
, packaging
, pyface
Expand All @@ -26,6 +27,24 @@ buildPythonPackage rec {
hash = "sha256-n0J+8spska542S02ibpr7KJMhGDicG2KHJuEKJrT/Z4=";
};

patches = [
# Adds compatibility with Python 3.11.
# https://github.com/enthought/mayavi/pull/1199
(fetchpatch {
name = "python311-compat.patch";
url = "https://github.com/enthought/mayavi/commit/50c0cbfcf97560be69c84b7c924635a558ebf92f.patch";
hash = "sha256-zZOT6on/f5cEjnDBrNGog/wPQh7rBkaFqrxkBYDUQu0=";
includes = [ "tvtk/src/*" ];
})
# Fixes an incompatible function pointer conversion error
# https://github.com/enthought/mayavi/pull/1266
(fetchpatch {
name = "incompatible-pointer-conversion.patch";
url = "https://github.com/enthought/mayavi/commit/887adc8fe2b076a368070f5b1d564745b03b1964.patch";
hash = "sha256-88H1NNotd4pO0Zw1oLrYk5WNuuVrmTU01HJgsTRfKlo=";
})
];

postPatch = ''
# building the docs fails with the usual Qt xcb error, so skip:
substituteInPlace setup.py \
Expand Down

0 comments on commit f409f15

Please sign in to comment.