From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Patches to implement system roll-back and switch-generation Date: Wed, 19 Oct 2016 23:07:40 +0200 Message-ID: <87y41k2gkj.fsf@gnu.org> References: <87a8ep6h6g.fsf@gmail.com> <8737kcbfhc.fsf@gnu.org> <87lgxy11py.fsf@gmail.com> <87pon6sik9.fsf@gnu.org> <87inssx0y4.fsf@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]:37521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwy5T-0008RR-0B for guix-devel@gnu.org; Wed, 19 Oct 2016 17:07:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwy5P-0006dp-0E for guix-devel@gnu.org; Wed, 19 Oct 2016 17:07:46 -0400 In-Reply-To: <87inssx0y4.fsf@gmail.com> (Chris Marusich's message of "Sat, 15 Oct 2016 23:28:03 -0700") 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: Chris Marusich Cc: guix-devel@gnu.org Hi Chris, Chris Marusich skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: >> We can now avoid monadic procedures by using the declarative counterpart >> of the monadic API. That is, we could write: >> >> (define (grub-configuration-file =E2=80=A6) ;normal proc >> (computed-file "grub.cfg" builder)) >> >> instead of: >> >> (define (grub-configuration-file =E2=80=A6) ;monadic proc >> (gexp->derivation "grub.cfg" builder)) >> >> I would welcome such changes. >> > > That's an interesting idea. However, in this case, I think we need to > pass the build options (from the parsed command-line arguments) along > somehow. How should we set the build options when using the declarative > 'computed-file' procedure? It seems like the most obvious way would be > to pass the build options in as arguments to the 'computed-file' > procedure, but is there a better way? Which build options? There=E2=80=99s a direct correspondence between, say, =E2=80=98gexp->derivation=E2=80=99 and =E2=80=98computed-file=E2=80=99 and = the arguments are essentially the same. Unless I=E2=80=99m overlooking something (again!), the change I suggest above is a mechanical change. HTH, Ludo=E2=80=99.