-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
94 lines (86 loc) · 2.5 KB
/
flake.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
description = "Unfolding Muon misID samples.";
inputs = {
root-curated.url = "github:umd-lhcb/root-curated";
nixpkgs.follows = "root-curated/nixpkgs";
flake-utils.follows = "root-curated/flake-utils";
pyTuplingUtils.url = "github:umd-lhcb/pyTuplingUtils";
pidcalib2.url = "github:umd-lhcb/pidcalib2";
};
outputs = { self, nixpkgs, flake-utils, root-curated, pyTuplingUtils, pidcalib2 }:
{
overlay = import ./nix/overlay.nix;
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
config = { allowUnfree = true; };
overlays = [ root-curated.overlay pyTuplingUtils.overlay pidcalib2.overlay self.overlay ];
};
python = pkgs.python3;
pythonPackages = python.pkgs;
in
rec {
packages = flake-utils.lib.flattenTree {
dev-shell = devShell.inputDerivation;
inherit (pkgs)
misid-unfold
misid-unfold-applyer
;
};
devShell = pkgs.mkShell rec {
name = "misid-unfold-dev";
buildInputs = (with pkgs; with pythonPackages; [
# Dev tools
clang-tools
root
roounfold
cxxopts
libyamlcpp
boost
# Python stack
pylint
# Python dependencies
statsmodels
numpy
pyyaml
pythonPackages.pyTuplingUtils # naming clash with the input!
pythonPackages.pidcalib2
# LaTeX
(texlive.combine {
inherit (texlive)
scheme-basic
# Explicit dependencies
latexmk
blkarray
booktabs
amsmath
enumitem
mathtools
standalone
preview
# Implicit dependencies
pgf
pgfopts
etoolbox
translator
selnolig
everysel
xkeyval
;
})
]);
FONTCONFIG_FILE = pkgs.makeFontsConf {
fontDirectories = with pkgs; [
gyre-fonts
];
};
shellHook = ''
export PATH=$(pwd)/scripts:$(pwd)/bin:$PATH
export MPLBACKEND=agg # the backend w/o a UI
export MPLCONFIGDIR=$(pwd)/.matplotlib
'';
};
});
}