From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH v2 1/2] guix ui: add the "depends" field to package->recutils: Date: Fri, 18 Jul 2014 01:26:13 +0200 Message-ID: <87mwc7bm96.fsf@gnu.org> References: <87r41mjozg.fsf@gnu.org> <1405558450-13602-1-git-send-email-tipecaml@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7v4C-0006Ut-NU for guix-devel@gnu.org; Thu, 17 Jul 2014 19:26:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7v43-0004RE-MO for guix-devel@gnu.org; Thu, 17 Jul 2014 19:26:24 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:60422) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7v43-0004RA-FQ for guix-devel@gnu.org; Thu, 17 Jul 2014 19:26:15 -0400 In-Reply-To: <1405558450-13602-1-git-send-email-tipecaml@gmail.com> (Cyril Roelandt's message of "Thu, 17 Jul 2014 02:54:09 +0200") 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: Cyril Roelandt Cc: guix-devel@gnu.org Cyril Roelandt skribis: > * guix/packages.scm (package-direct-inputs): New procedure. > * tests/packages.scm: Test it. > * guix/ui.scm (package->recutils): Print the dependencies of the package. [...] > --- a/guix/ui.scm > +++ b/guix/ui.scm > @@ -456,6 +456,14 @@ WIDTH columns." > ;; Note: Don't i18n field names so that people can post-process it. > (format port "name: ~a~%" (package-name p)) > (format port "version: ~a~%" (package-version p)) > + (format port "depends: ~a~%" > + (string-join > + (map car > + (sort (package-direct-inputs p) > + (lambda (p1 p2) > + (string + (package-full-name (cadr p2)))))) > + ", ")) =E2=80=98car=E2=80=99, =E2=80=98cadr=E2=80=99 & friends are frowned upon he= re. Could you: 1. make a local helper procedure: (define (package