unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: contact.ng0@cryptolab.net
To: guix-devel@gnu.org
Subject: [PATCH] gnu: rxvt-unicode: Add '.desktop' files.
Date: Sat, 11 Feb 2017 19:26:45 +0000	[thread overview]
Message-ID: <20170211192645.27279-2-contact.ng0@cryptolab.net> (raw)
In-Reply-To: <20170211192645.27279-1-contact.ng0@cryptolab.net>

From: ng0 <contact.ng0@cryptolab.net>

This fixes <https://bugs.gnu.org/23106>.

* gnu/packages/xdisorg.scm (rxvt-unicode)[arguments]: Use
'modify-phases'.
Add 'install-desktop-urxvt' and 'install-desktop-urxvtc' phase.
---
 gnu/packages/xdisorg.scm | 43 +++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm
index 510684a6c..e94210ab1 100644
--- a/gnu/packages/xdisorg.scm
+++ b/gnu/packages/xdisorg.scm
@@ -16,6 +16,7 @@
 ;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Petter <petter@mykolab.ch>
+;;; Copyright © 2017 ng0 <contact.ng0@cryptolab.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -694,9 +695,47 @@ compact configuration syntax.")
      ;; This sets the destination when installing the necessary terminal
      ;; capability data, which are not provided by 'ncurses'.  See
      ;; https://lists.gnu.org/archive/html/bug-ncurses/2009-10/msg00031.html
-     '(#:make-flags (list (string-append "TERMINFO="
+     `(#:make-flags (list (string-append "TERMINFO="
                                          (assoc-ref %outputs "out")
-                                         "/share/terminfo"))))
+                                         "/share/terminfo"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-desktop-urxvt
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((output (assoc-ref outputs "out"))
+                    (desktop (string-append output "/share/applications")))
+               (mkdir-p desktop)
+               (with-output-to-file
+                   (string-append desktop "/urxvt.desktop")
+                 (lambda _
+                   (format #t
+                           "[Desktop Entry]~@
+                           Name=rxvt-unicode~@
+                           Comment=~@
+                           Exec=~a/bin/urxvt~@
+                           TryExec=~@*~a/bin/urxvt~@
+                           Icon=~@
+                           Type=Application~%"
+                           output)))
+               #t)))
+         (add-after 'install 'install-desktop-urxvtc
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((output (assoc-ref outputs "out"))
+                    (desktop (string-append output "/share/applications")))
+               (mkdir-p desktop)
+               (with-output-to-file
+                   (string-append desktop "/urxvtc.desktop")
+                 (lambda _
+                   (format #t
+                           "[Desktop Entry]~@
+                           Name=rxvt-unicode~@
+                           Comment=Rxvt clone with XFT and unicode support~@
+                           Exec=~a/bin/urxvtc~@
+                           TryExec=~@*~a/bin/urxvtc~@
+                           Icon=~@
+                           Type=Application~%"
+                           output)))
+               #t))))))
     (inputs
      `(("libXft" ,libxft)
        ("libX11" ,libx11)))
-- 
2.11.1

  reply	other threads:[~2017-02-11 19:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-11 19:26 Add .desktop files to urxvt (fixes bug #23106) contact.ng0
2017-02-11 19:26 ` contact.ng0 [this message]
2017-03-05 21:26   ` [PATCH] gnu: rxvt-unicode: Add '.desktop' files Leo Famulari

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=20170211192645.27279-2-contact.ng0@cryptolab.net \
    --to=contact.ng0@cryptolab.net \
    --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).