depot/third_party/nixpkgs/pkgs/development/tools/dbus-test-runner/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

81 lines
1.6 KiB
Nix

{ 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 = "Small little utility to run a couple of executables under a new DBus session for testing";
mainProgram = "dbus-test-runner";
homepage = "https://launchpad.net/dbus-test-runner";
license = licenses.gpl3Only;
platforms = platforms.unix;
maintainers = teams.lomiri.members;
pkgConfigModules = [
"dbustest-1"
];
};
})