guix-commits
[Top][All Lists]
Advanced

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

04/04: gnu: dwm: Add '.desktop' file.


From: Ludovic Courtès
Subject: 04/04: gnu: dwm: Add '.desktop' file.
Date: Mon, 16 Jan 2017 10:04:00 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit ad1c349db067fc8d035a05ace39d22d0125e8f85
Author: ng0 <address@hidden>
Date:   Sun Jan 15 12:21:16 2017 +0000

    gnu: dwm: Add '.desktop' file.
    
    Fixes <https://bugs.gnu.org/25438>.
    
    * gnu/packages/suckless.scm (dwm)[arguments]: Add
    'install-xsession' phase.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/packages/suckless.scm |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index a737a29..e30a088 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -74,7 +74,26 @@
             (let ((out (assoc-ref outputs "out")))
               (zero?
                (system* "make" "install"
-                        (string-append "DESTDIR=" out) "PREFIX="))))))))
+                        (string-append "DESTDIR=" out) "PREFIX=")))))
+        (add-after 'build 'install-xsession
+          (lambda* (#:key outputs #:allow-other-keys)
+            ;; Add a .desktop file to xsessions.
+            (let* ((output (assoc-ref outputs "out"))
+                   (xsessions (string-append output "/share/xsessions")))
+              (mkdir-p xsessions)
+              (with-output-to-file
+                  (string-append xsessions "/dwm.desktop")
+                (lambda _
+                  (format #t
+                    "[Desktop Entry]~@
+                     Name=dwm~@
+                     Comment=Dynamic Window Manager~@
+                     Exec=~a/bin/dwm~@
+                     address@hidden/bin/dwm~@
+                     Icon=~@
+                     Type=Application~%"
+                    output)))
+              #t))))))
     (inputs
      `(("freetype" ,freetype)
        ("libx11" ,libx11)



reply via email to

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