From: ng0 <ng0@libertad.pw>
To: guix-devel@gnu.org
Subject: [PATCH 2/2] gnu: dwm: Add '.desktop' file.
Date: Sun, 15 Jan 2017 12:21:16 +0000 [thread overview]
Message-ID: <20170115122116.6988-2-ng0@libertad.pw> (raw)
In-Reply-To: <20170115122116.6988-1-ng0@libertad.pw>
Fixes <https://bugs.gnu.org/25438>.
* gnu/packages/suckless.scm (dwm)[arguments]: Add
'install-xsession' phase.
---
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 a737a29dc..e30a0883a 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~@
+ TryExec=~@*~a/bin/dwm~@
+ Icon=~@
+ Type=Application~%"
+ output)))
+ #t))))))
(inputs
`(("freetype" ,freetype)
("libx11" ,libx11)
--
2.11.0
next prev parent reply other threads:[~2017-01-15 12:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-15 12:21 [PATCH 1/2] gnu: dwm: Use modify-phases ng0
2017-01-15 12:21 ` ng0 [this message]
2017-01-16 9:47 ` [PATCH 2/2] gnu: dwm: Add '.desktop' file Ludovic Courtès
2017-01-16 9:45 ` [PATCH 1/2] gnu: dwm: Use modify-phases Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170115122116.6988-2-ng0@libertad.pw \
--to=ng0@libertad.pw \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).