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 CCDQOaxAzl9keQAA0tVLHw (envelope-from ) for ; Mon, 07 Dec 2020 14:48:12 +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 CKu8NaxAzl8CAwAA1q6Kng (envelope-from ) for ; Mon, 07 Dec 2020 14:48:12 +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 8B0C894060F for ; Mon, 7 Dec 2020 14:48:12 +0000 (UTC) Received: from localhost ([::1]:57590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmHoB-0006hN-Av for larch@yhetil.org; Mon, 07 Dec 2020 09:48:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmHo2-0006g9-CZ for guix-patches@gnu.org; Mon, 07 Dec 2020 09:48:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41486) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kmHo2-00087F-5F for guix-patches@gnu.org; Mon, 07 Dec 2020 09:48:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kmHo2-0000KO-3b for guix-patches@gnu.org; Mon, 07 Dec 2020 09:48:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45064] [PATCH 0/2] Set environment variables for GTK+ input methods via profile startup files Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 07 Dec 2020 14:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45064 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , 45064@debbugs.gnu.org Received: via spool by 45064-submit@debbugs.gnu.org id=B45064.160735243232412 (code B ref 45064); Mon, 07 Dec 2020 14:48:02 +0000 Received: (at 45064) by debbugs.gnu.org; 7 Dec 2020 14:47:12 +0000 Received: from localhost ([127.0.0.1]:53028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmHnE-0008QN-1d for submit@debbugs.gnu.org; Mon, 07 Dec 2020 09:47:12 -0500 Received: from mailrelay.tugraz.at ([129.27.2.202]:45610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kmHn9-0008M0-E0 for 45064@debbugs.gnu.org; Mon, 07 Dec 2020 09:47:11 -0500 Received: from nijino.local (217-149-166-73.nat.highway.telekom.at [217.149.166.73]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CqR3W5Xryz1LLyb; Mon, 7 Dec 2020 15:47:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4CqR3W5Xryz1LLyb DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1607352424; bh=7P+3+41aVZtNvfQ9Im4QSlAmPWww1S3Bh4viZV2FuPc=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=J2zCK0CjW+Kxr59hI2efbe5axkKIi029Ovoh0zzvWq3eS8cC39Iros6VO2v2aC7xc dTNVf0dVsrxoZizTwXMxMn/zjHS+aZ9LrOkdDH3xTMddImFORQogqNJRVEILHONLmK DwT6m6pDzTBEcRm/WWVh4uFeLqv283PYmCGiQ2m4= Message-ID: <5dff940dcf1ba6d6b4facfa9eb1167f23c6add04.camel@student.tugraz.at> From: Leo Prikler Date: Mon, 07 Dec 2020 15:47:03 +0100 In-Reply-To: References: <72dca2daaef417e9fef63e43f16eb76fe215f066.camel@student.tugraz.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 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 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.20 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=tugraz.at header.s=mailrelay header.b=J2zCK0Cj; 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-Migadu-Queue-Id: 8B0C894060F X-Spam-Score: -1.20 X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: j9PAqvQs528E Hello, Am Montag, den 07.12.2020, 21:55 +0800 schrieb 宋文武: > [...] > > b. What about `guix environment`? > For `guix environment`, it dosen't load `/etc/profile`, so this have > no > effect, but maybe we should make it doing so? It may not load `/etc/profile`, but it will load `$GUIX_ENVIRONMENT/etc/profile`. > > 2. Which purpose would sourcing those files offer other than > > setting > > environment variables? What would be permissible > > actions? Remember, > > that those would be executed whenever the user spawns a shell, so > > while > > you could put stuff like `fc-cache -r` in there, I personally think > > you > > ought not to. > Sure, for set environment variables, I can't came up with other > examples. It's just like support '/etc/profile.d', but there are some > packages (for now, only nix I think) that will set environment > variables > outside of store and profile (NIX_PATH=$HOME/.nix-defexpr/channels, > etc) > which would be difficult for search-paths. I agree with you that > profile should not run things that modify files. I think another potential candidate if we were to head into that direction might be flatpak, but should those packages not rather assume meaningful default values if said variables are unset? > > I believe a proper fix for GTK would be to allow setting multiple > > IM_MODULE_FILEs instead of a single one and using search paths. > Our search paths can be a single file (eg: SSL_CERT_FILE) or mutiple > files, but we need to add it to all GTK+ input methods (only ibus and > fcitx, but it's like GST_PLUGIN_SYSTEM_PATH every where, not ideal), > my > point is that set thoses environment varaibles once profile level is > better than set them many times each package. If profile hook can > contribute to the search-paths of manifest, I'd go for it. I think there might be a way to work around that. First, create a hidden package, that uses GTK+ as an input and propagates the immodules as well as share/locale (for translation) towards its output (the source can be empty). Add a search-path for GUIX_GTK*_IM_MODULE_FILE to that package. Propagate that input from ibus and fcitx. Then make it so that the IM module file builder looks for that package instead of plain GTK+. If you do everything right, the IM module file builder should only run if a package, that adds an IM module is in the profile and that IM module file will then be used to set GUIX_GTK*_IM_MODULE_FILE. Regards, Leo