-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathshell.nix
More file actions
42 lines (33 loc) · 781 Bytes
/
shell.nix
File metadata and controls
42 lines (33 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ pkgs ? import ./nixpkgs.nix
}:
with pkgs;
let
pyEnv = python27Full.withPackages (self: with self; [
pip
virtualenv
pillow
]);
systemDeps = [
cacert
libffi
openssl
pkgconfig
sqlite
zlib
];
devDeps = [ file which ];
allDeps = [pyEnv] ++ systemDeps ++ devDeps;
in
stdenv.mkDerivation {
name = "cloudmesh_client_env";
buildInputs = allDeps;
shellHook = ''
# https://github.com/pikajude/darwinixpkgs/blob/master/doc/languages-frameworks/python.md
# fixes: ZIP does not support timestamps before 1980
export SOURCE_DATE_EPOCH=$(date +%s)
export SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt
test -d venv || virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
'';
}