Add python and node virtualenvs

This commit is contained in:
Denis Lehmann 2019-01-07 15:47:29 +01:00
parent 9be402f81e
commit bb7d16565a
5 changed files with 40 additions and 1 deletions

View file

@ -0,0 +1,20 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "myPythonEnv";
buildInputs = with pkgs; [
python36Full
python36Packages.virtualenv
python36Packages.pip
];
src = null;
shellHook = ''
# set SOURCE_DATE_EPOCH so that we can use python wheels
SOURCE_DATE_EPOCH=$(date +%s)
virtualenv --no-setuptools venv
export PATH=$PWD/venv/bin:$PATH
if [ -s requirements.txt ]; then
pip install -r requirements.txt
fi
'';
}

View file