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