guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter


From: Konrad Hinsen
Subject: Re: Towards reproducibly Jupyter notebooks with Guix-Jupyter
Date: Wed, 23 Oct 2019 11:53:22 +0200

Hi Ludo,

> Did you define an environment along the lines of the example at
> <https://guix.gnu.org/manual/devel/en/html_node/Inferiors.html>?
>
> If so, this should behave in exactly the same way as a “regular” ‘guix
> environment’, so I’m 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]