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