Switch poetry nix shell to use python39
This commit is contained in:
parent
1b6502d95d
commit
f59ab3fa7d
|
@ -1,16 +1,9 @@
|
||||||
{ pkgs ? import <nixpkgs> {}, python ? pkgs.python3, ... }:
|
{ pkgs ? import <nixpkgs> {}, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
python-packages = ps: with ps; [
|
|
||||||
pip
|
|
||||||
setuptools
|
|
||||||
wheel
|
|
||||||
];
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
packages = with pkgs; [
|
||||||
(python.withPackages python-packages)
|
python39
|
||||||
poetry
|
(poetry.override { python3 = python39; })
|
||||||
git
|
git
|
||||||
zlib
|
zlib
|
||||||
libgccjit
|
libgccjit
|
||||||
|
@ -21,7 +14,7 @@ pkgs.mkShell {
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
export LD_LIBRARY_PATH="${pkgs.glibc}/lib:${pkgs.glibc_multi}/lib:${pkgs.zlib}/lib:${pkgs.libgccjit}/lib"
|
export LD_LIBRARY_PATH="${pkgs.glibc}/lib:${pkgs.glibc_multi}/lib:${pkgs.zlib}/lib:${pkgs.libgccjit}/lib"
|
||||||
[ ! -f "pyproject.toml" ] && poetry init -n
|
[ ! -f "pyproject.toml" ] && poetry init -n
|
||||||
poetry env use "$(command -v ${python}/bin/python)"
|
poetry env use "$(command -v ${pkgs.python39}/bin/python)"
|
||||||
[ -d "./.venv" ] && source .venv/bin/activate
|
[ -d "./.venv" ] && source .venv/bin/activate
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue