2022-02-20 02:22:22 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, callPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, cppunit
|
2022-02-24 21:40:53 +00:00
|
|
|
, pkg-config
|
2022-02-20 02:22:22 +00:00
|
|
|
, curl
|
|
|
|
, fuse
|
|
|
|
, libkrb5
|
|
|
|
, libuuid
|
|
|
|
, libxml2
|
|
|
|
, openssl
|
|
|
|
, readline
|
|
|
|
, systemd
|
2022-02-24 21:40:53 +00:00
|
|
|
, voms
|
2022-02-20 02:22:22 +00:00
|
|
|
, zlib
|
|
|
|
, enableTests ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xrootd";
|
2022-07-07 01:17:37 +00:00
|
|
|
version = "5.4.3";
|
2022-02-20 02:22:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xrootd";
|
|
|
|
repo = "xrootd";
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2022-07-07 01:17:37 +00:00
|
|
|
hash = "sha256-BlMYm4ffSpUxqMjlDVZC59KOuLvwsk/BeBB3VBjAwjs=";
|
2022-02-20 02:22:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "bin" "out" "dev" "man" ];
|
|
|
|
|
|
|
|
passthru.tests = lib.optionalAttrs enableTests {
|
|
|
|
test-runner = callPackage ./test-runner.nix { };
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
libkrb5
|
|
|
|
libuuid
|
|
|
|
libxml2
|
|
|
|
openssl
|
|
|
|
readline
|
|
|
|
zlib
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isLinux [
|
|
|
|
fuse
|
|
|
|
systemd
|
2022-02-24 21:40:53 +00:00
|
|
|
voms
|
2022-02-20 02:22:22 +00:00
|
|
|
]
|
|
|
|
++ lib.optionals enableTests [
|
|
|
|
cppunit
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
patchShebangs genversion.sh
|
|
|
|
|
|
|
|
# Manually apply part of
|
|
|
|
# https://github.com/xrootd/xrootd/pull/1619
|
|
|
|
# Remove after the above PR is merged.
|
|
|
|
sed -i 's/set\((\s*CMAKE_INSTALL_[A-Z_]\+DIR\s\+"[^"]\+"\s*)\)/define_default\1/g' cmake/XRootDOSDefs.cmake
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags = lib.optionals enableTests [
|
|
|
|
"-DENABLE_TESTS=TRUE"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "High performance, scalable fault tolerant data access";
|
|
|
|
homepage = "https://xrootd.slac.stanford.edu";
|
|
|
|
license = licenses.lgpl3Plus;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ ShamrockLee ];
|
|
|
|
};
|
|
|
|
}
|