Skip to content

Commit d276461

Browse files
committed
fix(nix): set VIRTUAL_ENV for ty to find site-packages
ty needs VIRTUAL_ENV to locate the Python environment's site-packages. Without this, ty looks for .venv which doesn't exist in the Nix environment. Also update justfile to call ty directly since it's available in PATH within the Nix shell.
1 parent 450bdd7 commit d276461

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@
144144
UV_NO_SYNC = "1";
145145
UV_PYTHON = "${python}/bin/python";
146146
UV_PYTHON_DOWNLOADS = "never";
147+
# Set VIRTUAL_ENV for tools like ty that look for site-packages
148+
VIRTUAL_ENV = "${virtualenv}";
147149
};
148150

149151
shellHook = ''

0 commit comments

Comments
 (0)