Conversation
c6b1b57 to
27ecd70
Compare
27ecd70 to
8bfea02
Compare
No, prek only needs Python and uv if you’re using Python hooks, so I don’t think they should be listed as runtime dependencies. |
Using Python hooks doesn't necessarily mean that the project itself is Python-based, so we can't assume that Python is installed on the system either. (Yes, this probably means we'll have to install a bunch of tools as runtime dependencies for Update: We could add flags to the prek package to allow users to exclude dependencies they don't need. Something like |
This approach of predefined, optional dependency groups is the cleanest IMO. It provides a good balance between package size and end-user customization. Additionally, the pattern is already common throughout nixpkgs so it should be familiar to any future contributors. |
8bfea02 to
3313f7a
Compare
`prek` assumes that `git` is on the `PATH`. `prek` will attempt to download `uv` if it's not on the `PATH`, but the downloaded executable is not compatible with NixOS. `prek` also assumes `python` is on the `PATH` when dealing with Python-based hooks. Because of this I've bundled those under a `withPythonSupport` flag. This flag defaults to `false` for compatibility with the original code, and to keep the package the minimal size by default. Closes <j178/prek#1707>.
3313f7a to
38f2cae
Compare
prekassumes thatgitis on thePATH.prekwill attempt to downloaduvif it's not on thePATH, but thedownloaded executable is not compatible with NixOS.
prekalso assumespythonis on thePATHwhen dealing with Python-based hooks. Becauseof this I've bundled those under a
withPythonSupportflag. This flagdefaults to
falsefor compatibility with the original code, and tokeep the package the minimal size by default.
Closes j178/prek#1707.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.