gnu: Add cl-ana.statistical-learning.
[jackhill/guix/guix.git] / gnu / packages / ocaml.scm
CommitLineData
d192efae
CR
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
69b8f08c 3;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
b9d8756b 4;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
c900f843 5;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
90907a22 6;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
a747baba 7;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
ca12352a 8;;; Copyright © 2016, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
564cf93f 9;;; Copyright © 2016-2018 Julien Lepiller <julien@lepiller.eu>
ec436717 10;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
8da3f78e 11;;; Copyright © 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
2b4d2a4d 12;;; Copyright © 2018 Peter Kreye <kreyepr@gmail.com>
cdcbccd1 13;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
59a07504 14;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
fa5d6e4c 15;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
d192efae
CR
16;;;
17;;; This file is part of GNU Guix.
18;;;
19;;; GNU Guix is free software; you can redistribute it and/or modify it
20;;; under the terms of the GNU General Public License as published by
21;;; the Free Software Foundation; either version 3 of the License, or (at
22;;; your option) any later version.
23;;;
24;;; GNU Guix is distributed in the hope that it will be useful, but
25;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27;;; GNU General Public License for more details.
28;;;
29;;; You should have received a copy of the GNU General Public License
30;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32(define-module (gnu packages ocaml)
d192efae 33 #:use-module (gnu packages)
44c23cb8 34 #:use-module (gnu packages autotools)
0705f79c 35 #:use-module (gnu packages base)
88191ace
JL
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages boost)
69b8f08c 38 #:use-module (gnu packages compression)
1ff755d1
DC
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages emacs)
eeb883cb 41 #:use-module (gnu packages emacs-xyz)
88191ace 42 #:use-module (gnu packages flex)
1ff755d1 43 #:use-module (gnu packages gcc)
90907a22 44 #:use-module (gnu packages ghostscript)
1fdfbadf 45 #:use-module (gnu packages glib)
1ff755d1
DC
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gtk)
1fdfbadf 48 #:use-module (gnu packages libevent)
69d08bb1 49 #:use-module (gnu packages libffi)
cd1562ef 50 #:use-module (gnu packages llvm)
a747baba 51 #:use-module (gnu packages m4)
59a07504 52 #:use-module (gnu packages maths)
ddf2b503 53 #:use-module (gnu packages multiprecision)
a34cedc4 54 #:use-module (gnu packages ncurses)
f8a12de1 55 #:use-module (gnu packages pcre)
1ff755d1
DC
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages pkg-config)
fc3d70ae 58 #:use-module (gnu packages protobuf)
1ff755d1 59 #:use-module (gnu packages python)
ec9d9325 60 #:use-module (gnu packages python-xyz)
a9e9fd15 61 #:use-module (gnu packages sdl)
cd0322a3 62 #:use-module (gnu packages sqlite)
1ff755d1
DC
63 #:use-module (gnu packages tex)
64 #:use-module (gnu packages texinfo)
44c23cb8 65 #:use-module (gnu packages time)
37f17e2a 66 #:use-module (gnu packages tls)
a34cedc4 67 #:use-module (gnu packages version-control)
7a1d25c4 68 #:use-module (gnu packages virtualization)
c5196ac7 69 #:use-module (gnu packages web-browsers)
7a76b4af 70 #:use-module (gnu packages xml)
1ff755d1 71 #:use-module (gnu packages xorg)
effc8325 72 #:use-module (guix build-system dune)
db1eb632 73 #:use-module (guix build-system emacs)
1ff755d1 74 #:use-module (guix build-system gnu)
7a76b4af 75 #:use-module (guix build-system ocaml)
1ff755d1 76 #:use-module (guix download)
8ae540a2 77 #:use-module (guix git-download)
1ff755d1
DC
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (guix packages)
80 #:use-module (guix svn-download)
1345231c 81 #:use-module (guix utils)
0ad5f809 82 #:use-module ((srfi srfi-1) #:hide (zip)))
d192efae 83
56f73ead
JL
84;; A shortcut for files from ocaml forge. Downloaded files are computed from
85;; their number, not their name.
86(define (ocaml-forge-uri name version file-number)
87 (string-append "https://forge.ocamlcore.org/frs/download.php/"
88 (number->string file-number) "/" name "-" version
89 ".tar.gz"))
90
f95ebba5
JL
91;; Janestreet packages are found in a similar way and all need the same patch.
92(define (janestreet-origin name version hash)
93 (origin (method url-fetch)
94 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
95 (version-major+minor version) "/files/"
96 name "-" version ".tar.gz"))
97 (sha256 (base32 hash))
98 (modules '((guix build utils)))
99 (snippet
100 (let ((pattern (string-append "lib/" name)))
101 `(begin
102 ;; install.ml contains an invalid reference to the ppx file and
103 ;; propagates this error to the generated META file. It
104 ;; looks for it in the "lib" directory, but it is installed in
105 ;; "lib/ocaml/site-lib/package". This substitute does not change
106 ;; this file for non ppx packages.
107 (substitute* "install.ml"
108 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
109 ;; The standard Makefile would try to install janestreet modules
110 ;; in OCaml's directory in the store, which is read-only.
111 (substitute* "Makefile"
112 (("--prefix")
6cbee49d
MW
113 "--libdir $(LIBDIR) --prefix"))
114 #t)))))
f95ebba5
JL
115
116;; They also require almost the same set of arguments
117(define janestreet-arguments
118 `(#:use-make? #t
119 #:make-flags
120 (list (string-append "CONFIGUREFLAGS=--prefix "
121 (assoc-ref %outputs "out")
122 " --enable-tests")
123 (string-append "LIBDIR="
124 (assoc-ref %outputs "out")
125 "/lib/ocaml/site-lib")
126 ;; for ocaml-bin-prot, otherwise ignored
127 (string-append "OCAML_TOPLEVEL_PATH="
128 (assoc-ref %build-inputs "findlib")
129 "/lib/ocaml/site-lib"))
130 #:phases (modify-phases %standard-phases (delete 'configure))))
131
c3634df2 132(define-public ocaml-4.07
d192efae
CR
133 (package
134 (name "ocaml")
c3634df2 135 (version "4.07.1")
d192efae 136 (source (origin
69b8f08c
MW
137 (method url-fetch)
138 (uri (string-append
139 "http://caml.inria.fr/pub/distrib/ocaml-"
140 (version-major+minor version)
141 "/ocaml-" version ".tar.xz"))
142 (sha256
143 (base32
c3634df2 144 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))))
d192efae 145 (build-system gnu-build-system)
6372e336
JN
146 (native-search-paths
147 (list (search-path-specification
148 (variable "OCAMLPATH")
e6876cb9 149 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
796a17ab
JL
150 (search-path-specification
151 (variable "CAML_LD_LIBRARY_PATH")
564cf93f
JL
152 (files (list "lib/ocaml/site-lib/stubslibs"
153 "lib/ocaml/site-lib/stublibs")))))
69b8f08c
MW
154 (native-inputs
155 `(("perl" ,perl)
156 ("pkg-config" ,pkg-config)))
157 (inputs
158 `(("libx11" ,libx11)
2f6d3e41 159 ;; For libiberty, needed for objdump support.
e1f32cf1 160 ("gcc:lib" ,(canonical-package gcc) "lib")
2f6d3e41 161 ("zlib" ,zlib))) ;also needed for objdump support
d192efae 162 (arguments
69b8f08c
MW
163 `(#:modules ((guix build gnu-build-system)
164 (guix build utils)
165 (web server))
166 #:phases
167 (modify-phases %standard-phases
168 (add-after 'unpack 'patch-/bin/sh-references
2b1f7b83
DC
169 (lambda* (#:key inputs #:allow-other-keys)
170 (let* ((sh (string-append (assoc-ref inputs "bash")
171 "/bin/sh"))
172 (quoted-sh (string-append "\"" sh "\"")))
173 (with-fluids ((%default-port-encoding #f))
174 (for-each
175 (lambda (file)
176 (substitute* file
177 (("\"/bin/sh\"")
178 (begin
179 (format (current-error-port) "\
69b8f08c 180patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
2b1f7b83
DC
181 file quoted-sh)
182 quoted-sh))))
183 (find-files "." "\\.ml$"))
184 #t))))
69b8f08c 185 (replace 'configure
2b1f7b83
DC
186 (lambda* (#:key outputs #:allow-other-keys)
187 (let* ((out (assoc-ref outputs "out"))
188 (mandir (string-append out "/share/man")))
189 ;; Custom configure script doesn't recognize
190 ;; --prefix=<PREFIX> syntax (with equals sign).
bb29e855
RW
191 (invoke "./configure"
192 "--prefix" out
193 "--mandir" mandir))))
69b8f08c 194 (replace 'build
2b1f7b83 195 (lambda _
bb29e855
RW
196 (invoke "make" "-j" (number->string (parallel-job-count))
197 "world.opt")))
69b8f08c
MW
198 (delete 'check)
199 (add-after 'install 'check
2b1f7b83
DC
200 (lambda _
201 (with-directory-excursion "testsuite"
c3634df2 202 (invoke "make" "all")))))))
69b8f08c 203 (home-page "https://ocaml.org/")
d192efae
CR
204 (synopsis "The OCaml programming language")
205 (description
206 "OCaml is a general purpose industrial-strength programming language with
35b9e423 207an emphasis on expressiveness and safety. Developed for more than 20 years at
d192efae
CR
208Inria it benefits from one of the most advanced type systems and supports
209functional, imperative and object-oriented styles of programming.")
69b8f08c
MW
210 ;; The compiler is distributed under qpl1.0 with a change to choice of
211 ;; law: the license is governed by the laws of France. The library is
212 ;; distributed under lgpl2.0.
d8e0a08c 213 (license (list license:qpl license:lgpl2.0))))
a34cedc4 214
564cf93f
JL
215(define-public ocaml ocaml-4.07)
216
217(define-public ocamlbuild
912f4400
JL
218 (package
219 (name "ocamlbuild")
220 (version "0.13.1")
8da3f78e
TGR
221 (source
222 (origin
223 (method git-fetch)
224 (uri (git-reference
225 (url "https://github.com/ocaml/ocamlbuild.git")
226 (commit version)))
227 (file-name (git-file-name name version))
228 (sha256
229 (base32 "0v37vjvdqw35yvj8ipmlzmwf1jhip0hbsmcbdcn9cnj12p3mr6k7"))))
912f4400
JL
230 (build-system gnu-build-system)
231 (arguments
232 `(#:test-target "test"
233 #:tests? #f; tests require findlib
234 #:make-flags
235 (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
236 (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
237 "/bin")
238 (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
239 "/lib/ocaml/site-lib")
240 (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
241 "/share/man"))
242 #:phases
243 (modify-phases %standard-phases
244 (delete 'bootstrap)
245 (delete 'configure)
246 (add-before 'build 'findlib-environment
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let* ((out (assoc-ref outputs "out")))
249 (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib"))
250 (setenv "OCAMLFIND_LDCONF" "ignore")
251 #t))))))
252 (native-inputs
253 `(("ocaml" ,ocaml)))
254 (home-page "https://github.com/ocaml/ocamlbuild")
255 (synopsis "OCaml build tool")
256 (description "OCamlbuild is a generic build tool, that has built-in rules
257for building OCaml library and programs.")
258 (license license:lgpl2.1+)))
564cf93f 259
bb338a7f
JL
260(define-public ocaml-extlib
261 (package
262 (name "ocaml-extlib")
263 (version "1.7.6")
264 (source (origin
265 (method url-fetch)
266 (uri (string-append "https://ygrek.org.ua/p/release/ocaml-extlib/"
267 "extlib-" version ".tar.gz"))
268 (sha256
269 (base32
270 "0wfs20v1yj5apdbj7214wdsr17ayh0qqq7ihidndvc8nmmwfa1dz"))))
271 (build-system ocaml-build-system)
272 (arguments
273 `(#:phases
274 (modify-phases %standard-phases
275 (delete 'configure))))
276 (native-inputs
277 `(("ocaml-cppo" ,ocaml-cppo)))
278 (home-page "https://github.com/ygrek/ocaml-extlib")
279 (synopsis "Complete and small extension for OCaml standard library")
280 (description "This library adds new functions to OCaml standard library
281modules, modifies some functions in order to get better performances or
282safety (tail-recursive) and also provides new modules which should be useful
283for day to day programming.")
284 ;; With static-linking exception
285 (license license:lgpl2.1+)))
286
718fadb8
JL
287(define-public ocaml-cudf
288 (package
289 (name "ocaml-cudf")
290 (version "0.9")
291 (source
292 (origin
293 (method url-fetch)
294 (uri "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz")
295 (sha256
296 (base32
297 "0771lwljqwwn3cryl0plny5a5dyyrj4z6bw66ha5n8yfbpcy8clr"))))
298 (build-system ocaml-build-system)
299 (propagated-inputs `(("ocaml-extlib" ,ocaml-extlib)))
300 (native-inputs
301 `(("perl" ,perl)
302 ("ocamlbuild" ,ocamlbuild)
303 ("ocaml-ounit" ,ocaml-ounit)))
304 (arguments
305 `(#:make-flags
306 (list
307 "all" "opt"
308 (string-append "BINDIR=" (assoc-ref %outputs "out")
309 "/bin"))
310 #:phases
311 (modify-phases %standard-phases
312 (delete 'configure))))
313 (home-page "http://www.mancoosi.org/cudf/")
314 (synopsis "CUDF library (part of the Mancoosi tools)")
315 (description "CUDF (for Common Upgradeability Description Format) is a
316format for describing upgrade scenarios in package-based Free and Open Source
317Software distribution.")
318 ;; With static-linking exception
319 (license license:lgpl2.1+)))
320
c4262cc9
JL
321(define-public ocaml-mccs
322 (package
323 (name "ocaml-mccs")
324 (version "1.1+9")
325 (source (origin
326 (method git-fetch)
327 (uri (git-reference
328 (url "https://github.com/AltGr/ocaml-mccs")
329 (commit version)))
330 (file-name (git-file-name name version))
331 (sha256
332 (base32
333 "1i0hhkrqi7rqlainlg5pc4hibbx6b5dp3x99gmav8c3sbfvlk9mc"))))
334 (build-system dune-build-system)
335 (propagated-inputs `(("ocaml-cudf" ,ocaml-cudf)))
336 (home-page "http://www.i3s.unice.fr/~cpjm/misc/")
337 (synopsis "Upgrade path problem solver")
338 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
339Mccs take as input a CUDF problem and computes the best solution according to
340a set of criteria. It relies on a Integer Programming solver or a
341Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
342underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
343 (license (list
344 license:bsd-3
345 license:gpl3+
346 ;; With static-linking exception
347 license:lgpl2.1+))))
348
ec9d9325
JL
349(define-public ocaml-dose3
350 (package
351 (name "ocaml-dose3")
352 (version "5.0.1")
353 (source (origin
354 (method url-fetch)
355 (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
356 (sha256
357 (base32
358 "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
359 (patches
360 (search-patches
30a6cd7c 361 "ocaml-dose3-add-unix-dependency.patch"
ec9d9325
JL
362 "ocaml-dose3-Fix-for-ocaml-4.06.patch"
363 "ocaml-dose3-dont-make-printconf.patch"
364 "ocaml-dose3-Install-mli-cmx-etc.patch"))))
365 (build-system ocaml-build-system)
366 (arguments
367 `(#:configure-flags
368 (list (string-append "SHELL="
369 (assoc-ref %build-inputs "bash")
370 "/bin/sh"))
371 #:make-flags
372 (list (string-append "LIBDIR="
373 (assoc-ref %outputs "out")
374 "/lib/ocaml/site-lib"))))
375 (propagated-inputs
376 `(("ocaml-graph" ,ocaml-graph)
377 ("ocaml-cudf" ,ocaml-cudf)
378 ("ocaml-extlib" ,ocaml-extlib)
379 ("ocaml-re" ,ocaml-re)))
380 (native-inputs
381 `(("perl" ,perl)
382 ("python" ,python-2) ; for a test script
383 ("python2-pyyaml" ,python2-pyyaml) ; for a test script
384 ("ocaml-extlib" ,ocaml-extlib)
385 ("ocamlbuild" ,ocamlbuild)
386 ("ocaml-cppo" ,ocaml-cppo)))
387 (home-page "http://www.mancoosi.org/software/")
388 (synopsis "Package distribution management framework")
389 (description "Dose3 is a framework made of several OCaml libraries for
390managing distribution packages and their dependencies. Though not tied to
391any particular distribution, dose3 constitutes a pool of libraries which
392enable analyzing packages coming from various distributions. Besides basic
393functionalities for querying and setting package properties, dose3 also
394implements algorithms for solving more complex problems such as monitoring
395package evolutions, correct and complete dependency resolution and
396repository-wide uninstallability checks.")
397 ;; with static-linking exception
398 (license license:lgpl2.1+)))
399
d1358ab6
JL
400(define-public ocaml-opam-file-format
401 (package
402 (name "ocaml-opam-file-format")
403 (version "2.0.0")
404 (source (origin
405 (method git-fetch)
406 (uri (git-reference
407 (url "https://github.com/ocaml/opam-file-format")
408 (commit version)))
b7a4cb52 409 (file-name (git-file-name name version))
d1358ab6
JL
410 (sha256
411 (base32
412 "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"))))
413 (build-system ocaml-build-system)
414 (arguments
415 `(#:tests? #f; No tests
416 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
417 "/lib/ocaml/site-lib"))
418 #:phases
419 (modify-phases %standard-phases
420 (delete 'configure))))
421 (home-page "https://opam.ocaml.org")
422 (synopsis "Parser and printer for the opam file syntax")
423 (description "This package contains a parser and a pretty-printer for
424the opam file fomat.")
425 ;; With static-linking exception
426 (license license:lgpl2.1+)))
427
a34cedc4
LC
428(define-public opam
429 (package
430 (name "opam")
5a3082ec 431 (version "2.0.5")
a34cedc4 432 (source (origin
e9b86fa0
JL
433 (method git-fetch)
434 (uri (git-reference
435 (url "https://github.com/ocaml/opam")
436 (commit version)))
437 (file-name (git-file-name name version))
a34cedc4
LC
438 (sha256
439 (base32
5a3082ec 440 "0pf2smq2sdcxryq5i87hz3dv05pb3zasb1is3kxq1pi1s4cn55mx"))))
e9b86fa0 441 (build-system ocaml-build-system)
a34cedc4 442 (arguments
e9b86fa0
JL
443 `(#:configure-flags
444 (list (string-append "SHELL="
445 (assoc-ref %build-inputs "bash")
446 "/bin/sh"))
a34cedc4
LC
447
448 ;; For some reason, 'ocp-build' needs $TERM to be set.
e9b86fa0
JL
449 #:make-flags
450 (list "TERM=screen"
451 (string-append "SHELL="
452 (assoc-ref %build-inputs "bash")
453 "/bin/sh"))
454
a34cedc4
LC
455 #:test-target "tests"
456
457 ;; FIXME: There's an obscure test failure:
458 ;; …/_obuild/opam/opam.asm install P1' failed.
459 #:tests? #f
460
2385cab1
EB
461 #:phases (modify-phases %standard-phases
462 (add-before 'build 'pre-build
463 (lambda* (#:key inputs make-flags #:allow-other-keys)
7a1d25c4
JL
464 (let ((bash (assoc-ref inputs "bash"))
465 (bwrap (string-append (assoc-ref inputs "bubblewrap")
466 "/bin/bwrap")))
2385cab1
EB
467 (substitute* "src/core/opamSystem.ml"
468 (("\"/bin/sh\"")
7a1d25c4
JL
469 (string-append "\"" bash "/bin/sh\""))
470 (("getconf")
471 (which "getconf")))
472 ;; Use bwrap from the store directly.
473 (substitute* "src/state/shellscripts/bwrap.sh"
474 (("-v bwrap") (string-append "-v " bwrap))
2a6ba9ff
JL
475 (("exec bwrap") (string-append "exec " bwrap))
476 ;; Mount /gnu and /run/current-system in the
477 ;; isolated environment when building with opam.
478 ;; This is necessary for packages to find external
479 ;; dependencies, such as a C compiler, make, etc...
e9b86fa0
JL
480 (("^add_sys_mounts /usr")
481 "add_sys_mounts /gnu /run/current-system /usr"))
7a1d25c4
JL
482 (substitute* "src/client/opamInitDefaults.ml"
483 (("\"bwrap\"") (string-append "\"" bwrap "\"")))
7a1d25c4 484 #t)))
2385cab1
EB
485 (add-before 'check 'pre-check
486 (lambda _
487 (setenv "HOME" (getcwd))
7a1d25c4
JL
488 (invoke "git" "config" "--global" "user.email" "guix@gnu.org")
489 (invoke "git" "config" "--global" "user.name" "Guix")
490 #t)))))
a34cedc4 491 (native-inputs
e9b86fa0
JL
492 `(("dune" ,dune)
493 ("git" ,git) ;for the tests
494 ("ocaml-cppo" ,ocaml-cppo)
8146ec55 495 ("python" ,python))) ;for the tests
a34cedc4
LC
496 (inputs
497 `(("ocaml" ,ocaml)
498 ("ncurses" ,ncurses)
7a1d25c4
JL
499 ("curl" ,curl)
500 ("bubblewrap" ,bubblewrap)))
e9b86fa0
JL
501 (propagated-inputs
502 `(("ocaml-cmdliner" ,ocaml-cmdliner)
503 ("ocaml-dose3" ,ocaml-dose3)
504 ("ocaml-mccs" ,ocaml-mccs)
505 ("ocaml-opam-file-format" ,ocaml-opam-file-format)
506 ("ocaml-re" ,ocaml-re)))
a34cedc4
LC
507 (home-page "http://opam.ocamlpro.com/")
508 (synopsis "Package manager for OCaml")
509 (description
510 "OPAM is a tool to manage OCaml packages. It supports multiple
511simultaneous compiler installations, flexible package constraints, and a
512Git-friendly development workflow.")
513
514 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
d8e0a08c 515 (license license:lgpl3)))
83f4dc36
MW
516
517(define-public camlp5
518 (package
519 (name "camlp5")
fa45b22d 520 (version "7.07")
6aade739
TGR
521 (source
522 (origin
523 (method git-fetch)
524 (uri (git-reference
525 (url "https://github.com/camlp5/camlp5.git")
526 (commit (string-append "rel" (string-delete #\. version)))))
527 (file-name (git-file-name name version))
528 (sha256
529 (base32 "1c8v45553ccbqha2ypfranqlgw06rr5wjr2hlnrx5bf9jfq0h0dn"))))
83f4dc36
MW
530 (build-system gnu-build-system)
531 (inputs
532 `(("ocaml" ,ocaml)))
533 (arguments
534 `(#:tests? #f ; XXX TODO figure out how to run the tests
535 #:phases
536 (modify-phases %standard-phases
537 (replace 'configure
538 (lambda* (#:key outputs #:allow-other-keys)
539 (let* ((out (assoc-ref outputs "out"))
540 (mandir (string-append out "/share/man")))
541 ;; Custom configure script doesn't recognize
542 ;; --prefix=<PREFIX> syntax (with equals sign).
402dedf8
MW
543 (invoke "./configure"
544 "--prefix" out
545 "--mandir" mandir))))
564cf93f
JL
546 (add-before 'build 'fix-/bin-references
547 (lambda _
548 (substitute* "config/Makefile"
549 (("/bin/rm") "rm"))
550 #t))
83f4dc36
MW
551 (replace 'build
552 (lambda _
402dedf8
MW
553 (invoke "make" "-j" (number->string
554 (parallel-job-count))
555 "world.opt")))
07b4cd3a
JL
556 ;; Required for findlib to find camlp5's libraries
557 (add-after 'install 'install-meta
558 (lambda* (#:key outputs #:allow-other-keys)
559 (install-file "etc/META" (string-append (assoc-ref outputs "out")
402dedf8
MW
560 "/lib/ocaml/camlp5/"))
561 #t)))))
83f4dc36
MW
562 (home-page "http://camlp5.gforge.inria.fr/")
563 (synopsis "Pre-processor Pretty Printer for OCaml")
564 (description
565 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
566tools for syntax (Stream Parsers and Grammars) and the ability to modify the
567concrete syntax of the language (Quotations, Syntax Extensions).")
568 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
d8e0a08c 569 (license (list license:bsd-3 license:qpl))))
d6b7b5ed
MW
570
571(define-public hevea
572 (package
573 (name "hevea")
564cf93f 574 (version "2.32")
d6b7b5ed
MW
575 (source (origin
576 (method url-fetch)
8f26f239 577 (uri (string-append "http://hevea.inria.fr/old/"
d6b7b5ed
MW
578 name "-" version ".tar.gz"))
579 (sha256
580 (base32
564cf93f 581 "1s4yqphfcr1pf5mcj5c84mvmd107k525iiym5jdwsxz0ka0ccmfy"))))
d6b7b5ed
MW
582 (build-system gnu-build-system)
583 (inputs
584 `(("ocaml" ,ocaml)))
564cf93f
JL
585 (native-inputs
586 `(("ocamlbuild" ,ocamlbuild)))
d6b7b5ed
MW
587 (arguments
588 `(#:tests? #f ; no test suite
589 #:make-flags (list (string-append "PREFIX=" %output))
590 #:phases (modify-phases %standard-phases
f5a8491b
EB
591 (delete 'configure)
592 (add-before 'build 'patch-/bin/sh
593 (lambda _
594 (substitute* "_tags"
595 (("/bin/sh") (which "sh")))
596 #t)))))
d6b7b5ed
MW
597 (home-page "http://hevea.inria.fr/")
598 (synopsis "LaTeX to HTML translator")
599 (description
600 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
601written in Objective Caml.")
d8e0a08c 602 (license license:qpl)))
1973183b 603
564cf93f
JL
604(define-public ocaml-num
605 (package
606 (name "ocaml-num")
607 (version "1.1")
34f615a2
TGR
608 (source
609 (origin
610 (method git-fetch)
611 (uri (git-reference
612 (url "https://github.com/ocaml/num.git")
613 (commit (string-append "v" version))))
614 (file-name (git-file-name name version))
615 (sha256
616 (base32 "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"))))
564cf93f
JL
617 (build-system ocaml-build-system)
618 (arguments
619 `(#:phases
620 (modify-phases %standard-phases
621 (delete 'configure)
622 (add-before 'build 'fix-makefile
623 (lambda* (#:key outputs #:allow-other-keys)
624 ;; This package supposes we install to the same directory as
625 ;; the ocaml package.
626 (substitute* "src/META"
627 (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
628 "/lib/ocaml/site-lib\"")))
629 (substitute* "src/Makefile"
630 (("\\) \\$\\(STDLIBDIR\\)")
631 (string-append ") " (assoc-ref outputs "out")
632 "/lib/ocaml/site-lib")))
633 #t))
634 (add-after 'install 'fix-stubslib
635 (lambda* (#:key outputs #:allow-other-keys)
636 (format #t "~a~%" (find-files "." ".*.so"))
637 (let ((stubdir (string-append (assoc-ref outputs "out")
38f06188
JL
638 "/lib/ocaml/site-lib/stublibs")))
639 (delete-file stubdir)
564cf93f
JL
640 (mkdir-p stubdir)
641 (install-file "src/dllnums.so" stubdir))
642 #t)))))
643 (home-page "https://github.com/ocaml/num")
644 (synopsis "Arbitrary-precision integer and rational arithmetic")
645 (description "OCaml-Num contains the legacy Num library for
646arbitrary-precision integer and rational arithmetic that used to be part of
647the OCaml core distribution.")
648 (license license:lgpl2.1+))); with linking exception
649
833ade67
OP
650(define-public emacs-tuareg
651 (package
652 (name "emacs-tuareg")
564cf93f 653 (version "2.2.0")
f541d86d
TGR
654 (source
655 (origin
656 (method git-fetch)
657 (uri (git-reference
658 (url "https://github.com/ocaml/tuareg.git")
659 (commit version)))
660 (file-name (git-file-name name version))
661 (sha256
662 (base32 "06zxnn85fk5087iq0zxc5l5n9fz8r0367wylmynbfhc9711vccy6"))))
833ade67
OP
663 (build-system gnu-build-system)
664 (native-inputs `(("emacs" ,emacs-minimal)
665 ("opam" ,opam)))
666 (arguments
667 `(#:phases
668 (modify-phases %standard-phases
f541d86d
TGR
669 (add-after 'unpack 'make-git-checkout-writable
670 (lambda _
671 (for-each make-file-writable (find-files "."))
672 #t))
833ade67
OP
673 (delete 'configure)
674 (add-before 'install 'fix-install-path
675 (lambda* (#:key outputs #:allow-other-keys)
676 (substitute* "Makefile"
677 (("/emacs/site-lisp")
678 (string-append (assoc-ref %outputs "out")
679 "/share/emacs/site-lisp/")))
680 #t))
681 (add-after 'install 'post-install
682 (lambda* (#:key outputs #:allow-other-keys)
683 (symlink "tuareg.el"
684 (string-append (assoc-ref outputs "out")
685 "/share/emacs/site-lisp/"
686 "tuareg-autoloads.el"))
687 #t)))))
688 (home-page "https://github.com/ocaml/tuareg")
689 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
690 (description "Tuareg helps editing OCaml code, to highlight important
691parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
692Emacs.")
693 (license license:gpl2+)))
694
e31b75f2
DC
695(define-public ocaml-menhir
696 (package
697 (name "ocaml-menhir")
187f9636 698 (version "20181113")
699 (source
700 (origin
701 (method git-fetch)
702 (uri (git-reference
703 (url "https://gitlab.inria.fr/fpottier/menhir.git")
704 (commit version)))
705 (file-name (git-file-name name version))
706 (sha256
707 (base32 "1iqdf64ayq4s3d9jkwhs3s8wqc2s48b292hp0kcjsskfhcvwg0kr"))))
708 (build-system ocaml-build-system)
e31b75f2
DC
709 (inputs
710 `(("ocaml" ,ocaml)))
564cf93f
JL
711 (native-inputs
712 `(("ocamlbuild" ,ocamlbuild)))
e31b75f2 713 (arguments
187f9636 714 `(#:make-flags `("USE_OCAMLFIND=true"
715 ,(string-append "PREFIX=" (assoc-ref %outputs "out")))
e31b75f2
DC
716 #:tests? #f ; No check target
717 #:phases
718 (modify-phases %standard-phases
187f9636 719 (delete 'configure))))
720 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
e31b75f2
DC
721 (synopsis "Parser generator")
722 (description "Menhir is a parser generator. It turns high-level grammar
723specifications, decorated with semantic actions expressed in the OCaml
187f9636 724programming language into parsers, again expressed in OCaml. It is based on
e31b75f2
DC
725Knuth’s LR(1) parser construction technique.")
726 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
727 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
728 ;; are QPL licensed.
d8e0a08c 729 (license (list license:gpl2+ license:qpl))))
e31b75f2 730
ce9a30e6
JL
731(define-public ocaml-bigarray-compat
732 (package
733 (name "ocaml-bigarray-compat")
734 (version "1.0.0")
735 (source (origin
736 (method git-fetch)
737 (uri (git-reference
738 (url "https://github.com/mirage/bigarray-compat")
739 (commit (string-append "v" version))))
740 (file-name (git-file-name name version))
741 (sha256
742 (base32
743 "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz"))))
744 (build-system dune-build-system)
745 (arguments
746 `(#:tests? #f)); no tests
747 (home-page "https://github.com/mirage/bigarray-compat")
748 (synopsis "OCaml compatibility library")
749 (description "This package contains a compatibility library for
750@code{Stdlib.Bigarray} in OCaml.")
751 (license license:isc)))
752
3573b634
AE
753(define-public lablgtk
754 (package
755 (name "lablgtk")
3a23b461 756 (version "2.18.8")
56f73ead 757 (source (origin
3a23b461
JL
758 (method git-fetch)
759 (uri (git-reference
760 (url "https://github.com/garrigue/lablgtk")
761 (commit "lablgtk2188")))
bcda0779 762 (file-name (git-file-name name version))
56f73ead
JL
763 (sha256
764 (base32
3a23b461 765 "0gpww8bkwi5cl68kc006970zvzwvq73h1mwrnd239apmwlxc1l8a"))))
3573b634
AE
766 (build-system gnu-build-system)
767 (native-inputs
3a23b461 768 `(("ocaml" ,ocaml)
8afd1958 769 ("findlib" ,ocaml-findlib)
3573b634
AE
770 ("pkg-config" ,pkg-config)))
771 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
772 ;; and gtk+-quartz-2.0 once available.
773 (inputs
774 `(("gtk+" ,gtk+-2)
c900f843 775 ("gtksourceview" ,gtksourceview-2)
3573b634
AE
776 ("libgnomecanvas" ,libgnomecanvas)
777 ("libgnomeui" ,libgnomeui)
778 ("libglade" ,libglade)
779 ("librsvg" ,librsvg)))
780 (arguments
781 `(#:tests? #f ; no check target
ef89cb42 782
8c1088bb 783 ;; opt: also install cmxa files
8afd1958
JL
784 #:make-flags (list "all" "opt"
785 (string-append "FINDLIBDIR="
786 (assoc-ref %outputs "out")
787 "/lib/ocaml"))
ef89cb42
LC
788 ;; Occasionally we would get "Error: Unbound module GtkThread" when
789 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
790 #:parallel-build? #f
791
3573b634
AE
792 #:phases
793 (modify-phases %standard-phases
8afd1958 794 (add-before 'install 'prepare-install
3573b634
AE
795 (lambda* (#:key inputs outputs #:allow-other-keys)
796 (let ((out (assoc-ref outputs "out"))
797 (ocaml (assoc-ref inputs "ocaml")))
798 ;; Install into the output and not the ocaml directory.
8afd1958 799 (mkdir-p (string-append out "/lib/ocaml"))
3573b634
AE
800 (substitute* "config.make"
801 ((ocaml) out))
3573b634
AE
802 #t))))))
803 (home-page "http://lablgtk.forge.ocamlcore.org/")
804 (synopsis "GTK+ bindings for OCaml")
805 (description
806 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
807a strongly-typed object-oriented interface that is compatible with the
808dynamic typing of GTK+. Most widgets and methods are available. LablGtk
809also provides bindings to
810gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
811gnomeui, gtksourceview, gtkspell,
812libglade (and it an generate OCaml code from .glade files),
813libpanel, librsvg and quartz.")
d8e0a08c 814 (license license:lgpl2.1)))
3573b634 815
b9d8756b
AE
816(define-public unison
817 (package
818 (name "unison")
6c8666b4
AE
819 (version "2.51.2")
820 (source (origin
821 (method git-fetch)
822 (uri (git-reference
823 (url "https://github.com/bcpierce00/unison.git")
824 (commit (string-append "v" version))))
825 (file-name (git-file-name name version))
826 (sha256
827 (base32
828 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))))
b9d8756b 829 (build-system gnu-build-system)
90907a22
EB
830 (outputs '("out"
831 "doc")) ; 1.9 MiB of documentation
b9d8756b 832 (native-inputs
6c8666b4 833 `(("ocaml" ,ocaml)
90907a22 834 ;; For documentation
2be896de 835 ("ghostscript" ,ghostscript)
68139bce 836 ("texlive" ,texlive-tiny)
90907a22 837 ("hevea" ,hevea)
564cf93f
JL
838 ("lynx" ,lynx)
839 ("which" ,which)))
b9d8756b
AE
840 (arguments
841 `(#:parallel-build? #f
842 #:parallel-tests? #f
843 #:test-target "selftest"
844 #:tests? #f ; Tests require writing to $HOME.
845 ; If some $HOME is provided, they fail with the message
846 ; "Fatal error: Skipping some tests -- remove me!"
847 #:phases
848 (modify-phases %standard-phases
849 (delete 'configure)
850 (add-before 'install 'prepare-install
851 (lambda* (#:key outputs #:allow-other-keys)
852 (let* ((out (assoc-ref outputs "out"))
853 (bin (string-append out "/bin")))
854 (mkdir-p bin)
855 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
90907a22 856 #t)))
31d968fb
OD
857 (add-after 'install 'install-fsmonitor
858 (lambda* (#:key outputs #:allow-other-keys)
859 (let* ((out (assoc-ref outputs "out"))
860 (bin (string-append out "/bin")))
861 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
317e80ce
TGR
862 (install-file "src/unison-fsmonitor" bin)
863 #t)))
90907a22 864 (add-after 'install 'install-doc
31d968fb 865 (lambda* (#:key outputs #:allow-other-keys)
90907a22
EB
866 (let ((doc (string-append (assoc-ref outputs "doc")
867 "/share/doc/unison")))
868 (mkdir-p doc)
50ab554b
JL
869 ;; Remove an '\n' that prevents the doc to be generated
870 ;; correctly with newer hevea.
871 (substitute* "doc/local.tex"
872 (("----SNIP----.*") "----SNIP----"))
90907a22
EB
873 ;; This file needs write-permissions, because it's
874 ;; overwritten by 'docs' during documentation generation.
875 (chmod "src/strings.ml" #o600)
317e80ce
TGR
876 (invoke "make" "docs"
877 "TEXDIRECTIVES=\\\\draftfalse")
878 (for-each (lambda (f)
879 (install-file f doc))
880 (map (lambda (ext)
881 (string-append "doc/unison-manual." ext))
882 ;; Install only html documentation,
883 ;; since the build is currently
884 ;; non-reproducible with the ps, pdf,
885 ;; and dvi docs.
886 '(;; "ps" "pdf" "dvi"
887 "html")))
888 #t))))))
b9d8756b
AE
889 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
890 (synopsis "File synchronizer")
891 (description
892 "Unison is a file-synchronization tool. It allows two replicas of
893a collection of files and directories to be stored on different hosts
894(or different disks on the same host), modified separately, and then
895brought up to date by propagating the changes in each replica
896to the other.")
d8e0a08c 897 (license license:gpl3+)))
a747baba
JN
898
899(define-public ocaml-findlib
900 (package
901 (name "ocaml-findlib")
a36074a8 902 (version "1.8.1")
a747baba
JN
903 (source (origin
904 (method url-fetch)
905 (uri (string-append "http://download.camlcity.org/download/"
906 "findlib" "-" version ".tar.gz"))
907 (sha256
908 (base32
a36074a8 909 "00s3sfb02pnjmkax25pcnljcnhcggiliccfz69a72ic7gsjwz1cf"))))
a747baba
JN
910 (build-system gnu-build-system)
911 (native-inputs
a36074a8 912 `(("m4" ,m4)
a747baba
JN
913 ("ocaml" ,ocaml)))
914 (arguments
915 `(#:tests? #f ; no test suite
916 #:parallel-build? #f
917 #:make-flags (list "all" "opt")
918 #:phases (modify-phases %standard-phases
919 (replace
920 'configure
921 (lambda* (#:key inputs outputs #:allow-other-keys)
922 (let ((out (assoc-ref outputs "out")))
4a810e75 923 (invoke
a747baba
JN
924 "./configure"
925 "-bindir" (string-append out "/bin")
926 "-config" (string-append out "/etc/ocamfind.conf")
927 "-mandir" (string-append out "/share/man")
928 "-sitelib" (string-append out "/lib/ocaml/site-lib")
ad3d730e 929 "-with-toolbox"))))
bff6739d
PK
930 (replace 'install
931 (lambda* (#:key outputs #:allow-other-keys)
932 (let ((out (assoc-ref outputs "out")))
4a810e75
MW
933 (invoke "make" "install"
934 (string-append "OCAML_CORE_STDLIB="
a36074a8 935 out "/lib/ocaml/site-lib"))))))))
a747baba
JN
936 (home-page "http://projects.camlcity.org/projects/findlib.html")
937 (synopsis "Management tool for OCaml libraries")
938 (description
939 "The \"findlib\" library provides a scheme to manage reusable software
940components (packages), and includes tools that support this scheme. Packages
941are collections of OCaml modules for which metainformation can be stored. The
8f65585b 942packages are kept in the file system hierarchy, but with strict directory
a747baba
JN
943structure. The library contains functions to look the directory up that
944stores a package, to query metainformation about a package, and to retrieve
945dependency information about multiple packages. There is also a tool that
946allows the user to enter queries on the command-line. In order to simplify
947compilation and linkage, there are new frontends of the various OCaml
948compilers that can directly deal with packages.")
d8e0a08c 949 (license license:x11)))
7a76b4af
JL
950
951;; note that some tests may hang for no obvious reason.
952(define-public ocaml-ounit
953 (package
954 (name "ocaml-ounit")
483be9bd 955 (version "2.0.8")
7a76b4af
JL
956 (source (origin
957 (method url-fetch)
483be9bd 958 (uri (ocaml-forge-uri "ounit" version 1749))
7a76b4af
JL
959 (sha256
960 (base32
483be9bd 961 "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
7a76b4af
JL
962 (build-system ocaml-build-system)
963 (native-inputs
564cf93f
JL
964 `(("libxml2" ,libxml2) ; for xmllint
965 ("ocamlbuild" ,ocamlbuild)))
7a76b4af 966 (arguments
337273e4
DC
967 `(#:phases
968 (modify-phases %standard-phases
483be9bd 969 (delete 'check)))) ; tests are run during build
7a76b4af
JL
970 (home-page "http://ounit.forge.ocamlcore.org")
971 (synopsis "Unit testing framework for OCaml")
972 (description "Unit testing framework for OCaml. It is similar to JUnit and
973other XUnit testing frameworks.")
974 (license license:expat)))
bc2c3bc6
JL
975
976(define-public camlzip
977 (package
978 (name "camlzip")
979 (version "1.0.6")
980 (source (origin
981 (method url-fetch)
982 (uri (ocaml-forge-uri name version 1616))
983 (sha256
984 (base32
985 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
986 (build-system ocaml-build-system)
987 (inputs
988 `(("zlib" ,zlib)))
989 (arguments
990 `(#:phases
991 (modify-phases %standard-phases
992 (delete 'configure)
8fe6b932
JL
993 (add-after 'install 'install-camlzip
994 (lambda* (#:key outputs #:allow-other-keys)
995 (let* ((out (assoc-ref outputs "out"))
996 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
997 (mkdir-p dir)
998 (call-with-output-file (string-append dir "/META")
999 (lambda (port)
1000 (format port "version=\"1.06\"\n")
1001 (format port "requires=\"unix\"\n")
1002 (format port "archive(byte)=\"zip.cma\"\n")
1003 (format port "archive(native)=\"zip.cmxa\"\n")
1004 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
1005 (format port "directory=\"../zip\"\n")))))))
bc2c3bc6
JL
1006 #:install-target "install-findlib"
1007 #:make-flags
1008 (list "all" "allopt"
1009 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
1010 "/lib/ocaml"))))
1011 (home-page "http://forge.ocamlcore.org/projects/camlzip")
1012 (synopsis "Provides easy access to compressed files")
1013 (description "Provides easy access to compressed files in ZIP, GZIP and
1014JAR format. It provides functions for reading from and writing to compressed
1015files in these formats.")
1016 (license license:lgpl2.1+)))
93eeadf0
JL
1017
1018(define-public ocamlmod
1019 (package
1020 (name "ocamlmod")
564cf93f 1021 (version "0.0.9")
93eeadf0
JL
1022 (source (origin
1023 (method url-fetch)
564cf93f 1024 (uri (ocaml-forge-uri name version 1702))
93eeadf0
JL
1025 (sha256
1026 (base32
564cf93f 1027 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
93eeadf0
JL
1028 (build-system ocaml-build-system)
1029 (native-inputs
564cf93f
JL
1030 `(("ounit" ,ocaml-ounit)
1031 ("ocamlbuild" ,ocamlbuild)))
93eeadf0 1032 (arguments
3dcaa122
DC
1033 `(#:phases
1034 (modify-phases %standard-phases
1035 ;; Tests are done during build.
1036 (delete 'check))))
93eeadf0
JL
1037 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1038 (synopsis "Generate modules from OCaml source files")
1039 (description "Generate modules from OCaml source files.")
1040 (license license:lgpl2.1+))) ; with an exception
ddf2b503
JL
1041
1042(define-public ocaml-zarith
1043 (package
1044 (name "ocaml-zarith")
3882f607 1045 (version "1.9.1")
ddf2b503 1046 (source (origin
09cd92a9
JL
1047 (method git-fetch)
1048 (uri (git-reference
1049 (url "https://github.com/ocaml/Zarith")
1050 (commit (string-append "release-" version))))
f1d4d79f 1051 (file-name (git-file-name name version))
ddf2b503
JL
1052 (sha256
1053 (base32
3882f607 1054 "0hv5ywz1q2cgn8apfz490clwk5hcynr937g2v8i13x2ax4bnv0lz"))))
ddf2b503
JL
1055 (build-system ocaml-build-system)
1056 (native-inputs
1057 `(("perl" ,perl)))
1058 (inputs
1059 `(("gmp" ,gmp)))
1060 (arguments
1061 `(#:tests? #f ; no test target
1062 #:phases
1063 (modify-phases %standard-phases
1064 (replace 'configure
04daa1ed 1065 (lambda _ (invoke "./configure"))))))
ddf2b503
JL
1066 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1067 (synopsis "Implements arbitrary-precision integers")
1068 (description "Implements arithmetic and logical operations over
1069arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1070over big integers. Small integers are represented as Caml unboxed integers,
1071for speed and space economy.")
1072 (license license:lgpl2.1+))) ; with an exception
ff891f10
JL
1073
1074(define-public ocaml-frontc
1075 (package
1076 (name "ocaml-frontc")
e57dd201 1077 (version "3.4.2")
ff891f10 1078 (source (origin
bbe9915b
JL
1079 (method git-fetch)
1080 (uri (git-reference
1081 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1082 (commit (string-append
1083 "V_" (string-join (string-split version #\.) "_")))))
1084 (file-name (git-file-name name version))
ff891f10
JL
1085 (sha256
1086 (base32
e57dd201 1087 "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
ff891f10
JL
1088 (build-system ocaml-build-system)
1089 (arguments
bbe9915b 1090 `(#:phases
ff891f10
JL
1091 (modify-phases %standard-phases
1092 (delete 'configure)
1093 (add-after 'install 'install-meta
1094 (lambda* (#:key outputs #:allow-other-keys)
1095 (let ((out (assoc-ref outputs "out")))
1096 (with-output-to-file
1097 (string-append out "/lib/ocaml/frontc/META")
1098 (lambda _
1099 (display
1100 (string-append
1101 "description = \"Parser for the C language\"
1102version = \"" ,version "\"
1103requires = \"unix\"
1104archive(byte) = \"frontc.cma\"
1105archive(native) = \"frontc.cmxa\""))))
1106 (symlink (string-append out "/lib/ocaml/frontc")
1107 (string-append out "/lib/ocaml/FrontC"))))))
1108 #:make-flags (list (string-append "PREFIX="
1109 (assoc-ref %outputs "out"))
1110 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
ee33e415 1111 (properties `((upstream-name . "FrontC")))
ff891f10
JL
1112 (home-page "https://www.irit.fr/FrontC")
1113 (synopsis "C parser and lexer library")
1114 (description "FrontC is an OCAML library providing a C parser and lexer.
1115The result is a syntactic tree easy to process with usual OCAML tree management.
1116It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1117GNU CC attributes. It provides also a C pretty printer as an example of use.")
1118 (license license:lgpl2.1)))
0472836f 1119
2c6ef0dd
JL
1120(define-public ocaml-qcheck
1121 (package
1122 (name "ocaml-qcheck")
9e560c18 1123 (version "0.11")
b0133981
TGR
1124 (source
1125 (origin
1126 (method git-fetch)
1127 (uri (git-reference
1128 (url "https://github.com/c-cube/qcheck.git")
1129 (commit version)))
1130 (file-name (git-file-name name version))
1131 (sha256
9e560c18 1132 (base32 "0d2wih4zxn2zm7kxd9dnf5nlp838km3vz6wv80fa3m51609fb24i"))))
3f59ecfc
JL
1133 (build-system dune-build-system)
1134 (arguments
1135 `(#:test-target "."))
2c6ef0dd 1136 (native-inputs
3f59ecfc
JL
1137 `(("ocaml-alcotest" ,ocaml-alcotest)
1138 ("ocaml-ounit" ,ocaml-ounit)
564cf93f 1139 ("ocamlbuild" ,ocamlbuild)))
2c6ef0dd
JL
1140 (home-page "https://github.com/c-cube/qcheck")
1141 (synopsis "QuickCheck inspired property-based testing for OCaml")
1142 (description "QuickCheck inspired property-based testing for OCaml. This
1143module allows to check invariants (properties of some types) over randomly
1144generated instances of the type. It provides combinators for generating
1145instances and printing them.")
1146 (license license:lgpl3+)))
1147
0472836f
JL
1148(define-public ocaml-qtest
1149 (package
1150 (name "ocaml-qtest")
e821a640 1151 (version "2.9")
0472836f 1152 (source (origin
e821a640
JL
1153 (method git-fetch)
1154 (uri (git-reference
1155 (url "https://github.com/vincent-hugot/qtest/")
1156 (commit (string-append "v" version))))
1157 (file-name (git-file-name name version))
0472836f
JL
1158 (sha256
1159 (base32
e821a640
JL
1160 "1ifxc8jndwah82g5k8xaa7jskbv866j4zpd0w41f0pskg4y0z9g1"))))
1161 (build-system dune-build-system)
1162 (arguments
1163 `(#:jbuild? #t
1164 #:test-target "tests"))
0472836f 1165 (propagated-inputs
e24d5271
JL
1166 `(("ounit" ,ocaml-ounit)
1167 ("qcheck" ,ocaml-qcheck)))
fdb3fba3 1168 (home-page "https://github.com/vincent-hugot/qtest")
0472836f
JL
1169 (synopsis "Inline (Unit) Tests for OCaml")
1170 (description "Qtest extracts inline unit tests written using a special
1171syntax in comments. Those tests are then run using the oUnit framework and the
1172qcheck library. The possibilities range from trivial tests -- extremely simple
1173to use -- to sophisticated random generation of test cases.")
1174 (license license:lgpl3+)))
3d598ebd
JL
1175
1176(define-public ocaml-stringext
1177 (package
1178 (name "ocaml-stringext")
69c83817 1179 (version "1.6.0")
3d598ebd 1180 (source (origin
acb98ad9
JL
1181 (method git-fetch)
1182 (uri (git-reference
1183 (url "https://github.com/rgrinberg/stringext")
1184 (commit version)))
1185 (file-name (git-file-name name version))
3d598ebd
JL
1186 (sha256
1187 (base32
69c83817 1188 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
acb98ad9
JL
1189 (build-system dune-build-system)
1190 (arguments
1191 `(#:test-target "."))
3d598ebd 1192 (native-inputs
564cf93f
JL
1193 `(("ocamlbuild" ,ocamlbuild)
1194 ("qtest" ,ocaml-qtest)))
3d598ebd
JL
1195 (home-page "https://github.com/rgrinberg/stringext")
1196 (synopsis "Extra string functions for OCaml")
1197 (description "Provides a single module named Stringext that provides a grab
1198bag of often used but missing string functions from the stdlib. E.g, split,
1199full_split, cut, rcut, etc..")
1200 ;; the only mention of a license in this project is in its `opam' file
1201 ;; where it says `mit'.
1202 (license license:expat)))
a5b5bd1d 1203
564cf93f
JL
1204(define-public dune
1205 (package
1206 (name "dune")
283ed30e 1207 (version "1.11.3")
564cf93f 1208 (source (origin
283ed30e
JL
1209 (method git-fetch)
1210 (uri (git-reference
1211 (url "https://github.com/ocaml/dune")
1212 (commit version)))
1213 (file-name (git-file-name name version))
564cf93f
JL
1214 (sha256
1215 (base32
283ed30e 1216 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))
564cf93f
JL
1217 (build-system ocaml-build-system)
1218 (arguments
1219 `(#:tests? #f; require odoc
8d135e37
JL
1220 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1221 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1222 "/lib/ocaml/site-lib"))
564cf93f
JL
1223 #:phases
1224 (modify-phases %standard-phases
1225 (replace 'configure
1226 (lambda* (#:key outputs #:allow-other-keys)
1227 (invoke "./configure")
1228 #t)))))
1229 (home-page "https://github.com/ocaml/dune")
1230 (synopsis "OCaml build system")
1231 (description "Dune is a build system that was designed to simplify the
1232release of Jane Street packages. It reads metadata from @file{dune} files
1233following a very simple s-expression syntax.")
1234 (license license:expat)))
1235
1236(define-public ocaml-migrate-parsetree
1237 (package
1238 (name "ocaml-migrate-parsetree")
8cc6a876 1239 (version "1.4.0")
b2c2c415
GH
1240 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1241 (source
1242 (origin
1243 (method git-fetch)
1244 (uri (git-reference
1245 (url (string-append home-page ".git"))
1246 (commit (string-append "v" version))))
8d2d68a5 1247 (file-name (git-file-name name version))
b2c2c415
GH
1248 (sha256
1249 (base32
8cc6a876 1250 "0sv1p4615l8gpbah4ya2c40yr6fbvahvv3ks7zhrsgcwcq2ljyr2"))))
effc8325 1251 (build-system dune-build-system)
564cf93f 1252 (arguments
b2c2c415 1253 `(#:tests? #f))
564cf93f 1254 (propagated-inputs
b2c2c415
GH
1255 `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
1256 ("ocamlbuild" ,ocamlbuild)
564cf93f 1257 ("ocaml-result" ,ocaml-result)))
cf338cc3 1258 (properties `((upstream-name . "ocaml-migrate-parsetree")))
86912a67 1259 (synopsis "OCaml parsetree converter")
564cf93f
JL
1260 (description "This library converts between parsetrees of different OCaml
1261versions. For each version, there is a snapshot of the parsetree and conversion
1262functions to the next and/or previous version.")
1263 (license license:lgpl2.1+)))
1264
1265(define-public ocaml-ppx-tools-versioned
1266 (package
1267 (name "ocaml-ppx-tools-versioned")
8cc6a876 1268 (version "5.2.3")
564cf93f 1269 (source (origin
8cc6a876
JL
1270 (method git-fetch)
1271 (uri (git-reference
1272 (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
1273 (commit version)))
1274 (file-name (git-file-name name version))
564cf93f
JL
1275 (sha256
1276 (base32
8cc6a876 1277 "1hcmpnw26zf70a71r3d2c2c0mn8q084gdn1r36ynng6fv9hq6j0y"))))
59fa09e1 1278 (build-system dune-build-system)
564cf93f 1279 (arguments
59fa09e1 1280 `(#:test-target "."))
564cf93f
JL
1281 (propagated-inputs
1282 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
c949a4eb 1283 (properties `((upstream-name . "ppx_tools_versioned")))
564cf93f
JL
1284 (home-page "https://github.com/let-def/ppx_tools_versioned")
1285 (synopsis "Variant of ppx_tools")
1286 (description "This package is a variant of ppx_tools based on
1287ocaml-migrate-parsetree")
1288 (license license:expat)))
1289
44c23cb8
JL
1290(define-public ocaml-bitstring
1291 (package
1292 (name "ocaml-bitstring")
564cf93f 1293 (version "3.1.0")
44c23cb8
JL
1294 (source (origin
1295 (method url-fetch)
564cf93f
JL
1296 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1297 "get/v" version ".tar.gz"))
0aee7fdc 1298 (file-name (string-append name "-" version ".tar.gz"))
44c23cb8
JL
1299 (sha256
1300 (base32
564cf93f 1301 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
f93246a5 1302 (build-system dune-build-system)
44c23cb8 1303 (native-inputs
24b199fd 1304 `(("time" ,time)
44c23cb8 1305 ("autoconf" ,autoconf)
24b199fd 1306 ("automake" ,automake)))
44c23cb8 1307 (propagated-inputs
24b199fd 1308 `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
44c23cb8 1309 (arguments
564cf93f 1310 `(#:tests? #f; Tests fail to build
f93246a5 1311 #:jbuild? #t))
564cf93f
JL
1312 (home-page "https://github.com/xguerin/bitstring")
1313 (synopsis "Bitstrings and bitstring matching for OCaml")
1314 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1315a syntax extension and library for OCaml. You can use this module to both parse
1316and generate binary formats, files and protocols. Bitstring handling is added
1317as primitives to the language, making it exceptionally simple to use and very
1318powerful.")
1319 (license license:isc)))
1320
704b990c
JL
1321(define-public ocaml-result
1322 (package
1323 (name "ocaml-result")
d47c8fff 1324 (version "1.4")
704b990c 1325 (source (origin
22cd6a1d
JL
1326 (method git-fetch)
1327 (uri (git-reference
1328 (url "https://github.com/janestreet/result")
1329 (commit version)))
1330 (file-name (git-file-name name version))
704b990c
JL
1331 (sha256
1332 (base32
d47c8fff 1333 "0hir97k9i72nfkm6kncxnqpyk400wlsxysbldgcvk0fd9pjnsc3p"))))
22cd6a1d 1334 (build-system dune-build-system)
704b990c 1335 (arguments
22cd6a1d 1336 `(#:test-target "."))
704b990c
JL
1337 (home-page "https://github.com/janestreet/result")
1338 (synopsis "Compatibility Result module")
1339 (description "Uses the new result type defined in OCaml >= 4.03 while
1340staying compatible with older version of OCaml should use the Result module
1341defined in this library.")
1342 (license license:bsd-3)))
564cf93f 1343
a359c727
JL
1344(define-public ocaml-topkg
1345 (package
1346 (name "ocaml-topkg")
eddfd11d 1347 (version "1.0.0")
a359c727
JL
1348 (source (origin
1349 (method url-fetch)
1350 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1351 "topkg-" version ".tbz"))
1352 (sha256
1353 (base32
eddfd11d 1354 "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"))))
a359c727
JL
1355 (build-system ocaml-build-system)
1356 (native-inputs
564cf93f
JL
1357 `(("opam" ,opam)
1358 ("ocamlbuild" ,ocamlbuild)))
a359c727
JL
1359 (propagated-inputs
1360 `(("result" ,ocaml-result)))
1361 (arguments
1362 `(#:tests? #f
1363 #:build-flags '("build")
1364 #:phases
1365 (modify-phases %standard-phases
1366 (delete 'configure))))
1367 (home-page "http://erratique.ch/software/topkg")
1368 (synopsis "Transitory OCaml software packager")
1369 (description "Topkg is a packager for distributing OCaml software. It
1370provides an API to describe the files a package installs in a given build
1371configuration and to specify information about the package's distribution,
1372creation and publication procedures.")
1373 (license license:isc)))
564cf93f 1374
63147e5e
JL
1375(define-public ocaml-rresult
1376 (package
1377 (name "ocaml-rresult")
1378 (version "0.5.0")
1379 (source (origin
1380 (method url-fetch)
1381 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1382 "rresult-" version ".tbz"))
1383 (sha256
1384 (base32
1385 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1386 (build-system ocaml-build-system)
1387 (native-inputs
564cf93f
JL
1388 `(("opam" ,opam)
1389 ("ocamlbuild" ,ocamlbuild)))
63147e5e
JL
1390 (propagated-inputs
1391 `(("topkg" ,ocaml-topkg)))
1392 (arguments
1393 `(#:tests? #f
1394 #:build-flags '("build")
1395 #:phases
1396 (modify-phases %standard-phases
1397 (delete 'configure))))
1398 (home-page "http://erratique.ch/software/rresult")
1399 (synopsis "Result value combinators for OCaml")
1400 (description "Handle computation results and errors in an explicit and
1401declarative manner, without resorting to exceptions. It defines combinators
1402to operate on the result type available from OCaml 4.03 in the standard
1403library.")
1404 (license license:isc)))
eb1ba731 1405
0c4dbdc2
BW
1406(define-public ocaml-sqlite3
1407 (package
1408 (name "ocaml-sqlite3")
fbf786bd 1409 (version "4.4.1")
0c4dbdc2
BW
1410 (source
1411 (origin
fbf786bd
JL
1412 (method git-fetch)
1413 (uri (git-reference
1414 (url "https://github.com/mmottl/sqlite3-ocaml")
1415 (commit version)))
1416 (file-name (git-file-name name version))
0c4dbdc2
BW
1417 (sha256
1418 (base32
fbf786bd
JL
1419 "1536agm5fgcqysszhpd3kmw7lkc5n5ni7gmlyglrbvmnmrwf3av2"))))
1420 (build-system dune-build-system)
0c4dbdc2 1421 (native-inputs
fbf786bd
JL
1422 `(("ocaml-base" ,ocaml-base)
1423 ("ocaml-stdio" ,ocaml-stdio)
564cf93f 1424 ("pkg-config" ,pkg-config)))
0c4dbdc2
BW
1425 (inputs
1426 `(("sqlite" ,sqlite)))
1427 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1428 (synopsis "SQLite3 Bindings for OCaml")
1429 (description
1430 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1431API. Sqlite3 is a self-contained, serverless, zero-configuration,
1432transactional SQL database engine with outstanding performance for many use
1433cases. These bindings are written in a way that enables a friendly
1434coexistence with the old (version 2) SQLite and its OCaml wrapper
1435@code{ocaml-sqlite}.")
1436 (license license:expat)))
1437
91df9eae
BW
1438(define-public ocaml-csv
1439 (package
1440 (name "ocaml-csv")
5696fbd9 1441 (version "2.3")
91df9eae
BW
1442 (source
1443 (origin
e58d05c3
JL
1444 (method git-fetch)
1445 (uri (git-reference
1446 (url "https://github.com/Chris00/ocaml-csv")
1447 (commit version)))
1448 (file-name (git-file-name name version))
91df9eae
BW
1449 (sha256
1450 (base32
5696fbd9 1451 "19k48517s8y1zb91a1312a0n94cbh5i5dixndcrqjmf87kkz61zx"))))
e58d05c3
JL
1452 (build-system dune-build-system)
1453 (arguments
1454 `(#:package "csv"
1455 #:test-target "."))
91df9eae
BW
1456 (home-page "https://github.com/Chris00/ocaml-csv")
1457 (synopsis "Pure OCaml functions to read and write CSV")
1458 (description
1459 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1460by all major spreadsheets. This library implements pure OCaml functions to
1461read and write files in this format as well as some convenience functions to
1462manipulate such data.")
5696fbd9
JL
1463 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
1464 ;; against the library to be released under any terms.
1465 (license license:lgpl2.1)))
91df9eae 1466
eb1ba731
JL
1467(define-public ocaml-mtime
1468 (package
1469 (name "ocaml-mtime")
853af25e 1470 (version "1.1.0")
eb1ba731
JL
1471 (source (origin
1472 (method url-fetch)
1473 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1474 "mtime-" version ".tbz"))
1475 (sha256
1476 (base32
853af25e 1477 "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3"))))
eb1ba731
JL
1478 (build-system ocaml-build-system)
1479 (native-inputs
564cf93f
JL
1480 `(("ocamlbuild" ,ocamlbuild)
1481 ("opam" ,opam)))
eb1ba731
JL
1482 (propagated-inputs
1483 `(("topkg" ,ocaml-topkg)))
1484 (arguments
1485 `(#:tests? #f
853af25e 1486 #:build-flags (list "build" "--with-js_of_ocaml" "false")
eb1ba731
JL
1487 #:phases
1488 (modify-phases %standard-phases
1489 (delete 'configure))))
1490 (home-page "http://erratique.ch/software/mtime")
1491 (synopsis "Monotonic wall-clock time for OCaml")
1492 (description "Access monotonic wall-clock time. It allows to measure time
1493spans without being subject to operating system calendar time adjustments.")
1494 (license license:isc)))
6548e53f
JL
1495
1496(define-public ocaml-cmdliner
1497 (package
1498 (name "ocaml-cmdliner")
b6bba90e 1499 (version "1.0.3")
6548e53f
JL
1500 (source (origin
1501 (method url-fetch)
1502 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1503 "cmdliner-" version ".tbz"))
1504 (sha256
1505 (base32
b6bba90e 1506 "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"))))
6548e53f 1507 (build-system ocaml-build-system)
ca53346d
GH
1508 (inputs
1509 `(("ocaml-result" ,ocaml-result)))
6548e53f 1510 (native-inputs
b6bba90e 1511 `(("ocamlbuild" ,ocamlbuild)))
6548e53f
JL
1512 (arguments
1513 `(#:tests? #f
b6bba90e
JL
1514 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
1515 "/lib/ocaml/site-lib/cmdliner"))
6548e53f
JL
1516 #:phases
1517 (modify-phases %standard-phases
6c79cee2
JL
1518 (delete 'configure)
1519 (add-before 'build 'fix-source-file-order
1520 (lambda _
1521 (substitute* "build.ml"
1522 (("Sys.readdir dir")
1523 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
1524 #t)))))
6548e53f
JL
1525 (home-page "http://erratique.ch/software/cmdliner")
1526 (synopsis "Declarative definition of command line interfaces for OCaml")
1527 (description "Cmdliner is a module for the declarative definition of command
1528line interfaces. It provides a simple and compositional mechanism to convert
1529command line arguments to OCaml values and pass them to your functions. The
1530module automatically handles syntax errors, help messages and UNIX man page
1531generation. It supports programs with single or multiple commands and respects
1532most of the POSIX and GNU conventions.")
1533 (license license:bsd-3)))
beeb2d41
JL
1534
1535(define-public ocaml-fmt
1536 (package
1537 (name "ocaml-fmt")
cdcbccd1 1538 (version "0.8.5")
beeb2d41
JL
1539 (source
1540 (origin
1541 (method url-fetch)
1542 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1543 version ".tbz"))
1544 (sha256 (base32
cdcbccd1 1545 "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"))))
beeb2d41 1546 (build-system ocaml-build-system)
564cf93f
JL
1547 (native-inputs
1548 `(("ocamlbuild" ,ocamlbuild)
1549 ("opam" ,opam)
1550 ("topkg" ,ocaml-topkg)))
1551 (propagated-inputs
1552 `(("result" ,ocaml-result)
cdcbccd1 1553 ("ocaml-uchar" ,ocaml-uchar)
564cf93f 1554 ("cmdliner" ,ocaml-cmdliner)))
beeb2d41
JL
1555 (arguments `(#:tests? #f
1556 #:build-flags (list "build" "--with-base-unix" "true"
1557 "--with-cmdliner" "true")
1558 #:phases
1559 (modify-phases %standard-phases
1560 (delete 'configure))))
1561 (home-page "http://erratique.ch/software/fmt")
1562 (synopsis "OCaml Format pretty-printer combinators")
1563 (description "Fmt exposes combinators to devise Format pretty-printing
1564functions.")
1565 (license license:isc)))
f46bceb6
JL
1566
1567(define-public ocaml-astring
1568 (package
1569 (name "ocaml-astring")
1570 (version "0.8.3")
1571 (source
1572 (origin
1573 (method url-fetch)
1574 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1575 version ".tbz"))
1576 (sha256 (base32
1577 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1578 (build-system ocaml-build-system)
564cf93f
JL
1579 (native-inputs
1580 `(("ocamlbuild" ,ocamlbuild)
1581 ("opam" ,opam)
1582 ("topkg" ,ocaml-topkg)))
1583 (arguments
1584 `(#:tests? #f
1585 #:build-flags (list "build")
1586 #:phases
1587 (modify-phases %standard-phases
1588 (delete 'configure))))
f46bceb6
JL
1589 (home-page "http://erratique.ch/software/astring")
1590 (synopsis "Alternative String module for OCaml")
1591 (description "Astring exposes an alternative String module for OCaml. This
1592module balances minimality and expressiveness for basic, index-free, string
1593processing and provides types and functions for substrings, string sets and
1594string maps. The String module exposed by Astring has exception safe functions,
1595removes deprecated and rarely used functions, alters some signatures and names,
1596adds a few missing functions and fully exploits OCaml's newfound string
1597immutability.")
1598 (license license:isc)))
69705efe
JL
1599
1600(define-public ocaml-alcotest
1601 (package
1602 (name "ocaml-alcotest")
23c8a97a 1603 (version "0.8.5")
69705efe
JL
1604 (source (origin
1605 (method url-fetch)
1606 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1607 "download/" version "/alcotest-" version ".tbz"))
1608 (sha256
1609 (base32
23c8a97a
JL
1610 "0szwjxvaahgynsx0apj81jxj3ki6yz4is9mh2wkcbx66qy7n6fvb"))))
1611 (build-system dune-build-system)
564cf93f 1612 (arguments
23c8a97a
JL
1613 `(#:package "alcotest"
1614 #:test-target "."))
564cf93f 1615 (native-inputs
23c8a97a 1616 `(("ocamlbuild" ,ocamlbuild)))
564cf93f 1617 (propagated-inputs
23c8a97a
JL
1618 `(("ocaml-astring" ,ocaml-astring)
1619 ("ocaml-cmdliner" ,ocaml-cmdliner)
1620 ("ocaml-fmt" ,ocaml-fmt)
1621 ("ocaml-result" ,ocaml-result)
1622 ("ocaml-uuidm" ,ocaml-uuidm)))
69705efe
JL
1623 (home-page "https://github.com/mirage/alcotest")
1624 (synopsis "Lightweight OCaml test framework")
1625 (description "Alcotest exposes simple interface to perform unit tests. It
1626exposes a simple TESTABLE module type, a check function to assert test
1627predicates and a run function to perform a list of unit -> unit test callbacks.
1628Alcotest provides a quiet and colorful output where only faulty runs are fully
1629displayed at the end of the run (with the full logs ready to inspect), with a
1630simple (yet expressive) query language to select the tests to run.")
1631 (license license:isc)))
0a7b43a8
JL
1632
1633(define-public ocaml-ppx-tools
1634 (package
1635 (name "ocaml-ppx-tools")
564cf93f 1636 (version "5.1+4.06.0")
0a7b43a8 1637 (source
ef59cf9d
TGR
1638 (origin
1639 (method git-fetch)
1640 (uri (git-reference
1641 (url "https://github.com/alainfrisch/ppx_tools.git")
1642 (commit version)))
9e6cce44 1643 (file-name (git-file-name name version))
ef59cf9d
TGR
1644 (sha256 (base32
1645 "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"))))
0a7b43a8 1646 (build-system ocaml-build-system)
564cf93f
JL
1647 (arguments
1648 `(#:phases (modify-phases %standard-phases (delete 'configure))
1649 #:tests? #f))
d4857001 1650 (properties `((upstream-name . "ppx_tools")))
0a7b43a8
JL
1651 (home-page "https://github.com/alainfrisch/ppx_tools")
1652 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1653 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1654 (license license:expat)))
1342fce1
JL
1655
1656(define-public ocaml-react
1657 (package
1658 (name "ocaml-react")
d7d41026 1659 (version "1.2.1")
1342fce1
JL
1660 (source
1661 (origin
1662 (method url-fetch)
1663 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1664 version ".tbz"))
1665 (sha256 (base32
d7d41026 1666 "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"))))
1342fce1 1667 (build-system ocaml-build-system)
564cf93f
JL
1668 (native-inputs
1669 `(("ocamlbuild" ,ocamlbuild)
d7d41026
JL
1670 ("opam" ,opam)
1671 ("ocaml-topkg" ,ocaml-topkg)))
564cf93f
JL
1672 (arguments
1673 `(#:tests? #f
d7d41026 1674 #:build-flags (list "build")
564cf93f
JL
1675 #:phases
1676 (modify-phases %standard-phases
1677 (delete 'configure))))
1342fce1
JL
1678 (home-page "http://erratique.ch/software/react")
1679 (synopsis "Declarative events and signals for OCaml")
1680 (description "React is an OCaml module for functional reactive programming
1681(FRP). It provides support to program with time varying values: declarative
1682events and signals. React doesn't define any primitive event or signal, it
1683lets the client choose the concrete timeline.")
1684 (license license:bsd-3)))
37f17e2a
JL
1685
1686(define-public ocaml-ssl
1687 (package
1688 (name "ocaml-ssl")
4a8a0d85 1689 (version "0.5.9")
37f17e2a
JL
1690 (source
1691 (origin
8ae540a2
TGR
1692 (method git-fetch)
1693 (uri (git-reference
1694 (url "https://github.com/savonet/ocaml-ssl.git")
1695 (commit version)))
1696 (file-name (git-file-name name version))
37f17e2a 1697 (sha256 (base32
4a8a0d85 1698 "04h02rvzrwp886n5hsx84rnc9b150iggy38g5v1x1rwz3pkdnmf0"))))
b858c5ac 1699 (build-system dune-build-system)
564cf93f 1700 (arguments
b858c5ac 1701 `(#:test-target "."))
564cf93f
JL
1702 (native-inputs
1703 `(("autoconf" ,autoconf)
1704 ("automake" ,automake)
1705 ("which" ,which)))
37f17e2a
JL
1706 (propagated-inputs `(("openssl" ,openssl)))
1707 (home-page "https://github.com/savonet/ocaml-ssl/")
1708 (synopsis "OCaml bindings for OpenSSL")
36dba63b
TGR
1709 (description
1710 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
1711through Transport Layer Security (@dfn{TLS}) encrypted connections.")
37f17e2a 1712 (license license:lgpl2.1)))
1fdfbadf
JL
1713
1714(define-public ocaml-lwt
1715 (package
1716 (name "ocaml-lwt")
564cf93f 1717 (version "4.1.0")
1fdfbadf
JL
1718 (source
1719 (origin
1720 (method url-fetch)
1721 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
1722 ".tar.gz"))
14ebf2fc 1723 (file-name (string-append name "-" version ".tar.gz"))
1fdfbadf 1724 (sha256 (base32
564cf93f 1725 "0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp"))))
f880b03b 1726 (build-system dune-build-system)
1fdfbadf 1727 (arguments
564cf93f 1728 `(#:tests? #f; require lwt_ppx
f880b03b 1729 #:jbuild? #t
1fdfbadf
JL
1730 #:phases
1731 (modify-phases %standard-phases
f880b03b 1732 (add-before 'build 'configure
564cf93f
JL
1733 (lambda _
1734 (invoke "ocaml" "src/util/configure.ml" "-use-libev" "true")
564cf93f
JL
1735 #t)))))
1736 (native-inputs
f880b03b 1737 `(("ocaml-cppo" ,ocaml-cppo)
564cf93f
JL
1738 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
1739 ("pkg-config" ,pkg-config)
1740 ("ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
1741 (inputs
1742 `(("libev" ,libev)
1743 ("glib" ,glib)))
1744 (propagated-inputs
1745 `(("result" ,ocaml-result)
1746 ("ocaml-ssl" ,ocaml-ssl)
1747 ("ocaml-react" ,ocaml-react)))
1fdfbadf
JL
1748 (home-page "https://github.com/ocsigen/lwt")
1749 (synopsis "Cooperative threads and I/O in monadic style")
1750 (description "Lwt provides typed, composable cooperative threads. These
1751make it easy to run normally-blocking I/O operations concurrently in a single
1752process. Also, in many cases, Lwt threads can interact without the need for
1753locks or other synchronization primitives.")
1754 (license license:lgpl2.1)))
9dc7dcb2 1755
564cf93f
JL
1756(define-public ocaml-lwt-log
1757 (package
1758 (name "ocaml-lwt-log")
72b2e2ea
JL
1759 (version "1.1.1")
1760 (source (origin
1761 (method git-fetch)
1762 (uri (git-reference
1763 (url "https://github.com/aantron/lwt_log")
1764 (commit version)))
1765 (file-name (git-file-name name version))
1766 (sha256
1767 (base32
1768 "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
5d071263 1769 (build-system dune-build-system)
564cf93f
JL
1770 (arguments
1771 `(#:tests? #f; require lwt_ppx
5d071263 1772 #:jbuild? #t))
564cf93f
JL
1773 (propagated-inputs
1774 `(("lwt" ,ocaml-lwt)))
f08b235d 1775 (properties `((upstream-name . "lwt_log")))
564cf93f
JL
1776 (home-page "https://github.com/aantron/lwt_log")
1777 (synopsis "Logging library")
1778 (description "This package provides a deprecated logging component for
1779ocaml lwt.")
1780 (license license:lgpl2.1)))
1781
9dc7dcb2
JL
1782(define-public ocaml-logs
1783 (package
1784 (name "ocaml-logs")
1785 (version "0.6.2")
1786 (source (origin
1787 (method url-fetch)
1788 (uri (string-append "http://erratique.ch/software/logs/releases/"
1789 "logs-" version ".tbz"))
1790 (sha256
1791 (base32
1792 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
1793 (build-system ocaml-build-system)
564cf93f
JL
1794 (arguments
1795 `(#:tests? #f
1796 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1797 #:phases
1798 (modify-phases %standard-phases
1799 (delete 'configure))))
1800 (native-inputs
1801 `(("ocamlbuild" ,ocamlbuild)
1802 ("opam" ,opam)))
1803 (propagated-inputs
1804 `(("fmt" ,ocaml-fmt)
1805 ("lwt" ,ocaml-lwt)
1806 ("mtime" ,ocaml-mtime)
1807 ("result" ,ocaml-result)
1808 ("cmdliner" ,ocaml-cmdliner)
1809 ("topkg" ,ocaml-topkg)))
9dc7dcb2
JL
1810 (home-page "http://erratique.ch/software/logs")
1811 (synopsis "Logging infrastructure for OCaml")
1812 (description "Logs provides a logging infrastructure for OCaml. Logging is
1813performed on sources whose reporting level can be set independently. Log
1814message report is decoupled from logging and is handled by a reporter.")
1815 (license license:isc)))
fbf38b09
JL
1816
1817(define-public ocaml-fpath
1818 (package
1819 (name "ocaml-fpath")
7e495384 1820 (version "0.7.2")
fbf38b09
JL
1821 (source (origin
1822 (method url-fetch)
1823 (uri (string-append "http://erratique.ch/software/fpath/releases/"
1824 "fpath-" version ".tbz"))
1825 (sha256
1826 (base32
7e495384 1827 "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
fbf38b09 1828 (build-system ocaml-build-system)
564cf93f
JL
1829 (arguments
1830 `(#:tests? #f
1831 #:build-flags (list "build")
1832 #:phases
1833 (modify-phases %standard-phases
1834 (delete 'configure))))
1835 (native-inputs
1836 `(("ocamlbuild" ,ocamlbuild)
1837 ("opam" ,opam)))
1838 (propagated-inputs
1839 `(("topkg" ,ocaml-topkg)
1840 ("astring" ,ocaml-astring)))
fbf38b09
JL
1841 (home-page "http://erratique.ch/software/fpath")
1842 (synopsis "File system paths for OCaml")
1843 (description "Fpath is an OCaml module for handling file system paths with
1844POSIX or Windows conventions. Fpath processes paths without accessing the
1845file system and is independent from any system library.")
1846 (license license:isc)))
33e0702d
JL
1847
1848(define-public ocaml-bos
1849 (package
1850 (name "ocaml-bos")
a1034ea0 1851 (version "0.2.0")
33e0702d
JL
1852 (source (origin
1853 (method url-fetch)
1854 (uri (string-append "http://erratique.ch/software/bos/releases/"
1855 "bos-" version ".tbz"))
1856 (sha256
1857 (base32
a1034ea0 1858 "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"))))
33e0702d 1859 (build-system ocaml-build-system)
564cf93f
JL
1860 (arguments
1861 `(#:tests? #f
1862 #:build-flags (list "build")
1863 #:phases
1864 (modify-phases %standard-phases
1865 (delete 'configure))))
1866 (native-inputs
1867 `(("ocamlbuild" ,ocamlbuild)
1868 ("opam" ,opam)))
1869 (propagated-inputs
1870 `(("topkg" ,ocaml-topkg)
1871 ("astring" ,ocaml-astring)
1872 ("fmt" ,ocaml-fmt)
1873 ("fpath" ,ocaml-fpath)
1874 ("logs" ,ocaml-logs)
1875 ("rresult" ,ocaml-rresult)))
33e0702d
JL
1876 (home-page "http://erratique.ch/software/bos")
1877 (synopsis "Basic OS interaction for OCaml")
1878 (description "Bos provides support for basic and robust interaction with
1879the operating system in OCaml. It has functions to access the process
1880environment, parse command line arguments, interact with the file system and
1881run command line programs.")
1882 (license license:isc)))
036b8579
JL
1883
1884(define-public ocaml-xmlm
1885 (package
1886 (name "ocaml-xmlm")
564cf93f 1887 (version "1.3.0")
036b8579
JL
1888 (source (origin
1889 (method url-fetch)
1890 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
1891 "xmlm-" version ".tbz"))
1892 (sha256
1893 (base32
564cf93f 1894 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
036b8579 1895 (build-system ocaml-build-system)
564cf93f
JL
1896 (arguments
1897 `(#:tests? #f
1898 #:build-flags (list "build")
1899 #:phases
1900 (modify-phases %standard-phases
1901 (delete 'configure))))
1902 (native-inputs
1903 `(("ocamlbuild" ,ocamlbuild)
1904 ("ocaml-topkg" ,ocaml-topkg)
1905 ("opam" ,opam)))
036b8579
JL
1906 (home-page "http://erratique.ch/software/xmlm")
1907 (synopsis "Streaming XML codec for OCaml")
1908 (description "Xmlm is a streaming codec to decode and encode the XML data
1909format. It can process XML documents without a complete in-memory
1910representation of the data.")
1911 (license license:isc)))
6e9b678e 1912
5a4003f4
JL
1913(define-public ocaml-gen
1914 (package
1915 (name "ocaml-gen")
1916 (version "0.5.2")
1917 (source (origin
5045821e
EF
1918 (method git-fetch)
1919 (uri (git-reference
1920 (url "https://github.com/c-cube/gen")
1921 (commit version)))
1922 (file-name (git-file-name name version))
5a4003f4
JL
1923 (sha256
1924 (base32
5045821e 1925 "1h9g508rnj2j8va5nvhamzscp954vrkh0hdf4pn3d10pcfyslfg2"))))
5a4003f4
JL
1926 (build-system dune-build-system)
1927 (arguments
1928 `(#:tests? #f; no tests
1929 #:package "gen"))
1930 (propagated-inputs
1931 `(("ocaml-odoc" ,ocaml-odoc)))
1932 (native-inputs
1933 `(("ocaml-qtest" ,ocaml-qtest)
1934 ("ocaml-qcheck" ,ocaml-qcheck)))
1935 (home-page "https://github.com/c-cube/gen/")
1936 (synopsis "Iterators for OCaml, both restartable and consumable")
1937 (description "Gen implements iterators of OCaml, that are both restartable
1938and consumable.")
1939 (license license:bsd-2)))
1940
98a468ff
JL
1941(define-public ocaml-sedlex
1942 (package
1943 (name "ocaml-sedlex")
1944 (version "2.1")
1945 (source (origin
1946 (method git-fetch)
1947 (uri (git-reference
1948 (url "https://github.com/ocaml-community/sedlex")
1949 (commit (string-append "v" version))))
1950 (file-name (git-file-name name version))
1951 (sha256
1952 (base32
1953 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
1954 (build-system dune-build-system)
1955 (arguments
1956 `(#:tests? #f; no tests
1957 #:package "sedlex"
1958 #:phases
1959 (modify-phases %standard-phases
1960 (add-before 'build 'copy-resources
1961 (lambda* (#:key inputs #:allow-other-keys)
1962 (with-directory-excursion "src/generator/data"
1963 (for-each
1964 (lambda (file)
1965 (copy-file (assoc-ref inputs file) file))
1966 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
1967 "PropList.txt")))
1968 #t))
1969 (add-before 'build 'chmod
1970 (lambda _
1971 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
1972 #t)))))
1973 (native-inputs
1974 `(("ocamlbuild" ,ocamlbuild)))
1975 (propagated-inputs
1976 `(("ocaml-gen" ,ocaml-gen)
1977 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
1978 ("ocaml-uchar" ,ocaml-uchar)))
1979 ;; These three files are needed by src/generator/data/dune, but would be
1980 ;; downloaded using curl at build time.
1981 (inputs
1982 `(("DerivedCoreProperties.txt"
1983 ,(origin
1984 (method url-fetch)
1985 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
1986 (sha256
1987 (base32
1988 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
1989 ("DerivedGeneralCategory.txt"
1990 ,(origin
1991 (method url-fetch)
1992 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
1993 (sha256
1994 (base32
1995 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
1996 ("PropList.txt"
1997 ,(origin
1998 (method url-fetch)
1999 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2000 (sha256
2001 (base32
2002 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
2003 (home-page "http://www.cduce.org/download.html#side")
2004 (synopsis "Lexer generator for Unicode and OCaml")
2005 (description "Lexer generator for Unicode and OCaml.")
2006 (license license:expat)))
2007
33f16b9a
JL
2008(define-public ocaml-uchar
2009 (package
2010 (name "ocaml-uchar")
f0dece30 2011 (version "0.0.2")
33f16b9a
JL
2012 (source
2013 (origin
2014 (method url-fetch)
2015 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2016 version "/uchar-" version ".tbz"))
2017 (sha256 (base32
f0dece30 2018 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
33f16b9a 2019 (build-system ocaml-build-system)
564cf93f
JL
2020 (arguments
2021 `(#:tests? #f
2022 #:build-flags (list "native=true" "native-dynlink=true")
2023 #:phases
2024 (modify-phases %standard-phases
2025 (delete 'configure))))
2026 (native-inputs
2027 `(("ocamlbuild" ,ocamlbuild)
2028 ("opam" ,opam)))
33f16b9a
JL
2029 (home-page "https://github.com/ocaml/uchar")
2030 (synopsis "Compatibility library for OCaml's Uchar module")
2031 (description "The uchar package provides a compatibility library for the
2032`Uchar` module introduced in OCaml 4.03.")
2033 (license license:lgpl2.1)))
84290923
JL
2034
2035(define-public ocaml-uutf
2036 (package
2037 (name "ocaml-uutf")
564cf93f 2038 (version "1.0.1")
84290923
JL
2039 (source (origin
2040 (method url-fetch)
2041 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2042 "uutf-" version ".tbz"))
2043 (sha256
2044 (base32
564cf93f 2045 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
84290923 2046 (build-system ocaml-build-system)
564cf93f
JL
2047 (arguments
2048 `(#:tests? #f
2049 #:build-flags (list "build")
2050 #:phases
2051 (modify-phases %standard-phases
2052 (delete 'configure))))
2053 (native-inputs
2054 `(("ocamlbuild" ,ocamlbuild)
2055 ("opam" ,opam)
2056 ("topkg" ,ocaml-topkg)))
2057 (propagated-inputs
2058 `(("uchar" ,ocaml-uchar)
2059 ("cmdliner" ,ocaml-cmdliner)))
84290923
JL
2060 (home-page "http://erratique.ch/software/uutf")
2061 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2062 (description "Uutf is a non-blocking streaming codec to decode and encode
2063the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2064work character by character without blocking on IO. Decoders perform character
2065position tracking and support newline normalization.
2066
2067Functions are also provided to fold over the characters of UTF encoded OCaml
2068string values and to directly encode characters in OCaml Buffer.t values.")
2069 (license license:isc)))
800ab1fb
JL
2070
2071(define-public ocaml-jsonm
2072 (package
2073 (name "ocaml-jsonm")
564cf93f 2074 (version "1.0.1")
800ab1fb
JL
2075 (source (origin
2076 (method url-fetch)
2077 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2078 "jsonm-" version ".tbz"))
2079 (sha256
2080 (base32
564cf93f 2081 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
800ab1fb 2082 (build-system ocaml-build-system)
564cf93f
JL
2083 (arguments
2084 `(#:tests? #f
2085 #:build-flags (list "build")
2086 #:phases
2087 (modify-phases %standard-phases
2088 (delete 'configure))))
2089 (native-inputs
2090 `(("ocamlbuild" ,ocamlbuild)
2091 ("opam" ,opam)
2092 ("topkg" ,ocaml-topkg)))
2093 (propagated-inputs
2094 `(("uutf" ,ocaml-uutf)
2095 ("cmdliner" ,ocaml-cmdliner)))
800ab1fb
JL
2096 (home-page "http://erratique.ch/software/jsonm")
2097 (synopsis "Non-blocking streaming JSON codec for OCaml")
2098 (description "Jsonm is a non-blocking streaming codec to decode and encode
2099the JSON data format. It can process JSON text without blocking on IO and
2100without a complete in-memory representation of the data.")
2101 (license license:isc)))
fd6e260e
JL
2102
2103(define-public ocaml-ocurl
2104 (package
2105 (name "ocaml-ocurl")
564cf93f 2106 (version "0.8.2")
fd6e260e
JL
2107 (source (origin
2108 (method url-fetch)
2109 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2110 version ".tar.gz"))
2111 (sha256
2112 (base32
564cf93f 2113 "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"))))
fd6e260e 2114 (build-system ocaml-build-system)
564cf93f
JL
2115 (arguments
2116 `(#:phases
2117 (modify-phases %standard-phases
2118 (add-before 'configure 'fix-/bin/sh
2119 (lambda* (#:key inputs #:allow-other-keys)
2120 (substitute* "configure"
2121 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2122 (native-inputs
2123 `(("pkg-config" ,pkg-config)))
fd6e260e
JL
2124 (inputs `(("curl" ,curl)))
2125 (home-page "http://ocurl.forge.ocamlcore.org/")
2126 (synopsis "OCaml bindings for libcurl")
2127 (description "Client-side URL transfer library, supporting HTTP and a
2128multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2129 (license license:isc)))
5d08f98d
JL
2130
2131(define-public ocaml-base64
2132 (package
2133 (name "ocaml-base64")
3617d4f9 2134 (version "3.2.0")
5d08f98d 2135 (source (origin
3617d4f9
JL
2136 (method git-fetch)
2137 (uri (git-reference
2138 (url "https://github.com/mirage/ocaml-base64")
2139 (commit (string-append "v" version))))
2140 (file-name (git-file-name name version))
5d08f98d
JL
2141 (sha256
2142 (base32
3617d4f9
JL
2143 "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy"))))
2144 (build-system dune-build-system)
5d08f98d 2145 (native-inputs
3617d4f9
JL
2146 `(("ocaml-alcotest" ,ocaml-alcotest)
2147 ("ocaml-bos" ,ocaml-bos)
2148 ("ocaml-rresult" ,ocaml-rresult)))
5d08f98d
JL
2149 (home-page "https://github.com/mirage/ocaml-base64")
2150 (synopsis "Base64 encoding for OCaml")
2151 (description "Base64 is a group of similar binary-to-text encoding schemes
2152that represent binary data in an ASCII string format by translating it into a
2153radix-64 representation. It is specified in RFC 4648.")
2154 (license license:isc)))
c590f1ae
JL
2155
2156(define-public ocamlify
2157 (package
2158 (name "ocamlify")
6e494267 2159 (version "0.0.1")
c590f1ae
JL
2160 (source (origin
2161 (method url-fetch)
6e494267 2162 (uri "https://download.ocamlcore.org/ocamlify/ocamlify/0.0.1/ocamlify-0.0.1.tar.gz")
c590f1ae
JL
2163 (sha256
2164 (base32
6e494267 2165 "1j9nb3vjqbdsx3d6jazixgrh776051zkrc06nsc5q5ilp1jhrwkm"))))
c590f1ae
JL
2166 (build-system ocaml-build-system)
2167 ; tests are done during build
2168 (arguments
6e494267 2169 `(#:phases
c590f1ae 2170 (modify-phases %standard-phases
6e494267
JL
2171 (delete 'check)
2172 (replace 'configure
2173 (lambda* (#:key outputs #:allow-other-keys)
2174 (invoke "ocaml" "setup.ml" "-configure" "--prefix"
2175 (assoc-ref outputs "out")))))))
2176 (native-inputs
2177 `(("ocamlbuild" ,ocamlbuild)))
c590f1ae
JL
2178 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2179 (synopsis "Include files in OCaml code")
2180 (description "OCamlify allows to create OCaml source code by including
2181whole files into OCaml string or string list. The code generated can be
2182compiled as a standard OCaml file. It allows embedding external resources as
2183OCaml code.")
2184 (license license:lgpl2.1+))); with the OCaml static compilation exception
41e8e079
JL
2185
2186(define-public omake
2187 (package
2188 (name "omake")
564cf93f 2189 (version "0.10.3")
41e8e079
JL
2190 (source (origin
2191 (method url-fetch)
2192 (uri (string-append "http://download.camlcity.org/download/"
2193 "omake-" version ".tar.gz"))
2194 (sha256
2195 (base32
564cf93f 2196 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
41e8e079
JL
2197 (patches (search-patches "omake-fix-non-determinism.patch"))))
2198 (build-system ocaml-build-system)
2199 (arguments
2200 `(#:make-flags
2201 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2202 #:tests? #f ; no test target
2203 #:phases
2204 (modify-phases %standard-phases
2205 (add-before 'configure 'fix-makefile
2206 (lambda* (#:key outputs #:allow-other-keys)
2207 (substitute* "mk/osconfig_unix.mk"
2208 (("CC = cc") "CC = gcc")))))))
2209 (native-inputs `(("hevea" ,hevea)))
2210 (home-page "http://projects.camlcity.org/projects/omake.html")
2211 (synopsis "Build system designed for scalability and portability")
2212 (description "Similar to make utilities you may have used, but it features
2213many additional enhancements, including:
2214
2215@enumerate
2216@item Support for projects spanning several directories or directory hierarchies.
2217@item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2218 with full support for incremental builds.
2219@item Dependency analysis takes the command lines into account — whenever the
2220 command line used to build a target changes, the target is considered
2221 out-of-date.
2222@item Fully scriptable, includes a library that providing support for standard
2223 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2224@end enumerate")
2225 (license (list license:lgpl2.1 ; libmojave
2226 license:expat ; OMake scripts
2227 license:gpl2)))) ; OMake itself, with ocaml linking exception
2228 ; see LICENSE.OMake
0e9e94b7
JL
2229
2230(define-public ocaml-batteries
2231 (package
2232 (name "ocaml-batteries")
242e9f0d 2233 (version "2.10.0")
0e9e94b7
JL
2234 (source (origin
2235 (method url-fetch)
564cf93f
JL
2236 (uri (string-append "https://github.com/ocaml-batteries-team/"
2237 "batteries-included/releases/download/v"
2238 version "/batteries-" version ".tar.gz"))
0e9e94b7
JL
2239 (sha256
2240 (base32
242e9f0d 2241 "08ghw87d56h1a6y1nnh3x2wy9xj25jqfk5sp6ma9nsyd37babb0h"))))
0e9e94b7
JL
2242 (build-system ocaml-build-system)
2243 (native-inputs
564cf93f 2244 `(("ocamlbuild" ,ocamlbuild)
af76eeda 2245 ("qtest" ,ocaml-qtest)))
564cf93f
JL
2246 (propagated-inputs
2247 `(("ocaml-num" ,ocaml-num)))
0e9e94b7
JL
2248 (arguments
2249 `(#:phases
2250 (modify-phases %standard-phases
2251 (delete 'check) ; tests are run by the build phase
850f7873
JL
2252 (add-before 'build 'fix-nondeterminism
2253 (lambda _
2254 (substitute* "setup.ml"
2255 (("Sys.readdir dirname")
2256 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
2257 #t))
0e9e94b7 2258 (replace 'build
564cf93f
JL
2259 (lambda* (#:key inputs outputs #:allow-other-keys)
2260 (let ((files
2261 (map (lambda (str)
2262 (substring str 0 (- (string-length str) 1)))
2263 (append
2264 (find-files "src" ".*.mliv")
2265 (find-files "src" ".*.mlv")
2266 (find-files "src" ".*.mlp")))))
2267 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2268 "-lflag" "-dllpath-all" files)
2269 (for-each (lambda (file)
2270 (copy-file (string-append "_build/" file) file))
2271 files))
2272 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2273 "-lflag" "-dllpath-all" "build/mkconf.byte")
2274 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2275 (invoke "make" "all")
2276 #t)))))
0e9e94b7
JL
2277 (home-page "http://batteries.forge.ocamlcore.org/")
2278 (synopsis "Development platform for the OCaml programming language")
2279 (description "Define a standard set of libraries which may be expected on
2280every compliant installation of OCaml and organize these libraries into a
2281hierarchy of modules.")
2282 (license license:lgpl2.1+)))
f8a12de1
JL
2283
2284(define-public ocaml-pcre
2285 (package
2286 (name "ocaml-pcre")
1e8439de 2287 (version "7.4.1")
f8a12de1 2288 (source (origin
1e8439de
JL
2289 (method git-fetch)
2290 (uri (git-reference
2291 (url "https://github.com/mmottl/pcre-ocaml")
2292 (commit version)))
2293 (file-name (git-file-name name version))
f8a12de1
JL
2294 (sha256
2295 (base32
1e8439de
JL
2296 "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
2297 (build-system dune-build-system)
f8a12de1 2298 (arguments
1e8439de 2299 `(#:test-target "."))
f8a12de1 2300 (native-inputs
1e8439de 2301 `(("ocaml-base" ,ocaml-base)
f8a12de1
JL
2302 ("pcre:bin" ,pcre "bin")))
2303 (propagated-inputs `(("pcre" ,pcre)))
2304 (home-page "https://mmottl.github.io/pcre-ocaml")
2305 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2306 (description "Pcre-ocaml offers library functions for string pattern
2307matching and substitution, similar to the functionality offered by the Perl
2308language.")
2309 (license license:lgpl2.1+))); with the OCaml link exception
3763eea7
JL
2310
2311(define-public ocaml-expect
2312 (package
2313 (name "ocaml-expect")
564cf93f 2314 (version "0.0.6")
3763eea7
JL
2315 (source (origin
2316 (method url-fetch)
564cf93f 2317 (uri (ocaml-forge-uri name version 1736))
3763eea7
JL
2318 (sha256
2319 (base32
564cf93f
JL
2320 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2321 (arguments
2322 `(#:tests? #f))
3763eea7
JL
2323 (build-system ocaml-build-system)
2324 (native-inputs
564cf93f
JL
2325 `(("ocamlbuild" ,ocamlbuild)
2326 ("ocaml-num" ,ocaml-num)
2327 ("ocaml-pcre" ,ocaml-pcre)
3763eea7
JL
2328 ("ounit" ,ocaml-ounit)))
2329 (propagated-inputs `(("batteries" ,ocaml-batteries)))
2330 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2331 (synopsis "Simple implementation of expect")
2332 (description "Help building unitary testing of interactive program. You
2333can match the question using a regular expression or a timeout.")
2334 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
77a515e9 2335
a21ea76f
JL
2336(define-public ocaml-stdlib-shims
2337 (package
2338 (name "ocaml-stdlib-shims")
2339 (version "0.1.0")
2340 (source (origin
2341 (method git-fetch)
2342 (uri (git-reference
2343 (url "https://github.com/ocaml/stdlib-shims")
2344 (commit version)))
2345 (file-name (git-file-name name version))
2346 (sha256
2347 (base32
2348 "007dwywsr5285z0np6a9nr0h8iqmyzfrlx6s5xaqcwj69zabsrjm"))))
2349 (build-system dune-build-system)
2350 (home-page "https://github.com/ocaml/stdlib-shims")
2351 (synopsis "OCaml stdlib features backport to older OCaml compilers")
2352 (description "This package backports some of the new stdlib features to
2353older compilers, such as the Stdlib module. This allows projects that require
2354compatibility with older compiler to use these new features in their code.")
2355 ;; with ocaml-linking exception
2356 (license license:lgpl2.1+)))
2357
bbe9915b 2358(define-public ocaml-fileutils
77a515e9 2359 (package
bbe9915b 2360 (name "ocaml-fileutils")
1fe01b70 2361 (version "0.6.0")
77a515e9 2362 (source (origin
1fe01b70
JL
2363 (method git-fetch)
2364 (uri (git-reference
2365 (url "https://github.com/gildor478/ocaml-fileutils")
2366 (commit (string-append "v" version))))
2367 (file-name (git-file-name name version))
77a515e9
JL
2368 (sha256
2369 (base32
1fe01b70 2370 "06gxbqfssl16xc8y4d34wpm0mwfr0jgph4lmlwfmgazyggnmvc7m"))))
77a515e9 2371 (build-system ocaml-build-system)
1fe01b70
JL
2372 (arguments
2373 '(#:phases
2374 (modify-phases %standard-phases
2375 (add-before 'configure 'set-topfind
2376 (lambda* (#:key inputs #:allow-other-keys)
2377 ;; add the line #directory ".." at the top of each file
2378 ;; using #use "topfind";; to be able to find topfind
2379 (let* ((findlib-path (assoc-ref inputs "findlib"))
2380 (findlib-libdir
2381 (string-append findlib-path "/lib/ocaml/site-lib")))
2382 (substitute* "setup.ml"
2383 (("#use \"topfind\";;" all)
2384 (string-append "#directory \"" findlib-libdir "\"\n"
2385 all))))
2386 #t)))))
2387 (propagated-inputs
2388 `(("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
564cf93f 2389 (native-inputs
bbe9915b 2390 `(("ocamlbuild" ,ocamlbuild)
1fe01b70
JL
2391 ("ocaml-oasis" ,ocaml-oasis)
2392 ("ocaml-ounit" ,ocaml-ounit)))
77a515e9
JL
2393 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2394 (synopsis "Pure OCaml functions to manipulate real file and filename")
2395 (description "Library to provide pure OCaml functions to manipulate real
2396file (POSIX like) and filename.")
2397 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
5eed45a8
JL
2398
2399(define-public ocaml-oasis
2400 (package
2401 (name "ocaml-oasis")
564cf93f 2402 (version "0.4.11")
5eed45a8
JL
2403 (source (origin
2404 (method url-fetch)
564cf93f 2405 (uri (ocaml-forge-uri name version 1757))
5eed45a8
JL
2406 (sha256
2407 (base32
564cf93f 2408 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
5eed45a8
JL
2409 (modules '((guix build utils)))
2410 (snippet
6cbee49d
MW
2411 '(begin
2412 (substitute* "test/test-main/Test.ml"
2413 ;; most of these tests fail because ld cannot find crti.o, but according
2414 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
564cf93f 2415 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
6cbee49d
MW
2416 (("TestBaseCompat.tests;") "")
2417 (("TestExamples.tests;") "")
2418 (("TestFull.tests;") "")
2419 (("TestPluginDevFiles.tests;") "")
2420 (("TestPluginInternal.tests;") "")
2421 (("TestPluginOCamlbuild.tests;") "")
2422 (("TestPluginOMake.tests;") ""))
2423 #t))))
5eed45a8 2424 (build-system ocaml-build-system)
564cf93f
JL
2425 (arguments
2426 `(#:tests? #f))
5eed45a8 2427 (native-inputs
564cf93f
JL
2428 `(("ocamlbuild" ,ocamlbuild)
2429 ("ocamlify" ,ocamlify)
2430 ("ocamlmod" ,ocamlmod)))
5eed45a8
JL
2431 (home-page "https://oasis.forge.ocamlcore.org")
2432 (synopsis "Integrates a configure, build, install system in OCaml projects")
2433 (description "OASIS is a tool to integrate a configure, build and install
2434system in your OCaml projects. It helps to create standard entry points in your
2435build system and allows external tools to analyse your project easily.")
2436 (license license:lgpl2.1+))) ; with ocaml static compilation exception
f95ebba5
JL
2437
2438(define-public ocaml-js-build-tools
2439 (package
2440 (name "ocaml-js-build-tools")
2441 (version "113.33.06")
2442 (source (janestreet-origin "js-build-tools" version
2443 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2444 (native-inputs
2445 `(("oasis" ,ocaml-oasis)
564cf93f 2446 ("ocamlbuild" ,ocamlbuild)
f95ebba5
JL
2447 ("opam" ,opam)))
2448 (build-system ocaml-build-system)
2449 (arguments janestreet-arguments)
2450 (home-page "https://github.com/janestreet/js-build-tools")
2451 (synopsis "Collection of tools to help building Jane Street Packages")
2452 (description "This package contains tools to help building Jane Street
2453packages, but can be used for other purposes. It contains:
2454@enumerate
2455@item an @command{oasis2opam-install} tool to produce a @file{.install} file
2456from the oasis build log
2457@item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2458@end enumerate")
2459 (license license:asl2.0)))
f5c8cf3b 2460
f6dde36a
JL
2461(define-public ocaml-cppo
2462 (package
2463 (name "ocaml-cppo")
f082c78c 2464 (version "1.6.6")
f6dde36a
JL
2465 (source
2466 (origin
f082c78c
JL
2467 (method git-fetch)
2468 (uri (git-reference
2469 (url "https://github.com/mjambon/cppo")
2470 (commit (string-append "v" version))))
2471 (file-name (git-file-name name version))
f6dde36a 2472 (sha256 (base32
f082c78c 2473 "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
48b27902 2474 (build-system dune-build-system)
f6dde36a 2475 (arguments
48b27902
JL
2476 `(#:tests? #f
2477 #:build-flags (list "--profile" "release")))
564cf93f 2478 (native-inputs
48b27902 2479 `(("ocamlbuild" ,ocamlbuild)))
f6dde36a
JL
2480 (home-page "https://github.com/mjambon/cppo")
2481 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2482 (description "Cppo is an equivalent of the C preprocessor for OCaml
2483programs. It allows the definition of simple macros and file inclusion. Cpp ois:
2484@enumerate
2485@item more OCaml-friendly than cpp
2486@item easy to learn without consulting a manual
2487@item reasonably fast
2488@item simple to install and to maintain.
2489@end enumerate")
2490 (license license:bsd-3)))
505394d1 2491
564cf93f
JL
2492(define-public ocaml-seq
2493 (package
2494 (name "ocaml-seq")
2495 (version "0.1")
f6a99fbf
TGR
2496 (source
2497 (origin
2498 (method git-fetch)
2499 (uri (git-reference
2500 (url "https://github.com/c-cube/seq.git")
2501 (commit version)))
2502 (file-name (git-file-name name version))
2503 (sha256
2504 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
564cf93f
JL
2505 (build-system ocaml-build-system)
2506 (arguments
2507 `(#:tests? #f
2508 #:phases
2509 (modify-phases %standard-phases
2510 (delete 'configure)
2511 (delete 'build)
2512 (replace 'install
2513 (lambda* (#:key outputs #:allow-other-keys)
2514 (let ((install-dir (string-append (assoc-ref outputs "out")
2515 "/lib/ocaml/site-lib/seq")))
2516 (mkdir-p install-dir)
2517 (with-output-to-file (string-append install-dir "/META")
2518 (lambda _
2519 (display "name=\"seq\"
2520version=\"[distributed with ocaml]\"
2521description=\"dummy package for compatibility\"
2522requires=\"\"")))
f6a99fbf 2523 #t))))))
564cf93f
JL
2524 (home-page "https://github.com/c-cube/seq")
2525 (synopsis "OCaml's standard iterator type")
2526 (description "This package is a compatibility package for OCaml's
2527standard iterator type starting from 4.07.")
2528 (license license:lgpl2.1+)))
2529
f27522d6
JL
2530(define-public ocaml-re
2531 (package
2532 (name "ocaml-re")
58c3118f 2533 (version "1.9.0")
07c3711d
TGR
2534 (source
2535 (origin
2536 (method git-fetch)
2537 (uri (git-reference
2538 (url "https://github.com/ocaml/ocaml-re.git")
2539 (commit version)))
2540 (file-name (git-file-name name version))
2541 (sha256
58c3118f 2542 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
d6fa189e 2543 (build-system dune-build-system)
564cf93f
JL
2544 (arguments
2545 `(#:tests? #f
d6fa189e 2546 #:build-flags (list "--profile" "release")))
564cf93f
JL
2547 (propagated-inputs
2548 `(("ocaml-seq" ,ocaml-seq)))
2549 (native-inputs
d6fa189e 2550 `(("ounit" ,ocaml-ounit)))
f27522d6
JL
2551 (home-page "https://github.com/ocaml/ocaml-re/")
2552 (synopsis "Regular expression library for OCaml")
2553 (description "Pure OCaml regular expressions with:
2554@enumerate
2555@item Perl-style regular expressions (module Re_perl)
2556@item Posix extended regular expressions (module Re_posix)
2557@item Emacs-style regular expressions (module Re_emacs)
2558@item Shell-style file globbing (module Re_glob)
2559@item Compatibility layer for OCaml's built-in Str module (module Re_str)
2560@end enumerate")
2561 (license license:expat)))
5cd47fb0 2562
9059d856
JL
2563(define-public ocaml-ocplib-endian
2564 (package
2565 (name "ocaml-ocplib-endian")
2566 (version "1.0")
2567 (source (origin
2568 (method url-fetch)
2569 (uri (string-append "https://github.com/OCamlPro/ocplib-endian/"
2570 "archive/" version ".tar.gz"))
2571 (sha256
2572 (base32
2573 "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))
2574 (file-name (string-append name "-" version ".tar.gz"))))
2575 (build-system ocaml-build-system)
564cf93f
JL
2576 (native-inputs
2577 `(("cppo" ,ocaml-cppo)
2578 ("ocamlbuild" ,ocamlbuild)))
9059d856
JL
2579 (home-page "https://github.com/OCamlPro/ocplib-endian")
2580 (synopsis "Optimised functions to read and write int16/32/64 from strings
2581and bigarrays")
2582 (description "Optimised functions to read and write int16/32/64 from strings
2583and bigarrays, based on new primitives added in version 4.01. It works on
2584strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
2585big- and little-endian, with their unsafe counter-parts.")
2586 (license license:lgpl2.1)))
0090b895 2587
bbe9915b 2588(define-public ocaml-cstruct
0090b895 2589 (package
bbe9915b
JL
2590 (name "ocaml-cstruct")
2591 (version "4.0.0")
0090b895 2592 (source (origin
bbe9915b
JL
2593 (method git-fetch)
2594 (uri (git-reference
2595 (url "https://github.com/mirage/ocaml-cstruct")
2596 (commit (string-append "v" version))))
f1d4d79f 2597 (file-name (git-file-name name version))
0090b895
JL
2598 (sha256
2599 (base32
bbe9915b
JL
2600 "0m4bz0digcsc8l2msfikwcbi1y371kccx6xnkwrz212mf5mp98bv"))))
2601 (build-system dune-build-system)
0090b895 2602 (arguments
bbe9915b
JL
2603 `(#:package "cstruct"
2604 #:test-target "."))
0090b895 2605 (native-inputs
bbe9915b 2606 `(("ocaml-alcotest" ,ocaml-alcotest)))
0090b895
JL
2607 (home-page "https://github.com/mirage/ocaml-cstruct")
2608 (synopsis "Access C structures via a camlp4 extension")
2609 (description "Cstruct is a library and syntax extension to make it easier
2610to access C-like structures directly from OCaml. It supports both reading and
2611writing to these structures, and they are accessed via the Bigarray module.")
2612 (license license:isc)))
61bafd44 2613
bbe9915b 2614(define-public ocaml-hex
61bafd44 2615 (package
bbe9915b
JL
2616 (name "ocaml-hex")
2617 (version "1.4.0")
61bafd44 2618 (source (origin
bbe9915b
JL
2619 (method git-fetch)
2620 (uri (git-reference
2621 (url "https://github.com/mirage/ocaml-hex")
2622 (commit (string-append "v" version))))
2623 (file-name (git-file-name name version))
61bafd44
JL
2624 (sha256
2625 (base32
bbe9915b
JL
2626 "0c8nhibcwy0ykzca4jn3gqb8ylq21ff88y82gl60wyzijr64rn0q"))))
2627 (build-system dune-build-system)
564cf93f 2628 (arguments
bbe9915b 2629 `(#:test-target "."))
564cf93f 2630 (propagated-inputs
bbe9915b
JL
2631 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
2632 ("cstruct" ,ocaml-cstruct)))
61bafd44
JL
2633 (home-page "https://github.com/mirage/ocaml-hex/")
2634 (synopsis "Minimal library providing hexadecimal converters")
2635 (description "Hex is a minimal library providing hexadecimal converters.")
2636 (license license:isc)))
d163d97d 2637
bbe9915b 2638(define-public ocaml-ezjsonm
bf7bc0d6 2639 (package
bbe9915b 2640 (name "ocaml-ezjsonm")
bcc718be 2641 (version "1.1.0")
21b1845d
TGR
2642 (source
2643 (origin
2644 (method git-fetch)
2645 (uri (git-reference
2646 (url "https://github.com/mirage/ezjsonm.git")
bcc718be 2647 (commit (string-append "v" version))))
21b1845d
TGR
2648 (file-name (git-file-name name version))
2649 (sha256
bcc718be 2650 (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
bbe9915b
JL
2651 (build-system dune-build-system)
2652 (arguments
2653 `(#:package "ezjsonm"
2654 #:test-target "."))
bf7bc0d6 2655 (native-inputs
bbe9915b 2656 `(("ocaml-alcotest" ,ocaml-alcotest)))
bf7bc0d6 2657 (propagated-inputs
bbe9915b
JL
2658 `(("ocaml-hex" ,ocaml-hex)
2659 ("ocaml-jsonm" ,ocaml-jsonm)
2660 ("ocaml-sexplib" ,ocaml-sexplib)))
bf7bc0d6
JL
2661 (home-page "https://github.com/mirage/ezjsonm/")
2662 (synopsis "Read and write JSON data")
2663 (description "Ezjsonm provides more convenient (but far less flexible) input
2664and output functions that go to and from [string] values than jsonm. This avoids
2665the need to write signal code, which is useful for quick scripts that manipulate
2666JSON.")
2667 (license license:isc)))
2668
bbe9915b 2669(define-public ocaml-uri
3dabefee 2670 (package
bbe9915b
JL
2671 (name "ocaml-uri")
2672 (version "2.2.0")
e4bb29dd
TGR
2673 (source
2674 (origin
2675 (method git-fetch)
2676 (uri (git-reference
2677 (url "https://github.com/mirage/ocaml-uri.git")
2678 (commit (string-append "v" version))))
2679 (file-name (git-file-name name version))
2680 (sha256
bbe9915b
JL
2681 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
2682 (build-system dune-build-system)
564cf93f 2683 (arguments
58c3118f
JL
2684 `(#:test-target "."
2685 #:phases
2686 (modify-phases %standard-phases
2687 (add-before 'build 'update-deprecated
2688 (lambda _
2689 (substitute* "lib/uri.ml"
2690 (("Re.get") "Re.Group.get")))))))
3dabefee 2691 (native-inputs
bbe9915b
JL
2692 `(("ocaml-ounit" ,ocaml-ounit)
2693 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
3dabefee 2694 (propagated-inputs
bbe9915b
JL
2695 `(("ocaml-re" ,ocaml-re)
2696 ("ocaml-sexplib0" ,ocaml-sexplib0)
2697 ("ocaml-stringext" ,ocaml-stringext)))
3dabefee
JL
2698 (home-page "https://github.com/mirage/ocaml-uri")
2699 (synopsis "RFC3986 URI/URL parsing library")
2700 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
2701 (license license:isc)))
2702
6134aeb9
JL
2703(define-public ocaml-easy-format
2704 (package
2705 (name "ocaml-easy-format")
ce502774 2706 (version "1.3.2")
6134aeb9 2707 (source (origin
12c3f62a
JL
2708 (method git-fetch)
2709 (uri (git-reference
2710 (url "https://github.com/mjambon/easy-format")
ce502774 2711 (commit version)))
12c3f62a 2712 (file-name (git-file-name name version))
6134aeb9
JL
2713 (sha256
2714 (base32
ce502774 2715 "1fc95q2ypck6m6rv3kiawwilh5ac93v2hcp823mj608d5kj79xkb"))))
12c3f62a 2716 (build-system dune-build-system)
6134aeb9 2717 (arguments
ce502774
JL
2718 `(#:jbuild? #t
2719 #:phases
2720 (modify-phases %standard-phases
2721 (add-before 'build 'make-writable
2722 (lambda _
2723 (for-each
2724 (lambda (file)
2725 (chmod file #o644))
2726 (find-files "." "."))
2727 #t)))))
6134aeb9
JL
2728 (home-page "https://github.com/mjambon/easy-format")
2729 (synopsis "Interface to the Format module")
2730 (description "Easy-format is a high-level and functional interface to the
2731Format module of the OCaml standard library.")
2732 (license license:bsd-3)))
2733
9c5dbbf0
JL
2734(define-public ocaml-piqilib
2735 (package
2736 (name "ocaml-piqilib")
05fe0a58 2737 (version "0.6.15")
677a88e0
TGR
2738 (source
2739 (origin
2740 (method git-fetch)
2741 (uri (git-reference
2742 (url "https://github.com/alavrik/piqi.git")
2743 (commit (string-append "v" version))))
2744 (file-name (git-file-name name version))
2745 (sha256
05fe0a58 2746 (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
9c5dbbf0
JL
2747 (build-system ocaml-build-system)
2748 (arguments
2749 `(#:phases
2750 (modify-phases %standard-phases
2751 (add-before 'configure 'fix-ocamlpath
2752 (lambda _
2753 (substitute* '("Makefile" "make/Makefile.ocaml")
2754 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
2755 #t))
2756 (replace 'configure
2757 (lambda* (#:key outputs #:allow-other-keys)
2758 (let ((out (assoc-ref outputs "out")))
2759 (substitute* "make/OCamlMakefile"
2760 (("/bin/sh") (which "bash")))
564cf93f
JL
2761 (invoke "./configure" "--prefix" out "--ocaml-libdir"
2762 (string-append out "/lib/ocaml/site-lib")))
2763 #t))
9c5dbbf0
JL
2764 (add-after 'build 'build-ocaml
2765 (lambda* (#:key outputs #:allow-other-keys)
564cf93f
JL
2766 (invoke "make" "ocaml")
2767 #t))
9c5dbbf0
JL
2768 (add-after 'install 'install-ocaml
2769 (lambda* (#:key outputs #:allow-other-keys)
564cf93f
JL
2770 (invoke "make" "ocaml-install")
2771 #t))
9c5dbbf0
JL
2772 (add-after 'install-ocaml 'link-stubs
2773 (lambda* (#:key outputs #:allow-other-keys)
2774 (let* ((out (assoc-ref outputs "out"))
2775 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
2776 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
2777 (mkdir-p stubs)
2778 (symlink (string-append lib "/dllpiqilib_stubs.so")
2779 (string-append stubs "/dllpiqilib_stubs.so"))
2780 #t))))))
2781 (native-inputs
05fe0a58 2782 `(("which" ,which)))
9c5dbbf0 2783 (propagated-inputs
05fe0a58
JL
2784 `(("ocaml-xmlm" ,ocaml-xmlm)
2785 ("ocaml-sedlex" ,ocaml-sedlex)
2786 ("ocaml-easy-format" ,ocaml-easy-format)
2787 ("ocaml-base64" ,ocaml-base64)))
9c5dbbf0
JL
2788 (home-page "http://piqi.org")
2789 (synopsis "Data serialization and conversion library")
2790 (description "Piqilib is the common library used by the piqi command-line
2791tool and piqi-ocaml.")
2792 (license license:asl2.0)))
2793
88b1533c
JL
2794(define-public ocaml-uuidm
2795 (package
2796 (name "ocaml-uuidm")
2797 (version "0.9.6")
2798 (source (origin
2799 (method url-fetch)
2800 (uri (string-append "http://erratique.ch/software/uuidm/"
2801 "releases/uuidm-" version ".tbz"))
2802 (sha256
2803 (base32
2804 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
2805 (build-system ocaml-build-system)
2806 (arguments
2807 `(#:build-flags
2808 (list "build" "--tests" "true" "--with-cmdliner" "true")
2809 #:phases
2810 (modify-phases %standard-phases
2811 (delete 'configure))))
2812 (native-inputs
564cf93f
JL
2813 `(("ocamlbuild" ,ocamlbuild)
2814 ("opam" ,opam)))
88b1533c
JL
2815 (propagated-inputs
2816 `(("cmdliner" ,ocaml-cmdliner)
2817 ("topkg" ,ocaml-topkg)))
2818 (home-page "http://erratique.ch/software/uuidm")
2819 (synopsis "Universally unique identifiers for OCaml")
2820 (description "Uuidm is an OCaml module implementing 128 bits universally
2821unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
2822and 4 (random based) according to RFC 4122.")
2823 (license license:isc)))
2824
8a238180
JL
2825(define-public ocaml-graph
2826 (package
2827 (name "ocaml-graph")
564cf93f 2828 (version "1.8.8")
8a238180
JL
2829 (source (origin
2830 (method url-fetch)
2831 (uri (string-append "http://ocamlgraph.lri.fr/download/"
2832 "ocamlgraph-" version ".tar.gz"))
2833 (sha256
2834 (base32
564cf93f 2835 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
8a238180
JL
2836 (build-system ocaml-build-system)
2837 (arguments
2838 `(#:install-target "install-findlib"
564cf93f 2839 #:tests? #f
8a238180
JL
2840 #:phases
2841 (modify-phases %standard-phases
2842 (add-before 'configure 'set-shell
2843 (lambda* (#:key inputs #:allow-other-keys)
2844 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
2845 "/bin/sh")))))))
2846 (inputs `(("lablgtk" ,lablgtk)))
8737666a 2847 (properties `((upstream-name . "ocamlgraph")))
8a238180
JL
2848 (home-page "http://ocamlgraph.lri.fr/")
2849 (synopsis "Graph library for OCaml")
2850 (description "OCamlgraph is a generic graph library for OCaml.")
2851 (license license:lgpl2.1)))
2852
fc3d70ae
JL
2853(define-public ocaml-piqi
2854 (package
2855 (name "ocaml-piqi")
c8b309ec 2856 (version "0.7.7")
fc3d70ae
JL
2857 (source (origin
2858 (method url-fetch)
2859 (uri (string-append "https://github.com/alavrik/piqi-ocaml/"
2860 "archive/v" version ".tar.gz"))
597beb8a 2861 (file-name (string-append name "-" version ".tar.gz"))
fc3d70ae
JL
2862 (sha256
2863 (base32
c8b309ec 2864 "1l0b4saxmwqgw9mb10mwrz31lvpj3l0abh3cwarqp0x4vdrzshbh"))))
fc3d70ae
JL
2865 (build-system ocaml-build-system)
2866 (arguments
2867 `(#:make-flags
2868 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
2869 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
2870 "/bin/sh"))
2871 #:phases
2872 (modify-phases %standard-phases
2873 (delete 'configure))))
2874 (native-inputs
2875 `(("which" ,which)
2876 ("protobuf" ,protobuf))) ; for tests
2877 (propagated-inputs
c8b309ec
JL
2878 `(("ocaml-num" ,ocaml-num)
2879 ("ocaml-piqilib" ,ocaml-piqilib)
2880 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
fc3d70ae
JL
2881 (home-page "https://github.com/alavrik/piqi-ocaml")
2882 (synopsis "Protocol serialization system for OCaml")
2883 (description "Piqi is a multi-format data serialization system for OCaml.
2884It provides a uniform interface for serializing OCaml data structures to JSON,
2885XML and Protocol Buffers formats.")
2886 (license license:asl2.0)))
2887
cd1562ef
JL
2888(define-public bap
2889 (package
2890 (name "bap")
bbe9915b 2891 (version "1.6.0")
cd1562ef
JL
2892 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
2893 (source (origin
bbe9915b
JL
2894 (method git-fetch)
2895 (uri (git-reference
2896 (url home-page)
2897 (commit (string-append "v" version))))
2898 (file-name (git-file-name name version))
cd1562ef
JL
2899 (sha256
2900 (base32
bbe9915b 2901 "0ryf2xb37pj2f9mc3p5prqgqrylph9qgq7q9jnbx8b03nzzpa6h6"))))
cd1562ef
JL
2902 (build-system ocaml-build-system)
2903 (native-inputs
bbe9915b 2904 `(("ocaml-oasis" ,ocaml-oasis)
67b5785e 2905 ("clang" ,clang-3.8)
bbe9915b 2906 ("ocaml-ounit" ,ocaml-ounit)))
cd1562ef 2907 (propagated-inputs
bbe9915b
JL
2908 `(("camlzip" ,camlzip)
2909 ("ocaml-bitstring" ,ocaml-bitstring)
2910 ("ocaml-cmdliner" ,ocaml-cmdliner)
2911 ("ocaml-core-kernel" ,ocaml-core-kernel)
2912 ("ocaml-ezjsonm" ,ocaml-ezjsonm)
2913 ("ocaml-fileutils" ,ocaml-fileutils)
2914 ("ocaml-frontc" ,ocaml-frontc)
2915 ("ocaml-graph" ,ocaml-graph)
2916 ("ocaml-ocurl" ,ocaml-ocurl)
2917 ("ocaml-piqi" ,ocaml-piqi)
2918 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
2919 ("ocaml-uuidm" ,ocaml-uuidm)
2920 ("ocaml-uri" ,ocaml-uri)
2921 ("ocaml-zarith" ,ocaml-zarith)))
2922 (inputs
2923 `(("llvm" ,llvm-3.8)
2924 ("gmp" ,gmp)))
cd1562ef 2925 (arguments
bbe9915b 2926 `(#:use-make? #t
cd1562ef
JL
2927 #:phases
2928 (modify-phases %standard-phases
2929 (replace 'configure
564cf93f 2930 (lambda* (#:key outputs inputs #:allow-other-keys)
bbe9915b
JL
2931 ;; add write for user, to prevent a failure in the install phase
2932 (for-each
2933 (lambda (file)
2934 (let ((stat (stat file)))
2935 (chmod file (+ #o200 (stat:mode stat)))))
2936 (find-files "." "."))
564cf93f
JL
2937 (invoke "./configure" "--prefix"
2938 (assoc-ref outputs "out")
2939 "--libdir"
2940 (string-append
2941 (assoc-ref outputs "out")
2942 "/lib/ocaml/site-lib")
2943 "--with-llvm-version=3.8"
2944 "--with-llvm-config=llvm-config"
bbe9915b 2945 "--enable-everything"))))))
cd1562ef
JL
2946 (synopsis "Binary Analysis Platform")
2947 (description "Binary Analysis Platform is a framework for writing program
2948analysis tools, that target binary files. The framework consists of a plethora
2949of libraries, plugins, and frontends. The libraries provide code reusability,
2950the plugins facilitate extensibility, and the frontends serve as entry points.")
2951 (license license:expat)))
2952
408091d5
JL
2953(define-public ocaml-camomile
2954 (package
2955 (name "ocaml-camomile")
a468fc5e 2956 (version "1.0.2")
408091d5
JL
2957 (home-page "https://github.com/yoriyuki/Camomile")
2958 (source (origin
2959 (method url-fetch)
564cf93f
JL
2960 (uri (string-append home-page "/releases/download/" version
2961 "/camomile-" version ".tbz"))
408091d5
JL
2962 (sha256
2963 (base32
a468fc5e 2964 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
426e629e 2965 (build-system dune-build-system)
408091d5 2966 (arguments
a468fc5e 2967 `(#:build-flags (list "--profile" "release")
62151321 2968 #:test-target "camomile-test"
a468fc5e 2969 #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
62151321
JL
2970 #:phases
2971 (modify-phases %standard-phases
2972 (add-before 'build 'fix-usr-share
2973 (lambda* (#:key outputs #:allow-other-keys)
a468fc5e 2974 (substitute* '("Camomile/dune" "configure.ml")
62151321
JL
2975 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
2976 #t)))))
408091d5
JL
2977 (synopsis "Comprehensive Unicode library")
2978 (description "Camomile is a Unicode library for OCaml. Camomile provides
2979Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
2980200 encodings, collation and locale-sensitive case mappings, and more. The
2981library is currently designed for Unicode Standard 3.2.")
2982 ;; with an exception for linked libraries to use a different license
2983 (license license:lgpl2.0+)))
2984
e6033051
JL
2985(define-public ocaml-charinfo-width
2986 (package
2987 (name "ocaml-charinfo-width")
2988 (version "1.1.0")
2989 (source (origin
2990 (method url-fetch)
ca12352a
EF
2991 (uri (string-append "https://bitbucket.org/zandoye/charinfo_width"
2992 "/get/" version ".tar.gz"))
2993 (file-name (string-append name "-" version ".tar.gz"))
e6033051
JL
2994 (sha256
2995 (base32
2996 "00bv4p1yqs8y0z4z07wd9w9yyv669dikp9b04dcjbwpiy2wy0086"))))
2997 (build-system dune-build-system)
2998 (propagated-inputs
2999 `(("ocaml-result" ,ocaml-result)
3000 ("ocaml-camomile" ,ocaml-camomile)))
3001 (native-inputs
3002 `(("ocaml-ppx-expect" ,ocaml-ppx-expect)))
3003 (properties
3004 `((upstream-name . "charInfo_width")))
3005 (home-page "https://bitbucket.org/zandoye/charinfo_width/")
3006 (synopsis "Determine column width for a character")
3007 (description "This module is implements purely in OCaml a character width
3008function that follows the prototype of POSIX's wcwidth.")
3009 (license license:expat)))
3010
cd4abd29
PK
3011(define-public ocaml-zed
3012 (package
3013 (name "ocaml-zed")
1a0d41b3 3014 (version "2.0.3")
f4f3e8ce
TGR
3015 (source
3016 (origin
3017 (method git-fetch)
3018 (uri (git-reference
3019 (url "https://github.com/diml/zed.git")
3020 (commit version)))
3021 (file-name (git-file-name name version))
3022 (sha256
1a0d41b3 3023 (base32 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
0705f389 3024 (build-system dune-build-system)
cd4abd29 3025 (arguments
0705f389
JL
3026 `(#:jbuild? #t
3027 #:test-target "."))
cd4abd29 3028 (propagated-inputs
1a0d41b3
JL
3029 `(("ocaml-camomile" ,ocaml-camomile)
3030 ("ocaml-charinfo-width" ,ocaml-charinfo-width)
3031 ("ocaml-react" ,ocaml-react)))
cd4abd29
PK
3032 (home-page "https://github.com/diml/zed")
3033 (synopsis "Abstract engine for text editing in OCaml")
3034 (description "Zed is an abstract engine for text edition. It can be used
3035to write text editors, edition widgets, readlines, etc. You just have to
3036connect an engine to your inputs and rendering functions to get an editor.")
3037 (license license:bsd-3)))
3038
e88ff71c
PK
3039(define-public ocaml-lambda-term
3040 (package
3041 (name "ocaml-lambda-term")
1a0d41b3 3042 (version "2.0.2")
e88ff71c
PK
3043 (source
3044 (origin
fd2582bd
TGR
3045 (method git-fetch)
3046 (uri (git-reference
3047 (url "https://github.com/diml/lambda-term.git")
3048 (commit version)))
3049 (file-name (git-file-name name version))
e88ff71c 3050 (sha256
1a0d41b3 3051 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
34d5314e 3052 (build-system dune-build-system)
e88ff71c 3053 (arguments
34d5314e 3054 `(#:build-flags (list "--profile" "release")
564cf93f 3055 #:tests? #f))
e88ff71c
PK
3056 (propagated-inputs
3057 `(("lwt" ,ocaml-lwt)
564cf93f 3058 ("lwt-log" ,ocaml-lwt-log)
e88ff71c
PK
3059 ("zed" ,ocaml-zed)))
3060 (home-page "https://github.com/diml/lambda-term")
3061 (synopsis "Terminal manipulation library for OCaml")
3062 (description "Lambda-Term is a cross-platform library for manipulating the
3063terminal. It provides an abstraction for keys, mouse events, colors, as well as
3064a set of widgets to write curses-like applications. The main objective of
3065Lambda-Term is to provide a higher level functional interface to terminal
3066manipulation than, for example, ncurses, by providing a native OCaml interface
3067instead of bindings to a C library.")
3068 (license license:bsd-3)))
3069
90ab26fa
PK
3070(define-public ocaml-utop
3071 (package
3072 (name "ocaml-utop")
1e6e526e 3073 (version "2.4.2")
7848205b
TGR
3074 (source
3075 (origin
3076 (method git-fetch)
3077 (uri (git-reference
3078 (url "https://github.com/ocaml-community/utop.git")
3079 (commit version)))
3080 (file-name (git-file-name name version))
3081 (sha256
1e6e526e 3082 (base32 "0z8klqwqmq5i111p4awzvlvirhm1dxp0mbfagwfiwq1wg72v6zdm"))))
0705f389 3083 (build-system dune-build-system)
90ab26fa 3084 (arguments
0705f389
JL
3085 `(#:jbuild? #t
3086 #:test-target "."))
90ab26fa 3087 (native-inputs
0705f389 3088 `(("cppo" ,ocaml-cppo)))
90ab26fa 3089 (propagated-inputs
0705f389 3090 `(("lambda-term" ,ocaml-lambda-term)
90ab26fa
PK
3091 ("lwt" ,ocaml-lwt)
3092 ("react" ,ocaml-react)
3093 ("camomile" ,ocaml-camomile)
3094 ("zed" ,ocaml-zed)))
3095 (home-page "https://github.com/diml/utop")
3096 (synopsis "Improved interface to the OCaml toplevel")
3097 (description "UTop is an improved toplevel for OCaml. It can run in a
3098terminal or in Emacs. It supports line editing, history, real-time and context
3099sensitive completion, colors, and more.")
3100 (license license:bsd-3)))
3101
edac5354
PK
3102(define-public ocaml-integers
3103 (package
3104 (name "ocaml-integers")
273ba255 3105 (version "0.3.0")
edac5354
PK
3106 (home-page "https://github.com/ocamllabs/ocaml-integers")
3107 (source (origin
3108 (method url-fetch)
3109 (uri (string-append home-page
3110 "/releases/download/v0.2.2/integers-"
3111 version ".tbz"))
3112 (file-name (string-append name "-" version ".tbz"))
3113 (sha256
3114 (base32
3115 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
3116 (build-system ocaml-build-system)
3117 (arguments
3118 `(#:tests? #f; no tests
3119 #:build-flags (list "build")
3120 #:phases
3121 (modify-phases %standard-phases
3122 (delete 'configure))))
564cf93f
JL
3123 (native-inputs
3124 `(("ocamlbuild" ,ocamlbuild)))
edac5354 3125 (inputs
bff6739d 3126 `(("topkg" ,ocaml-topkg)
c695fb76 3127 ("opam" ,opam)))
edac5354
PK
3128 (synopsis "Various signed and unsigned integer types for OCaml")
3129 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
3130and 64-bit signed and unsigned integer types, together with aliases such as
3131long and size_t whose sizes depend on the host platform.")
3132 (license license:expat)))
3133
69d08bb1
PK
3134(define-public ocaml-ctypes
3135 (package
3136 (name "ocaml-ctypes")
564cf93f 3137 (version "0.14.0")
69d08bb1
PK
3138 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
3139 (source (origin
3140 (method url-fetch)
3141 (uri (string-append home-page "/archive/" version ".tar.gz"))
3142 (file-name (string-append name "-" version ".tar.gz"))
3143 (sha256
3144 (base32
564cf93f 3145 "0zrsd42q2nciyg9375g2kydqax6ay299rhyfgms59qiw7d9ylyp9"))))
69d08bb1
PK
3146 (build-system ocaml-build-system)
3147 (arguments
564cf93f
JL
3148 `(#:tests? #f; require an old lwt
3149 #:make-flags
69d08bb1
PK
3150 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
3151 #:phases
3152 (modify-phases %standard-phases
3153 (delete 'configure))))
3154 (native-inputs
3155 `(("pkg-config" ,pkg-config)))
3156 (inputs
3157 `(("libffi" ,libffi)
3158 ("ounit" ,ocaml-ounit)
3159 ("integers" ,ocaml-integers)
3160 ("lwt" ,ocaml-lwt)
3161 ("topkg" ,ocaml-topkg)
c695fb76 3162 ("opam" ,opam)))
69d08bb1
PK
3163 (synopsis "Library for binding to C libraries using pure OCaml")
3164 (description "Ctypes is a library for binding to C libraries using pure
3165OCaml. The primary aim is to make writing C extensions as straightforward as
3166possible. The core of ctypes is a set of combinators for describing the
3167structure of C types -- numeric types, arrays, pointers, structs, unions and
3168functions. You can use these combinators to describe the types of the
3169functions that you want to call, then bind directly to those functions -- all
3170without writing or generating any C!")
3171 (license license:expat)))
3172
c98c8237
PK
3173(define-public ocaml-ocb-stubblr
3174 (package
3175 (name "ocaml-ocb-stubblr")
3176 (version "0.1.1")
3177 (home-page "https://github.com/pqwy/ocb-stubblr")
3178 (source (origin
3179 (method url-fetch)
3180 (uri (string-append
3181 home-page "/releases/download/v0.1.1/ocb-stubblr-"
3182 version ".tbz"))
3183 (file-name (string-append name "-" version ".tbz"))
3184 (sha256
3185 (base32
3186 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
3187 (build-system ocaml-build-system)
3188 (arguments
bff6739d 3189 `(#:build-flags (list "build" "--tests" "true")
c98c8237
PK
3190 #:phases
3191 (modify-phases %standard-phases
70a57011
JL
3192 (delete 'configure)
3193 (add-before 'build 'fix-for-guix
3194 (lambda _
3195 (substitute* "src/ocb_stubblr.ml"
3196 ;; Do not fail when opam is not present or initialized
3197 (("error_msgf \"error running opam\"") "\"\"")
3198 ;; Guix doesn't have cc, but it has gcc
3199 (("\"cc\"") "\"gcc\""))
3200 #t)))))
c98c8237
PK
3201 (inputs
3202 `(("topkg" ,ocaml-topkg)
c695fb76 3203 ("opam" ,opam)))
c98c8237 3204 (native-inputs
564cf93f
JL
3205 `(("astring" ,ocaml-astring)
3206 ("ocamlbuild" ,ocamlbuild)))
c98c8237
PK
3207 (synopsis "OCamlbuild plugin for C stubs")
3208 (description "Ocb-stubblr is about ten lines of code that you need to
3209repeat over, over, over and over again if you are using ocamlbuild to build
3210OCaml projects that contain C stubs.")
3211 (license license:isc)))
3212
a9e9fd15
PK
3213(define-public ocaml-tsdl
3214 (package
3215 (name "ocaml-tsdl")
9f5a3ba6 3216 (version "0.9.6")
a9e9fd15
PK
3217 (home-page "http://erratique.ch/software/tsdl")
3218 (source (origin
3219 (method url-fetch)
3220 (uri (string-append home-page "/releases/tsdl-"
3221 version ".tbz"))
3222 (file-name (string-append name "-" version ".tar.gz"))
3223 (sha256
3224 (base32
9f5a3ba6 3225 "00krjhmnchsnz33h9zhh0v69xbvi86l0xf0dvy7iivylb7f7x3n4"))))
a9e9fd15
PK
3226 (build-system ocaml-build-system)
3227 (arguments
3228 `(#:build-flags '("build")
3229 #:tests? #f; tests require a display device
3230 #:phases
3231 (modify-phases %standard-phases
3232 (delete 'configure))))
3233 (native-inputs
564cf93f 3234 `(("ocamlbuild" ,ocamlbuild)
9f5a3ba6
JL
3235 ("ocaml-astring" ,ocaml-astring)
3236 ("ocaml-ocb-stubblr" ,ocaml-ocb-stubblr)
564cf93f 3237 ("opam" ,opam)
a9e9fd15
PK
3238 ("pkg-config" ,pkg-config)))
3239 (inputs
bff6739d 3240 `(("topkg" ,ocaml-topkg)
a9e9fd15
PK
3241 ("result" ,ocaml-result)
3242 ("sdl2" ,sdl2)
3243 ("integers" ,ocaml-integers)
3244 ("ctypes" ,ocaml-ctypes)))
3245 (synopsis "Thin bindings to SDL for OCaml")
3246 (description "Tsdl is an OCaml library providing thin bindings to the
3247cross-platform SDL C library.")
3248 (license license:isc)))
3249
5895696e
GH
3250(define-public dedukti
3251 (package
3252 (name "dedukti")
3253 (version "2.6.0")
3254 (home-page "https://deducteam.github.io/")
3255 (source
3256 (origin
3257 (method git-fetch)
3258 (uri (git-reference
3259 (url "https://github.com/deducteam/dedukti.git")
3260 (commit (string-append "v" version))))
3261 (file-name (git-file-name name version))
3262 (sha256
3263 (base32
3264 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
3265 (inputs
3266 `(("menhir" ,ocaml-menhir)))
3267 (native-inputs
3268 `(("ocamlbuild" ,ocamlbuild)))
3269 (build-system ocaml-build-system)
3270 (arguments
3271 `(#:phases
3272 (modify-phases %standard-phases
3273 (delete 'configure)
3274 (replace 'build
3275 (lambda _
3276 (invoke "make")
912f4400 3277 #t))
5895696e
GH
3278 (replace 'check
3279 (lambda _
3280 (invoke "make" "tests")
912f4400 3281 #t))
5895696e
GH
3282 (add-before 'install 'set-binpath
3283 ;; Change binary path in the makefile
3284 (lambda _
3285 (let ((out (assoc-ref %outputs "out")))
3286 (substitute* "GNUmakefile"
3287 (("BINDIR = (.*)$")
3288 (string-append "BINDIR = " out "/bin"))))
912f4400
JL
3289 #t))
3290 (replace 'install
3291 (lambda _
3292 (invoke "make" "install")
3293 #t)))))
5895696e
GH
3294 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
3295the λ-calculus")
3296 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
3297theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
3298dependent types. The λΠ-calculus modulo theory is itself an extension of the
3299λΠ-calculus where the context contains variable declaration as well as rewrite
3300rules. This system is not designed to develop proofs, but to check proofs
3301developed in other systems. In particular, it enjoys a minimalistic syntax.")
3302 (license license:cecill-c)))
2939fe7b 3303
db1eb632
LC
3304(define-public emacs-dedukti-mode
3305 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
3306 (package
3307 (name "emacs-dedukti-mode")
3308 (version (git-version "0" "0" commit))
3309 (home-page "https://github.com/rafoo/dedukti-mode")
3310 (source (origin
3311 (method git-fetch)
3312 (uri (git-reference
3313 (url home-page)
3314 (commit commit)))
3315 (sha256
3316 (base32
3317 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
3318 (file-name (git-file-name name version))))
3319 (inputs
3320 `(("dedukti" ,dedukti)))
3321 (build-system emacs-build-system)
3322 (arguments
3323 '(#:phases
3324 (modify-phases %standard-phases
3325 (add-before 'install 'patch-dkpath
3326 (lambda _
3327 (let ((dkcheck-path (which "dkcheck")))
3328 (substitute* "dedukti-mode.el"
3329 (("dedukti-path \"(.*)\"")
3330 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
3331 (synopsis "Emacs major mode for Dedukti files")
3332 (description "This package provides an Emacs major mode for editing
3333Dedukti files.")
3334 (license license:cecill-b))))
3335
3336(define-public emacs-flycheck-dedukti
3337 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
3338 (package
3339 (name "emacs-flycheck-dedukti")
3340 (version (git-version "0" "0" commit))
3341 (home-page "https://github.com/rafoo/flycheck-dedukti")
3342 (source (origin
3343 (method git-fetch)
3344 (uri (git-reference
3345 (url home-page)
3346 (commit commit)))
3347 (sha256
3348 (base32
3349 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
3350 (file-name (git-file-name name version))))
3351 (build-system emacs-build-system)
3352 (inputs
3353 `(("dedukti-mode" ,emacs-dedukti-mode)
3354 ("flycheck-mode" ,emacs-flycheck)))
3355 (synopsis "Flycheck integration for the dedukti language")
3356 (description "This package provides a frontend for Flycheck to perform
3357syntax checking on dedukti files.")
3358 (license license:cecill-b))))
3359
308d72bf
GH
3360(define-public ocaml-ppx-inline-test
3361 (package
3362 (name "ocaml-ppx-inline-test")
b7ebcb04 3363 (version "0.12.0")
308d72bf
GH
3364 (home-page "https://github.com/janestreet/ppx_inline_test")
3365 (source
3366 (origin
3367 (method git-fetch)
3368 (uri (git-reference
3369 (url (string-append home-page ".git"))
3370 (commit (string-append "v" version))))
3371 (file-name (git-file-name name version))
3372 (sha256
3373 (base32
b7ebcb04 3374 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
308d72bf
GH
3375 (build-system dune-build-system)
3376 (arguments
3377 ;see home page README for further information
3378 `(#:tests? #f))
3379 (inputs
3380 `(("ocaml-base" ,ocaml-base)
3381 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
3382 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
3383 ("ocaml-sexplib0" ,ocaml-sexplib0)
3384 ("ocaml-stdio" ,ocaml-stdio)
3385 ("ocaml-ppxlib" ,ocaml-ppxlib)))
b7ebcb04 3386 (properties `((upstream-name . "ppx_inline_test")))
308d72bf
GH
3387 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3388 (description "This package contains a syntax extension for writing
3389in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
3390collection.")
3391 (license license:expat)))
3392
7195c4f2
GH
3393(define-public ocaml-bindlib
3394 (package
3395 (name "ocaml-bindlib")
3396 (version "5.0.1")
3397 (source
3398 (origin
3399 (method git-fetch)
3400 (uri (git-reference
3401 (url "https://github.com/rlepigre/ocaml-bindlib.git")
3402 (commit (string-append "ocaml-bindlib_" version))))
3403 (file-name (git-file-name name version))
3404 (sha256
3405 (base32
3406 "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
3407 (build-system ocaml-build-system)
3408 (arguments
3409 `(#:tests? #f ;no tests
3410 #:use-make? #t
3411 #:phases
3412 (modify-phases %standard-phases
3413 (delete 'configure)
3414 (replace 'build
3415 (lambda _
3416 (invoke "make")))
3417 (replace 'install
3418 (lambda _
3419 (invoke "make" "install"))))))
3420 (native-inputs
3421 `(("ocamlbuild" ,ocamlbuild)
3422 ("ocaml-findlib" ,ocaml-findlib)))
3423 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
3424 (synopsis "OCaml Bindlib library for bound variables")
3425 (description "Bindlib is a library allowing the manipulation of data
3426structures with bound variables. It is particularly useful when writing ASTs
3427for programming languages, but also for manipulating terms of the λ-calculus
3428or quantified formulas.")
3429 (license license:gpl3+)))
3430
70c7d025
GH
3431(define-public ocaml-earley
3432 (package
3433 (name "ocaml-earley")
3434 (version "2.0.0")
3435 (home-page "https://github.com/rlepigre/ocaml-earley")
3436 (source
3437 (origin
3438 (method git-fetch)
3439 (uri (git-reference
3440 (url (string-append home-page ".git"))
3441 (commit version)))
3442 (file-name (git-file-name name version))
3443 (sha256
3444 (base32
3445 "18k7bi7krc4bvqnhijz1q0pfr0nfahghfjifci8rh1q4i5zd0xz5"))))
3446 (build-system dune-build-system)
3447 (arguments
3448 `(#:test-target "."))
3449 (synopsis "Parsing library based on Earley Algorithm")
3450 (description "Earley is a parser combinator library base on Earley's
3451algorithm. It is intended to be used in conjunction with an OCaml syntax
3452extension which allows the definition of parsers inside the language. There
3453is also support for writing OCaml syntax extensions in a camlp4 style.")
3454 (license license:cecill-b)))
3455
8213db7c
GH
3456(define-public ocaml-timed
3457 (package
3458 (name "ocaml-timed")
3459 (version "1.0")
3460 (home-page "https://github.com/rlepigre/ocaml-timed")
3461 (source (origin
3462 (method git-fetch)
3463 (uri (git-reference
3464 (url (string-append home-page ".git"))
3465 (commit (string-append name "_" version))))
3466 (sha256
3467 (base32
3468 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
3469 (file-name (git-file-name name version))))
3470 (build-system ocaml-build-system)
3471 (arguments
3472 '(#:phases
3473 (modify-phases %standard-phases
3474 (delete 'configure)
3475 (replace 'build
3476 (lambda _
3477 (invoke "make")))
3478 (replace 'install
3479 (lambda _
3480 (invoke "make" "install")))
3481 (replace 'check
3482 (lambda _
3483 (invoke "make" "tests"))))))
3484 (synopsis "Timed references for imperative state")
3485 (description "Timed references for imperative state. This module provides
3486an alternative type for references (or mutable cells) supporting undo/redo
3487operations. In particular, an abstract notion of time is used to capture the
3488state of the references at any given point, so that it can be restored. Note
3489that usual reference operations only have a constant time / memory overhead
3490(compared to those of the standard library).
3491
3492Moreover, we provide an alternative implementation based on the references
3493of the standard library (Pervasives module). However, it is less efficient
3494than the first one.")
3495 (license license:expat)))
3496
2939fe7b
GH
3497(define-public ocaml-biniou
3498 (package
3499 (name "ocaml-biniou")
8dfe8fee 3500 (version "1.2.1")
2939fe7b
GH
3501 (home-page "https://github.com/mjambon/biniou")
3502 (source
3503 (origin
3504 (method git-fetch)
3505 (uri (git-reference
3506 (url (string-append home-page ".git"))
8dfe8fee 3507 (commit version)))
2939fe7b
GH
3508 (file-name (git-file-name name version))
3509 (sha256
3510 (base32
8dfe8fee 3511 "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
2939fe7b 3512 (build-system dune-build-system)
8dfe8fee
JL
3513 (arguments
3514 `(#:phases
3515 (modify-phases %standard-phases
3516 (add-before 'build 'make-writable
3517 (lambda _
3518 (for-each
3519 (lambda (file)
3520 (chmod file #o644))
3521 (find-files "." "."))
3522 #t)))))
2939fe7b
GH
3523 (inputs
3524 `(("ocaml-easy-format" ,ocaml-easy-format)))
3525 (native-inputs
3526 `(("which" ,which)))
3527 (synopsis "Data format designed for speed, safety, ease of use and backward
3528compatibility")
3529 (description "Biniou (pronounced \"be new\" is a binary data format
3530designed for speed, safety, ease of use and backward compatibility as
3531protocols evolve. Biniou is vastly equivalent to JSON in terms of
3532functionality but allows implementations several times faster (4 times faster
3533than yojson), with 25-35% space savings.")
3534 (license license:bsd-3)))
2e951707
GH
3535
3536(define-public ocaml-yojson
3537 (package
3538 (name "ocaml-yojson")
373a2a07 3539 (version "1.7.0")
2e951707
GH
3540 (home-page "https://github.com/ocaml-community/yojson")
3541 (source
3542 (origin
3543 (method git-fetch)
3544 (uri (git-reference
3545 (url (string-append home-page ".git"))
373a2a07 3546 (commit version)))
2e951707
GH
3547 (file-name (git-file-name name version))
3548 (sha256
3549 (base32
373a2a07 3550 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
2e951707 3551 (build-system dune-build-system)
912f4400
JL
3552 (arguments
3553 `(#:test-target "."))
2e951707
GH
3554 (inputs
3555 `(("ocaml-biniou" ,ocaml-biniou)
912f4400
JL
3556 ("ocaml-easy-format" ,ocaml-easy-format)))
3557 (native-inputs
373a2a07
JL
3558 `(("ocaml-alcotest" ,ocaml-alcotest)
3559 ("ocaml-cppo" ,ocaml-cppo)))
2e951707
GH
3560 (synopsis "Low-level JSON library for OCaml")
3561 (description "Yojson is an optimized parsing and printing library for the
3562JSON format. It addresses a few shortcomings of json-wheel including 2x
3563speedup, polymorphic variants and optional syntax for tuples and variants.
3564@code{ydump} is a pretty printing command-line program provided with the
3565yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
3566serializers and deserializers from type definitions.")
3567 (license license:bsd-3)))
1d209d06
GH
3568
3569(define-public ocaml-craml
3570 (package
3571 (name "ocaml-craml")
3572 (version "1.0.0")
3573 (home-page "https://github.com/realworldocaml/craml")
3574 (source
3575 (origin
3576 (method git-fetch)
3577 (uri (git-reference
3578 (url (string-append home-page ".git"))
3579 (commit version)))
3580 (file-name (git-file-name name version))
3581 (sha256
3582 (base32
3583 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
3584 (build-system dune-build-system)
3585 (inputs
3586 `(("ocaml-fmt" ,ocaml-fmt)
3587 ("ocaml-astring" ,ocaml-astring)
3588 ("ocaml-logs" ,ocaml-logs)
3589 ("ocaml-cmdliner" ,ocaml-cmdliner)))
3590 (synopsis
3591 "CRAM-testing framework for testing command line applications")
3592 (description "CRAM is a is functional testing framework for command line
3593applications. @code{craml} is freely inspired by the
3594Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
3595format}. @code{craml} is released as a single binary (called @code{craml}).")
3596 (license license:isc)))
59a07504 3597
64d25f0b
GH
3598(define-public ocaml-merlin
3599 (package
3600 (name "ocaml-merlin")
3601 (version "3.2.2")
3602 (home-page "https://ocaml.github.io/merlin/")
3603 (source
3604 (origin
3605 (method git-fetch)
3606 (uri (git-reference
3607 (url "https://github.com/ocaml/merlin.git")
3608 (commit (string-append "v" version))))
3609 (file-name (git-file-name name version))
3610 (sha256
3611 (base32
3612 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
3613 (build-system dune-build-system)
3614 (inputs
3615 `(("ocaml-biniou" ,ocaml-biniou)
3616 ("ocaml-yojson" ,ocaml-yojson)
3617 ("ocaml-easy-format" ,ocaml-easy-format)))
3618 (native-inputs
3619 `(("ocaml-findlib" ,ocaml-findlib)))
3620 (arguments
373a2a07
JL
3621 '(#:jbuild? #t
3622 #:tests? #f)) ;; Errors in tests in version 3.2.2
64d25f0b
GH
3623 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
3624 (description "Merlin is an editor service that provides modern IDE
3625features for OCaml. Emacs and Vim support is provided out-of-the-box.
3626External contributors added support for Visual Studio Code, Sublime Text and
3627Atom.")
3628 (license license:expat)))
3629
59a07504
LC
3630(define-public ocaml-gsl
3631 (package
3632 (name "ocaml-gsl")
8fd89788 3633 (version "1.24.0")
59a07504
LC
3634 (source
3635 (origin
3636 (method url-fetch)
3637 (uri
3638 (string-append
3639 "https://github.com/mmottl/gsl-ocaml/releases/download/"
3640 version "/gsl-" version ".tbz"))
3641 (sha256
3642 (base32
8fd89788
JL
3643 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
3644 (build-system dune-build-system)
3645 (arguments
3646 `(#:test-target "."
3647 #:phases
3648 (modify-phases %standard-phases
3649 (add-after 'unpack 'fix-gsl-directory
3650 (lambda* (#:key inputs #:allow-other-keys)
3651 (substitute* "src/config/discover.ml"
3652 (("/usr") (assoc-ref inputs "gsl")))
3653 #t)))))
59a07504
LC
3654 (inputs
3655 `(("gsl" ,gsl)))
8fd89788
JL
3656 (propagated-inputs
3657 `(("ocaml-base" ,ocaml-base)
3658 ("ocaml-stdio" ,ocaml-stdio)))
59a07504
LC
3659 (home-page "https://mmottl.github.io/gsl-ocaml")
3660 (synopsis "Bindings to the GNU Scientific Library")
3661 (description
3662 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
3663the OCaml language.")
3664 (license license:gpl3+)))
3665
ddb5dc08
RW
3666(define-public ocaml-gsl-1
3667 (package
3668 (inherit ocaml-gsl)
3669 (version "1.19.3")
3670 (source (origin
3671 (method url-fetch)
3672 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
3673 "/releases/download/v"
3674 version "/gsl-ocaml-" version ".tar.gz"))
3675 (sha256
3676 (base32
3677 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
3678 (build-system ocaml-build-system)
3679 (inputs
3680 `(("gsl" ,gsl)))
3681 (native-inputs
3682 `(("ocamlbuild" ,ocamlbuild)))
3683 (arguments '())
3684 (propagated-inputs '())))
3685
59a07504
LC
3686(define-public cubicle
3687 (package
3688 (name "cubicle")
3689 (version "1.1.2")
3690 (source (origin
3691 (method url-fetch)
3692 (uri (string-append "http://cubicle.lri.fr/cubicle-"
3693 version ".tar.gz"))
3694 (sha256
3695 (base32
3696 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
3697 (build-system gnu-build-system)
3698 (native-inputs
3699 `(("automake" ,automake)
3700 ("ocaml" ,ocaml)
3701 ("which" ,(@@ (gnu packages base) which))))
3702 (propagated-inputs
3703 `(("ocaml-num" ,ocaml-num)
3704 ("z3" ,z3)))
3705 (arguments
3706 `(#:configure-flags (list "--with-z3")
3707 #:make-flags (list "QUIET=")
3708 #:tests? #f
3709 #:phases
3710 (modify-phases %standard-phases
3711 (add-before 'configure 'configure-for-release
3712 (lambda _
3713 (substitute* "Makefile.in"
3714 (("SVNREV=") "#SVNREV="))
3715 #t))
3716 (add-before 'configure 'fix-/bin/sh
3717 (lambda _
3718 (substitute* "configure"
3719 (("-/bin/sh") (string-append "-" (which "sh"))))
3720 #t))
3721 (add-before 'configure 'fix-smt-z3wrapper.ml
3722 (lambda _
3723 (substitute* "Makefile.in"
3724 (("\\\\n") ""))
3725 #t))
3726 (add-before 'configure 'fix-ocaml-num
3727 (lambda* (#:key inputs #:allow-other-keys)
3728 (substitute* "Makefile.in"
3729 (("= \\$\\(FUNCTORYLIB\\)")
3730 (string-append "= -I "
3731 (assoc-ref inputs "ocaml-num")
3732 "/lib/ocaml/site-lib"
3733 " $(FUNCTORYLIB)")))
3734 #t)))))
3735 (home-page "http://cubicle.lri.fr/")
3736 (synopsis "Model checker for array-based systems")
3737 (description "Cubicle is a model checker for verifying safety properties
3738of array-based systems. This is a syntactically restricted class of
3739parametrized transition systems with states represented as arrays indexed by
3740an arbitrary number of processes. Cache coherence protocols and mutual
3741exclusion algorithms are typical examples of such systems.")
3742 (license license:asl2.0)))
5fa01e8a
GH
3743
3744(define-public ocaml-sexplib0
3745 (package
3746 (name "ocaml-sexplib0")
3747 (version "0.11.0")
3748 (home-page "https://github.com/janestreet/sexplib0")
3749 (source
3750 (origin
3751 (method git-fetch)
3752 (uri (git-reference
3753 (url (string-append home-page ".git"))
3754 (commit (string-append "v" version))))
3755 (file-name (git-file-name name version))
3756 (sha256
3757 (base32
3758 "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
3759 (build-system dune-build-system)
3760 (arguments
3761 '(#:tests? #f)) ;no tests
3762 (synopsis "Library containing the definition of S-expressions and some
3763base converters")
3764 (description "Part of Jane Street's Core library The Core suite of
3765libraries is an industrial strength alternative to OCaml's standard library
3766that was developed by Jane Street, the largest industrial user of OCaml.")
3767(license license:expat)))
7726124a
GH
3768
3769(define-public ocaml-parsexp
3770 (package
3771 (name "ocaml-parsexp")
3772 (version "0.11.0")
3773 (home-page "https://github.com/janestreet/parsexp")
3774 (source
3775 (origin
3776 (method git-fetch)
3777 (uri (git-reference
3778 (url (string-append home-page ".git"))
3779 (commit (string-append "v" version))))
3780 (file-name (git-file-name name version))
3781 (sha256
3782 (base32
3783 "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
3784 (build-system dune-build-system)
3785 (inputs
3786 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
3787 (synopsis "S-expression parsing library")
3788 (description
3789 "This library provides generic parsers for parsing S-expressions from
3790strings or other medium.
3791
3792The library is focused on performances but still provide full generic
3793parsers that can be used with strings, bigstrings, lexing buffers,
3794character streams or any other sources effortlessly.
3795
3796It provides three different class of parsers:
3797@itemize
3798@item
3799the normal parsers, producing [Sexp.t] or [Sexp.t list] values
3800@item
3801the parsers with positions, building compact position sequences so
3802that one can recover original positions in order to report properly
3803located errors at little cost
3804@item
3805the Concrete Syntax Tree parsers, produce values of type
3806@code{Parsexp.Cst.t} which record the concrete layout of the s-expression
3807syntax, including comments
3808@end itemize
3809
3810This library is portable and doesn't provide IO functions. To read
3811s-expressions from files or other external sources, you should use
3812parsexp_io.")
3813 (license license:expat)))
7cca1fd4
GH
3814
3815(define-public ocaml-sexplib
3816 (package
3817 (name "ocaml-sexplib")
3818 (version "0.11.0")
3819 (home-page "https://github.com/janestreet/sexplib")
3820 (source
3821 (origin
3822 (method git-fetch)
3823 (uri (git-reference
3824 (url (string-append home-page ".git"))
3825 (commit (string-append "v" version))))
3826 (file-name (git-file-name name version))
3827 (sha256
3828 (base32
3829 "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
3830 (build-system dune-build-system)
7e12b4c2 3831 (propagated-inputs
7cca1fd4
GH
3832 `(("ocaml-num" ,ocaml-num)
3833 ("ocaml-parsexp" ,ocaml-parsexp)
3834 ("ocaml-sexplib0" ,ocaml-sexplib0)))
3835 (synopsis
3836 "Library for serializing OCaml values to and from S-expressions")
3837 (description
3838 "This package is part of Jane Street's Core library. Sexplib contains
3839functionality for parsing and pretty-printing s-expressions.")
3840 (license license:expat)))
22074259
GH
3841
3842(define-public ocaml-base
3843 (package
3844 (name "ocaml-base")
3845 (version "0.11.1")
3846 (home-page "https://github.com/janestreet/base")
3847 (source
3848 (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url (string-append home-page ".git"))
3852 (commit (string-append "v" version))))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32
3856 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
3857 (build-system dune-build-system)
7e12b4c2 3858 (propagated-inputs
22074259
GH
3859 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
3860 (arguments
3861 `(#:phases
3862 (modify-phases %standard-phases
3863 (replace 'build
3864 ;; make warnings non fatal (jbuilder behaviour)
3865 (lambda _
3866 (invoke "dune" "build" "@install" "--profile=release"))))))
3867 (synopsis
3868 "Full standard library replacement for OCaml")
3869 (description
3870 "Base is a complete and portable alternative to the OCaml standard
3871library. It provides all standard functionalities one would expect
3872from a language standard library. It uses consistent conventions
3873across all of its module.
3874
3875Base aims to be usable in any context. As a result system dependent
3876features such as I/O are not offered by Base. They are instead
3877provided by companion libraries such as
3878@url{https://github.com/janestreet/stdio, ocaml-stdio}.")
3879 (license license:expat)))
ac06a773
GH
3880
3881(define-public ocaml-compiler-libs
3882 (package
3883 (name "ocaml-compiler-libs")
3884 (version "0.11.0")
3885 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
3886 (source
3887 (origin
3888 (method git-fetch)
3889 (uri (git-reference
3890 (url (string-append home-page ".git"))
3891 (commit (string-append "v" version))))
3892 (file-name (git-file-name name version))
3893 (sha256
3894 (base32
3895 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
3896 (build-system dune-build-system)
3897 (arguments
3898 '(#:tests? #f)) ;no tests
d9faae62 3899 (properties `((upstream-name . "ocaml-compiler-libs")))
ac06a773 3900 (synopsis "Compiler libraries repackaged")
37c5b197 3901 (description "This package simply repackages the OCaml compiler libraries
ac06a773
GH
3902so they don't expose everything at toplevel. For instance, @code{Ast_helper}
3903is now @code{Ocaml_common.Ast_helper}.")
3904 (license license:expat)))
b5bab81c
GH
3905
3906(define-public ocaml-stdio
3907 (package
3908 (name "ocaml-stdio")
3909 (version "0.11.0")
3910 (home-page "https://github.com/janestreet/stdio")
3911 (source
3912 (origin
3913 (method git-fetch)
3914 (uri (git-reference
3915 (url (string-append home-page ".git"))
3916 (commit (string-append "v" version))))
3917 (file-name (git-file-name name version))
3918 (sha256
3919 (base32
3920 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
3921 (build-system dune-build-system)
7e12b4c2
JL
3922 (propagated-inputs
3923 `(("ocaml-base" ,ocaml-base)
3924 ("ocaml-sexplib0" ,ocaml-sexplib0)))
b5bab81c
GH
3925 (arguments
3926 '(#:tests? #f)) ;no tests
3927 (synopsis "Standard IO library for OCaml")
3928 (description
3929 "Stdio implements simple input/output functionalities for OCaml. It
3930re-exports the input/output functions of the OCaml standard libraries using
3931a more consistent API.")
3932 (license license:expat)))
3f623d00
GH
3933
3934(define-public ocaml-ppx-derivers
3935 (package
3936 (name "ocaml-ppx-derivers")
1e5937c8 3937 (version "1.2.1")
3f623d00
GH
3938 (home-page
3939 "https://github.com/ocaml-ppx/ppx_derivers")
3940 (source
3941 (origin
3942 (method git-fetch)
3943 (uri (git-reference
3944 (url (string-append home-page ".git"))
3945 (commit version)))
3946 (file-name (git-file-name name version))
3947 (sha256
3948 (base32
1e5937c8 3949 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
3f623d00
GH
3950 (build-system dune-build-system)
3951 (arguments
3952 '(#:tests? #f)) ;no tests
51e52f47 3953 (properties `((upstream-name . "ppx_derivers")))
3f623d00
GH
3954 (synopsis "Shared @code{@@deriving} plugin registry")
3955 (description
3956 "Ppx_derivers is a tiny package whose sole purpose is to allow
3957ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
3958as part of the same ocaml-migrate-parsetree driver.")
3959 (license license:bsd-3)))
4d390cad
GH
3960
3961(define-public ocaml-ppxlib
3962 (package
3963 (name "ocaml-ppxlib")
b0529038 3964 (version "0.6.0")
4d390cad
GH
3965 (home-page "https://github.com/ocaml-ppx/ppxlib")
3966 (source
3967 (origin
3968 (method git-fetch)
3969 (uri (git-reference
3970 (url (string-append home-page ".git"))
3971 (commit version)))
3972 (file-name (git-file-name name version))
3973 (sha256
3974 (base32
b0529038 3975 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
4d390cad 3976 (build-system dune-build-system)
7e12b4c2 3977 (propagated-inputs
4d390cad
GH
3978 `(("ocaml-base" ,ocaml-base)
3979 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
3980 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
3981 ("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
3982 ("ocaml-stdio" ,ocaml-stdio)
3983 ("ocaml-result" ,ocaml-result)
3984 ("ocaml-sexplib0" ,ocaml-sexplib0)))
4d390cad
GH
3985 (arguments
3986 '(#:phases
3987 (modify-phases %standard-phases
3988 (add-before 'check 'set-topfind
3989 (lambda* (#:key inputs #:allow-other-keys)
3990 ;; add the line #directory ".." at the top of each file
3991 ;; using #use "topfind";; to be able to find topfind
7e12b4c2 3992 (let* ((findlib-path (assoc-ref inputs "findlib"))
4d390cad
GH
3993 (findlib-libdir
3994 (string-append findlib-path "/lib/ocaml/site-lib")))
3995 (substitute* '("test/base/test.ml"
b0529038 3996 "test/code_path/test.ml"
4d390cad
GH
3997 "test/deriving/test.ml"
3998 "test/driver/attributes/test.ml"
3999 "test/driver/non-compressible-suffix/test.ml"
4000 "test/driver/transformations/test.ml")
4001 (("#use \"topfind\";;" all)
4002 (string-append "#directory \"" findlib-libdir "\"\n"
4003 all))))
4004 #t)))))
4005 (synopsis
4006 "Base library and tools for ppx rewriters")
4007 (description
4008 "A comprehensive toolbox for ppx development. It features:
4009@itemize
4010@item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
4011independent of the version of OCaml;
4012@item a library for library for ppx rewriters in general, and type-driven code
4013generators in particular;
4014@item
4015a feature-full driver for OCaml AST transformers;
4016@item a quotation mechanism allowing to write values representing the
4017OCaml AST in the OCaml syntax;
4018@item a generator of open recursion classes from type definitions.
4019@end itemize")
4020 (license license:expat)))
c16c8bb6
JL
4021
4022(define-public ocaml-ppx-compare
4023 (package
4024 (name "ocaml-ppx-compare")
4025 (version "0.11.1")
4026 (source (origin
4027 (method git-fetch)
4028 (uri (git-reference
4029 (url "https://github.com/janestreet/ppx_compare.git")
4030 (commit (string-append "v" version))))
4031 (file-name (git-file-name name version))
4032 (sha256
4033 (base32
4034 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
4035 (build-system dune-build-system)
4036 (propagated-inputs
4037 `(("ocaml-base" ,ocaml-base)
4038 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4039 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4040 (properties `((upstream-name . "ppx_compare")))
4041 (home-page "https://github.com/janestreet/ppx_compare")
4042 (synopsis "Generation of comparison functions from types")
4043 (description "Generation of fast comparison functions from type expressions
4044and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
4045from type representations. The scaffolded functions are usually much faster
4046than ocaml's Pervasives.compare. Scaffolding functions also gives you more
4047flexibility by allowing you to override them for a specific type and more safety
4048by making sure that you only compare comparable values.")
4049 (license license:asl2.0)))
143685fd
JL
4050
4051(define-public ocaml-fieldslib
4052 (package
4053 (name "ocaml-fieldslib")
4054 (version "0.11.0")
4055 (source (origin
4056 (method url-fetch)
4057 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4058 (version-major+minor version) "/files/"
4059 "fieldslib-v" version ".tar.gz"))
4060 (sha256
4061 (base32
4062 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))))
4063 (build-system dune-build-system)
4064 (arguments
4065 ;; No tests
4066 `(#:tests? #f))
4067 (propagated-inputs
4068 `(("ocaml-base" ,ocaml-base)
4069 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4070 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4071 (properties `((upstream-name . "fieldslib")))
4072 (home-page "https://github.com/janestreet/fieldslib")
4073 (synopsis "Syntax extension to record fields")
4074 (description "Syntax extension to define first class values representing
4075record fields, to get and set record fields, iterate and fold over all fields
4076of a record and create new record values.")
4077 (license license:asl2.0)))
d9f8433e
JL
4078
4079(define-public ocaml-variantslib
4080 (package
4081 (name "ocaml-variantslib")
4082 (version "0.11.0")
4083 (source (origin
4084 (method url-fetch)
4085 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4086 (version-major+minor version)
4087 "/files/variantslib-v" version ".tar.gz"))
4088 (sha256
4089 (base32
4090 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
4091 (build-system dune-build-system)
4092 (arguments
4093 ;; No tests
4094 `(#:tests? #f))
4095 (propagated-inputs
4096 `(("ocaml-base" ,ocaml-base)
4097 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4098 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4099 (properties `((upstream-name . "variantslib")))
4100 (home-page "https://github.com/janestreet/variantslib")
4101 (synopsis "OCaml variants as first class values")
4102 (description "The Core suite of libraries is an alternative to OCaml's
4103standard library.")
4104 (license license:asl2.0)))
7b685486
JL
4105
4106(define-public ocaml-ppx-fields-conv
4107 (package
4108 (name "ocaml-ppx-fields-conv")
4109 (version "0.11.0")
4110 (source (origin
4111 (method url-fetch)
4112 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4113 (version-major+minor version)
4114 "/files/ppx_fields_conv-v" version ".tar.gz"))
4115 (sha256
4116 (base32
4117 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
4118 (build-system dune-build-system)
4119 (propagated-inputs
4120 `(("ocaml-base" ,ocaml-base)
4121 ("ocaml-fieldslib" ,ocaml-fieldslib)
4122 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4123 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4124 (properties `((upstream-name . "ppx_fields_conv")))
4125 (home-page "https://github.com/janestreet/ppx_fields_conv")
4126 (synopsis "Generation of accessor and iteration functions for ocaml records")
4127 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
4128first class values representing record fields, and additional routines, to get
4129and set record fields, iterate and fold over all fields of a record and create
4130new record values.")
4131 (license license:asl2.0)))
c7cf165e
JL
4132
4133(define-public ocaml-ppx-sexp-conv
4134 (package
4135 (name "ocaml-ppx-sexp-conv")
4136 (version "0.11.2")
4137 (source (origin
4138 (method git-fetch)
4139 (uri (git-reference
4140 (url "https://github.com/janestreet/ppx_sexp_conv.git")
4141 (commit (string-append "v" version))))
4142 (file-name (git-file-name name version))
4143 (sha256
4144 (base32
4145 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
4146 (build-system dune-build-system)
4147 (propagated-inputs
4148 `(("ocaml-base" ,ocaml-base)
4149 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4150 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4151 (properties `((upstream-name . "ppx_sexp_conv")))
4152 (home-page "https://github.com/janestreet/ppx_sexp_conv")
4153 (synopsis "Generation of S-expression conversion functions from type definitions")
4154 (description "This package generates S-expression conversion functions from type
4155definitions.")
4156 (license license:asl2.0)))
7523674c
JL
4157
4158(define-public ocaml-ppx-variants-conv
4159 (package
4160 (name "ocaml-ppx-variants-conv")
4161 (version "0.11.1")
4162 (source (origin
4163 (method git-fetch)
4164 (uri (git-reference
4165 (url "https://github.com/janestreet/ppx_variants_conv.git")
4166 (commit (string-append "v" version))))
4167 (file-name (git-file-name name version))
4168 (sha256
4169 (base32
4170 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
4171 (build-system dune-build-system)
4172 (propagated-inputs
4173 `(("ocaml-base" ,ocaml-base)
4174 ("ocaml-variantslib" ,ocaml-variantslib)
4175 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4176 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4177 (properties
4178 `((upstream-name . "ppx_variants_conv")))
4179 (home-page
4180 "https://github.com/janestreet/ppx_variants_conv")
4181 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
4182 (description
4183 "This package generates accessors and interation functions for OCaml
4184variant types.")
4185 (license license:asl2.0)))
e6f08ec9
JL
4186
4187(define-public ocaml-ppx-custom-printf
4188 (package
4189 (name "ocaml-ppx-custom-printf")
4190 (version "0.11.0")
4191 (source (origin
4192 (method url-fetch)
4193 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4194 (version-major+minor version)
4195 "/files/ppx_custom_printf-v" version ".tar.gz"))
4196 (sha256
4197 (base32
4198 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
4199 (build-system dune-build-system)
4200 (propagated-inputs
4201 `(("ocaml-base" ,ocaml-base)
4202 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4203 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4204 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4205 (properties `((upstream-name . "ppx_custom_printf")))
4206 (home-page "https://github.com/janestreet/ppx_custom_printf")
4207 (synopsis "Printf-style format-strings for user-defined string conversion")
4208 (description "Extensions to printf-style format-strings for user-defined
4209string conversion.")
4210 (license license:asl2.0)))
a0584d6c
JL
4211
4212(define-public ocaml-bin-prot
4213 (package
4214 (name "ocaml-bin-prot")
4215 (version "0.11.0")
4216 (source (origin
4217 (method url-fetch)
4218 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4219 (version-major+minor version)
4220 "/files/bin_prot-v" version ".tar.gz"))
4221 (sha256
4222 (base32
4223 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
4224 (build-system dune-build-system)
4225 (inputs
4226 `(("ocaml-base" ,ocaml-base)
4227 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4228 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
4229 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
4230 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4231 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
4232 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
4233 (properties `((upstream-name . "bin_prot")))
4234 (home-page "https://github.com/janestreet/bin_prot")
4235 (synopsis "Binary protocol generator")
4236 (description "This library contains functionality for reading and writing
4237OCaml-values in a type-safe binary protocol. It is extremely efficient,
4238typically supporting type-safe marshalling and unmarshalling of even highly
4239structured values at speeds sufficient to saturate a gigabit connection. The
4240protocol is also heavily optimized for size, making it ideal for long-term
4241storage of large amounts of data.")
4242 (license (list
4243 license:asl2.0
4244 license:bsd-3))))
49b01fa3
JL
4245
4246(define-public ocaml-octavius
4247 (package
4248 (name "ocaml-octavius")
44b8507d 4249 (version "1.2.1")
49b01fa3
JL
4250 (source (origin
4251 (method git-fetch)
4252 (uri (git-reference
4253 (url "https://github.com/ocaml-doc/octavius")
4254 (commit (string-append "v" version))))
4255 (file-name (git-file-name name version))
4256 (sha256
4257 (base32
44b8507d 4258 "1ck6yj6z5rvqyl39rz87ca1bnk0f1dpgvlk115631hjh8bwpfvfq"))))
49b01fa3
JL
4259 (build-system dune-build-system)
4260 (properties `((upstream-name . "octavius")))
4261 (home-page "https://github.com/ocaml-doc/octavius")
4262 (synopsis "Ocamldoc comment syntax parser")
4263 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
4264 (license license:isc)))
6692f652
JL
4265
4266(define-public ocaml-ppx-hash
4267 (package
4268 (name "ocaml-ppx-hash")
4269 (version "0.11.1")
4270 (source (origin
4271 (method git-fetch)
4272 (uri (git-reference
4273 (url "https://github.com/janestreet/ppx_hash.git")
4274 (commit (string-append "v" version))))
3a75925e 4275 (file-name (git-file-name name version))
6692f652
JL
4276 (sha256
4277 (base32
4278 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
4279 (build-system dune-build-system)
4280 (propagated-inputs
4281 `(("ocaml-base" ,ocaml-base)
4282 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4283 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4284 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4285 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4286 (properties `((upstream-name . "ppx_hash")))
4287 (home-page "https://github.com/janestreet/ppx_hash")
4288 (synopsis "Generation of hash functions from type expressions and definitions")
74ee98ee 4289 (description "This package is a collection of ppx rewriters that generate
6692f652
JL
4290hash functions from type exrpessions and definitions.")
4291 (license license:asl2.0)))
db67f569
JL
4292
4293(define-public ocaml-ppx-enumerate
4294 (package
4295 (name "ocaml-ppx-enumerate")
4296 (version "0.11.1")
4297 (source (origin
4298 (method git-fetch)
4299 (uri (git-reference
4300 (url "https://github.com/janestreet/ppx_enumerate.git")
4301 (commit (string-append "v" version))))
4a6de002 4302 (file-name (git-file-name name version))
db67f569
JL
4303 (sha256
4304 (base32
4305 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
4306 (build-system dune-build-system)
4307 (arguments
4a6de002 4308 `(#:tests? #f)) ; no test suite
db67f569
JL
4309 (propagated-inputs
4310 `(("ocaml-base" ,ocaml-base)
4311 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4312 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4313 (properties `((upstream-name . "ppx_enumerate")))
4314 (home-page "https://github.com/janestreet/ppx_enumerate")
4315 (synopsis "Generate a list containing all values of a finite type")
4316 (description "Ppx_enumerate is a ppx rewriter which generates a definition
4317for the list of all values of a type (for a type which only has finitely
4318many values).")
4319 (license license:asl2.0)))
b42afab2
JL
4320
4321(define-public ocaml-ppx-bench
4322 (package
4323 (name "ocaml-ppx-bench")
4324 (version "0.11.0")
4325 (source (origin
4326 (method url-fetch)
4327 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4328 (version-major+minor version)
4329 "/files/ppx_bench-v" version ".tar.gz"))
4330 (sha256
4331 (base32
4332 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
4333 (build-system dune-build-system)
4334 (arguments
4335 ;; No tests
4336 `(#:tests? #f))
4337 (propagated-inputs
4338 `(("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4339 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4340 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4341 (properties `((upstream-name . "ppx_bench")))
4342 (home-page "https://github.com/janestreet/ppx_bench")
4343 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
4344 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
4345 (license license:asl2.0)))
164b06da
JL
4346
4347(define-public ocaml-ppx-here
4348 (package
4349 (name "ocaml-ppx-here")
4350 (version "0.11.0")
4351 (source (origin
4352 (method url-fetch)
4353 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4354 (version-major+minor version)
4355 "/files/ppx_here-v" version ".tar.gz"))
4356 (sha256
4357 (base32
4358 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))))
4359 (build-system dune-build-system)
4360 (arguments
4361 ;; broken tests
4362 `(#:tests? #f))
4363 (propagated-inputs
4364 `(("ocaml-base" ,ocaml-base)
4365 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4366 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4367 (properties `((upstream-name . "ppx_here")))
4368 (home-page "https://github.com/janestreet/ppx_here")
4369 (synopsis "Expands [%here] into its location")
4370 (description
4371 "Part of the Jane Street's PPX rewriters collection.")
4372 (license license:asl2.0)))
a58118ca
JL
4373
4374(define-public ocaml-typerep
4375 (package
4376 (name "ocaml-typerep")
4377 (version "0.11.0")
4378 (source (origin
4379 (method url-fetch)
4380 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4381 (version-major+minor version)
4382 "/files/typerep-v" version ".tar.gz"))
4383 (sha256
4384 (base32
4385 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
4386 (build-system dune-build-system)
4387 (arguments
4388 `(#:tests? #f))
4389 (propagated-inputs `(("ocaml-base" ,ocaml-base)))
4390 (home-page "https://github.com/janestreet/typerep")
4391 (synopsis "Typerep is a library for runtime types")
4392 (description "Typerep is a library for runtime types.")
4393 (license license:asl2.0)))
e9328150
JL
4394
4395(define-public ocaml-ppx-sexp-value
4396 (package
4397 (name "ocaml-ppx-sexp-value")
4398 (version "0.11.0")
4399 (source (origin
4400 (method url-fetch)
4401 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4402 (version-major+minor version)
4403 "/files/ppx_sexp_value-v" version ".tar.gz"))
4404 (sha256
4405 (base32
4406 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
4407 (build-system dune-build-system)
4408 (propagated-inputs
4409 `(("ocaml-base" ,ocaml-base)
4410 ("ocaml-ppx-here" ,ocaml-ppx-here)
4411 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4412 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4413 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4414 (properties `((upstream-name . "ppx_sexp_value")))
4415 (home-page "https://github.com/janestreet/ppx_sexp_value")
4416 (synopsis "Simplify building s-expressions from ocaml values")
4417 (description "A ppx rewriter that simplifies building s-expressions from
4418ocaml values.")
4419 (license license:asl2.0)))
44a2ceca
JL
4420
4421(define-public ocaml-ppx-sexp-message
4422 (package
4423 (name "ocaml-ppx-sexp-message")
4424 (version "0.11.0")
4425 (source (origin
4426 (method url-fetch)
4427 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4428 (version-major+minor version)
4429 "/files/ppx_sexp_message-v" version ".tar.gz"))
4430 (sha256
4431 (base32
4432 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
4433 (build-system dune-build-system)
4434 (propagated-inputs
4435 `(("ocaml-base" ,ocaml-base)
4436 ("ocaml-ppx-here" ,ocaml-ppx-here)
4437 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4438 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4439 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4440 (properties `((upstream-name . "ppx_sexp_message")))
4441 (home-page "https://github.com/janestreet/ppx_sexp_message")
4442 (synopsis "A ppx rewriter for easy construction of s-expressions")
4443 (description "Ppx_sexp_message aims to ease the creation of s-expressions
4444in OCaml. This is mainly motivated by writing error and debugging messages,
4445where one needs to construct a s-expression based on various element of the
4446context such as function arguments.")
4447 (license license:asl2.0)))
6a114001
JL
4448
4449(define-public ocaml-ppx-pipebang
4450 (package
4451 (name "ocaml-ppx-pipebang")
4452 (version "0.11.0")
4453 (source (origin
4454 (method url-fetch)
4455 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4456 (version-major+minor version)
4457 "/files/ppx_pipebang-v" version ".tar.gz"))
4458 (sha256
4459 (base32
4460 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
4461 (build-system dune-build-system)
4462 (arguments
4463 ;; No tests
4464 `(#:tests? #f))
4465 (propagated-inputs
4466 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4467 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4468 (properties `((upstream-name . "ppx_pipebang")))
4469 (home-page "https://github.com/janestreet/ppx_pipebang")
4470 (synopsis "Inline reverse application operators `|>` and `|!`")
4471 (description "A ppx rewriter that inlines reverse application operators
4472@code{|>} and @code{|!}.")
4473 (license license:asl2.0)))
3f4ecf66
JL
4474
4475(define-public ocaml-ppx-optional
4476 (package
4477 (name "ocaml-ppx-optional")
4478 (version "0.11.0")
4479 (source (origin
4480 (method url-fetch)
4481 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4482 (version-major+minor version)
4483 "/files/ppx_optional-v" version ".tar.gz"))
4484 (sha256
4485 (base32
4486 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))))
4487 (build-system dune-build-system)
4488 (arguments
4489 ;; No tests
4490 `(#:tests? #f))
4491 (propagated-inputs
4492 `(("ocaml-base" ,ocaml-base)
4493 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4494 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4495 (properties `((upstream-name . "ppx_optional")))
4496 (home-page "https://github.com/janestreet/ppx_optional")
4497 (synopsis "Pattern matching on flat options")
4498 (description
4499 "A ppx rewriter that rewrites simple match statements with an if then
4500else expression.")
4501 (license license:asl2.0)))
79967eea
JL
4502
4503(define-public ocaml-ppx-optcomp
4504 (package
4505 (name "ocaml-ppx-optcomp")
4506 (version "0.11.0")
4507 (source (origin
4508 (method url-fetch)
4509 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4510 (version-major+minor version)
4511 "/files/ppx_optcomp-v" version ".tar.gz"))
4512 (sha256
4513 (base32
4514 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))))
4515 (build-system dune-build-system)
4516 (propagated-inputs
4517 `(("ocaml-base" ,ocaml-base)
4518 ("ocaml-stdio" ,ocaml-stdio)
4519 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4520 (properties `((upstream-name . "ppx_optcomp")))
4521 (home-page "https://github.com/janestreet/ppx_optcomp")
4522 (synopsis "Optional compilation for OCaml")
4523 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
4524used to handle optional compilations of pieces of code depending of the word
4525size, the version of the compiler, ...")
4526 (license license:asl2.0)))
1365ae47
JL
4527
4528(define-public ocaml-ppx-let
4529 (package
4530 (name "ocaml-ppx-let")
4531 (version "0.11.0")
4532 (source (origin
4533 (method url-fetch)
4534 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4535 (version-major+minor version)
4536 "/files/ppx_let-v" version ".tar.gz"))
4537 (sha256
4538 (base32
4539 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))))
4540 (build-system dune-build-system)
4541 (propagated-inputs
4542 `(("ocaml-base" ,ocaml-base)
4543 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4544 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4545 (properties `((upstream-name . "ppx_let")))
4546 (home-page "https://github.com/janestreet/ppx_let")
4547 (synopsis "Monadic let-bindings")
4548 (description "A ppx rewriter for monadic and applicative let bindings,
4549match expressions, and if expressions.")
4550 (license license:asl2.0)))
6018802d
JL
4551
4552(define-public ocaml-ppx-fail
4553 (package
4554 (name "ocaml-ppx-fail")
4555 (version "0.11.0")
4556 (source (origin
4557 (method url-fetch)
4558 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4559 (version-major+minor version)
4560 "/files/ppx_fail-v" version ".tar.gz"))
4561 (sha256
4562 (base32
4563 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
4564 (build-system dune-build-system)
4565 (propagated-inputs
4566 `(("ocaml-base" ,ocaml-base)
4567 ("ocaml-ppx-here" ,ocaml-ppx-here)
4568 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4569 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4570 (properties `((upstream-name . "ppx_fail")))
4571 (home-page "https://github.com/janestreet/ppx_fail")
4572 (synopsis "Add location to calls to failwiths")
4573 (description "Syntax extension that makes [failwiths] always include a
4574position.")
4575 (license license:asl2.0)))
7ec9a45d
JL
4576
4577(define-public ocaml-ppx-assert
4578 (package
4579 (name "ocaml-ppx-assert")
4580 (version "0.11.0")
4581 (source (origin
4582 (method url-fetch)
4583 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4584 (version-major+minor version)
4585 "/files/ppx_assert-v" version ".tar.gz"))
4586 (sha256
4587 (base32
4588 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))))
4589 (build-system dune-build-system)
4590 (propagated-inputs
4591 `(("ocaml-base" ,ocaml-base)
4592 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4593 ("ocaml-ppx-here" ,ocaml-ppx-here)
4594 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4595 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4596 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4597 (properties `((upstream-name . "ppx_assert")))
4598 (home-page "https://github.com/janestreet/ppx_assert")
4599 (synopsis "Assert-like extension nodes that raise useful errors on failure")
4600 (description "This package contains assert-like extension nodes that raise
4601useful errors on failure.")
4602 (license license:asl2.0)))
4e4e5fb1
JL
4603
4604(define-public ocaml-ppx-expect
4605 (package
4606 (name "ocaml-ppx-expect")
b7ebcb04 4607 (version "0.12.0")
4e4e5fb1
JL
4608 (source (origin
4609 (method git-fetch)
4610 (uri (git-reference
4611 (url "https://github.com/janestreet/ppx_expect.git")
4612 (commit (string-append "v" version))))
4613 (file-name (git-file-name name version))
4614 (sha256
4615 (base32
b7ebcb04 4616 "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"))))
4e4e5fb1
JL
4617 (build-system dune-build-system)
4618 (arguments
4619 `(#:jbuild? #t))
4620 (propagated-inputs
4621 `(("ocaml-base" ,ocaml-base)
4622 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
4623 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4624 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
4625 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
4626 ("ocaml-ppx-here" ,ocaml-ppx-here)
4627 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4628 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4629 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
4630 ("ocaml-stdio" ,ocaml-stdio)
4631 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4632 ("ocaml-ppxlib" ,ocaml-ppxlib)
4633 ("ocaml-re" ,ocaml-re)))
4634 (properties `((upstream-name . "ppx_expect")))
4635 (home-page "https://github.com/janestreet/ppx_expect")
4636 (synopsis "Cram like framework for OCaml")
4637 (description "Expect-test is a framework for writing tests in OCaml, similar
4638to Cram. Expect-tests mimics the existing inline tests framework with the
4639@code{let%expect_test} construct. The body of an expect-test can contain
4640output-generating code, interleaved with @code{%expect} extension expressions
4641to denote the expected output.")
4642 (license license:asl2.0)))
f4304c1d
JL
4643
4644(define-public ocaml-ppx-js-style
4645 (package
4646 (name "ocaml-ppx-js-style")
4647 (version "0.11.0")
4648 (source (origin
4649 (method url-fetch)
4650 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4651 (version-major+minor version)
4652 "/files/ppx_js_style-v" version ".tar.gz"))
4653 (sha256
4654 (base32
4655 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))))
4656 (build-system dune-build-system)
4657 (arguments
4658 ;; No tests
4659 `(#:tests? #f))
4660 (propagated-inputs
4661 `(("ocaml-base" ,ocaml-base)
4662 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4663 ("ocaml-octavius" ,ocaml-octavius)
4664 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4665 (properties `((upstream-name . "ppx_js_style")))
4666 (home-page "https://github.com/janestreet/ppx_js_style")
4667 (synopsis "Code style checker for Jane Street Packages")
d38ccbb0 4668 (description "This package is a no-op ppx rewriter. It is used as a
f4304c1d
JL
4669@code{lint} tool to enforce some coding conventions across all Jane Street
4670packages.")
4671 (license license:asl2.0)))
48ad1181
JL
4672
4673(define-public ocaml-ppx-typerep-conv
4674 (package
4675 (name "ocaml-ppx-typerep-conv")
4676 (version "0.11.1")
4677 (source (origin
4678 (method git-fetch)
4679 (uri (git-reference
4680 (url "https://github.com/janestreet/ppx_typerep_conv.git")
4681 (commit (string-append "v" version))))
7026f6b2 4682 (file-name (git-file-name name version))
48ad1181
JL
4683 (sha256
4684 (base32
4685 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
4686 (build-system dune-build-system)
4687 (arguments
4688 `(#:test-target "."))
4689 (propagated-inputs
4690 `(("ocaml-base" ,ocaml-base)
4691 ("ocaml-typerep" ,ocaml-typerep)
4692 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4693 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4694 (properties `((upstream-name . "ppx_typerep_conv")))
4695 (home-page "https://github.com/janestreet/ppx_typerep_conv")
4696 (synopsis "Generation of runtime types from type declarations")
4697 (description "This package can automatically generate runtime types
4698from type definitions.")
4699 (license license:asl2.0)))
d13b9c5f
JL
4700
4701(define-public ocaml-ppx-base
4702 (package
4703 (name "ocaml-ppx-base")
4704 (version "0.11.0")
4705 (source (origin
4706 (method url-fetch)
4707 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4708 (version-major+minor version)
4709 "/files/ppx_base-v" version ".tar.gz"))
4710 (sha256
4711 (base32
4712 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))))
4713 (build-system dune-build-system)
4714 (arguments
4715 `(#:test-target "."))
4716 (propagated-inputs
4717 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
4718 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
4719 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
4720 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
4721 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4722 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4723 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4724 (properties `((upstream-name . "ppx_base")))
4725 (home-page "https://github.com/janestreet/ppx_base")
4726 (synopsis "Base set of ppx rewriters")
4727 (description "Ppx_base is the set of ppx rewriters used for Base.
4728
4729Note that Base doesn't need ppx to build, it is only used as a
4730verification tool.")
4731 (license license:asl2.0)))
7bd4b85e
JL
4732
4733(define-public ocaml-ppx-bin-prot
4734 (package
4735 (name "ocaml-ppx-bin-prot")
4736 (version "0.11.1")
4737 (source (origin
4738 (method git-fetch)
4739 (uri (git-reference
4740 (url "https://github.com/janestreet/ppx_bin_prot.git")
4741 (commit (string-append "v" version))))
4742 (file-name (git-file-name name version))
4743 (sha256
4744 (base32
4745 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
4746 (build-system dune-build-system)
4747 (arguments
4748 ;; Cyclic dependency with ocaml-ppx-jane
4749 `(#:tests? #f))
4750 (propagated-inputs
4751 `(("ocaml-base" ,ocaml-base)
4752 ("ocaml-bin-prot" ,ocaml-bin-prot)
4753 ("ocaml-ppx-here" ,ocaml-ppx-here)
4754 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4755 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4756 (properties `((upstream-name . "ppx_bin_prot")))
4757 (home-page "https://github.com/janestreet/ppx_bin_prot")
4758 (synopsis "Generation of bin_prot readers and writers from types")
4759 (description "Generation of binary serialization and deserialization
4760functions from type definitions.")
4761 (license license:asl2.0)))
255f1cae
JL
4762
4763(define-public ocaml-ppx-jane
4764 (package
4765 (name "ocaml-ppx-jane")
4766 (version "0.11.0")
4767 (source (origin
4768 (method url-fetch)
4769 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4770 (version-major+minor version)
4771 "/files/ppx_jane-v" version ".tar.gz"))
4772 (sha256
4773 (base32
4774 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
4775 (build-system dune-build-system)
4776 (arguments
4777 `(#:test-target "."))
4778 (propagated-inputs
4779 `(("ocaml-ppx-assert" ,ocaml-ppx-assert)
4780 ("ocaml-ppx-base" ,ocaml-ppx-base)
4781 ("ocaml-ppx-bench" ,ocaml-ppx-bench)
4782 ("ocaml-ppx-bin-prot" ,ocaml-ppx-bin-prot)
4783 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
4784 ("ocaml-ppx-expect" ,ocaml-ppx-expect)
4785 ("ocaml-ppx-fail" ,ocaml-ppx-fail)
4786 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
4787 ("ocaml-ppx-here" ,ocaml-ppx-here)
4788 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4789 ("ocaml-ppx-let" ,ocaml-ppx-let)
4790 ("ocaml-ppx-optcomp" ,ocaml-ppx-optcomp)
4791 ("ocaml-ppx-optional" ,ocaml-ppx-optional)
4792 ("ocaml-ppx-pipebang" ,ocaml-ppx-pipebang)
4793 ("ocaml-ppx-sexp-message" ,ocaml-ppx-sexp-message)
4794 ("ocaml-ppx-sexp-value" ,ocaml-ppx-sexp-value)
4795 ("ocaml-ppx-typerep-conv" ,ocaml-ppx-typerep-conv)
4796 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
4797 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4798 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4799 (properties `((upstream-name . "ppx_jane")))
4800 (home-page "https://github.com/janestreet/ppx_jane")
4801 (synopsis "Standard Jane Street ppx rewriters")
4802 (description "This package installs a ppx-jane executable, which is a ppx
4803driver including all standard Jane Street ppx rewriters.")
4804 (license license:asl2.0)))
5995e6d1
JL
4805
4806(define-public ocaml-splittable-random
4807 (package
4808 (name "ocaml-splittable-random")
4809 (version "0.11.0")
4810 (source (origin
4811 (method url-fetch)
4812 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4813 (version-major+minor version)
4814 "/files/splittable_random-v" version ".tar.gz"))
4815 (sha256
4816 (base32
4817 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
4818 (build-system dune-build-system)
4819 (propagated-inputs
4820 `(("ocaml-base" ,ocaml-base)
4821 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
4822 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
4823 (properties `((upstream-name . "splittable_random")))
4824 (home-page "https://github.com/janestreet/splittable_random")
4825 (synopsis "PRNG that can be split into independent streams")
e88fd8be
CB
4826 (description "This package provides a splittable
4827@acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
4828be used as a stream of random values; it can also be split to produce a
4829second, independent stream of random values.
5995e6d1
JL
4830
4831This library implements a splittable pseudo-random number generator that sacrifices
4832cryptographic-quality randomness in favor of performance.")
4833 (license license:asl2.0)))
dc361a25
JL
4834
4835(define-public ocaml-jane-street-headers
4836 (package
4837 (name "ocaml-jane-street-headers")
4838 (version "0.11.0")
4839 (source (origin
4840 (method url-fetch)
4841 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4842 (version-major+minor version)
4843 "/files/jane-street-headers-v" version ".tar.gz"))
4844 (sha256
4845 (base32
4846 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
4847 (build-system dune-build-system)
4848 (arguments
4849 `(#:test-target "."))
4850 (home-page "https://github.com/janestreet/jane-street-headers")
4851 (synopsis "Jane Street C header files")
4852 (description "This package provides C header files shared between the
4853various Jane Street packages.")
4854 (license license:asl2.0)))
3e3d5ffc
JL
4855
4856(define-public ocaml-configurator
4857 (package
4858 (name "ocaml-configurator")
4859 (version "0.11.0")
4860 (source (origin
4861 (method url-fetch)
4862 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4863 (version-major+minor version)
4864 "/files/configurator-v" version ".tar.gz"))
4865 (sha256
4866 (base32
4867 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
4868 (build-system dune-build-system)
4869 (arguments
4870 ;; No tests
4871 `(#:tests? #f))
4872 (propagated-inputs
4873 `(("ocaml-base" ,ocaml-base)
4874 ("ocaml-stdio" ,ocaml-stdio)))
4875 (home-page "https://github.com/janestreet/configurator")
4876 (synopsis "Helper library for gathering system configuration")
4877 (description "Configurator is a small library that helps writing OCaml
4878scripts that test features available on the system, in order to generate config.h
4879files for instance.
4880
4881Configurator allows one to:
4882@itemize
4883@item test if a C program compiles
4884@item query pkg-config
4885@item import #define from OCaml header files
4886@item generate config.h file
4887@end itemize")
4888 (license license:asl2.0)))
9e81db80
JL
4889
4890(define-public ocaml-spawn
4891 (package
4892 (name "ocaml-spawn")
f9caa17b 4893 (version "0.13.0")
9e81db80
JL
4894 (source (origin
4895 (method git-fetch)
4896 (uri (git-reference
4897 (url "https://github.com/janestreet/spawn.git")
4898 (commit (string-append "v" version))))
f9caa17b 4899 (file-name (git-file-name name version))
9e81db80
JL
4900 (sha256
4901 (base32
f9caa17b 4902 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
9e81db80
JL
4903 (build-system dune-build-system)
4904 (arguments
4905 `(#:phases
4906 (modify-phases %standard-phases
4907 (add-before 'check 'fix-tests
4908 (lambda _
4909 (substitute* "test/tests.ml"
4910 (("/bin/pwd") (which "pwd"))
4911 (("/bin/echo") (which "echo")))
4912 #t)))))
4913 (native-inputs
4914 `(("ocaml-ppx-expect" ,ocaml-ppx-expect)))
4915 (home-page "https://github.com/janestreet/spawn")
4916 (synopsis "Spawning sub-processes")
4917 (description
4918 "Spawn is a small library exposing only one functionality: spawning sub-process.
4919
4920It has three main goals:
4921
4922@itemize
4923@item provide missing features of Unix.create_process such as providing a
4924working directory,
4925@item provide better errors when a system call fails in the
4926sub-process. For instance if a command is not found, you get a proper
4927@code{Unix.Unix_error} exception,
4928@item improve performances by using vfork when available. It is often
4929claimed that nowadays fork is as fast as vfork, however in practice
4930fork takes time proportional to the process memory while vfork is
4931constant time. In application using a lot of memory, vfork can be
1d5d0447
CB
4932thousands of times faster than fork.
4933@end itemize")
9e81db80 4934 (license license:asl2.0)))
514b5420
JL
4935
4936(define-public ocaml-core
4937 (package
4938 (name "ocaml-core")
4939 (version "0.11.3")
4940 (source (origin
4941 (method git-fetch)
4942 (uri (git-reference
4943 (url "https://github.com/janestreet/core.git")
4944 (commit (string-append "v" version))))
fbd08d42 4945 (file-name (git-file-name name version))
514b5420
JL
4946 (sha256
4947 (base32
4948 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
4949 (build-system dune-build-system)
4950 (arguments
4951 `(#:jbuild? #t
4952 ;; Require a cyclic dependency: core_extended
4953 #:tests? #f))
4954 (propagated-inputs
4955 `(("ocaml-base" ,ocaml-base)
4956 ("ocaml-configurator" ,ocaml-configurator)
4957 ("ocaml-core-kernel" ,ocaml-core-kernel)
4958 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
4959 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
4960 ("ocaml-sexplib" ,ocaml-sexplib)
4961 ("ocaml-spawn" ,ocaml-spawn)
4962 ("ocaml-stdio" ,ocaml-stdio)
4963 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4964 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4965 (home-page "https://github.com/janestreet/core")
4966 (synopsis "Alternative to OCaml's standard library")
4967 (description "The Core suite of libraries is an alternative to OCaml's
4968standard library that was developed by Jane Street.")
4969 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
4970 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
4971 (license license:asl2.0)))
8baa5c8b
JL
4972
4973(define-public ocaml-core-kernel
4974 (package
4975 (name "ocaml-core-kernel")
4976 (version "0.11.1")
4977 (source (origin
4978 (method git-fetch)
4979 (uri (git-reference
4980 (url "https://github.com/janestreet/core_kernel.git")
4981 (commit (string-append "v" version))))
4982 (file-name (git-file-name name version))
4983 (sha256
4984 (base32
4985 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
4986 (build-system dune-build-system)
4987 (arguments
4988 ;; Cyclic dependency with ocaml-core
4989 `(#:tests? #f))
4990 (propagated-inputs
4991 `(("ocaml-base" ,ocaml-base)
4992 ("ocaml-bin-prot" ,ocaml-bin-prot)
4993 ("ocaml-configurator" ,ocaml-configurator)
4994 ("ocaml-fieldslib" ,ocaml-fieldslib)
4995 ("ocaml-jane-street-headers" ,ocaml-jane-street-headers)
4996 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
4997 ("ocaml-ppx-base" ,ocaml-ppx-base)
4998 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
4999 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
5000 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
5001 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
5002 ("ocaml-ppx-sexp-message" ,ocaml-ppx-sexp-message)
5003 ("ocaml-sexplib" ,ocaml-sexplib)
5004 ("ocaml-splittable-random" ,ocaml-splittable-random)
5005 ("ocaml-stdio" ,ocaml-stdio)
5006 ("ocaml-typerep" ,ocaml-typerep)
5007 ("ocaml-variantslib" ,ocaml-variantslib)
5008 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
5009 (properties `((upstream-name . "core_kernel")))
5010 (home-page "https://github.com/janestreet/core_kernel")
5011 (synopsis "Portable standard library for OCaml")
5012 (description "Core is an alternative to the OCaml standard library.
5013
5014Core_kernel is the system-independent part of Core. It is aimed for cases when
5015the full Core is not available, such as in Javascript.")
5016 (license (list
5017 ;; this package and parts of OCaml, relicensed by janestreet
5018 license:asl2.0
5019 ;; MLton and sjs
5020 license:expat))))
38089b54 5021
5022(define-public ocaml-markup
5023 (package
5024 (name "ocaml-markup")
b3419c40 5025 (version "0.8.1")
38089b54 5026 (home-page "https://github.com/aantron/markup.ml")
5027 (source
5028 (origin
5029 (method git-fetch)
5030 (uri (git-reference
5031 (url (string-append home-page ".git"))
5032 (commit version)))
5033 (file-name (git-file-name name version))
5034 (sha256
5035 (base32
b3419c40 5036 "0gzdjfnkv56vhmpvi9xpv1p05z50y55izhn156bkmb35s6izxds3"))))
38089b54 5037 (build-system dune-build-system)
b3419c40
JL
5038 (propagated-inputs
5039 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
5040 ("ocaml-uchar" ,ocaml-uchar)
38089b54 5041 ("ocaml-uutf" ,ocaml-uutf)
5042 ("ocaml-lwt" ,ocaml-lwt)))
5043 (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
5044 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
5045 (description "Markup.ml provides an HTML parser and an XML parser. The
5046parsers are wrapped in a simple interface: they are functions that transform
5047byte streams to parsing signal streams. Streams can be manipulated in various
5048ways, such as processing by fold, filter, and map, assembly into DOM tree
5049structures, or serialization back to HTML or XML.
5050
5051Both parsers are based on their respective standards. The HTML parser, in
5052particular, is based on the state machines defined in HTML5.
5053
5054The parsers are error-recovering by default, and accept fragments. This makes
5055it very easy to get a best-effort parse of some input. The parsers can,
5056however, be easily configured to be strict, and to accept only full documents.
5057
5058Apart from this, the parsers are streaming (do not build up a document in
5059memory), non-blocking (can be used with threading libraries), lazy (do not
5060consume input unless the signal stream is being read), and process the input in
5061a single pass. They automatically detect the character encoding of the input
5062stream, and convert everything to UTF-8.")
5063 (license license:bsd-3)))
e2506afc 5064
5065(define-public ocaml-tyxml
5066 (package
5067 (name "ocaml-tyxml")
5068 (version "4.3.0")
5069 (source
5070 (origin
5071 (method git-fetch)
5072 (uri (git-reference
5073 (url "https://github.com/ocsigen/tyxml.git")
5074 (commit version)))
5075 (file-name (git-file-name name version))
5076 (sha256
5077 (base32
5078 "0wv19xipkj8l2sks1h53105ywbjwk7q93fb7b8al4a2g9wr109c0"))))
5079 (build-system dune-build-system)
5080 (inputs
5081 `(("ocaml-re" ,ocaml-re)
5082 ("ocaml-seq" ,ocaml-seq)
5083 ("ocaml-uutf" ,ocaml-uutf)
5084 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5085 ("ocaml-markup" ,ocaml-markup)))
5086 (native-inputs
5087 `(("ocaml-alcotest" ,ocaml-alcotest)))
5088 (arguments `(#:jbuild? #t))
5089 (home-page "https://github.com/ocsigen/tyxml/")
5090 (synopsis "TyXML is a library for building correct HTML and SVG documents")
5091 (description "TyXML provides a set of convenient combinators that uses the
5092OCaml type system to ensure the validity of the generated documents. TyXML can
5093be used with any representation of HTML and SVG: the textual one, provided
5094directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
5095(@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
5096also create your own representation and use it to instantiate a new set of
5097combinators.")
5098 (license license:lgpl2.1)))
908a2ee0 5099
5100(define-public ocaml-bisect-ppx
5101 (package
5102 (name "ocaml-bisect-ppx")
5103 (version "1.4.1")
5104 (source
5105 (origin
5106 (method git-fetch)
5107 (uri (git-reference
5108 (url "https://github.com/aantron/bisect_ppx.git")
5109 (commit version)))
5110 (file-name (git-file-name name version))
5111 (sha256
5112 (base32
5113 "1vp3qvrkz7q25nbmvd40vhsnz2k9aqh17bnd21i3q8q0xlr5hdag"))))
5114 (build-system dune-build-system)
b3419c40 5115 (propagated-inputs
908a2ee0 5116 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
5117 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5118 ("ocaml-ounit" ,ocaml-ounit)))
8cc6a876
JL
5119 (arguments
5120 `(#:phases
5121 (modify-phases %standard-phases
5122 (add-before 'build 'fix-deprecated
5123 (lambda _
5124 ;; Fixed upstream in 22dd1ad9a0c9629f60599c22d82c6488394d6d32, but
5125 ;; not in a release yet.
5126 (substitute* "src/ppx/instrument.ml"
5127 (("module Ast = Ast_405")
5128 "module Ast = Migrate_parsetree.Ast_405
5129module Ast_405 = Ast"))
5130 #t)))))
908a2ee0 5131 (home-page "https://github.com/aantron/bisect_ppx")
5132 (synopsis "Code coverage for OCaml")
5133 (description "Bisect_ppx helps you test thoroughly. It is a small
5134preprocessor that inserts instrumentation at places in your code, such as
5135if-then-else and match expressions. After you run tests, Bisect_ppx gives a
5136nice HTML report showing which places were visited and which were missed.
5137
5138Usage is simple - add package bisect_ppx when building tests, run your tests,
5139then run the Bisect_ppx report tool on the generated visitation files.")
5140 (license license:mpl2.0)))
2f8e77be 5141
5142(define-public ocaml-odoc
5143 (package
5144 (name "ocaml-odoc")
520dc743 5145 (version "1.4.2")
2f8e77be 5146 (source
5147 (origin
5148 (method git-fetch)
5149 (uri (git-reference
5150 (url "https://github.com/ocaml/odoc")
5151 (commit version)))
5152 (file-name (git-file-name name version))
5153 (sha256
520dc743 5154 (base32 "0rvhx139jx6wmlfz355mja6mk03x4swq1xxvk5ky6jzhalq3cf5i"))))
2f8e77be 5155 (build-system dune-build-system)
5156 (inputs
5157 `(("ocaml-alcotest" ,ocaml-alcotest)
5158 ("ocaml-markup" ,ocaml-markup)
5159 ("ocaml-sexplib" ,ocaml-sexplib)
5160 ("ocaml-re" ,ocaml-re)
5161 ("ocaml-uutf" ,ocaml-uutf)))
5162 (native-inputs
5163 `(("ocaml-astring" ,ocaml-astring)
5164 ("ocaml-cmdliner" ,ocaml-cmdliner)
5165 ("ocaml-cppo" ,ocaml-cppo)
5166 ("ocaml-fpath" ,ocaml-fpath)
5167 ("ocaml-result" ,ocaml-result)
5168 ("ocaml-tyxml" ,ocaml-tyxml)
5169 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)))
5170 (home-page "https://github.com/ocaml/odoc")
5171 (synopsis "OCaml documentation generator")
5172 (description "Odoc is a documentation generator for OCaml. It reads
5173@emph{doc comments}, delimited with @code{(** ... *)}, and outputs
5174@acronym{HTML}.
5175
5176Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
5177advantage over ocamldoc is an accurate cross-referencer, which handles the
5178complexity of the OCaml module system.")
5179 (license license:isc)))