Created
October 28, 2019 09:17
-
-
Save mmai/1ee7356c7418c2a1f5741f9c2e973a85 to your computer and use it in GitHub Desktop.
Creates a nix-shell environnement for installing apps using pip install
This file contains 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
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "random-project"; | |
buildInputs = [ | |
python | |
python37Packages.virtualenv | |
]; | |
env = buildEnv { name = name; paths = buildInputs; }; | |
shellHook = '' | |
export SOURCE_DATE_EPOCH=315532800 | |
virtualenv .env | |
source .env/bin/activate | |
pip install -r requirements.txt | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment