From 01aee17eea837454532d669553a11bd4030c8bfe Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Tue, 6 Jun 2023 14:53:52 +0200 Subject: [PATCH] dbus-test-runner: init at unstable-2019-10-02 --- .../tools/dbus-test-runner/default.nix | 80 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 82 insertions(+) create mode 100644 pkgs/development/tools/dbus-test-runner/default.nix diff --git a/pkgs/development/tools/dbus-test-runner/default.nix b/pkgs/development/tools/dbus-test-runner/default.nix new file mode 100644 index 000000000000..c4951f0193c5 --- /dev/null +++ b/pkgs/development/tools/dbus-test-runner/default.nix @@ -0,0 +1,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" + ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d8ee8e0d78e9..1230cac32f9d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17726,6 +17726,8 @@ with pkgs; ansible-doctor = callPackage ../tools/admin/ansible/doctor.nix { }; + dbus-test-runner = callPackage ../development/tools/dbus-test-runner { }; + phpunit = callPackage ../development/tools/misc/phpunit { }; ### DEVELOPMENT / TOOLS / LANGUAGE-SERVERS