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