From d6079b031899ea471e4d972e4b9e909b60049be9 Mon Sep 17 00:00:00 2001 From: Hugo Herter Date: Tue, 13 Aug 2024 15:01:11 +0200 Subject: [PATCH] Fix: nix-shell raised 'pop_var_context' Using nix-shell with the latest version of Nixpkgs raised the following error: ``` bash: pop_var_context: head of shell_variables not a function context ``` Changing the order of the instructions fixed this. --- shell.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/shell.nix b/shell.nix index bd740609c..274577238 100644 --- a/shell.nix +++ b/shell.nix @@ -60,9 +60,6 @@ pkgs.mkShell { # Install the required Python packages ./venv/bin/pip install -e .\[testing\] - # Activate the virtual environment - source venv/bin/activate - # If config.yml does not exist, create it with the port specified in this shell. [ -e config.yml ] || echo -e "postgres:\n port: $PG_PORT" > config.yml @@ -78,5 +75,8 @@ pkgs.mkShell { echo "PostgreSQL started. Data directory is $PGDATA, Socket directory is $PG_SOCKET_DIR" | sed 's/./=/g' echo -e "\033[0m" set +eu + + # Activate the virtual environment + source venv/bin/activate ''; }