Skip to content

Instantly share code, notes, and snippets.

@rummik
Created November 6, 2019 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rummik/cad95e071426b21a93d3eb0b0ebb4102 to your computer and use it in GitHub Desktop.
Save rummik/cad95e071426b21a93d3eb0b0ebb4102 to your computer and use it in GitHub Desktop.
Nix Shell Python virtualenv
{ 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