diff --git a/templates/poetry.nix b/templates/poetry.nix index af84a269..47d1a599 100644 --- a/templates/poetry.nix +++ b/templates/poetry.nix @@ -1,4 +1,4 @@ -{ pkgs ? import {}, python ? pkgs.python39, ... }: +{ pkgs ? import {}, python ? pkgs.python3, ... }: let python-packages = ps: with ps; [ @@ -14,13 +14,14 @@ pkgs.mkShell { git zlib libgccjit + glibc + glibc_multi ]; shellHook = '' - export LD_LIBRARY_PATH="${pkgs.zlib}/lib:${pkgs.libgccjit}/lib" - poetry lock --check > /dev/null || poetry lock + export LD_LIBRARY_PATH="${pkgs.glibc}/lib:${pkgs.glibc_multi}/lib:${pkgs.zlib}/lib:${pkgs.libgccjit}/lib" + [ ! -f "pyproject.toml" ] && poetry init -n poetry env use "$(command -v ${python}/bin/python)" - [ ! -d "./.venv" ] && poetry install --sync - source .venv/bin/activate + [ -d "./.venv" ] && source .venv/bin/activate ''; }