From 18479f82fb1dee5dfa290b6411d93078195a256a Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 23 Jul 2024 09:49:47 +0100 Subject: [PATCH] Update python envrc template Completely removes the need to call a shell.nix in .envrc now (I think) --- templates | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates b/templates index 7796077..c4e5bad 100644 --- a/templates +++ b/templates @@ -208,6 +208,10 @@ envrc-file-mode (python "CC=\"$(nix build nixpkgs#stdenv.cc.cc.lib --print-out-paths --no-link)\"" n "ZLIB=\"$(nix build nixpkgs#zlib --print-out-paths --no-link)\"" n "export LD_LIBRARY_PATH=\"$CC/lib\":\"$ZLIB/lib\"" n + "VENV_DIR=.venv/" n + "if [ ! -f $VENV_DIR/bin/python3 ]; then" n + > "nix run nixpkgs#python3 -- -m venv $VENV_DIR" n + "fi" n "source .venv/bin/activate") ;; Local Variables: