diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-05-28 18:22:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-06-01 15:21:28 +0200 |
commit | 13993c77fec7580f4f10ea07256db9e5f5a7949b (patch) | |
tree | eb5baa8bef65408d9dd26b0df5599f04d87de8ab /guix/scripts | |
parent | 838e17d8050236a6d3ffde991fb0035412eb3046 (diff) | |
download | gnu-guix-13993c77fec7580f4f10ea07256db9e5f5a7949b.tar gnu-guix-13993c77fec7580f4f10ea07256db9e5f5a7949b.tar.gz |
pack: Use 'with-extensions' when referring to (guix docker).
* guix/docker.scm: Use module (json) the normal way.
* guix/scripts/pack.scm (docker-image)[build]: Wrap in
'with-extensions'.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/pack.scm | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 35b8a7e729..76729d8e10 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -340,28 +340,25 @@ the image." guile-json)) (define build - (with-imported-modules `(,@(source-module-closure '((guix docker)) - #:select? not-config?) - (guix build store-copy) - ((guix config) => ,config)) - #~(begin - ;; Guile-JSON is required by (guix docker). - (add-to-load-path - (string-append #+json "/share/guile/site/" - (effective-version))) - - (use-modules (guix docker) (srfi srfi-19) (guix build store-copy)) - - (setenv "PATH" (string-append #$archiver "/bin")) - - (build-docker-image #$output - (call-with-input-file "profile" - read-reference-graph) - #$profile - #:system (or #$target (utsname:machine (uname))) - #:symlinks '#$symlinks - #:compressor '#$(compressor-command compressor) - #:creation-time (make-time time-utc 0 1))))) + ;; Guile-JSON is required by (guix docker). + (with-extensions (list json) + (with-imported-modules `(,@(source-module-closure '((guix docker)) + #:select? not-config?) + (guix build store-copy) + ((guix config) => ,config)) + #~(begin + (use-modules (guix docker) (srfi srfi-19) (guix build store-copy)) + + (setenv "PATH" (string-append #$archiver "/bin")) + + (build-docker-image #$output + (call-with-input-file "profile" + read-reference-graph) + #$profile + #:system (or #$target (utsname:machine (uname))) + #:symlinks '#$symlinks + #:compressor '#$(compressor-command compressor) + #:creation-time (make-time time-utc 0 1)))))) (gexp->derivation (string-append name ".tar" (compressor-extension compressor)) |