[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] gnu: rxvt-unicode: Add '.desktop' files.
From: |
contact . ng0 |
Subject: |
[PATCH] gnu: rxvt-unicode: Add '.desktop' files. |
Date: |
Sat, 11 Feb 2017 19:26:45 +0000 |
From: ng0 <address@hidden>
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 <address@hidden>
;;; Copyright © 2016 Marius Bakke <address@hidden>
;;; Copyright © 2016 Petter <address@hidden>
+;;; Copyright © 2017 ng0 <address@hidden>
;;;
;;; 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~@
+ address@hidden/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~@
+ address@hidden/bin/urxvtc~@
+ Icon=~@
+ Type=Application~%"
+ output)))
+ #t))))))
(inputs
`(("libXft" ,libxft)
("libX11" ,libx11)))
--
2.11.1