Add template shell.nix for python development
This commit is contained in:
parent
75486b9726
commit
680f60db81
24
templates/python.nix
Normal file
24
templates/python.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
let
|
||||
python-packages = ps: with ps; [
|
||||
pip
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
in
|
||||
with pkgs;
|
||||
(buildFHSUserEnv {
|
||||
name = "python";
|
||||
targetPkgs = pkgs: [ ];
|
||||
multiPkgs = pkgs: [
|
||||
zlib zlib-ng
|
||||
(python39.withPackages python-packages)
|
||||
];
|
||||
runScript = ''
|
||||
bash -c "{
|
||||
python -m venv .venv
|
||||
source .venv/bin/activate
|
||||
}"
|
||||
'';
|
||||
}).env
|
Loading…
Reference in a new issue