pythonPackages.pytest.setupHook: run in correct phase

It was reported that the 2nd solution wasn't working as expected because
it was ran in the wrong phase.

This commit creates a new phase, in between the installCheckPhase and distPhase.
This commit is contained in:
Frederik Rietdijk 2018-09-01 11:57:08 +02:00 committed by Frederik Rietdijk
parent 7242ef1ec1
commit 20a4a4b593

View File

@ -29,9 +29,11 @@ buildPythonPackage rec {
# Remove .pytest_cache when using py.test in a Nix build # Remove .pytest_cache when using py.test in a Nix build
setupHook = writeText "pytest-hook" '' setupHook = writeText "pytest-hook" ''
postFixupHooks+=( pytestcachePhase() {
'find $out -name .pytest_cache -type d -exec rm -rf {} +' find $out -name .pytest_cache -type d -exec rm -rf {} +
) }
preDistPhases+=" pytestcachePhase"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {