Created
February 22, 2018 23:56
-
-
Save Thomashrb/4f28fb90461a385961719c812e0dfd17 to your computer and use it in GitHub Desktop.
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
# http://datakurre.pandala.org/2015/10/nix-for-python-developers.html | |
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 = [ | |
# Add packages from nix-env -qaP | grep -i needle queries | |
redis | |
# With Python configuration requiring a special wrapper | |
(python35.buildEnv.override { | |
ignoreCollisions = true; | |
extraLibs = with python35Packages; [ | |
# Add pythonPackages without the prefix | |
redis | |
tornado | |
]; | |
}) | |
]; | |
# Customizable development shell setup with at last SSL certs set | |
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