Last active
October 29, 2015 11:38
-
-
Save datakurre/4215aafa5b4a33cefae4 to your computer and use it in GitHub Desktop.
Buildable Python development environment shell in Nix
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
with import <nixpkgs> {}; | |
stdenv.mkDerivation rec { | |
name = "env"; | |
# Mandatory boilerplate for buildable env | |
env = buildEnv { name = name; paths = buildInputs; }; | |
builder = builtins.toFile "builder.sh" '' | |
source $stdenv/setup; ln -s $env $out | |
''; | |
# Customizable development requirements | |
buildInputs = [ | |
(python.buildEnv.override { | |
ignoreCollisions = true; | |
extraLibs = with pythonPackages; [ | |
pillow | |
]; | |
}) | |
]; | |
# Customizable development shell setup | |
shellHook = '' | |
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment