gnu: gnome-session: Use absolute paths in .desktop files.

This makes the gnome-session .desktop files usable even if gnome-session
is not available from the PATH variable.

* gnu/packages/gnome.scm (gnome-session)[arguments]: Add a phase that
adds the absolute path of gnome-session in its .desktop files.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Timothy Sample 2019-02-13 14:22:15 -05:00 committed by Ludovic Courtès
parent e57c2adb2a
commit 1d7bff4b4b
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 8 additions and 0 deletions

View File

@ -4657,6 +4657,14 @@ such as gzip tarballs.")
(out (assoc-ref outputs "out")))
(wrap-program (string-append out "/bin/gnome-session")
`("PATH" ":" prefix (,(string-append glib "/bin"))))
#t)))
(add-after 'install 'add-absolute-paths-to-desktop-files
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")))
(substitute* (map (lambda (x)
(string-append out "/share/xsessions/" x))
'("gnome.desktop" "gnome-xorg.desktop"))
(("gnome-session") (string-append out "/bin/gnome-session")))
#t))))
#:configure-flags