root: add xrootd support and workaround the xrootd runpath bug
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
, patchRcPathFish
|
||||
, patchRcPathPosix
|
||||
, tbb
|
||||
, xrootd
|
||||
, Cocoa
|
||||
, CoreSymbolication
|
||||
, OpenGL
|
||||
@@ -113,6 +114,7 @@ stdenv.mkDerivation rec {
|
||||
patchRcPathPosix
|
||||
python.pkgs.numpy
|
||||
tbb
|
||||
xrootd
|
||||
]
|
||||
++ lib.optionals (!stdenv.isDarwin) [ libX11 libXpm libXft libXext libGLU libGL ]
|
||||
++ lib.optionals (stdenv.isDarwin) [ Cocoa CoreSymbolication OpenGL ]
|
||||
@@ -195,7 +197,7 @@ stdenv.mkDerivation rec {
|
||||
"-Dvdt=OFF"
|
||||
"-Dwebgui=OFF"
|
||||
"-Dxml=ON"
|
||||
"-Dxrootd=OFF"
|
||||
"-Dxrootd=ON"
|
||||
]
|
||||
++ lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${lib.getDev stdenv.cc.libc}/include"
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
@@ -209,11 +211,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
NIX_LDFLAGS = lib.optionalString (stdenv.isLinux && stdenv.isAarch64 && stdenv.cc.isGNU) "-lgcc";
|
||||
|
||||
# Workaround the xrootd runpath bug #169677 by prefixing [DY]LD_LIBRARY_PATH with ${lib.makeLibraryPath xrootd}.
|
||||
# TODO: Remove the [DY]LDLIBRARY_PATH prefix for xrootd when #200830 get merged.
|
||||
postInstall = ''
|
||||
for prog in rootbrowse rootcp rooteventselector rootls rootmkdir rootmv rootprint rootrm rootslimtree; do
|
||||
wrapProgram "$out/bin/$prog" \
|
||||
--set PYTHONPATH "$out/lib" \
|
||||
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib"
|
||||
--set ${lib.optionalString stdenv.isDarwin "DY"}LD_LIBRARY_PATH "$out/lib:${lib.makeLibraryPath [ xrootd ]}"
|
||||
done
|
||||
|
||||
# Make ldd and sed available to the ROOT executable by prefixing PATH.
|
||||
@@ -222,7 +226,8 @@ stdenv.mkDerivation rec {
|
||||
gnused # sed
|
||||
stdenv.cc # c++ ld etc.
|
||||
stdenv.cc.libc # ldd
|
||||
]}"
|
||||
]}" \
|
||||
--prefix ${lib.optionalString stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xrootd ]}"
|
||||
|
||||
# Patch thisroot.{sh,csh,fish}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user