all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Prikler <leo.prikler@student.tugraz.at>
To: 宋文武 <iyzsong@outlook.com>
Cc: 宋文武 <iyzsong@member.fsf.org>, 45064@debbugs.gnu.org
Subject: [bug#45064] [PATCH 0/2] Set environment variables for GTK+ input methods via profile startup files
Date: Mon, 07 Dec 2020 15:47:03 +0100	[thread overview]
Message-ID: <5dff940dcf1ba6d6b4facfa9eb1167f23c6add04.camel@student.tugraz.at> (raw)
In-Reply-To: <TYAP286MB01850D310F024AF85AAB129DA3CE0@TYAP286MB0185.JPNP286.PROD.OUTLOOK.COM>

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





      reply	other threads:[~2020-12-07 14:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06  5:40 [bug#45064] [PATCH 0/2] Set environment variables for GTK+ input methods via profile startup files iyzsong
2020-12-06  6:15 ` [bug#45064] [PATCH 1/2] profiles: Load application specific " iyzsong
2020-12-07 12:09 ` [bug#45064] [PATCH 0/2] Set environment variables for GTK+ input methods via profile " Leo Prikler
2020-12-07 13:55   ` 宋文武
2020-12-07 14:47     ` Leo Prikler [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5dff940dcf1ba6d6b4facfa9eb1167f23c6add04.camel@student.tugraz.at \
    --to=leo.prikler@student.tugraz.at \
    --cc=45064@debbugs.gnu.org \
    --cc=iyzsong@member.fsf.org \
    --cc=iyzsong@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.