forked from usnistgov/jarvis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shell.nix
33 lines (32 loc) · 977 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
{ pkgs ? (import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/20.03.tar.gz";
sha256 = "0182ys095dfx02vl2a20j1hz92dx3mfgz2a6fhn31bqlp1wa8hlq";
}) {}) }:
let
pypkgs = pkgs.python3Packages;
in
pypkgs.buildPythonPackage rec {
pname = "jarvis-tools";
version = "dev";
nativeBuildInputs = with pypkgs; [
joblib
flask
numpy
scipy
matplotlib
spglib
requests
toolz
pytest
];
src=builtins.filterSource (path: type: type != "directory" || baseNameOf path != ".git") ./.;
preShellHook = ''
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
## To build a python package from pypi use
pip install --user scikit-learn pandas lightgbm
'';
}