From bd6c12ba32b1b076baee6cfc0f1fc80b22e04987 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Thu, 23 Apr 2020 12:00:00 +0000 Subject: [PATCH] ibus: fix generation of 00-upstream-settings --- pkgs/tools/inputmethods/ibus/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/inputmethods/ibus/default.nix b/pkgs/tools/inputmethods/ibus/default.nix index 644fd5eef3b..238e133495c 100644 --- a/pkgs/tools/inputmethods/ibus/default.nix +++ b/pkgs/tools/inputmethods/ibus/default.nix @@ -16,6 +16,7 @@ , gtk2 , gtk3 , gtk-doc +, runCommand , isocodes , cldr-emoji-annotation , unicode-character-database @@ -47,6 +48,14 @@ let 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 stdenv.mkDerivation rec { @@ -71,7 +80,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "installedTests" ]; postPatch = '' - echo \#!${runtimeShell} > data/dconf/make-dconf-override-db.sh + patchShebangs --build data/dconf/make-dconf-override-db.sh cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make . ''; @@ -105,6 +114,7 @@ stdenv.mkDerivation rec { python3BuildEnv vala wrapGAppsHook + dbus-launch ]; propagatedBuildInputs = [