Gaetan Lepage 2025-04-10 14:43:39 +02:00
parent 10af252670
commit b2ac303287

View File

@ -30,14 +30,14 @@
stdenv.mkDerivation (finalAttrs: {
pname = "xrootd";
version = "5.7.1";
version = "5.8.0";
src = fetchFromGitHub {
owner = "xrootd";
repo = "xrootd";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-ZU31nsQgs+Gz9mV8LVv4utJ7g8TXN5OxHjNDfQlt38M=";
hash = "sha256-i0gVKk2nFQQGxvUI2zqPWL82SFJdNglAuZ5gNdNhg2M=";
};
postPatch =
@ -46,6 +46,17 @@ stdenv.mkDerivation (finalAttrs: {
substituteInPlace cmake/XRootDConfig.cmake.in \
--replace-fail "@PACKAGE_CMAKE_INSTALL_" "@CMAKE_INSTALL_FULL_"
''
# Upstream started using an absolute path in an install's DESTINATION directive.
# This causes our build to fail in `fixupPhase` with:
# Moving /nix/store/jbh4667k5zm74h9wv8y1j11x89cv6pnd-xrootd-5.8.0/include to /nix/store/6vnmipw8p1hc6cmkrsq9v1ay7j6iycq2-xrootd-5.8.0-dev/include
# mv: cannot overwrite '/nix/store/6vnmipw8p1hc6cmkrsq9v1ay7j6iycq2-xrootd-5.8.0-dev/include/xrootd': Directory not empty
# Patch submitted upstream: https://github.com/xrootd/xrootd/pull/2478
+ ''
substituteInPlace src/XrdPfc.cmake \
--replace-fail \
'DESTINATION ''${CMAKE_INSTALL_PREFIX}/include/xrootd/XrdPfc' \
'DESTINATION ''${CMAKE_INSTALL_INCLUDEDIR}/xrootd/XrdPfc'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
sed -i cmake/XRootDOSDefs.cmake -e '/set( MacOSX TRUE )/ainclude( GNUInstallDirs )'
'';