unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Add .desktop files to urxvt (fixes bug #23106)
@ 2017-02-11 19:26 contact.ng0
  2017-02-11 19:26 ` [PATCH] gnu: rxvt-unicode: Add '.desktop' files contact.ng0
  0 siblings, 1 reply; 3+ messages in thread
From: contact.ng0 @ 2017-02-11 19:26 UTC (permalink / raw)
  To: guix-devel

[PATCH] gnu: rxvt-unicode: Add '.desktop' files.

This patch fixes bug #23106.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] gnu: rxvt-unicode: Add '.desktop' files.
  2017-02-11 19:26 Add .desktop files to urxvt (fixes bug #23106) contact.ng0
@ 2017-02-11 19:26 ` contact.ng0
  2017-03-05 21:26   ` Leo Famulari
  0 siblings, 1 reply; 3+ messages in thread
From: contact.ng0 @ 2017-02-11 19:26 UTC (permalink / raw)
  To: guix-devel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: rxvt-unicode: Add '.desktop' files.
  2017-02-11 19:26 ` [PATCH] gnu: rxvt-unicode: Add '.desktop' files contact.ng0
@ 2017-03-05 21:26   ` Leo Famulari
  0 siblings, 0 replies; 3+ messages in thread
From: Leo Famulari @ 2017-03-05 21:26 UTC (permalink / raw)
  To: contact.ng0; +Cc: guix-devel, 23106-done

On Sat, Feb 11, 2017 at 07:26:45PM +0000, contact.ng0@cryptolab.net wrote:
> 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.

Pushed, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-05 21:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-11 19:26 Add .desktop files to urxvt (fixes bug #23106) contact.ng0
2017-02-11 19:26 ` [PATCH] gnu: rxvt-unicode: Add '.desktop' files contact.ng0
2017-03-05 21:26   ` Leo Famulari

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).