From f0719291bc23766be9d266fbe2ac1c397fe856ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 5 Apr 2022 20:33:38 +0200 Subject: [PATCH] python39Packages.cffi: move prePatch to postPatch to not break patches --- pkgs/development/python-modules/cffi/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/cffi/default.nix b/pkgs/development/python-modules/cffi/default.nix index a65cd297f43f..22d2e87cd276 100644 --- a/pkgs/development/python-modules/cffi/default.nix +++ b/pkgs/development/python-modules/cffi/default.nix @@ -19,11 +19,12 @@ if isPyPy then null else buildPythonPackage rec { propagatedBuildInputs = [ pycparser ]; - prePatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.isDarwin '' # Remove setup.py impurities - substituteInPlace setup.py --replace "'-iwithsysroot/usr/include/ffi'" "" - substituteInPlace setup.py --replace "'/usr/include/ffi'," "" - substituteInPlace setup.py --replace '/usr/include/libffi' '${lib.getDev libffi}/include' + substituteInPlace setup.py \ + --replace "'-iwithsysroot/usr/include/ffi'" "" \ + --replace "'/usr/include/ffi'," "" \ + --replace '/usr/include/libffi' '${lib.getDev libffi}/include' ''; # The tests use -Werror but with python3.6 clang detects some unreachable code.