From fc072108fe55fcfbdb552a7993245da1968fe7e0 Mon Sep 17 00:00:00 2001 From: Sander Date: Tue, 5 Nov 2024 17:45:43 +0400 Subject: [PATCH] python: update task ordering spec --- src/modules/languages/python.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/modules/languages/python.nix b/src/modules/languages/python.nix index 9c6aef053..71bfbb447 100644 --- a/src/modules/languages/python.nix +++ b/src/modules/languages/python.nix @@ -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 = ''