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