forked from next-exp/nexus
-
Notifications
You must be signed in to change notification settings - Fork 1
/
shell.nix
64 lines (56 loc) · 1.52 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
57
58
59
60
61
62
63
64
# To override the default python version:
#
# nix-shell shell.nix --argstr py 39
#
{ py ? "38"
, nixpkgs-commit-id ? "78cd22c1b8604de423546cd49bfe264b786eca13" # nixos-unstable on 2022-01-03.
}:
# To update `nixpkgs-commit-id` go to https://status.nixos.org/, which lists the
# latest commit that passes all the tests for any release. Unless there is an
# overriding reason, pick the latest stable NixOS release.
let
nixpkgs-url = "https://github.com/nixos/nixpkgs/archive/${nixpkgs-commit-id}.tar.gz";
pkgs = import (builtins.fetchTarball { url = nixpkgs-url; }) {
#overlays = [ (import ./nix/geant4.nix) ];
};
python = builtins.getAttr ("python" + py) pkgs;
command = pkgs.writeShellScriptBin;
pythonEnv = python.withPackages (ps: [
ps.pandas
ps.numpy
ps.tables
ps.pytest
ps.flaky
ps.hypothesis
ps.pytest-xdist
ps.pytest-instafail
ps.pytest-order
]);
in
pkgs.mkShell rec {
name = "nexus";
buildInputs = [
pythonEnv
pkgs.git
pkgs.scons
pkgs.bear
pkgs.clang_11
pkgs.geant4
pkgs.geant4.data.G4PhotonEvaporation
pkgs.geant4.data.G4EMLOW
pkgs.geant4.data.G4RadioactiveDecay
pkgs.geant4.data.G4ENSDFSTATE
pkgs.geant4.data.G4SAIDDATA
pkgs.geant4.data.G4PARTICLEXS
pkgs.geant4.data.G4NDL
pkgs.root
pkgs.gsl
pkgs.hdf5
];
HDF5_DIR = pkgs.symlinkJoin { name = "hdf5"; paths = [ pkgs.hdf5 pkgs.hdf5.dev ]; };
HDF5_LIB = "${HDF5_DIR}/lib";
HDF5_INC = "${HDF5_DIR}/include";
shellHook = ''
export NEXUSDIR=`pwd`
'';
}