Created
November 6, 2019 03:47
-
-
Save rummik/cad95e071426b21a93d3eb0b0ebb4102 to your computer and use it in GitHub Desktop.
Nix Shell Python virtualenv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv ? import <nixpkgs> {} }: | |
let | |
inherit (stdenv) pkgs mkShell; | |
inherit (stdenv.lib) flatten; | |
in | |
mkShell rec { | |
name = "venv"; | |
buildInputs = | |
with pkgs; | |
with python37Packages; [ | |
python3 | |
pip | |
virtualen | |
]; | |
shellHook = /* sh */ '' | |
virtualenv --no-setuptools .venv | |
source ./.venv/bin/activate | |
unset PYTHONPATH | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment