-
Notifications
You must be signed in to change notification settings - Fork 41
/
shell-surge.nix
39 lines (37 loc) · 1013 Bytes
/
shell-surge.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
{
tag ? "22.11"
}:
let
pkgs = import (builtins.fetchTarball "https://github.com/NixOS/nixpkgs/archive/${tag}.tar.gz") {};
pypkgs = pkgs.python3Packages;
in
pkgs.mkShell rec {
pname = "pfhub-surge";
nativeBuildInputs = with pypkgs; [
pkgs.rubyPackages.github-pages
pkgs.nodePackages.surge
pypkgs.python
ipython
ipykernel
traitlets
notebook
widgetsnbextension
ipywidgets
scipy
papermill
jupytext
matplotlib
bokeh
scikitimage
(if pkgs.stdenv.isDarwin then pypkgs.jupyter else pypkgs.jupyterlab)
];
shellHook = ''
# export NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
# export OMPI_MCA_plm_rsh_agent=${pkgs.openssh}/bin/ssh
SOURCE_DATE_EPOCH=$(date +%s)
export PYTHONUSERBASE=$PWD/.local
export USER_SITE=`python -c "import site; print(site.USER_SITE)"`
export PYTHONPATH=$PYTHONPATH:$USER_SITE
export PATH=$PATH:$PYTHONUSERBASE/bin
'';
}