Skip to content

Commit

Permalink
python: update task ordering spec
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Nov 22, 2024
1 parent 86f3cdc commit 7331eee
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/modules/languages/python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -459,25 +459,24 @@ in
description = "Initialize Python virtual environment";
exec = initVenvScript;
exports = [ "PATH" "VIRTUAL_ENV" ];
after = [ "devenv:enterShell" ];
};

"devenv:python:poetry" = lib.mkIf cfg.poetry.install.enable {
description = "Initialize Poetry";
exec = initPoetryScript;
exports = [ "PATH" ] ++ lib.optional cfg.poetry.activate.enable "VIRTUAL_ENV";
after = lib.optional cfg.venv.enable "devenv:python:virtualenv";
after = [ "devenv:enterShell" ];
before = lib.optional cfg.venv.enable "devenv:python:virtualenv";
};

"devenv:python:uv" = lib.mkIf cfg.uv.sync.enable {
description = "Initialize uv sync";
exec = initUvScript;
exports = [ "PATH" ];
after = lib.optional cfg.venv.enable "devenv:python:virtualenv";
after = [ "devenv:enterShell" ];
before = lib.optional cfg.venv.enable "devenv:python:virtualenv";
};

"devenv:enterShell".after = lib.optional cfg.venv.enable "devenv:python:virtualenv"
++ lib.optional cfg.poetry.install.enable "devenv:python:poetry"
++ lib.optional cfg.uv.sync.enable "devenv:python:uv";
};

enterShell = ''
Expand Down

0 comments on commit 7331eee

Please sign in to comment.