From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: [PATCH] gnu: rxvt-unicode: Add the terminal capability data. Date: Wed, 09 Dec 2015 18:58:59 +0100 Message-ID: <87y4d31p24.fsf@gnu.org> References: <87fuzcsvt1.fsf@gnu.org> <87wpsnsp8x.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39650) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6j1A-0000A8-3D for guix-devel@gnu.org; Wed, 09 Dec 2015 12:59:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6j18-0004u6-Ls for guix-devel@gnu.org; Wed, 09 Dec 2015 12:59:08 -0500 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Otherwise LGTM. It=E2=80=99s great that you fixed this! People had repo= rted > the issue on IRC, so that=E2=80=99ll make them happy! :-) I think this is only a partial fix. to launch emacsclient I still need to do this: TERMINFO=3D"$HOME/.guix-profile/share/terminfo" emacsclient --tty foo in terminfo(5), we can read this: --8<---------------cut here---------------start------------->8--- Fetching Compiled Descriptions The ncurses library searches for terminal descriptions in several places. It uses only the first description found. The library has a compiled-in list of places to search which can be overridden by envi= =E2=80=90 ronment variables. Before starting to search, ncurses eliminates duplicates in its search list. =20=20=20=20 =C2=B7 If the environment variable TERMINFO is set, it is interprete= d as the pathname of a directory containing the compiled description you are working on. Only that directory is searched. =20=20=20=20 =C2=B7 If TERMINFO is not set, ncurses will instead look in the dire= ctory $HOME/.terminfo for a compiled description. =C2=B7 Next, if the environment variable TERMINFO_DIRS is set, nc= urses will interpret the contents of that variable as a list of colon- separated directories (or database files) to be searched. An empty directory name (i.e., if the variable begins or ends with a colon, or contains adjacent colons) is interpreted as the system location /etc/terminfo. =C2=B7 Finally, ncurses searches these compiled-in locations: =C2=B7 a list of directories (no default value), and =C2=B7 the system terminfo directory, /etc/terminfo (the compil= ed-in default). --8<---------------cut here---------------end--------------->8--- I suppose that "system terminfo directory" is set to /gnu/store/...-ncurses-6.0 and IIUC correctly this is the only place automatically searched. What about adding TERMINFO_DIRS in "$HOME/.guix-profile/etc/profile"? I think TERMINFO_DIRS is more appropriate than TERMINFO because it let the possibility for non-GuixSD users to have multiple directories in it. Here is an updated patch with my proposal: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-rxvt-unicode-Add-the-terminal-capability-data.patch >From eedb9ca34c5bbc973765c8bd8a17b0a42c98e427 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 6 Dec 2015 21:58:03 +0100 Subject: [PATCH] gnu: rxvt-unicode: Add the terminal capability data. 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 * gnu/packages/xdisorg.scm (rxvt-unicode)[native-inputs]: Add ncurses. [arguments]: Set the destination of the terminfo files. [native-search-path]: New field. Make them automatically available to the user. --- gnu/packages/xdisorg.scm | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 4b5308c..ab48b2a 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -40,6 +40,7 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) ;for libgudev + #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages linux) @@ -529,24 +530,32 @@ compact configuration syntax.") (package (name "rxvt-unicode") (version "9.21") - (source - (origin - (method url-fetch) - (uri (string-append - "http://dist.schmorp.de/rxvt-unicode/" - name "-" - version - ".tar.bz2")) - (sha256 - (base32 - "0swmi308v5yxsddrdhvi4cch88k2bbs2nffpl5j5m2f55gbhw9vm")))) + (source (origin + (method url-fetch) + (uri (string-append "http://dist.schmorp.de/rxvt-unicode/" + name "-" version ".tar.bz2")) + (sha256 + (base32 + "0swmi308v5yxsddrdhvi4cch88k2bbs2nffpl5j5m2f55gbhw9vm")))) (build-system gnu-build-system) + (arguments + ;; 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=" + (assoc-ref %outputs "out") + "/share/terminfo")))) (inputs `(("libXft" ,libxft) ("libX11" ,libx11))) (native-inputs - `(("perl" ,perl) + `(("ncurses" ,ncurses) ;trigger the installation of terminfo data + ("perl" ,perl) ("pkg-config" ,pkg-config))) + (native-search-paths + (list (search-path-specification + (variable "TERMINFO_DIRS") + (files '("share/terminfo"))))) (home-page "http://software.schmorp.de/pkg/rxvt-unicode.html") (synopsis "Rxvt clone with XFT and unicode support") (description "Rxvt-unicode (urxvt) is a colour vt102 terminal emulator -- 2.6.3 --=-=-= Content-Type: text/plain Thanks, -- Mathieu Lirzin --=-=-=--