Skip to content

Commit 54f011a

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 54f011a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
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 = ''

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ test-examples:
3131

3232
# Run type checking
3333
ty:
34-
uv run ty check stackone_ai
34+
ty check stackone_ai
3535

3636
# Run gitleaks secret detection
3737
gitleaks:

0 commit comments

Comments
 (0)