blob: 8102cea82101a397ac061419432335658a298f7b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
{
lib,
fetchgit,
unstableGitUpdater,
stdenv,
doxygen,
graphviz,
python3Packages,
}:
stdenv.mkDerivation {
pname = "xtf";
version = "0-unstable-2025-10-02";
outputs = [
"out" # xtf-runner and test suite.
"doc" # Autogenerated HTML documentation website.
"dev" # Development headers.
];
src = fetchgit {
url = "https://xenbits.xenproject.org/git-http/xtf.git";
rev = "453490df6f65fb503a39b1bddf0093441eece9ae";
hash = "sha256-YHECFZCl5VgpSv9+OoT5BXpC/tzSVFylrPKK1PrYAOo=";
};
nativeBuildInputs =
(with python3Packages; [
python
wrapPython
])
++ [
doxygen
graphviz
];
buildFlags = [ "doxygen" ];
installFlags = [
"xtfdir=$(out)/share/xtf"
];
postInstall =
# Much like Xen, XTF installs its files to dist/nix/store/*/*,
# so we need to copy them to the right place.
''
mkdir -p ''${!outputBin}/share
cp -prvd dist/nix/store/*/* ''${!outputBin}
''
# The documentation and development headers aren't in the dist/
# folder, so we copy those too.
+ ''
mkdir -p ''${!outputDoc}/share/doc/xtf
cp -prvd docs/autogenerated/html ''${!outputDoc}/share/doc/xtf
mkdir -p ''${!outputDev}/include
cp -prvd include ''${!outputDev}
''
# Wrap xtf-runner, and link it to $out/bin.
# This is necessary because the real xtf-runner should
# be in the same directory as the tests/ directory.
+ ''
wrapPythonProgramsIn "''${!outputBin}/share/xtf" "''${!outputBin} ''${pythonPath[*]}"
mkdir -p ''${!outputBin}/bin
ln -s ''${!outputBin}/share/xtf/xtf-runner ''${!outputBin}/bin/xtf-runner
'';
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Xen Test Framework and Suite for creating microkernel-based tests";
homepage = "https://xenbits.xenproject.org/docs/xtf/index.html";
license = lib.licenses.bsd2;
teams = [ lib.teams.xen ];
mainProgram = "xtf-runner";
platforms = lib.lists.intersectLists lib.platforms.linux lib.platforms.x86_64;
};
}
|