From mboxrd@z Thu Jan 1 00:00:00 1970 From: contact.ng0@cryptolab.net Subject: [PATCH] gnu: rxvt-unicode: Add '.desktop' files. Date: Sat, 11 Feb 2017 19:26:45 +0000 Message-ID: <20170211192645.27279-2-contact.ng0@cryptolab.net> References: <20170211192645.27279-1-contact.ng0@cryptolab.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42633) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccdIM-0003Gy-8Y for guix-devel@gnu.org; Sat, 11 Feb 2017 14:25:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccdIH-00043O-KZ for guix-devel@gnu.org; Sat, 11 Feb 2017 14:25:18 -0500 Received: from aibo.runbox.com ([91.220.196.211]:45558) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ccdIH-00042l-Cz for guix-devel@gnu.org; Sat, 11 Feb 2017 14:25:13 -0500 In-Reply-To: <20170211192645.27279-1-contact.ng0@cryptolab.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org From: ng0 This fixes . * 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 ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2016 Petter +;;; Copyright © 2017 ng0 ;;; ;;; 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