-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
31 lines (29 loc) · 751 Bytes
/
default.nix
File metadata and controls
31 lines (29 loc) · 751 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
with import <nixpkgs> {};
let
my-python-packages = python-packages: with python-packages; [
build
flake8
jupyter numba
numpy
pip
scipy
scikit-learn
statsmodels
tabulate
twine
wheel
];
python-with-my-packages = python3.withPackages my-python-packages;
in pkgs.mkShell {
buildInputs = [
python-with-my-packages
];
shellHook = ''
# Tells pip to put packages into $PIP_PREFIX instead of the usual locations.
# See https://pip.pypa.io/en/stable/user_guide/#environment-variables.
export PIP_PREFIX=$(pwd)/_build/pip_packages
export PYTHONPATH="$PIP_PREFIX/${pkgs.python3.sitePackages}:$PYTHONPATH"
export PATH="$PIP_PREFIX/bin:$PATH"
unset SOURCE_DATE_EPOCH
'';
}