add nix venv
This commit is contained in:
parent
2e79e58ac1
commit
48b06ebf29
20
default.nix
Normal file
20
default.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
with import <nixpkgs> {};
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
name = "myPythonEnv";
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
python37Full
|
||||||
|
python37Packages.virtualenv
|
||||||
|
];
|
||||||
|
src = null;
|
||||||
|
shellHook = ''
|
||||||
|
if [ ! -d .venv ]; then
|
||||||
|
python -m venv .venv
|
||||||
|
fi
|
||||||
|
source .venv/bin/activate
|
||||||
|
pip install --upgrade pip
|
||||||
|
if [ -s requirements.txt ]; then
|
||||||
|
pip install -r requirements.txt
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
}
|
3
requirements.txt
Normal file
3
requirements.txt
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
pillow
|
||||||
|
wheel
|
||||||
|
colour
|
Loading…
Reference in New Issue
Block a user