From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: new manifest format readers? Date: Fri, 09 Jun 2017 16:58:21 +0200 Message-ID: <87vao5cinm.fsf@elephly.net> References: <87zidhcqr9.fsf@elephly.net> <87d1adw9eb.fsf@gnu.org> 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]:58826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJLMy-0007Oz-Mk for guix-devel@gnu.org; Fri, 09 Jun 2017 10:58:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJLMx-0005wM-N3 for guix-devel@gnu.org; Fri, 09 Jun 2017 10:58:36 -0400 In-reply-to: <87d1adw9eb.fsf@gnu.org> 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: Jan Nieuwenhuizen Cc: guix-devel Jan Nieuwenhuizen writes: > 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’s unfortunate that this requires so much code (with >> emphasis on “code”, not on “so much”). >> >> Here’s 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") You can use “icedtea:jdk” as a spec string. But doing this with just variable names does indeed require something awkward like (list icedtea-8 "jdk"). > 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? I’m not sure about this, but I’ll think about it. My initial response is that there is probably relatively little to be gained from adding more special syntax (“package-strings”) to S-expressions when we already have regular Guile. But maybe there’s something else we can do to require less boilerplate when using package spec strings. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net