python3Packages.mayavi: fix build with Python 3.11 and clang 16

* Apply a patch from upstream that adds Python 3.11 compatibility; and
* Apply a patch that fixes an incompatible function pointer conversion.

+19
+19
pkgs/development/python-modules/mayavi/default.nix
··· 3 3 , buildPythonPackage 4 4 , envisage 5 5 , fetchPypi 6 + , fetchpatch 6 7 , numpy 7 8 , packaging 8 9 , pyface ··· 25 26 inherit pname version; 26 27 hash = "sha256-n0J+8spska542S02ibpr7KJMhGDicG2KHJuEKJrT/Z4="; 27 28 }; 29 + 30 + patches = [ 31 + # Adds compatibility with Python 3.11. 32 + # https://github.com/enthought/mayavi/pull/1199 33 + (fetchpatch { 34 + name = "python311-compat.patch"; 35 + url = "https://github.com/enthought/mayavi/commit/50c0cbfcf97560be69c84b7c924635a558ebf92f.patch"; 36 + hash = "sha256-zZOT6on/f5cEjnDBrNGog/wPQh7rBkaFqrxkBYDUQu0="; 37 + includes = [ "tvtk/src/*" ]; 38 + }) 39 + # Fixes an incompatible function pointer conversion error 40 + # https://github.com/enthought/mayavi/pull/1266 41 + (fetchpatch { 42 + name = "incompatible-pointer-conversion.patch"; 43 + url = "https://github.com/enthought/mayavi/commit/887adc8fe2b076a368070f5b1d564745b03b1964.patch"; 44 + hash = "sha256-88H1NNotd4pO0Zw1oLrYk5WNuuVrmTU01HJgsTRfKlo="; 45 + }) 46 + ]; 28 47 29 48 postPatch = '' 30 49 # building the docs fails with the usual Qt xcb error, so skip: