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
2252f087d4.

* guix/scripts/pack.scm (docker-image)[json]: New variable.
[build]: Use it.
This commit is contained in:
Ludovic Courtès 2017-05-20 14:28:24 +02:00
parent 7dccad95b6
commit 96afb480f8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -35,7 +35,7 @@ (define-module (guix scripts pack)
#:autoload (gnu packages base) (tar) #:autoload (gnu packages base) (tar)
#:autoload (gnu packages package-management) (guix) #:autoload (gnu packages package-management) (guix)
#:autoload (gnu packages gnupg) (libgcrypt) #: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-1)
#:use-module (srfi srfi-9) #:use-module (srfi srfi-9)
#:use-module (srfi srfi-37) #:use-module (srfi srfi-37)
@ -217,6 +217,13 @@ (define-module (guix config)
(define %libgcrypt (define %libgcrypt
#+(file-append libgcrypt "/lib/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 (define build
(with-imported-modules `(,@(source-module-closure '((guix docker)) (with-imported-modules `(,@(source-module-closure '((guix docker))
#:select? not-config?) #:select? not-config?)
@ -224,7 +231,7 @@ (define build
#~(begin #~(begin
;; Guile-JSON is required by (guix docker). ;; Guile-JSON is required by (guix docker).
(add-to-load-path (add-to-load-path
(string-append #$guile-json "/share/guile/site/" (string-append #+json "/share/guile/site/"
(effective-version))) (effective-version)))
(use-modules (guix docker) (srfi srfi-19)) (use-modules (guix docker) (srfi srfi-19))