me
/
guix
Archived
1
0
Fork 0

guix-install.sh: Correctly treat empty or unset $XDG_DATA_DIRS

If $XDG_DATA_DIRS is unset, default value of "/usr/local/share:/usr/share"
is used according to XDG Base Directory Specification. However,
/etc/profile.d/guix.sh treats this value as empty list when appending its
own directory, so after installing Guix on the system, launchers such
as Rofi stop searching for .desktop files in /usr/share/applications/
and can't launch applications other than those installed with Guix.

This patch fixes the bug in generated /etc/profile.d/guix.sh

* etc/guix-install.sh (sys_create_init_profile): Use default value of
  /usr/local/share:/usr/share/ before appending if $XDG_DATA_DIRS is not
  set.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Alexander Krotov 2020-01-22 02:01:33 +03:00 committed by Ludovic Courtès
parent 29ba58c0ef
commit 7ff169d04f
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 1 additions and 1 deletions

View File

@ -415,7 +415,7 @@ export GUIX_PROFILE GUIX_LOCPATH
eval `guix package --search-paths=prefix 2> /dev/null`
# set XDG_DATA_DIRS to include Guix installations
export XDG_DATA_DIRS="$GUIX_PROFILE/share${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"
export XDG_DATA_DIRS="$GUIX_PROFILE/share:${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}"
EOF
}