root: wrap the executable and patch thisroot.*

+52
+52
pkgs/applications/science/misc/root/default.nix
··· 4 4 , fetchpatch 5 5 , makeWrapper 6 6 , cmake 7 + , coreutils 7 8 , git 8 9 , davix 9 10 , ftgl 10 11 , gl2ps 11 12 , glew 13 + , gnugrep 14 + , gnused 12 15 , gsl 13 16 , lapack 14 17 , libX11 ··· 20 23 , libxcrypt 21 24 , libxml2 22 25 , llvm_9 26 + , lsof 23 27 , lz4 24 28 , xz 29 + , man 25 30 , openblas 26 31 , openssl 27 32 , pcre 28 33 , nlohmann_json 29 34 , pkg-config 35 + , procps 30 36 , python 37 + , which 31 38 , xxHash 32 39 , zlib 33 40 , zstd ··· 36 43 , libjpeg 37 44 , libtiff 38 45 , libpng 46 + , patchRcPathCsh 47 + , patchRcPathFish 48 + , patchRcPathPosix 39 49 , tbb 40 50 , Cocoa 41 51 , CoreSymbolication ··· 93 103 libtiff 94 104 libpng 95 105 nlohmann_json 106 + patchRcPathCsh 107 + patchRcPathFish 108 + patchRcPathPosix 96 109 python.pkgs.numpy 97 110 tbb 98 111 ] ··· 195 208 --set PYTHONPATH "$out/lib" \ 196 209 --set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib" 197 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 + ]}" 198 250 ''; 199 251 200 252 setupHook = ./setup-hook.sh;