26 lines
460 B
Nix
26 lines
460 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
|
|
black
|
|
isort
|
|
ruff
|
|
git
|
|
];
|
|
|
|
shellHook = ''
|
|
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib/"
|
|
[ -d .venv ] || python -m venv .venv
|
|
[ -d .venv ] && source .venv/bin/activate
|
|
'';
|
|
}
|