Skip to content

Commit

Permalink
uv: fix test and don't override VIRTUAL_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Oct 7, 2024
1 parent 30b43aa commit 401979b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/languages/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,13 @@ in
"devenv:python:poetry" = lib.mkIf cfg.poetry.install.enable {
description = "Initialize Poetry";
exec = initPoetryScript;
exports = [ "PATH" "VIRTUAL_ENV" ];
exports = [ "PATH" ] ++ lib.optional cfg.poetry.activate.enable "VIRTUAL_ENV";
};

"devenv:python:uv" = lib.mkIf cfg.uv.sync.enable {
description = "Initialize uv sync";
exec = initUvScript;
exports = [ "PATH" "VIRTUAL_ENV" ];
exports = [ "PATH" ];
};

"devenv:enterShell".after = lib.optional cfg.venv.enable "devenv:python:virtualenv"
Expand Down
1 change: 1 addition & 0 deletions tests/python-uv-sync/devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ in
languages.python = {
enable = true;
directory = "./directory";
venv.enable = true;
uv = {
enable = true;
package = pkgs-unstable.uv;
Expand Down

0 comments on commit 401979b

Please sign in to comment.