[PATCH] gnu: Add ocaml-yojson.

  • Done
  • quality assurance status badge
Details
2 participants
  • Gabriel Hondet
  • Julien Lepiller
Owner
unassigned
Submitted by
Gabriel Hondet
Severity
normal

Debbugs page

Gabriel Hondet wrote 6 years ago
(address . guix-patches@gnu.org)
87pntnwjdx.fsf@gmail.com
* gnu/packages/ocaml.scm (ocaml-yojson): New variable.
---
gnu/packages/ocaml.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (49 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlwkdtoACgkQMbyBBfZZ
1CXhJxAAgIky+e1qglcVvV7Sbj8zE1+vxQZn4FL1gDWCnCwETTq99CUNfB2f2AC7
ZvQ5ktxGwclc2rgkxjHdGdIVPCL5yUOUGw5U2sJpnuuIl9vMPtnZMivwhBA/lNB8
FouGju6/7gqYwpV7lf0mnxVPmErtiIAvM1pK3rxOiR4Y8Y6UPyoYNR9zUXYE5gO7
VD4ABtdMqc+AhMXqxv5VA3UtwHDQ4RjLCdovtGhUilNlrrIuWn34GZZps5uJoonm
7+c10Ws4vUeVbEKZZk3yrProBpRVvfVHo3+BMGZXRC38pgBhGZUfaNmPgGftJiPc
YuzCQAzFVfnYac5iNLy/Gl0umnkkekKZLEhRdXAS/nGMi3HDKpEsHxyVBimQg7YQ
+JDrtlWcb7FrHXox1jNntav+ls7Cj0R10UNOK7/rZvkJ5nomQqCx3vS1RZH+wc5q
Ms6m9KwDwl5Eb69Ere8J64O3iYLxmVesK++zif3Zf0LHSqXyW0vw5oQwvyhO27WP
P/25ncR0Waz4qNA6upN/I74Uf2NDl6lPv6W2MiK4r3rtJoqgqAsQAi/dE2SHqaM3
ufLW1SMMQKoCR2yPvg6wsbKlfLTr7VJSFPGVBR7Fb+8s3mTxiMxJVMlehc4+vqCk
mIPf96TZI2F4V6Y1KlplrBUteh5spOHBoBsiIp3OAQzZT856fXw=
=P+d1
-----END PGP SIGNATURE-----

Julien Lepiller wrote 6 years ago
(address . 33883@debbugs.gnu.org)
20181227095347.64bba51b@lepiller.eu
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 :)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtfrmKFtBNyiyoPrtQxEfRSAIagwFAlwkkxsACgkQQxEfRSAI
agw3+Q//R8oYAkwc6MXDtPsr1+B8TWwt3rU8peoqxZIPCuNGwc4sTTMdqPiWo3Ji
c2FLLwmGivC4osa8wrNsUcbqxEynMTMR0CxqE5crSM9c2d/TVPNQnVILUV5VvYyR
O3U8Ep+GTXwcHFFbnfZXHT7sutnEt2JGAcH9t1ErCwzIGBzv8mBVbRFpXfQ//iut
eAxAx8P5dJ1zrIzWt5tB6DtRFvd3gWbk9apzEfZUuGg/9biHL8t2Rmix4EVnDMlJ
8YSUROvmg04/JZg3yRfm0578azYFVqhX7h/arwFDYLQTqHlu43iIIsczVPHfgCQr
RWNYpMw4Vaq1a8OQypLK5uu/Xh9xSM9kOVR1OITHZGjrs5ybmtRGY0tD1wF05vQo
AaYIehYN8bage7MM7A9TXoy9kBjT7G9CWfVVHVTdYR/2IaKdpkX7tmDIIgi03O7B
Lqrpxm4rm3VOE595P/MfwIBPEY6yy87VEG4sf/5Qz2IIWZmHUjGtNVJ2XeQb8YeR
INc1mJ2fzgfgQJaxZ8ywgEH/YuFPOYV9S3eQTFJy8ofSPCd599AUVP/bBaT52xp6
Yld9eNFaUc2GPGr7M87d/jyDVrW52GBnnyIzphuyPT+VacjS/sMqIrA+GoCg1kZY
E+fAU6Y73W5HCphg9p8dnHbXFDVKH3zGLGnNxz/l6safxj3cyBw=
=zJIN
-----END PGP SIGNATURE-----


Julien Lepiller wrote 6 years ago
(address . 33883-done@debbugs.gnu.org)
20181227095539.0b398af9@lepiller.eu
Le Thu, 27 Dec 2018 09:53:47 +0100,
Julien Lepiller <julien@lepiller.eu> a écrit :

Toggle quote (11 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtfrmKFtBNyiyoPrtQxEfRSAIagwFAlwkk4sACgkQQxEfRSAI
agwyTxAArfuqBWZNM19aDQI5hbuHEmLHMRCj9Lm6ksyYbVxPdktT9MUHELfdoH7g
9b8n+nmVO7upI1t8tgqaOMvZankykdwNbWDlEsDT2NpTuRmcxFT1SwjG8cnnX6PR
H5UOsrqJnjCSGbgf2kgtvTX7c4H+WUhqe3HqTwJ46e6iOAQvm8TMfbU9FCC6cECL
7k/kkKhxIOOVMbpNZI8WrXCqwHhoJpi+EGkg7ZCXdq7UeSkjDedeLdGYRJXy05pA
CRW0gVl570ZWmpfqJKLSR+yJWnNwakwnJ3pE1ty/FWWyMXnO1R2O4wzBMehEZPPQ
cKhdUBXoeAt0VX0jDZ3uBXpW6N7jWfgq0GX5wjWM8Fneaj/3x5pSIWJ2uk7Fdi8u
0n2u6V4R5G3f2JkeDm5FskaJkBNIOdkJOx3PmL6s4kZsfmEiXbfRgnWQ7zj9zwK7
WB0HezBeLc/J9migt+DhrsQ44ocaIEM9Dhtp2bxGkMAwi1xEr+TKbA7BP3FXTVSZ
U3ed6OZeTEATlrm6Aly3+lQqQS2qDA4LoYQ3kflWkg78poXZVVmRUqUaFv8X0FqT
osp6NYJf8LZhVxQmBbT63hxMUou/Yl+0u5PA56Ph+lxnANXfMDV6DXH8A8ANV6Jz
ll6dqjbG484rvFC1ETdWtBOwAqFW43R760wdJWMse6nSr1Gv84o=
=lH65
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 33883@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33883
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help