add nix venv

This commit is contained in:
Denis Lehmann 2020-05-08 22:52:46 +02:00
parent 2e79e58ac1
commit 48b06ebf29
2 changed files with 23 additions and 0 deletions

20
default.nix Normal file
View 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
View File

@ -0,0 +1,3 @@
pillow
wheel
colour