Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-hooks: prevent pre-commit from leaking build inputs into env #1689

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

sandydoo
Copy link
Member

Upstream issue: NixOS/nixpkgs#302376

Python derivations built with buildPythonApplication or converted from a library with toPythonApplication do not make the distinction between build- and run-time dependencies. When these packages are added to packages, their propagatedBuildInputs are leaked into the environment. This includes the Python interpreter and other dependencies, which may conflict with the user's configured environment.

This PR symlinks the pre-commit binary to avoid bringing along all of the Python baggage with it.

Fixes #1644.

@sandydoo sandydoo added the bug Something isn't working label Jan 27, 2025
@sandydoo sandydoo marked this pull request as ready for review January 29, 2025 09:17
@sandydoo sandydoo merged commit 0f043d3 into main Jan 29, 2025
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using pre-commit.hooks with a python project causes PYTHONPATH to have default site-packages
1 participant