gnu: ocaml-yojson: Update to 2.0.2.

merlin also needs to be updated at the same time because of
incompatibilities between the two versions.

* gnu/packages/ocaml.scm (ocaml-merlin-lib): New variable.
(ocaml-dot-merlin-reader): Inherit from it and update inputs.
(ocaml-merlin): Update inputs.
(ocaml-yojson): Update to 2.0.2.
(ocaml-odoc): Disable tests.
This commit is contained in:
Julien Lepiller 2022-08-13 17:42:09 +02:00
parent 7034824dcb
commit 07dcba5437
No known key found for this signature in database
GPG key ID: 53D457B2D636EE82

View file

@ -4987,7 +4987,7 @@ than yojson), with 25-35% space savings.")
(define-public ocaml-yojson (define-public ocaml-yojson
(package (package
(name "ocaml-yojson") (name "ocaml-yojson")
(version "1.7.0") (version "2.0.2")
(home-page "https://github.com/ocaml-community/yojson") (home-page "https://github.com/ocaml-community/yojson")
(source (source
(origin (origin
@ -4998,14 +4998,13 @@ than yojson), with 25-35% space savings.")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn")))) "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
(build-system dune-build-system) (build-system dune-build-system)
(arguments (arguments
`(#:test-target ".")) `(#:test-target "."
(propagated-inputs #:package "yojson"))
(list ocaml-biniou ocaml-easy-format)) (propagated-inputs (list ocaml-seq))
(native-inputs (native-inputs (list ocaml-alcotest ocaml-cppo))
(list ocaml-alcotest ocaml-cppo))
(synopsis "Low-level JSON library for OCaml") (synopsis "Low-level JSON library for OCaml")
(description "Yojson is an optimized parsing and printing library for the (description "Yojson is an optimized parsing and printing library for the
JSON format. It addresses a few shortcomings of json-wheel including 2x JSON format. It addresses a few shortcomings of json-wheel including 2x
@ -5048,10 +5047,10 @@ Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
format}. @code{craml} is released as a single binary (called @code{craml}).") format}. @code{craml} is released as a single binary (called @code{craml}).")
(license license:isc))) (license license:isc)))
(define-public ocaml-dot-merlin-reader (define-public ocaml-merlin-lib
(package (package
(name "ocaml-dot-merlin-reader") (name "ocaml-merlin-lib")
(version "4.5-414") (version "4.6-414")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -5061,17 +5060,27 @@ format}. @code{craml} is released as a single binary (called @code{craml}).")
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32
"125gyk63fg9plqkyrkl3wvpr3czjxgvshf4496fc4swldl7z587c")))) "1cpa9x45w54l4mqqmc8z3s5gscggw37gb6z9i7wwss86fj1wgclh"))))
(build-system dune-build-system) (build-system dune-build-system)
(arguments '(#:package "merlin-lib"
#:tests? #f)) ; no tests
(propagated-inputs (list ocaml-csexp ocaml-menhir))
(home-page "https://ocaml.github.io/merlin/")
(synopsis "Merlin libraries")
(description "These libraries provides access to low-level compiler
interfaces and the standard higher-level merlin protocol.")
(license license:expat)))
(define-public ocaml-dot-merlin-reader
(package
(inherit ocaml-merlin-lib)
(name "ocaml-dot-merlin-reader")
(arguments '(#:package "dot-merlin-reader" (arguments '(#:package "dot-merlin-reader"
#:tests? #f)) ; no tests #:tests? #f)) ; no tests
(inputs (propagated-inputs (list ocaml-merlin-lib))
(list ocaml-yojson ocaml-csexp ocaml-result))
(home-page "https://ocaml.github.io/merlin/")
(synopsis "Reads config files for @code{ocaml-merlin}") (synopsis "Reads config files for @code{ocaml-merlin}")
(description "@code{ocaml-dot-merlin-reader} is an external reader for (description "@code{ocaml-dot-merlin-reader} is an external reader for
@code{ocaml-merlin} configurations.") @code{ocaml-merlin} configurations.")))
(license license:expat)))
(define-public ocaml-merlin (define-public ocaml-merlin
(package (package
@ -5085,8 +5094,7 @@ format}. @code{craml} is released as a single binary (called @code{craml}).")
(lambda* (#:key tests? #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(when tests? (when tests?
(invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader"))))))) (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
(inputs (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
(list ocaml-yojson ocaml-csexp ocaml-result))
(native-inputs (native-inputs
(list ocaml-dot-merlin-reader ; required for tests (list ocaml-dot-merlin-reader ; required for tests
ocaml-mdx jq)) ocaml-mdx jq))
@ -7644,7 +7652,8 @@ then run the Bisect_ppx report tool on the generated visitation files.")
(base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag")))) (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
(build-system dune-build-system) (build-system dune-build-system)
(arguments (arguments
`(#:phases `(#:tests? #f; not compatible with current version of ocaml-yojson
#:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'fix-test (add-after 'unpack 'fix-test
(lambda _ (lambda _