Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bfa2405
python: wire up a toggle to disable the python wrapper on newer versi…
sandydoo Oct 22, 2025
a476d74
python: fix `withPackages` when used with the legacy python wrapper
sandydoo Oct 22, 2025
9b96d42
tests: add a `python3.withPackages` test
sandydoo Oct 22, 2025
645e270
Auto generate missing individual markdowns
github-actions[bot] Oct 22, 2025
4d38422
Auto generate docs and examples
github-actions[bot] Oct 22, 2025
09e9f21
python: bring back LD_LIBRARY_PATH wrapper
sandydoo Oct 22, 2025
3f43a18
python: post-review pass
sandydoo Oct 23, 2025
26b4d8e
tests: add a venv to the python withPackages test
sandydoo Oct 23, 2025
12b1322
python: properly patch buildEnvs
sandydoo Oct 24, 2025
bea13ad
python: avoid nesting `buildEnv` by patching in-place
sandydoo Oct 24, 2025
bdafca6
Auto generate missing individual markdowns
github-actions[bot] Oct 24, 2025
74f437e
Auto generate docs and examples
github-actions[bot] Oct 24, 2025
a2f9508
python: disable the bounds check for the wrapper
sandydoo Nov 10, 2025
7ee4c3e
python: remove trace
sandydoo Nov 10, 2025
5cb2b37
python: resolve argv0 to correctly point to venv python when symlinked
sandydoo Nov 10, 2025
5a604b7
python: add a test for uv + withPackages
sandydoo Nov 10, 2025
13e4ef8
python: simplify how the wrapper is applied
sandydoo Nov 10, 2025
95d531c
python: don't call the wrapper "legacy" until it is
sandydoo Nov 10, 2025
32a04c7
Auto generate missing individual markdowns
github-actions[bot] Nov 10, 2025
3f7cac2
Auto generate docs and examples
github-actions[bot] Nov 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# For developing the mkdocs-based documentation
python = {
enable = true;
package = pkgs.python3.withPackages (ps: [ ps.matplotlib ]);
# Use a faster package manager
uv.enable = true;
venv = {
Expand Down
97 changes: 63 additions & 34 deletions docs/src/reference/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -15935,7 +15935,7 @@ boolean
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -15956,7 +15956,7 @@ package
` pkgs.python3 `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -15983,7 +15983,7 @@ string
` "./directory" `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16010,7 +16010,7 @@ list of absolute path
```

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16035,7 +16035,36 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



## languages.python.patches.buildEnv.enable



Whether to apply fixes to Python’s ` buildEnv ` for correct runtime initialization:

- Executables use ` --inherit-argv0 ` to ensure Python initializes with correct ` sys.prefix ` and ` sys.base_prefix `
- Python package scripts are unwrapped to invoke the environment’s interpreter directly

Without these fixes, venvs cannot access environment packages via ` --system-site-packages `.

Enabled by default for nixpkgs versions prior to 25.11.
Newer nixpkgs releases include upstream fixes that make this patch obsolete.



*Type:*
boolean



*Default:*
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16061,7 +16090,7 @@ boolean
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16082,7 +16111,7 @@ package
` pkgs.poetry `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16103,7 +16132,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16129,7 +16158,7 @@ boolean
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16150,7 +16179,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16171,7 +16200,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16192,7 +16221,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16213,7 +16242,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16234,7 +16263,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16255,7 +16284,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16276,7 +16305,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16297,7 +16326,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16318,7 +16347,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16339,7 +16368,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16360,7 +16389,7 @@ one of “no”, “little”, “more”, “debug”
` "no" `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16386,7 +16415,7 @@ boolean
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16407,7 +16436,7 @@ package
` pkgs.uv `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16433,7 +16462,7 @@ boolean
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16454,7 +16483,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16475,7 +16504,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16496,7 +16525,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16517,7 +16546,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16538,7 +16567,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16559,7 +16588,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16580,7 +16609,7 @@ list of string
` [ ] `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16606,7 +16635,7 @@ boolean
` true `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16627,7 +16656,7 @@ boolean
` false `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16649,7 +16678,7 @@ null or strings concatenated with “\\n” or absolute path
` null `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand All @@ -16676,7 +16705,7 @@ null or string
` "3.11 or 3.11.2" `

*Declared by:*
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix](https://github.com/cachix/devenv/blob/main/src/modules/languages/python.nix)
- [https://github.com/cachix/devenv/blob/main/src/modules/languages/python](https://github.com/cachix/devenv/blob/main/src/modules/languages/python)



Expand Down
Loading