diff --git a/pkgs/development/python-modules/afdko/default.nix b/pkgs/development/python-modules/afdko/default.nix index e6ae003b8f7b..06e0be5c82f3 100644 --- a/pkgs/development/python-modules/afdko/default.nix +++ b/pkgs/development/python-modules/afdko/default.nix @@ -70,10 +70,16 @@ buildPythonPackage (finalAttrs: { }) ]; - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang (toString [ - "-Wno-error=incompatible-function-pointer-types" - "-Wno-error=int-conversion" - ]); + env = { + # Use system libxml2 + FORCE_SYSTEM_LIBXML2 = true; + } + // lib.optionalAttrs stdenv.cc.isClang { + NIX_CFLAGS_COMPILE = toString [ + "-Wno-error=incompatible-function-pointer-types" + "-Wno-error=int-conversion" + ]; + }; # setup.py will always (re-)execute cmake in buildPhase dontConfigure = true; @@ -95,9 +101,6 @@ buildPythonPackage (finalAttrs: { ++ fonttools.optional-dependencies.unicode ++ fonttools.optional-dependencies.woff; - # Use system libxml2 - FORCE_SYSTEM_LIBXML2 = true; - nativeCheckInputs = [ pytestCheckHook ]; preCheck = ''