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,19 @@
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "myNodeEnv";
buildInputs = with pkgs; [
nodejs
];
src = null;
shellHook = ''
mkdir -p .npm
if [ -s global_packages.txt ]; then
cat global_packages.txt | xargs npm install -g --prefix $PWD/.npm
fi
if [ -s package.json ]; then
npm install
fi
export PATH=$PWD/.npm/bin:$PATH
'';
}

View file