forked from cloudmesh/classes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
41 lines (34 loc) · 758 Bytes
/
shell.nix
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
with import ./nixpkgs.nix;
with pkgs;
let
pythonTools = with python2Packages; [
python2Full
pip
virtualenv
ghp-import
ipython
ipykernel
jupyter
attrs
matplotlib
numpy
scipy
pandas
];
fingerprint = callPackage ./fingerprint_matching.nix {};
in
stdenv.mkDerivation {
name = "class-env";
buildInputs = [
pythonTools
pandoc
] ++ fingerprint;
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
'';
}