python: support withPackages with venvs and prepare for upstream patch#2234
python: support withPackages with venvs and prepare for upstream patch#2234domenkozar merged 20 commits intomainfrom
withPackages with venvs and prepare for upstream patch#2234Conversation
…ons of nixpkgs This can also be toggled manually if needed.
🔍 Suggested ReviewersBased on git blame analysis of the changed lines, the following contributors have significant experience with the modified code: Please consider reviewing this PR as you have authored significant portions of the code being modified. Your expertise would be valuable! 🙏 This comment was automatically generated by git-blame-auto-reviewer Last updated: 2025-11-11T14:08:15.535Z |
Deploying devenv with
|
| Latest commit: |
3f7cac2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5880f4d8.devenv.pages.dev |
| Branch Preview URL: | https://fix-1218.devenv.pages.dev |
|
Added a test to verify We now also patch This PR still needs to be tested against the upstream nixpkgs PR. Once it's out of staging, we can verify this easily without rebuilding the universe. |
|
Shall we merge this? |
|
suggestion: we need another uv test as uv is the predominant tool |
|
but should not hold it back! |
Let's wait until the upsteam patch is released proper.
If the python executable is a symlink, e.g. in a devenv profile, we won't correctly resolve to the buildEnv-wrapped executable without `resolve-argv0`.
withPackages with venvs and prepare for upstream patch
cachix/devenv#2234 change causes shell fail to build, because languages.python.packages to be modified. As a result, the python package needs to be specified in languages.python.uv2nix.package. I initially though of setting languages.python.packages as the default but there's no point as the shell will be broken with it. I also did not set it to pkgs.python3 as it would lead to silently replacing python version with one that might not be desired.
This prepares us for the arrival of several upstream patches (including NixOS/nixpkgs#442540) that will make it possible to drop the python wrapper.
withPackagesare now propagated through the wrapperpatches.buildEnv.enableoption to toggle the wrapperFixes #1807.
Fixes #1792.
Fixes #1486. (possibly earlier)
Fixes #1218.