at 24.11-pre 81 lines 1.6 kB view raw
1{ stdenv 2, lib 3, fetchbzr 4, testers 5, autoreconfHook 6, bash 7, coreutils 8, dbus 9, dbus-glib 10, glib 11, intltool 12, pkg-config 13, python3 14, xvfb-run 15}: 16 17stdenv.mkDerivation (finalAttrs: { 18 pname = "dbus-test-runner"; 19 version = "unstable-2019-10-02"; 20 21 src = fetchbzr { 22 url = "lp:dbus-test-runner"; 23 rev = "109"; 24 sha256 = "sha256-4yH19X98SVqpviCBIWzIX6FYHWxCbREpuKCNjQuTFDk="; 25 }; 26 27 postPatch = '' 28 patchShebangs tests/test-wait-outputer 29 30 # Tests `cat` together build shell scripts 31 # true is a PATHable call, bash a shebang 32 substituteInPlace tests/Makefile.am \ 33 --replace '/bin/true' 'true' \ 34 --replace '/bin/bash' '${lib.getExe bash}' 35 ''; 36 37 strictDeps = true; 38 39 nativeBuildInputs = [ 40 autoreconfHook 41 glib # for autoconf macro, gtester, gdbus 42 intltool 43 pkg-config 44 ]; 45 46 buildInputs = [ 47 dbus-glib 48 glib 49 ]; 50 51 nativeCheckInputs = [ 52 bash 53 dbus 54 (python3.withPackages (ps: with ps; [ 55 python-dbusmock 56 ])) 57 xvfb-run 58 ]; 59 60 enableParallelBuilding = true; 61 62 doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; 63 64 checkFlags = [ 65 "XVFB_RUN=${lib.getExe xvfb-run}" 66 ]; 67 68 passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; 69 70 meta = with lib; { 71 description = "A small little utility to run a couple of executables under a new DBus session for testing"; 72 mainProgram = "dbus-test-runner"; 73 homepage = "https://launchpad.net/dbus-test-runner"; 74 license = licenses.gpl3Only; 75 platforms = platforms.unix; 76 maintainers = teams.lomiri.members; 77 pkgConfigModules = [ 78 "dbustest-1" 79 ]; 80 }; 81})