tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
root: wrap the executable and patch thisroot.*
Shamrock Lee
3 years ago
7f91dec5
da31bd56
+52
1 changed file
expand all
collapse all
unified
split
pkgs
applications
science
misc
root
default.nix
+52
pkgs/applications/science/misc/root/default.nix
···
4
, fetchpatch
5
, makeWrapper
6
, cmake
0
7
, git
8
, davix
9
, ftgl
10
, gl2ps
11
, glew
0
0
12
, gsl
13
, lapack
14
, libX11
···
20
, libxcrypt
21
, libxml2
22
, llvm_9
0
23
, lz4
24
, xz
0
25
, openblas
26
, openssl
27
, pcre
28
, nlohmann_json
29
, pkg-config
0
30
, python
0
31
, xxHash
32
, zlib
33
, zstd
···
36
, libjpeg
37
, libtiff
38
, libpng
0
0
0
39
, tbb
40
, Cocoa
41
, CoreSymbolication
···
93
libtiff
94
libpng
95
nlohmann_json
0
0
0
96
python.pkgs.numpy
97
tbb
98
]
···
195
--set PYTHONPATH "$out/lib" \
196
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
197
done
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
198
'';
199
200
setupHook = ./setup-hook.sh;
···
4
, fetchpatch
5
, makeWrapper
6
, cmake
7
+
, coreutils
8
, git
9
, davix
10
, ftgl
11
, gl2ps
12
, glew
13
+
, gnugrep
14
+
, gnused
15
, gsl
16
, lapack
17
, libX11
···
23
, libxcrypt
24
, libxml2
25
, llvm_9
26
+
, lsof
27
, lz4
28
, xz
29
+
, man
30
, openblas
31
, openssl
32
, pcre
33
, nlohmann_json
34
, pkg-config
35
+
, procps
36
, python
37
+
, which
38
, xxHash
39
, zlib
40
, zstd
···
43
, libjpeg
44
, libtiff
45
, libpng
46
+
, patchRcPathCsh
47
+
, patchRcPathFish
48
+
, patchRcPathPosix
49
, tbb
50
, Cocoa
51
, CoreSymbolication
···
103
libtiff
104
libpng
105
nlohmann_json
106
+
patchRcPathCsh
107
+
patchRcPathFish
108
+
patchRcPathPosix
109
python.pkgs.numpy
110
tbb
111
]
···
208
--set PYTHONPATH "$out/lib" \
209
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
210
done
211
+
212
+
# Make ldd and sed available to the ROOT executable
213
+
wrapProgram "$out/bin/root" --prefix PATH : "${lib.makeBinPath [
214
+
gnused # sed
215
+
stdenv.cc # c++ ld etc.
216
+
stdenv.cc.libc # ldd
217
+
]}"
218
+
219
+
# Patch thisroot.{sh,csh,fish}
220
+
221
+
# The main target of `thisroot.sh` is "bash-like shells",
222
+
# but it also need to support Bash-less POSIX shell like dash,
223
+
# as they are mentioned in `thisroot.sh`.
224
+
225
+
# `thisroot.sh` would include commands `lsof` and `procps` since ROOT 6.28.
226
+
# See https://github.com/root-project/root/pull/10332
227
+
228
+
patchRcPathPosix "$out/bin/thisroot.sh" "${lib.makeBinPath [
229
+
coreutils # dirname tail
230
+
gnugrep # grep
231
+
gnused # sed
232
+
lsof # lsof # for ROOT (>=6.28)
233
+
man # manpath
234
+
procps # ps # for ROOT (>=6.28)
235
+
which # which
236
+
]}"
237
+
patchRcPathCsh "$out/bin/thisroot.csh" "${lib.makeBinPath [
238
+
coreutils
239
+
gnugrep
240
+
gnused
241
+
lsof # lsof # for ROOT (>=6.28)
242
+
man
243
+
which
244
+
]}"
245
+
patchRcPathFish "$out/bin/thisroot.fish" "${lib.makeBinPath [
246
+
coreutils
247
+
man
248
+
which
249
+
]}"
250
'';
251
252
setupHook = ./setup-hook.sh;