Subject: Re: [bug#36469] [PATCH 1/2] pack: 'docker' backend records the profile's search paths.

From: Ricardo Wurmus <[email-masked]>
Date: Thu, 04 Jul 2019 13:13:59 +0200

Ludovic Courtès <[email-masked]> writes:

> * gnu/tests/docker.scm (run-docker-test)["Load docker image and run it"]:
> Add example that expects (json) to be available.

This message here is clearer than the actual test.  In the test all that
JSON stuff is really only there to test that (json) is available, right?

Maybe it’s worth adding a comment to the test itself.

> diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
> index c90b777222..bb6a8cda1a 100644
> --- a/guix/scripts/pack.scm
> +++ b/guix/scripts/pack.scm
> @@ -27,6 +27,7 @@
>    #:use-module (guix utils)
>    #:use-module (guix store)
>    #:use-module ((guix status) #:select (with-status-verbosity))
> +  #:use-module ((guix self) #:select (make-config.scm))
>    #:use-module (guix grafts)
>    #:autoload   (guix inferior) (inferior-package?)
>    #:use-module (guix monads)
> @@ -440,11 +441,24 @@ the image."
>    (define build
>      ;; Guile-JSON and Guile-Gcrypt are required by (guix docker).
>      (with-extensions (list guile-json guile-gcrypt)
> -      (with-imported-modules (source-module-closure '((guix docker)
> -                                                      (guix build store-copy))
> -                                                    #:select? not-config?)
> +      (with-imported-modules `(((guix config) => ,(make-config.scm))
> +                               ,@(source-module-closure
> +                                  `((guix docker)
> +                                    (guix build store-copy)
> +                                    (guix profiles)
> +                                    (guix search-paths))
> +                                  #:select? not-config?))

Woah, that “=>” thing is to generate a module dynamically?  I hadn’t
seen this before.  Nifty!

The rest of this commit looks good to me.  Thanks for working on it!

-- 
Ricardo