From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Nieuwenhuizen Subject: Re: new manifest format readers? Date: Fri, 09 Jun 2017 15:58:04 +0200 Message-ID: <87d1adw9eb.fsf@gnu.org> References: <87zidhcqr9.fsf@elephly.net> 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]:42676) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJKQl-0003S9-GI for guix-devel@gnu.org; Fri, 09 Jun 2017 09:58:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJKQh-00081h-KN for guix-devel@gnu.org; Fri, 09 Jun 2017 09:58:27 -0400 In-Reply-To: <87zidhcqr9.fsf@elephly.net> (Ricardo Wurmus's message of "Fri, 09 Jun 2017 14:03:22 +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" To: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus writes: > One can either write a manifest using variable names or convert a list > of spec strings to a manifest. The latter case is used a lot at my > institute and it=E2=80=99s unfortunate that this requires so much code (w= ith > emphasis on =E2=80=9Ccode=E2=80=9D, not on =E2=80=9Cso much=E2=80=9D). > > Here=E2=80=99s an example: > > (define packages > (list "gfortran@5" > "gcc-toolchain@5" > "cdogs-sdl")) and don't forget things like (list icedtea-8 "jdk") or `(,icedtea-8 "jdk") > ;; Boilerplate code to turn the above list of packages into a manifest > (use-modules (gnu packages)) > (packages->manifest (map (compose list specification->package+output) pac= kages)) Yes, I finally found this and it is not very friendly/discoverable. > Can we simplify this case by adding manifest readers for different > formats? One simple format could be plain text: > # this is for compilers > gfortran@5 > gcc-toolchain@5 Can I suggest sticking with s-expresions, and preferrably with something that can be used verbatim in the packages section of (operating-system)? New users will most probably have to maintain that too. So something like (use-package-modules gcc) (packages ;; this is for compilers gfortran-5) or go further even and add some sugar to remove use-package-modules and do something like (package-strings ;; this is for compilers "gfortran@5" ;; this is for work "icedtea:jdk") and have package-strings be usable in operating-system too? Greetings, janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com