From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WGv3IWaXnV/MSAAA0tVLHw (envelope-from ) for ; Sat, 31 Oct 2020 16:57:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id QCPyHWaXnV+KRAAA1q6Kng (envelope-from ) for ; Sat, 31 Oct 2020 16:57:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 31D239403CC for ; Sat, 31 Oct 2020 16:57:10 +0000 (UTC) Received: from localhost ([::1]:58072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kYuBh-0000aS-5j for larch@yhetil.org; Sat, 31 Oct 2020 12:57:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53074) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYuBa-0000a5-R8 for guix-patches@gnu.org; Sat, 31 Oct 2020 12:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kYuBa-0001QR-IU for guix-patches@gnu.org; Sat, 31 Oct 2020 12:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kYuBa-0006hJ-FR for guix-patches@gnu.org; Sat, 31 Oct 2020 12:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#44354] [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE. Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 31 Oct 2020 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44354 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 44354@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160416336125627 (code B ref -1); Sat, 31 Oct 2020 16:57:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 Oct 2020 16:56:01 +0000 Received: from localhost ([127.0.0.1]:34436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYuAb-0006fA-ET for submit@debbugs.gnu.org; Sat, 31 Oct 2020 12:56:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:46612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kYuAa-0006f3-3K for submit@debbugs.gnu.org; Sat, 31 Oct 2020 12:56:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52752) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYuAZ-0000Or-H8 for guix-patches@gnu.org; Sat, 31 Oct 2020 12:55:59 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:19941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kYuAW-0001HK-Kg for guix-patches@gnu.org; Sat, 31 Oct 2020 12:55:58 -0400 Received: from localhost.localdomain (217-149-162-161.nat.highway.telekom.at [217.149.162.161]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CNlXD4zhZz3wYj for ; Sat, 31 Oct 2020 17:49:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1604162988; bh=IAFwdIsJ1+iNLsEPTMB5QFTIb/5OpPlQ+hfIm5ZiXgs=; h=From:To:Subject:Date; b=lMqFXyd8EdqjurjrLHecBfeCa7X66bnFfR1MQhkTY8wWoc/F4CqLXUoR6LitWcjxQ 4QaJMb7G78cbSnp0bGkqhHrE6ZsJ1jVoNJbCypae1eXQ/U0xh5WDiRRS2cIoc5bZ3v 40dHQMNFDa5MqJTsuyTn/wAeevGdckod+ZHs5X58= From: Leo Prikler Date: Sat, 31 Oct 2020 17:46:03 +0100 Message-Id: <20201031164602.13152-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.29.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 Received-SPF: pass client-ip=129.27.2.202; envelope-from=leo.prikler@student.tugraz.at; helo=mailrelay.tugraz.at X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/31 12:49:50 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tugraz.at header.s=mailrelay header.b=lMqFXyd8; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 5.09 X-TUID: /A7tR0k+eR9c This makes it, so that GNOME can handle system-wide input methods installed by adding them to the gnome package, to the operating system packages, or to some other profile-service. An example would be a system-wide installation of ibus along with input methods like ibus-anthy or ibus-rime. * gnu/services/desktop.scm (gnome-environment): New variable. (gnome-desktop-service-type)[extensions]: Use it here. --- gnu/services/desktop.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 265cf9f35f..8a571aacb0 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -918,12 +918,43 @@ rules." "gnome-system-monitor" "gvfs")))) +(define (gnome-environment config) + (let* ((lib "/run/current-system/profile/lib") + (im-module-files + `(("3" + "GUIX_GTK3_IM_MODULE_FILE" + . + ,(string-append lib "/gtk-3.0/3.0.0/immodules-gtk3.cache")) + ("2" + "GUIX_GTK2_IM_MODULE_FILE" + . + ,(string-append lib "/gtk-2.0/2.10.0/immodules-gtk2.cache")))) + (versions + (filter-map + (match-lambda + ((_ pkg) + (and (package? pkg) + (string=? (package-name pkg) "gtk+") + (version-major (package-version pkg)))) + ((_ pkg "out") + (and (package? pkg) + (string=? (package-name pkg) "gtk+") + (version-major (package-version pkg)))) + (_ #f)) + (package-transitive-inputs (gnome-package config))))) + (filter-map + (lambda (version) + (assoc-ref im-module-files version)) + (delete-duplicates versions)))) + (define gnome-desktop-service-type (service-type (name 'gnome-desktop) (extensions (list (service-extension polkit-service-type gnome-polkit-settings) + (service-extension session-environment-service-type + gnome-environment) (service-extension profile-service-type (compose list gnome-package)))) -- 2.29.1