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
79
80
|
{ stdenv
, lib
, fetchbzr
, testers
, autoreconfHook
, bash
, coreutils
, dbus
, dbus-glib
, glib
, intltool
, pkg-config
, python3
, xvfb-run
}:
stdenv.mkDerivation (finalAttrs: {
pname = "dbus-test-runner";
version = "unstable-2019-10-02";
src = fetchbzr {
url = "lp:dbus-test-runner";
rev = "109";
sha256 = "sha256-4yH19X98SVqpviCBIWzIX6FYHWxCbREpuKCNjQuTFDk=";
};
postPatch = ''
patchShebangs tests/test-wait-outputer
# Tests `cat` together build shell scripts
# true is a PATHable call, bash a shebang
substituteInPlace tests/Makefile.am \
--replace '/bin/true' 'true' \
--replace '/bin/bash' '${lib.getExe bash}'
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
glib # for autoconf macro, gtester, gdbus
intltool
pkg-config
];
buildInputs = [
dbus-glib
glib
];
nativeCheckInputs = [
bash
dbus
(python3.withPackages (ps: with ps; [
python-dbusmock
]))
xvfb-run
];
enableParallelBuilding = true;
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
checkFlags = [
"XVFB_RUN=${lib.getExe xvfb-run}"
];
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = with lib; {
description = "A small little utility to run a couple of executables under a new DBus session for testing";
homepage = "https://launchpad.net/dbus-test-runner";
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = teams.lomiri.members;
pkgConfigModules = [
"dbustest-1"
];
};
})
|