huepaper/default.nix
2020-05-08 22:52:46 +02:00

21 lines
399 B
Nix

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
'';
}