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:39:50 +0200 |
| commit | 96afb480f8165a315a69b1dd3a031e053044d3b2 (patch) | |
| tree | fef54dcd56521c91cece448b652b49c921103e03 | |
| parent | 7dccad95b62871af048dd2d337579424f07595f2 (diff) | |
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.
| -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 1595be1f526..1273c09f54a 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm | |||
| @@ -35,7 +35,7 @@ | |||
| 35 | #:autoload (gnu packages base) (tar) | 35 | #:autoload (gnu packages base) (tar) |
| 36 | #:autoload (gnu packages package-management) (guix) | 36 | #:autoload (gnu packages package-management) (guix) |
| 37 | #:autoload (gnu packages gnupg) (libgcrypt) | 37 | #:autoload (gnu packages gnupg) (libgcrypt) |
| 38 | #:autoload (gnu packages guile) (guile-json) | 38 | #:autoload (gnu packages guile) (guile2.0-json guile-json) |
| 39 | #:use-module (srfi srfi-1) | 39 | #:use-module (srfi srfi-1) |
| 40 | #:use-module (srfi srfi-9) | 40 | #:use-module (srfi srfi-9) |
| 41 | #:use-module (srfi srfi-37) | 41 | #:use-module (srfi srfi-37) |
| @@ -217,6 +217,13 @@ the image." | |||
| 217 | (define %libgcrypt | 217 | (define %libgcrypt |
| 218 | #+(file-append libgcrypt "/lib/libgcrypt")))))) | 218 | #+(file-append libgcrypt "/lib/libgcrypt")))))) |
| 219 | 219 | ||
| 220 | (define json | ||
| 221 | ;; Pick the guile-json package that corresponds to the Guile used to build | ||
| 222 | ;; derivations. | ||
| 223 | (if (string-prefix? "2.0" (package-version (default-guile))) | ||
| 224 | guile2.0-json | ||
| 225 | guile-json)) | ||
| 226 | |||
| 220 | (define build | 227 | (define build |
| 221 | (with-imported-modules `(,@(source-module-closure '((guix docker)) | 228 | (with-imported-modules `(,@(source-module-closure '((guix docker)) |
| 222 | #:select? not-config?) | 229 | #:select? not-config?) |
| @@ -224,7 +231,7 @@ the image." | |||
| 224 | #~(begin | 231 | #~(begin |
| 225 | ;; Guile-JSON is required by (guix docker). | 232 | ;; Guile-JSON is required by (guix docker). |
| 226 | (add-to-load-path | 233 | (add-to-load-path |
| 227 | (string-append #$guile-json "/share/guile/site/" | 234 | (string-append #+json "/share/guile/site/" |
| 228 | (effective-version))) | 235 | (effective-version))) |
| 229 | 236 | ||
| 230 | (use-modules (guix docker) (srfi srfi-19)) | 237 | (use-modules (guix docker) (srfi srfi-19)) |
