From e1b6c3f112f72337c7bd51d091702b02d0e5dce9 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Sun, 29 Dec 2024 17:02:05 +0800 Subject: [PATCH] python3Packages.pyopengl-accelerate: fix build with numpy 2 and gcc 14 --- .../python-modules/pyopengl-accelerate/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/python-modules/pyopengl-accelerate/default.nix b/pkgs/development/python-modules/pyopengl-accelerate/default.nix index f32d555d7589..c138af55ea6a 100644 --- a/pkgs/development/python-modules/pyopengl-accelerate/default.nix +++ b/pkgs/development/python-modules/pyopengl-accelerate/default.nix @@ -19,6 +19,11 @@ buildPythonPackage rec { hash = "sha256-KxI2ISc6k59/0uwidUHjmfm11OgV1prgvbG2xwopNoA="; }; + postPatch = '' + substituteInPlace src/numpy_formathandler.pyx \ + --replace-fail 'Py_intptr_t' 'npy_intp' + ''; + nativeBuildInputs = [ cython numpy @@ -26,6 +31,11 @@ buildPythonPackage rec { wheel ]; + env.NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=int-conversion" + "-Wno-error=incompatible-pointer-types" + ]; + meta = { description = "This set of C (Cython) extensions provides acceleration of common operations for slow points in PyOpenGL 3.x"; homepage = "https://pyopengl.sourceforge.net/";