12 name = "ibus-with-plugins-" + lib.getVersion ibus;
14 paths = [ ibus ] ++ plugins;
22 # Need to link contents so that the directories are writeable.
24 "/share/dbus-1/services"
26 "/share/systemd/user/gnome-session.target.wants"
33 buildInputs = [ ibus ] ++ plugins;
37 wrapProgram "$out/bin/$prog" \
38 --set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
39 --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
40 --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
41 --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
42 --set IBUS_DATAROOTDIR "$out/share" \
43 --set IBUS_LIBEXECDIR "$out/libexec" \
44 --set IBUS_LOCALEDIR "$out/share/locale" \
45 --set IBUS_PREFIX "$out" \
46 --set IBUS_TABLE_BIN_PATH "$out/bin" \
47 --set IBUS_TABLE_DATA_DIR "$out/share" \
48 --set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
49 --set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
50 --prefix PYTHONPATH : "$PYTHONPATH" \
51 --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
52 --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share"
55 for prog in ibus-daemon; do
56 wrapProgram "$out/bin/$prog" \
57 --set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
58 --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
59 --prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
60 --set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
61 --set IBUS_DATAROOTDIR "$out/share" \
62 --set IBUS_LIBEXECDIR "$out/libexec" \
63 --set IBUS_LOCALEDIR "$out/share/locale" \
64 --set IBUS_PREFIX "$out" \
65 --set IBUS_TABLE_BIN_PATH "$out/bin" \
66 --set IBUS_TABLE_DATA_DIR "$out/share" \
67 --set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
68 --set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
69 --prefix PYTHONPATH : "$PYTHONPATH" \
70 --prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
71 --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
72 --add-flags "--cache=refresh"
79 "share/dbus-1/services/org.freedesktop.IBus.service" \
80 "share/systemd/user/org.freedesktop.IBus.session.generic.service" \
81 "share/systemd/user/org.freedesktop.IBus.session.GNOME.service"
83 unlink "$out/$service"
84 substitute "$ibusPackage/$service" "$out/$service" --replace "$ibusPackage/bin" "$out/bin"
87 # Re-create relative symbolic links.
89 "$out/share/systemd/user/gnome-session.target.wants/"*
92 until [[ "''${target:0:1}" != "/" ]]; do
93 target="$(readlink "$target")"
96 ln -s "$target" "$link"
99 # Update absolute symbolic links.
101 "$out/lib/systemd/user"
103 target="$(readlink -f "$link")"
104 relativeTarget="''${target#$ibusPackage/}"
105 if [[ "$ibusPackage/$relativeTarget" != "$target" ]]; then
106 >&2 echo "File $link does not point to to a file in $ibusPackage"
110 ln -s "$out/$relativeTarget" "$link"