mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
Remove (guix json) and require Guile-JSON 4.3.0+.
This is a followup to 4071879c86
.
* guix/json.scm: Remove.
* Makefile.am (MODULES): Adjust accordingly.
* m4/guix.m4 (GUIX_CHECK_GUILE_JSON): Check for 'define-json-mapping'.
* doc/guix.texi (Requirements): Require Guile-JSON 4.3.0+.
* guix/ci.scm, guix/cve.scm, guix/import/cpan.scm,
guix/import/crate.scm, guix/swh.scm: Remove (guix json) import.
* guix/import/gem.scm, guix/import/pypi.scm: Likewise, and import (json).
* guix/self.scm (specification->package): Switch to GUILE-JSON-4.
* guix/git-download.scm (git-fetch): Likewise.
This commit is contained in:
parent
d15c7974a2
commit
b5eb901ab5
13 changed files with 21 additions and 100 deletions
19
m4/guix.m4
19
m4/guix.m4
|
@ -161,14 +161,23 @@ dnl GUIX_CHECK_GUILE_JSON
|
|||
dnl
|
||||
dnl Check whether a recent-enough Guile-JSON is available.
|
||||
AC_DEFUN([GUIX_CHECK_GUILE_JSON], [
|
||||
dnl Check whether we're using Guile-JSON 3.x, which uses a JSON-to-Scheme
|
||||
dnl mapping different from that of earlier versions.
|
||||
dnl Check whether we're using Guile-JSON 4.3+, which provides
|
||||
dnl 'define-json-mapping'.
|
||||
AC_CACHE_CHECK([whether Guile-JSON is available and recent enough],
|
||||
[guix_cv_have_recent_guile_json],
|
||||
[GUILE_CHECK([retval],
|
||||
[(use-modules (json) (ice-9 match))
|
||||
(match (json-string->scm \"[[ { \\\"a\\\": 42 } ]]\")
|
||||
(#((("a" . 42))) #t))])
|
||||
[(use-modules (json))
|
||||
|
||||
(define-json-mapping <frob> make-frob
|
||||
frob?
|
||||
json->frob
|
||||
(a frob-a)
|
||||
(b frob-b \"bee\"))
|
||||
|
||||
(exit
|
||||
(equal? (json->frob
|
||||
(open-input-string \"{ \\\"a\\\": 1, \\\"bee\\\": 2 }\"))
|
||||
(make-frob 1 2)))])
|
||||
if test "$retval" = 0; then
|
||||
guix_cv_have_recent_guile_json="yes"
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue