2023-04-03 09:24:26 +01:00
|
|
|
{ pkgs ? import <nixpkgs> {}, python ? pkgs.python39, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
python-packages = ps: with ps; [
|
|
|
|
pip
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
in
|
|
|
|
pkgs.mkShell {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
(python.withPackages python-packages)
|
|
|
|
poetry
|
|
|
|
git
|
|
|
|
zlib
|
|
|
|
libgccjit
|
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
export LD_LIBRARY_PATH="${pkgs.zlib}/lib:${pkgs.libgccjit}/lib"
|
2023-04-03 13:29:15 +01:00
|
|
|
poetry lock --check > /dev/null || poetry lock
|
|
|
|
poetry env use "$(command -v ${python}/bin/python)"
|
2023-04-03 09:24:26 +01:00
|
|
|
[ ! -d "./.venv" ] && poetry install --sync
|
|
|
|
source .venv/bin/activate
|
|
|
|
'';
|
|
|
|
}
|