2023-05-18 09:36:17 +01:00
|
|
|
{pkgs ? import <nixpkgs> {}, ...}:
|
|
|
|
pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [python39 poetry git];
|
|
|
|
shellHook = ''
|
2023-06-01 08:26:13 +01:00
|
|
|
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.zlib}/lib:${pkgs.python39}/lib:$LD_LIBRARY_PATH
|
2023-05-22 09:54:50 +01:00
|
|
|
export PROJECT_NAME=$(basename $(readlink -f .))
|
2023-05-22 10:39:40 +01:00
|
|
|
[ -e .venv/bin/python3 ] && VENV_FLAG="--upgrade" || VENV_FLAG="--clear"; python3 -m venv --prompt $PROJECT_NAME $VENV_FLAG .venv
|
2023-05-18 09:36:17 +01:00
|
|
|
[ -e .venv/bin/activate ] && source .venv/bin/activate
|
|
|
|
'';
|
|
|
|
}
|