From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Hinsen Subject: Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter Date: Wed, 23 Oct 2019 11:53:22 +0200 Message-ID: References: <87lftt57ux.fsf@inria.fr> <87imowwt3i.fsf@gnu.org> <875zkru70u.fsf@inria.fr> <87imorqx0w.fsf@inria.fr> <87y2xd5bmb.fsf@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:37984) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNDKf-0007UA-Bg for guix-devel@gnu.org; Wed, 23 Oct 2019 05:53:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNDKe-0007Gf-1i for guix-devel@gnu.org; Wed, 23 Oct 2019 05:53:33 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34959) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iNDKZ-00075n-Tf for guix-devel@gnu.org; Wed, 23 Oct 2019 05:53:31 -0400 In-Reply-To: <87y2xd5bmb.fsf@inria.fr> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix Devel Hi Ludo, > Did you define an environment along the lines of the example at > ? > > If so, this should behave in exactly the same way as a =E2=80=9Cregular= =E2=80=9D =E2=80=98guix > environment=E2=80=99, so I=E2=80=99m not sure where the issues regarding = access to the > tty come from? I ended up finding an approach that does work, though it relies on undocumented properties: (use-modules (guix channels) (guix inferior)) (define channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "44881cad93801de9462d469500d582af79b99959")))) (define inferior (inferior-for-channels channels)) (define inferior-executable (inferior-eval '(car (program-arguments)) inferior)) (define inferior-command-line (cons inferior-executable (cdr (program-arguments)))) (apply system* inferior-command-line) This script uses the inferior mechanism for creating and caching an older guix, but then calls its executable directly. Of course this idea could be implemented in a better way, by factoring out the caching mechanism from inferior-for-channels and providing a command-line interface. Something like guix time-machine channels.scm command args ... Does this sound reasonable? I volunteer for implementing this, but I'd like to have an expert opinion first. Cheers, Konrad.