-
Notifications
You must be signed in to change notification settings - Fork 2
/
overlay.nix
384 lines (324 loc) · 11.3 KB
/
overlay.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
final: prev:
with final; {
lib = prev.lib.extend (import ./lib);
adapters = import ./pkgs/stdenv/adapters.nix prev;
inherit
(final.adapters)
optimizePackage
withOpenMP
optimizedStdEnv
customFlags
extraNativeCflags
customFlagsWithinStdEnv
;
# some-qt5-package = prev.libsForQt5.callPackage ./pkgs/some-qt5-package { };
# ...
inherit
(final.callPackages ./pkgs/elfutils {
lib = final.lib;
elfutils = prev.elfutils;
})
elfutils_0_179
;
dyninst = final.callPackage ./pkgs/dyninst {};
palabos = final.callPackage ./pkgs/palabos {};
otf2 = final.callPackage ./pkgs/otf2 {};
score-p = final.callPackage ./pkgs/score-p {
inherit (final) otf2;
inherit (final) cubew;
inherit (final) cubelib;
};
libffi_3_2 = final.callPackage ./pkgs/libffi/3.2.nix {};
gotcha = final.callPackage ./pkgs/gotcha {};
caliper = final.callPackage ./pkgs/caliper {
inherit (final) dyninst;
};
caliper-cuda = final.caliper.override {
enableCuda = true;
};
drvFlavor = drv: let
name = builtins.head (builtins.concatLists (map (x: builtins.match x drv.name) [
"(.*)-[0-9.]*" # fallback regex
]));
flavor =
if drv == null
then "none"
else "${name}";
in
builtins.trace "drvFlavor: ${
if (drv != null)
then drv
else "null"
}=${flavor}"
flavor;
compilers_line = stdenv: mpi: let
compiler_id = drvFlavor stdenv.cc.cc;
mpi_id = drvFlavor mpi;
line =
{
intel-compilers = {
intelmpi = "CC=mpiicc CXX=mpiicpc F77=mpiifort FC=mpiifort";
openmpi = "CC=mpicc CXX=mpicxx F77=mpif90 FC=mpif90";
none = "CC=icc CXX=icpc F77=ifort FC=ifort";
};
oneapi-compilers = {
none = "CC=icx CXX=icpx FC=ifx";
openmpi = "CC=mpicc CXX=mpicxx FC=mpif90";
oneapi-mpi = "CC=mpiicc CXX=mpiicpc FC=mpiifort";
};
aocc = {
none = "CC=clang CXX=clang++ FC=flang";
openmpi = "CC=mpicc CXX=mpicxx FC=mpif90";
};
gcc = {
openmpi = "CC=mpicc CXX=mpicxx FC=mpif90";
none = "";
};
}
."${compiler_id}"
."${mpi_id}";
in
builtins.trace "compilers ${compiler_id}.${mpi_id}: ${line}" line;
collectl = final.callPackage ./pkgs/collectl {};
cubew = final.callPackage ./pkgs/cubew {};
cubelib = final.callPackage ./pkgs/cubelib {};
cubegui = final.callPackage ./pkgs/cubegui {inherit (final) cubelib;};
arm-forge = libsForQt5.callPackage ./pkgs/arm-forge {};
dwm = prev.dwm.override {
patches = [
./pkgs/dwm/0001-dwm-pertag-20170513-ceac8c9.patch
./pkgs/dwm/0002-dwm-systray-20180314-3bd8466.diff.patch
./pkgs/dwm/0003-config.h-azerty.patch
./pkgs/dwm/0004-config.h-audio-controls.patch
./pkgs/dwm/0005-light-solarized-theme.patch
./pkgs/dwm/0006-config-support-shortcuts-for-vbox-inside-windows.patch
./pkgs/dwm/0007-xpra-as-float.patch
./pkgs/dwm/0008-qtpass-as-float.patch
./pkgs/dwm/0009-pineentry-as-float.patch
];
};
fetchannex = final.callPackage ./pkgs/build-support/fetchannex {git-annex = prev.gitAndTools.git-annex;};
# throw "use gitAndTools.hub instead"
gitAndTools =
(removeAttrs prev.gitAndTools ["hubUnstable"])
// {
git-credential-password-store = final.callPackage ./pkgs/git-credential-password-store {};
#git-crypt = prev.gitAndTools.git-crypt.overrideAttrs (o: {
# patches = (o.patches or []) ++ [
# ./pkgs/git-crypt-pr-222.patch # seems not fully working (further testing required)
# ];
#});
};
jobs = final.callPackage ./pkgs/jobs {
inherit final prev;
inherit (final) stream;
admin_scripts_dir = "";
};
hpcg = final.callPackage ./pkgs/hpcg {};
inherit
(final.callPackages ./pkgs/hpl {
inherit (final) fetchannex;
})
hpl_netlib_2_3
hpl_mkl_netlib_2_3
hpl_cuda_ompi_volta_pascal_kepler_3_14_19
;
lmod = final.callPackage ./pkgs/lmod {
inherit (prev.luaPackages) luafilesystem;
inherit (final) luaposix;
};
luaposix = final.callPackage ./pkgs/luaposix {};
lo2s = final.callPackage ./pkgs/lo2s {inherit (final) otf2;};
lulesh = final.callPackage ./pkgs/lulesh {};
gccNoOffloadPtx = final.callPackage ./pkgs/gcc/9 {
cudaSupport = false;
noSysDirs = true;
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
enableLTO = !stdenv.isi686;
libcCross =
if stdenv.targetPlatform != stdenv.buildPlatform
then libcCross
else null;
threadsCross =
if stdenv.targetPlatform != stdenv.buildPlatform
then threadsCross
else null;
isl =
if !stdenv.isDarwin
then isl_0_17
else null;
};
gcc9OffloadPtx = final.callPackage ./pkgs/gcc/9 {
cudaSupport = true;
nvidia_x11 = linuxPackages.nvidia_x11;
noSysDirs = true;
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
enableLTO = !stdenv.isi686;
libcCross =
if stdenv.targetPlatform != stdenv.buildPlatform
then libcCross
else null;
threadsCross =
if stdenv.targetPlatform != stdenv.buildPlatform
then threadsCross
else null;
isl =
if !stdenv.isDarwin
then isl_0_17
else null;
};
gcc10OffloadPtx = final.callPackage ./pkgs/gcc/10 {
cudaSupport = true;
nvidia_x11 = linuxPackages.nvidia_x11;
langFortran = true;
noSysDirs = true;
# PGO seems to speed up compilation by gcc by ~10%, see #445 discussion
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
enableLTO = !stdenv.isi686;
libcCross =
if stdenv.targetPlatform != stdenv.buildPlatform
then libcCross
else null;
threadsCross =
if stdenv.targetPlatform != stdenv.buildPlatform
then threadsCross
else null;
isl =
if !stdenv.isDarwin
then isl_0_17
else null;
};
gnumake_slurm = prev.gnumake.overrideAttrs (attrs: {
patches =
(attrs.patches or [])
++ [
./pkgs/make/make-4.2.slurm.patch
#(pkgs.fetchpatch {
# url = "https://raw.githubusercontent.com/SchedMD/slurm/master/contribs/make-4.0.slurm.patch";
# sha256 = "1rnwcw6xniwq6d0qpbz1b15bzmkl6r9zj20m6jnivif8qd7gkjqf";
# stripLen = 1;
#})
];
});
hpcbind = final.callPackage ./pkgs/hpcbind {};
maqao = final.callPackage ./pkgs/maqao {};
modulefile = final.callPackage ./pkgs/gen-modulefile {};
must = final.callPackage ./pkgs/must {inherit (final) dyninst;};
muster = final.callPackage ./pkgs/muster {};
nemo_gyre_36 = final.callPackage ./pkgs/nemo/3.6.nix {};
nemo_bench_4_0 = final.callPackage ./pkgs/nemo/4.0.nix {};
nemo_gyre_pisces_4_0 = final.callPackage ./pkgs/nemo/4.0.nix {config = "GYRE_PISCES";};
nemo_bench_4_0_2 = final.callPackage ./pkgs/nemo/4.0.2.nix {};
nemo_gyre_pisces_4_0_2 = final.callPackage ./pkgs/nemo/4.0.2.nix {config = "GYRE_PISCES";};
#inherit (final.callPackages ./pkgs/nemo { })
# nemo_meto_go8_4_0_2
#;
nss_sss = callPackage ./pkgs/sssd/nss-client.nix {};
nvptx-newlib = final.callPackage ./pkgs/nvptx-newlib {};
nvptx-tools = final.callPackage ./pkgs/nvptx-tools {};
inherit
(final.callPackages ./pkgs/openmpi {
enableSlurm = true;
lib = final.lib;
openmpi = prev.openmpi;
})
openmpi_2_0_2
openmpi_4_0_2
openmpi_4_1_1
;
osu-micro-benchmarks = final.callPackage ./pkgs/osu-micro-benchmarks {};
# https://github.com/NixOS/nixpkgs/issues/44426
python27 = prev.python27.override {packageOverrides = final.pythonOverrides;};
python35 = prev.python35.override {packageOverrides = final.pythonOverrides;};
python36 = prev.python36.override {packageOverrides = final.pythonOverrides;};
python37 = prev.python37.override {packageOverrides = final.pythonOverrides;};
python38 = prev.python38.override {packageOverrides = final.pythonOverrides;};
python39 = prev.python39.override {packageOverrides = final.pythonOverrides;};
python310 = prev.python310.override {packageOverrides = final.pythonOverrides;};
pythonOverrides = python-self: python-super:
with python-self; {
hatchet = callPackage ./pkgs/py-hatchet {};
pyslurm = final.lib.upgradeOverride python-super.pyslurm (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "19-05-0";
});
pyslurm_17_02_0 = (python-super.pyslurm.override {slurm = slurm_17_02_11;}).overrideAttrs (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "17.02.0";
patches = [];
preConfigure = ''
sed -i -e 's@__max_slurm_hex_version__ = "0x11020a"@__max_slurm_hex_version__ = "0x11020b"@' setup.py
'';
src = prev.fetchFromGitHub {
repo = "pyslurm";
owner = "PySlurm";
# The release tags use - instead of .
rev = "refs/heads/17.02.0";
sha256 = "sha256:1b5xaq0w4rkax8y7rnw35fapxwn739i21dgb9609hg01z9b6n1ka";
};
});
pyslurm_17_11_12 = (python-super.pyslurm.override {slurm = final.slurm_17_11_9_1;}).overrideAttrs (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "17.11.12";
patches = [];
src = prev.fetchFromGitHub {
repo = "pyslurm";
owner = "PySlurm";
# The release tags use - instead of .
rev = "${builtins.replaceStrings ["."] ["-"] version}";
sha256 = "01xdx2v3w8i3bilyfkk50f786fq60938ikqp2ls2kf3j218xyxmz";
};
});
pyslurm_19_05_0 = (python-super.pyslurm.override {slurm = final.slurm_19_05_5;}).overrideAttrs (oldAttrs: rec {
name = "${oldAttrs.pname}-${version}";
version = "19.05.0";
patches = [];
src = prev.fetchFromGitHub {
repo = "pyslurm";
owner = "PySlurm";
# The release tags use - instead of .
rev = "${builtins.replaceStrings ["."] ["-"] version}";
sha256 = "sha256-WdCs1hs5cUp/iYM6Rtyk29XNHNOfBqvK99okHxAmy9E=";
};
});
mpi4py = builtins.trace "mpi4py without check" python-super.mpi4py.overrideAttrs (oldAttrs: {
doCheck = false;
doInstallCheck = false;
});
};
ravel = final.callPackage ./pkgs/ravel {
inherit (final) otf2;
inherit (final) muster;
};
inherit
(final.callPackages ./pkgs/slurm {
gtk2 = null;
lib = final.lib;
slurm = prev.slurm;
})
slurm_17_02_11
slurm_17_11_5
slurm_17_11_9_1
slurm_18_08_5
slurm_19_05_3_2
slurm_19_05_5
;
st = prev.st.override {
patches = [
./pkgs/st/0001-theme-from-base16-c_header.patch
./pkgs/st/0002-Show-bold-not-as-bright.patch
(prev.fetchpatch {
url = "https://st.suckless.org/patches/clipboard/st-clipboard-20180309-c5ba9c0.diff";
sha256 = "sha256:1gsqgasc5spklrk7575m7jlxcii072wf03qn9znqwh1ibsy9lnr2";
})
];
};
xios_10 = final.callPackage ./pkgs/xios/1.0.nix {};
xios = final.callPackage ./pkgs/xios {};
# miniapps
miniapp-ping-pong = final.callPackage ./pkgs/miniapp-ping-pong {};
stream = final.callPackage ./pkgs/stream {};
test-dgemm = final.callPackage ./pkgs/test-dgemm {};
}