all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mikhail Kryshen <mikhail@kryshen.net>
To: Hartmut Goebel <h.goebel@crazy-compilers.com>,
	Guix-devel <guix-devel@gnu.org>
Subject: Re: qt-build-system: prefix or suffix env-variables in wrap-program
Date: Wed, 11 Dec 2019 23:25:33 +0300	[thread overview]
Message-ID: <878snifw3m.fsf@home.localdomain> (raw)
In-Reply-To: <ed993624-2e04-2179-bf20-6a92750ea924@crazy-compilers.com>

[-- Attachment #1: Type: text/plain, Size: 1278 bytes --]

Hartmut Goebel <h.goebel@crazy-compilers.com> writes:

> Hi,
>
> it came to my mind that currently the qt-build-system wraps the program
> without passing along any environment variables. Thus e.g.
> XDG_CONFIG_DIRS will be overwritten, instead of not extended. Furtunatly
> ((guix build utils) wrap-program) supports prefixing or suffixing an
> existing variable value.
>
> Shall qt-build-system: prefix or suffix existing env-variables? Should
> it become
>
>     export
> XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}/gnu/store/…-kate-…"
>
> or
>
>     export
> XDG_DATA_DIRS="/gnu/store/…-kate-…${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"

Note that XDG Base Directory Specification [1] sets default values to
use for empty or unset XDG_* variables, for instance:

  "If $XDG_DATA_DIRS is either not set or empty, a value equal to
  /usr/local/share/:/usr/share/ should be used."

So the correct way to extend XDG_DATA_DIRS would be

  export XDG_DATA_DIRS="${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}:/gnu/store/…-kate-…"

or

  export XDG_DATA_DIRS="/gnu/store/…-kate-…:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"

[1] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

--
Mikhail

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 658 bytes --]

  reply	other threads:[~2019-12-11 20:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11  8:33 qt-build-system: prefix or suffix env-variables in wrap-program Hartmut Goebel
2019-12-11 20:25 ` Mikhail Kryshen [this message]
2019-12-14 17:26   ` Hartmut Goebel
2019-12-17 16:56     ` Mikhail Kryshen

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=878snifw3m.fsf@home.localdomain \
    --to=mikhail@kryshen.net \
    --cc=guix-devel@gnu.org \
    --cc=h.goebel@crazy-compilers.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.