25 lines
453 B
Nix
25 lines
453 B
Nix
|
{ 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"
|
||
|
[ ! -d "./.venv" ] && poetry install --sync
|
||
|
source .venv/bin/activate
|
||
|
'';
|
||
|
}
|