Add LD_LIBRARY_PATH to python nix shell

This commit is contained in:
Evie Litherland-Smith 2023-06-01 08:26:13 +01:00
parent 0775e886d1
commit 3335058680

View file

@ -2,6 +2,7 @@
pkgs.mkShell { pkgs.mkShell {
nativeBuildInputs = with pkgs; [python39 poetry git]; nativeBuildInputs = with pkgs; [python39 poetry git];
shellHook = '' shellHook = ''
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib:${pkgs.python39}/lib:$LD_LIBRARY_PATH
export PROJECT_NAME=$(basename $(readlink -f .)) export PROJECT_NAME=$(basename $(readlink -f .))
[ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear"; python3 -m venv --prompt $PROJECT_NAME $VENV_FLAG .venv [ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear"; python3 -m venv --prompt $PROJECT_NAME $VENV_FLAG .venv
[ -e .venv/bin/activate ] && source .venv/bin/activate [ -e .venv/bin/activate ] && source .venv/bin/activate