Skip to content

Instantly share code, notes, and snippets.

@datakurre
Last active October 29, 2015 11:38
Show Gist options
  • Save datakurre/4215aafa5b4a33cefae4 to your computer and use it in GitHub Desktop.
Save datakurre/4215aafa5b4a33cefae4 to your computer and use it in GitHub Desktop.
Buildable Python development environment shell in Nix
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