[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: qt-build-system: prefix or suffix env-variables in wrap-program
From: |
Mikhail Kryshen |
Subject: |
Re: qt-build-system: prefix or suffix env-variables in wrap-program |
Date: |
Wed, 11 Dec 2019 23:25:33 +0300 |
User-agent: |
Notmuch/0.29.3 (https://notmuchmail.org) Emacs/26.3 (x86_64-pc-linux-gnu) |
Hartmut Goebel <address@hidden> 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
signature.asc
Description: PGP signature