mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-20 11:05:14 +00:00
xrootd: init at 5.4.0 (#160102)
This commit is contained in:
parent
103c44d035
commit
617e0845c7
80
pkgs/tools/networking/xrootd/default.nix
Normal file
80
pkgs/tools/networking/xrootd/default.nix
Normal file
@ -0,0 +1,80 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, cppunit
|
||||
, curl
|
||||
, fuse
|
||||
, libkrb5
|
||||
, libuuid
|
||||
, libxml2
|
||||
, openssl
|
||||
, pkg-config
|
||||
, readline
|
||||
, systemd
|
||||
, zlib
|
||||
, enableTests ? true
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xrootd";
|
||||
version = "5.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "xrootd";
|
||||
repo = "xrootd";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
sha256 = "A2yUz2KhuRBoo5lMpZwPLNCJlYQXqsZSBR+Knj+gWAk=";
|
||||
};
|
||||
|
||||
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
|
||||
]
|
||||
++ 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 ];
|
||||
};
|
||||
}
|
27
pkgs/tools/networking/xrootd/test-runner.nix
Normal file
27
pkgs/tools/networking/xrootd/test-runner.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ lib
|
||||
, runCommand
|
||||
, xrootd
|
||||
}:
|
||||
|
||||
# These tests are specified in the test procedure of the upstream CD:
|
||||
# https://github.com/xrootd/xrootd/blob/master/.github/workflows/build.yml#L90-L98
|
||||
runCommand "${xrootd.pname}-run-tests-${xrootd.version}" {
|
||||
testRunnerPath = "${xrootd}/bin/test-runner";
|
||||
testLibraries = [ "XrdClTests" ];
|
||||
XrdClTestsSuites = [ "UtilsTest" "SocketTest" "PollerTest" ];
|
||||
pname = "${xrootd.pname}-run-tests";
|
||||
inherit (xrootd) version;
|
||||
meta.mainProgram = "test-runner";
|
||||
} ''
|
||||
for testLibrary in $testLibraries; do
|
||||
echo "Testing $testLibrary"
|
||||
testLibraryPath="${xrootd.out}/lib/lib''${testLibrary}.so"
|
||||
testsuiteVarname="''${testLibrary}Suites"
|
||||
for testsuite in ''${!testsuiteVarname}; do
|
||||
echo "Doing test $testsuite"
|
||||
"$testRunnerPath" "$testLibraryPath" "All Tests/$testsuite/"
|
||||
done
|
||||
done
|
||||
mkdir -p "$out/bin"
|
||||
ln -s "$testRunnerPath" "$out/bin/test-runner"
|
||||
''
|
@ -1089,6 +1089,8 @@ with pkgs;
|
||||
|
||||
xcd = callPackage ../tools/misc/xcd { };
|
||||
|
||||
xrootd = callPackage ../tools/networking/xrootd { };
|
||||
|
||||
xtrt = callPackage ../tools/archivers/xtrt { };
|
||||
|
||||
yabridge = callPackage ../tools/audio/yabridge {
|
||||
|
Loading…
Reference in New Issue
Block a user