diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix index f4e8c927ad88..4f4cfea37c34 100644 --- a/pkgs/development/python-modules/Cython/default.nix +++ b/pkgs/development/python-modules/Cython/default.nix @@ -74,6 +74,10 @@ in buildPythonPackage rec { doCheck = false; # doCheck = !stdenv.isDarwin; + # force regeneration of generated code in source distributions + # https://github.com/cython/cython/issues/5089 + setupHook = ./setup-hook.sh; + meta = { changelog = "https://github.com/cython/cython/blob/${version}/CHANGES.rst"; description = "An optimising static compiler for both the Python programming language and the extended Cython programming language"; diff --git a/pkgs/development/python-modules/Cython/setup-hook.sh b/pkgs/development/python-modules/Cython/setup-hook.sh new file mode 100644 index 000000000000..c26330a53644 --- /dev/null +++ b/pkgs/development/python-modules/Cython/setup-hook.sh @@ -0,0 +1,3 @@ +if [ -z "${dontForceRegenCython-}"]; then + export CYTHON_FORCE_REGEN=1 +fi