pre-commit: prevent propagating inputs

Fixes a bug where pre-commit would pollute the PYTHONPATH with its
dependencies, potentially interfering with the user's dependencies.
This commit is contained in:
Matt Rixman 2023-05-30 21:47:31 -06:00 committed by Frederik Rietdijk
parent 2bfb2f045a
commit 8ebcb96e4a

View File

@ -101,6 +101,12 @@ buildPythonApplication rec {
deactivate
'';
# Propagating dependencies leaks them through $PYTHONPATH which causes issues
# when used in nix-shell.
postFixup = ''
rm $out/nix-support/propagated-build-inputs
'';
disabledTests = [
# ERROR: The install method you used for conda--probably either `pip install conda`
# or `easy_install conda`--is not compatible with using conda as an application.