From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Kost Subject: bug#21399: Emacs: Guix Package Info omits some inputs Date: Wed, 02 Sep 2015 18:20:25 +0300 Message-ID: <87a8t4zw3q.fsf@gmail.com> References: <87bndl9djb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX9qV-0000O1-LF for bug-guix@gnu.org; Wed, 02 Sep 2015 11:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZX9qQ-00085V-PB for bug-guix@gnu.org; Wed, 02 Sep 2015 11:21:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:54399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZX9qQ-00085Q-I8 for bug-guix@gnu.org; Wed, 02 Sep 2015 11:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZX9qQ-0003q3-7s for bug-guix@gnu.org; Wed, 02 Sep 2015 11:21:02 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87bndl9djb.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 02 Sep 2015 15:06:00 +0200") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 21399@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s (2015-09-02 16:06 +0300) wrote: > Hello, > > For =E2=80=98r=E2=80=99, the *Guix Package Info* buffer omits IcedTea fro= m the set of > inputs. It shows this: > > > Inputs : openblas-0.2.14, cairo-1.14.2, gfortran-4.9.3, icu4c-= 55.1, > lapack-3.5.0, libjpeg-9a, libpng-1.5.21, libtiff-4.0.= 3, > libxt-1.1.4, pcre-8.37, readline-6.3, zlib-1.2.7 > > whereas the recipe has this: > > > (inputs > `(("openblas" ,openblas) > ("cairo" ,cairo) > ("gfortran" ,gfortran) > ("icu4c" ,icu4c) > ("icedtea6" ,icedtea6 "jdk") > ("lapack" ,lapack) > ("libjpeg" ,libjpeg) > ("libpng" ,libpng) > ("libtiff" ,libtiff) > ("libxt" ,libxt) > ("pcre" ,pcre) > ("readline" ,readline) > ("zlib" ,zlib))) > > My guess is that somewhere, the triplet for IcedTea is silently filtered > out. Yes, you are right, it is filtered in =E2=80=98package-inputs-names=E2=80= =99 in "emacs/guix-main.scm". The easiest fix would be the following --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=inputs.diff diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 8d3a881..636d524 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -245,7 +245,7 @@ Example: (define (package-inputs-names inputs) "Return a list of full names of the packages from package INPUTS." (filter-map (match-lambda - ((_ (? package? package)) + ((_ (? package? package) _ ...) (package-full-name package)) (_ #f)) inputs)) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable However, I think it would be better to have "icedtea6-1.13.7:jdk" instead of "icedtea6-1.13.7" in the "Inputs". This requires modifying =E2=80=98full-name->name+version=E2=80=99 procedure so that pressing such "-:" buttons will also work. Thank you for noticing this. The patch is attached. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-emacs-Add-support-for-triplet-package-inputs.patch >From ae9203234d5254a9cb6a8127d31e99289c605f7a Mon Sep 17 00:00:00 2001 From: Alex Kost Date: Wed, 2 Sep 2015 17:57:58 +0300 Subject: [PATCH] emacs: Add support for "triplet" package inputs. Fixes . * emacs/guix-main.scm (full-name->name+version): Adjust to handle "name-version:output" string. (package-inputs-names): Support ("name" package "output") inputs. --- emacs/guix-main.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/emacs/guix-main.scm b/emacs/guix-main.scm index 8d3a881..623da88 100644 --- a/emacs/guix-main.scm +++ b/emacs/guix-main.scm @@ -71,7 +71,14 @@ (define (list-maybe obj) (if (list? obj) obj (list obj))) -(define full-name->name+version package-name->name+version) +(define (full-name->name+version spec) + "Given package specification SPEC with or without output, +return two values: name and version. For example, for SPEC +\"foo-0.9.1b:lib\", return \"foo\" and \"0.9.1b\"." + (let-values (((name version output) + (package-specification->name+version+output spec))) + (values name version))) + (define (name+version->full-name name version) (string-append name "-" version)) @@ -247,6 +254,10 @@ Example: (filter-map (match-lambda ((_ (? package? package)) (package-full-name package)) + ((_ (? package? package) output) + (make-package-specification (package-name package) + (package-version package) + output)) (_ #f)) inputs)) -- 2.4.3 --=-=-=--