diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-05-20 14:28:24 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-20 14:30:01 +0200 |
commit | d6bf931cb23d73af5f74963e16d78f64c4f6df12 (patch) | |
tree | 31ee0b131f968f9a88758372e6334fed3c44b5e1 /guix/scripts | |
parent | d30ce4a7e2ba8f4eca7b99bb8483353c753e91bf (diff) | |
download | gnu-guix-d6bf931cb23d73af5f74963e16d78f64c4f6df12.tar gnu-guix-d6bf931cb23d73af5f74963e16d78f64c4f6df12.tar.gz |
pack: Use 'guile2.0-json' when building with Guile 2.0.
Fixes <http://bugs.gnu.org/27005>.
Reported by Pjotr Prins <pjotr.public12@thebird.nl>.
Fixes a regression introduced in commit
2252f087d4bd450ab41a71379320467887edfc0f.
* guix/scripts/pack.scm (docker-image)[json]: New variable.
[build]: Use it.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/pack.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 1595be1f52..1273c09f54 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -35,7 +35,7 @@ #:autoload (gnu packages base) (tar) #:autoload (gnu packages package-management) (guix) #:autoload (gnu packages gnupg) (libgcrypt) - #:autoload (gnu packages guile) (guile-json) + #:autoload (gnu packages guile) (guile2.0-json guile-json) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-37) @@ -217,6 +217,13 @@ the image." (define %libgcrypt #+(file-append libgcrypt "/lib/libgcrypt")))))) + (define json + ;; Pick the guile-json package that corresponds to the Guile used to build + ;; derivations. + (if (string-prefix? "2.0" (package-version (default-guile))) + guile2.0-json + guile-json)) + (define build (with-imported-modules `(,@(source-module-closure '((guix docker)) #:select? not-config?) @@ -224,7 +231,7 @@ the image." #~(begin ;; Guile-JSON is required by (guix docker). (add-to-load-path - (string-append #$guile-json "/share/guile/site/" + (string-append #+json "/share/guile/site/" (effective-version))) (use-modules (guix docker) (srfi srfi-19)) |