Merge pull request #85970 from NixOS/revert-85892-ibus-db
Revert "ibus: fix dconf db installation"
This commit is contained in:
commit
cf2e613dc6
@ -64,7 +64,7 @@ in
|
|||||||
# Without dconf enabled it is impossible to use IBus
|
# Without dconf enabled it is impossible to use IBus
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
programs.dconf.packages = [ ibusPackage ];
|
programs.dconf.profiles.ibus = "${ibusPackage}/etc/dconf/profile/ibus";
|
||||||
|
|
||||||
services.dbus.packages = [
|
services.dbus.packages = [
|
||||||
ibusAutostart
|
ibusAutostart
|
||||||
|
@ -4,24 +4,13 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.programs.dconf;
|
cfg = config.programs.dconf;
|
||||||
cfgDir = pkgs.symlinkJoin {
|
|
||||||
name = "dconf-system-config";
|
mkDconfProfile = name: path:
|
||||||
paths = map (x: "${x}/etc/dconf") cfg.packages;
|
{
|
||||||
postBuild = ''
|
name = "dconf/profile/${name}";
|
||||||
mkdir -p $out/profile
|
value.source = path;
|
||||||
mkdir -p $out/db
|
};
|
||||||
'' + (
|
|
||||||
concatStringsSep "\n" (
|
|
||||||
mapAttrsToList (
|
|
||||||
name: path: ''
|
|
||||||
ln -s ${path} $out/profile/${name}
|
|
||||||
''
|
|
||||||
) cfg.profiles
|
|
||||||
)
|
|
||||||
) + ''
|
|
||||||
${pkgs.dconf}/bin/dconf update $out/db
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
###### interface
|
###### interface
|
||||||
@ -33,22 +22,18 @@ in
|
|||||||
profiles = mkOption {
|
profiles = mkOption {
|
||||||
type = types.attrsOf types.path;
|
type = types.attrsOf types.path;
|
||||||
default = {};
|
default = {};
|
||||||
description = "Set of dconf profile files, installed at <filename>/etc/dconf/profiles/<replaceable>name</replaceable></filename>.";
|
description = "Set of dconf profile files.";
|
||||||
internal = true;
|
internal = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = mkOption {
|
|
||||||
type = types.listOf types.package;
|
|
||||||
default = [];
|
|
||||||
description = "A list of packages which provide dconf profiles and databases in <filename>/etc/dconf</filename>.";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf (cfg.profiles != {} || cfg.enable) {
|
config = mkIf (cfg.profiles != {} || cfg.enable) {
|
||||||
environment.etc.dconf.source = mkIf (cfg.profiles != {} || cfg.packages != []) cfgDir;
|
environment.etc = optionalAttrs (cfg.profiles != {})
|
||||||
|
(mapAttrs' mkDconfProfile cfg.profiles);
|
||||||
|
|
||||||
services.dbus.packages = [ pkgs.dconf ];
|
services.dbus.packages = [ pkgs.dconf ];
|
||||||
|
|
||||||
|
@ -5,12 +5,16 @@ makeInstalledTest {
|
|||||||
|
|
||||||
testConfig = {
|
testConfig = {
|
||||||
i18n.inputMethod.enabled = "ibus";
|
i18n.inputMethod.enabled = "ibus";
|
||||||
systemd.user.services.ibus-daemon = {
|
|
||||||
serviceConfig.ExecStart = "${pkgs.ibus}/bin/ibus-daemon --xim --verbose";
|
|
||||||
wantedBy = [ "graphical-session.target" ];
|
|
||||||
partOf = [ "graphical-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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;
|
withX11 = true;
|
||||||
|
|
||||||
|
# TODO: ibus-daemon is currently crashing or something
|
||||||
|
# maybe make ibus systemd service that auto-restarts?
|
||||||
|
meta.broken = true;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
, gtk2
|
, gtk2
|
||||||
, gtk3
|
, gtk3
|
||||||
, gtk-doc
|
, gtk-doc
|
||||||
, runCommand
|
|
||||||
, isocodes
|
, isocodes
|
||||||
, cldr-emoji-annotation
|
, cldr-emoji-annotation
|
||||||
, unicode-character-database
|
, unicode-character-database
|
||||||
@ -48,14 +47,6 @@ let
|
|||||||
makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
|
makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
# make-dconf-override-db.sh needs to execute dbus-launch in the sandbox,
|
|
||||||
# it will fail to read /etc/dbus-1/session.conf unless we add this flag
|
|
||||||
dbus-launch = runCommand "sandbox-dbus-launch" {
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
} ''
|
|
||||||
makeWrapper ${dbus}/bin/dbus-launch $out/bin/dbus-launch \
|
|
||||||
--add-flags --config-file=${dbus.daemon}/share/dbus-1/session.conf
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -80,7 +71,7 @@ stdenv.mkDerivation rec {
|
|||||||
outputs = [ "out" "dev" "installedTests" ];
|
outputs = [ "out" "dev" "installedTests" ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs --build data/dconf/make-dconf-override-db.sh
|
echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh
|
||||||
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
|
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -114,7 +105,6 @@ stdenv.mkDerivation rec {
|
|||||||
python3BuildEnv
|
python3BuildEnv
|
||||||
vala
|
vala
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
dbus-launch
|
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
Loading…
Reference in New Issue
Block a user