From 524e6ac2373b484cbe347d06d6262a21dd53b57f Mon Sep 17 00:00:00 2001 From: Bob van der Linden Date: Wed, 8 Mar 2023 15:06:21 +0100 Subject: [PATCH] python: allow venv to be used in recursive devenv --- src/modules/languages/python.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/languages/python.nix b/src/modules/languages/python.nix index c27209de6..0f62322d9 100644 --- a/src/modules/languages/python.nix +++ b/src/modules/languages/python.nix @@ -5,7 +5,7 @@ let initVenvScript = pkgs.writeShellScript "init-venv.sh" '' if [ ! -L ${config.env.DEVENV_STATE}/venv/devenv-profile ] \ - || [ "$(${pkgs.coreutils}/bin/readlink ${config.env.DEVENV_STATE}/venv/devenv-profile)" != "$DEVENV_PROFILE" ] + || [ "$(${pkgs.coreutils}/bin/readlink ${config.env.DEVENV_STATE}/venv/devenv-profile)" != "${config.env.DEVENV_PROFILE}" ] then if [ -d ${config.env.DEVENV_STATE}/venv ] then @@ -16,7 +16,7 @@ let [ -f "${config.env.DEVENV_STATE}/poetry.lock.checksum" ] && rm ${config.env.DEVENV_STATE}/poetry.lock.checksum ''} python -m venv ${config.env.DEVENV_STATE}/venv - ln -sf $DEVENV_PROFILE ${config.env.DEVENV_STATE}/venv/devenv-profile + ln -sf ${config.env.DEVENV_PROFILE} ${config.env.DEVENV_STATE}/venv/devenv-profile fi source ${config.env.DEVENV_STATE}/venv/bin/activate '';