-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
56 lines (56 loc) · 1.31 KB
/
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Nix expression for starting jupyter notebook
let
pkgs = import (builtins.fetchGit {
name = "19.03";
url = https://github.com/nixos/nixpkgs/;
ref = "release-19.03";
rev = "7e889fe8c81c45faf8c7964cd89eafb1f2cd6ec4";
}) {
config = {};
overlays=[overlay];
};
#
overlay = self: super: {
python37 = super.python37.override { packageOverrides = pyOverrides; };
};
# Python overrides
pyOverrides = self: super: {
joblib = super.joblib.overridePythonAttrs(old: rec {
version = "0.12.5";
src = super.fetchPypi {
inherit version;
pname = "joblib";
sha256 = "11cdfd38cdb71768149e1373f2509e9b4fc1ec6bc92f874cb515b25f2d69f8f4";
};
});
};
#
pyp = pkgs.python37.withPackages (ps: with ps; [
jupyter_core
jupyter_client
notebook
#
matplotlib
seaborn
numpy
sympy
scipy
pandas
#
pymc3
]);
in
#pkgs.mkShell {buildInputs = [pkgs.clblas]; }
pkgs.mkShell {
buildInputs = [ pyp ];
# TMP&Co overrides needed for Theano https://github.com/NixOS/nixpkgs/issues/4546
shellHook = ''
export PYTHONPATH=$PWD:$PWD/unfolding
export XDG_DATA_HOME=$PWD/.XDG
export JUPYTER_CONFIG_DIR=$PWD/.XDG/jupyter
export TMP=/tmp
export TMPDIR=/tmp
export TEMPDIR=/tmp
export TEMP=/tmp
'';
}