Skip to content

Commit 8f7f0c0

Browse files
authored
[Fix] Ensure python sys path contains nix installed modules (#218)
## Summary Fixes #216 Fixes issue where python can't find modules installed as nix packages. ## How was it tested? testdata/python/pipenv `devbox shell` `python -m pipenv`
1 parent 6d96c05 commit 8f7f0c0

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

testdata/python/pipenv/devbox.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"packages": [
3+
"python310",
4+
"pipenv"
5+
],
6+
"shell": {
7+
"init_hook": null
8+
}
9+
}

tmpl/shell.nix.tmpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,9 @@ mkShell {
4444
echo "PATH=$PATH"
4545
{{- end }}
4646
'';
47+
packages = [
48+
{{- range .DevPackages}}
49+
{{.}}
50+
{{end -}}
51+
];
4752
}

0 commit comments

Comments
 (0)