From fd98e31bec328b6b2d4b549b85f640ca20d7eef8 Mon Sep 17 00:00:00 2001 From: Emily Date: Thu, 21 Nov 2024 23:01:14 +0000 Subject: [PATCH] vtk: disable function pointer warnings on GCC too I tried to devendor these libraries but it seemed hopeless. See for a more comprehensive attempt. This will have to do for now. --- pkgs/development/libraries/vtk/generic.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/vtk/generic.nix b/pkgs/development/libraries/vtk/generic.nix index 3f7f05678f15..1553f0fa1f8c 100644 --- a/pkgs/development/libraries/vtk/generic.nix +++ b/pkgs/development/libraries/vtk/generic.nix @@ -100,8 +100,13 @@ in stdenv.mkDerivation { "-DVTK_PYTHON_VERSION:STRING=${pythonMajor}" ]; - env = lib.optionalAttrs stdenv.cc.isClang { - NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types"; + env = { + # Lots of warnings in vendored code… + NIX_CFLAGS_COMPILE = + if stdenv.cc.isClang then + "-Wno-error=incompatible-function-pointer-types" + else + "-Wno-error=incompatible-pointer-types"; }; postInstall = optionalString enablePython ''