Merge pull request #71442 from jtojnar/ibus-fixes

Fix/clean up various ibus-engines
This commit is contained in:
Jan Tojnar
2019-12-07 12:10:44 +01:00
committed by GitHub
19 changed files with 571 additions and 242 deletions
+8 -2
View File
@@ -53,9 +53,15 @@ in
config = mkIf (config.i18n.inputMethod.enabled == "ibus") {
i18n.inputMethod.package = ibusPackage;
environment.systemPackages = [
ibusAutostart
];
# Without dconf enabled it is impossible to use IBus
environment.systemPackages = with pkgs; [
dconf ibusAutostart
programs.dconf.enable = true;
services.dbus.packages = [
ibusAutostart
];
environment.variables = {
+41 -25
View File
@@ -29,36 +29,51 @@ let
# Extra flags to pass to gnome-desktop-testing-runner.
, testRunnerFlags ? ""
}:
makeTest rec {
name = tested.name;
meta = {
maintainers = tested.meta.maintainers;
};
# Extra attributes to pass to makeTest.
# They will be recursively merged into the attrset created by this function.
, ...
}@args:
makeTest
(recursiveUpdate
rec {
name = tested.name;
machine = { ... }: {
imports = [
testConfig
] ++ optional withX11 ../common/x11.nix;
meta = {
maintainers = tested.meta.maintainers;
};
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
machine = { ... }: {
imports = [
testConfig
] ++ optional withX11 ../common/x11.nix;
};
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
testScript =
optionalString withX11 ''
machine.wait_for_x()
'' +
optionalString (preTestScript != "") ''
${preTestScript}
'' +
''
machine.succeed(
"gnome-desktop-testing-runner ${testRunnerFlags} -d '${tested.installedTests}/share'"
)
'';
};
};
testScript =
optionalString withX11 ''
machine.wait_for_x()
'' +
optionalString (preTestScript != "") ''
${preTestScript}
'' +
''
machine.succeed(
"gnome-desktop-testing-runner ${testRunnerFlags} -d '${tested.installedTests}/share'"
)
'';
}
(removeAttrs args [
"tested"
"testConfig"
"preTestScript"
"withX11"
"testRunnerFlags"
])
);
in
@@ -73,6 +88,7 @@ in
glib-networking = callInstalledTest ./glib-networking.nix {};
gnome-photos = callInstalledTest ./gnome-photos.nix {};
graphene = callInstalledTest ./graphene.nix {};
ibus = callInstalledTest ./ibus.nix {};
libgdata = callInstalledTest ./libgdata.nix {};
libxmlb = callInstalledTest ./libxmlb.nix {};
ostree = callInstalledTest ./ostree.nix {};
+20
View File
@@ -0,0 +1,20 @@
{ pkgs, makeInstalledTest, ... }:
makeInstalledTest {
tested = pkgs.ibus;
testConfig = {
i18n.inputMethod.enabled = "ibus";
};
preTestScript = ''
# ibus has ibus-desktop-testing-runner but it tries to manage desktop session so we just spawn ibus-daemon ourselves
machine.succeed("ibus-daemon --daemonize --verbose")
'';
withX11 = true;
# TODO: ibus-daemon is currently crashing or something
# maybe make ibus systemd service that auto-restarts?
meta.broken = true;
}