guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/05: gnu: mate-session-manager: Provide absolute file name in '.deskto


From: guix-commits
Subject: 01/05: gnu: mate-session-manager: Provide absolute file name in '.desktop' file.
Date: Wed, 3 Apr 2019 12:21:52 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit bfac63667552898b32821c0f0fae1256f5bcab0c
Author: Ludovic Courtès <address@hidden>
Date:   Wed Apr 3 17:26:58 2019 +0200

    gnu: mate-session-manager: Provide absolute file name in '.desktop' file.
    
    Previously GDM would crash when selecting MATE.
    
    * gnu/packages/mate.scm (mate-session-manager)[arguments]: Add
    'update-xsession-dot-desktop' phase.
---
 gnu/packages/mate.scm | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm
index 00ec24e..cf8392a 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2016, 2017 Efraim Flashner <address@hidden>
 ;;; Copyright © 2017 ng0 <address@hidden>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2019 Ludovic Courtès <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -337,7 +338,20 @@ configurations (profiles).")
                (("#ifdef HAVE_SYSTEMD") "#if 0"))
              (substitute* "mate-session/gsm-autostart-app.c"
                (("#ifdef HAVE_SYSTEMD") "#if 0"))
-             #t)))))
+             #t))
+         (add-after 'install 'update-xsession-dot-desktop
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Record the absolute file name of 'mate-session' in the
+             ;; '.desktop' file.
+             (let* ((out (assoc-ref outputs "out"))
+                    (xsession (string-append
+                               out "/share/xsessions/mate.desktop")))
+               (substitute* xsession
+                 (("^Exec=.*$")
+                  (string-append "Exec=" out "/bin/mate-session\n"))
+                 (("^TryExec=.*$")
+                  (string-append "Exec=" out "/bin/mate-session\n")))
+               #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
        ("intltool" ,intltool)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]