all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Meiyo Peng <meiyo@riseup.net>
To: Giovanni Biscuolo <g@xelera.eu>
Cc: guix-devel@gnu.org
Subject: Re: XDG_DATA_DIRS issue in execution environment on LTSP
Date: Thu, 28 Mar 2019 10:35:07 +0800	[thread overview]
Message-ID: <877ecj915w.fsf@riseup.net> (raw)
In-Reply-To: <878swz930e.fsf@riseup.net>

Hi,

Meiyo Peng writes:

> #+begin_src fish
>   if status is-login || status is-interactive
>       set -gx MY_PROFILE "$HOME/.guix-profile"
>
>       # Guix on foreign distros.
>       # This test is a dirty hack.
>       if test -d /var/guix && ! test -L /run/current-system
>           # Environment
>           set -gx ROOT_PROFILE "/var/guix/profiles/per-user/root/guix-profile"
>           set -gx GUIX_LOCPATH "$ROOT_PROFILE/lib/locale"
>           set -gx SSL_CERT_DIR "$ROOT_PROFILE/etc/ssl/certs"
>           set -gx SSL_CERT_FILE "$ROOT_PROFILE/etc/ssl/certs/ca-certificates.crt"
>
>           # XDG
>           # ==========> Look at here! <=========
>           # Set $XDG_CONFIG_DIRS and $XDG_DATA_DIRS to their default
>           # values if they are not set.
>           test "$XDG_CONFIG_DIRS" = "" && set -gx XDG_CONFIG_DIRS "/etc/xdg"
>           test "$XDG_DATA_DIRS" = "" && set -gx XDG_DATA_DIRS "/usr/local/share:/usr/share"
>           set -gx XDG_CONFIG_DIRS "$MY_PROFILE/etc/xdg:$XDG_CONFIG_DIRS"
>           set -gx XDG_DATA_DIRS "$MY_PROFILE/share:$XDG_DATA_DIRS"
>           # ==========> Look at here! <=========
>
>           # Source my etc/profile
>           set -gx GUIX_PROFILE $MY_PROFILE
>           fenv source $MY_PROFILE/etc/profile
>           set -eu GUIX_PROFILE
>
>           # $PATH
>           # add_path is a function defined by me.  It adds the argument
>           # into $PATH
>           add_path $MY_PROFILE/sbin
>           add_path $MY_PROFILE/bin
>           add_path $XDG_CONFIG_HOME/guix/current/bin
>       end
>   end
> #+end_src

I made a minor mistake here.  `set -eu` is invalid fish command.  `set
-eu GUIX_PROFILE` should be `set -e GUIX_PROFILE`.  It means erase the
$GUIX_PROFILE environment variable.

--
Meiyo Peng
https://www.pengmeiyu.com/

  reply	other threads:[~2019-03-28  2:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-27 14:51 XDG_DATA_DIRS issue in execution environment on LTSP Giovanni Biscuolo
2019-03-28  1:55 ` Meiyo Peng
2019-03-28  2:35   ` Meiyo Peng [this message]
2019-03-28 11:22   ` Giovanni Biscuolo
2019-03-28 11:51     ` Meiyo Peng

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=877ecj915w.fsf@riseup.net \
    --to=meiyo@riseup.net \
    --cc=g@xelera.eu \
    --cc=guix-devel@gnu.org \
    /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.