* [bug#33883] [PATCH] gnu: Add ocaml-yojson.
@ 2018-12-27 6:25 Gabriel Hondet
2018-12-27 8:53 ` Julien Lepiller
0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Hondet @ 2018-12-27 6:25 UTC (permalink / raw)
To: 33883
[-- Attachment #1: Type: text/plain, Size: 2098 bytes --]
* gnu/packages/ocaml.scm (ocaml-yojson): New variable.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 4cfd203bd..6a16f0729 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -5085,3 +5085,42 @@ functionality but allows implementations several times faster (4 times faster
than yojson), with 25-35% space savings.")
(license license:bsd-3)))
+(define-public ocaml-yojson
+ (package
+ (name "ocaml-yojson")
+ (version "1.4.1")
+ (home-page "https://github.com/ocaml-community/yojson")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url (string-append home-page ".git"))
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0nwsfkmqpyfab4rxq76q8ff7giyanghw08094jyrp275v99zdjr9"))))
+ (build-system ocaml-build-system)
+ (inputs
+ `(("biniou" ,ocaml-biniou)
+ ("ocaml-easy-format" ,ocaml-easy-format)
+ ("cppo" ,ocaml-cppo)))
+ (native-inputs
+ `(("jbuilder" ,ocaml-jbuilder)))
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (replace 'install
+ (lambda _
+ (invoke "jbuilder" "install"
+ (string-append "--prefix="
+ (assoc-ref %outputs "out"))))))))
+ (synopsis "Low-level JSON library for OCaml")
+ (description "Yojson is an optimized parsing and printing library for the
+JSON format. It addresses a few shortcomings of json-wheel including 2x
+speedup, polymorphic variants and optional syntax for tuples and variants.
+@code{ydump} is a pretty printing command-line program provided with the
+yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
+serializers and deserializers from type definitions.")
+ (license license:bsd-3)))
--
2.20.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [bug#33883] [PATCH] gnu: Add ocaml-yojson.
2018-12-27 6:25 [bug#33883] [PATCH] gnu: Add ocaml-yojson Gabriel Hondet
@ 2018-12-27 8:53 ` Julien Lepiller
2018-12-27 8:55 ` bug#33883: " Julien Lepiller
0 siblings, 1 reply; 3+ messages in thread
From: Julien Lepiller @ 2018-12-27 8:53 UTC (permalink / raw)
To: 33883
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
Pushed as 2e951707f505db2d6e3a94a842b4319aa9b07e39, thank you!
I've modified the definition to use the dune-build-system, moved cppo
to native-inputs and modified the names of the inputs in that way:
("cppo" ,ocaml-cppo) -> ("ocaml-cppo" ,ocaml-cppo)
to correspond better to the way we usually declare dependencies. I know
the ocaml.scm file doesn't always respect this convention, but please
try to stick to it anyway :)
[-- Attachment #2: Signature digitale OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#33883: [PATCH] gnu: Add ocaml-yojson.
2018-12-27 8:53 ` Julien Lepiller
@ 2018-12-27 8:55 ` Julien Lepiller
0 siblings, 0 replies; 3+ messages in thread
From: Julien Lepiller @ 2018-12-27 8:55 UTC (permalink / raw)
To: 33883-done
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
Le Thu, 27 Dec 2018 09:53:47 +0100,
Julien Lepiller <julien@lepiller.eu> a écrit :
> Pushed as 2e951707f505db2d6e3a94a842b4319aa9b07e39, thank you!
>
> I've modified the definition to use the dune-build-system, moved cppo
> to native-inputs and modified the names of the inputs in that way:
>
> ("cppo" ,ocaml-cppo) -> ("ocaml-cppo" ,ocaml-cppo)
>
> to correspond better to the way we usually declare dependencies. I
> know the ocaml.scm file doesn't always respect this convention, but
> please try to stick to it anyway :)
closing.
[-- Attachment #2: Signature digitale OpenPGP --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-27 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 6:25 [bug#33883] [PATCH] gnu: Add ocaml-yojson Gabriel Hondet
2018-12-27 8:53 ` Julien Lepiller
2018-12-27 8:55 ` bug#33883: " Julien Lepiller
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.