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 <ludo@gnu.org>
This commit is contained in:
ng0 2017-01-15 12:21:16 +00:00 committed by Ludovic Courtès
parent 0d2c8f3420
commit ad1c349db0
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 20 additions and 1 deletions

View File

@ -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~@
TryExec=~@*~a/bin/dwm~@
Icon=~@
Type=Application~%"
output)))
#t))))))
(inputs
`(("freetype" ,freetype)
("libx11" ,libx11)