1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2015 David Hashe <david.hashe@dhashe.com>
6 ;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
8 ;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016-2020 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
11 ;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2018 Peter Kreye <kreyepr@gmail.com>
13 ;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
14 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
15 ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
16 ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
17 ;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
18 ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
19 ;;; Copyright © 2020 divoplade <d@divoplade.fr>
20 ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
21 ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
23 ;;; This file is part of GNU Guix.
25 ;;; GNU Guix is free software; you can redistribute it and/or modify it
26 ;;; under the terms of the GNU General Public License as published by
27 ;;; the Free Software Foundation; either version 3 of the License, or (at
28 ;;; your option) any later version.
30 ;;; GNU Guix is distributed in the hope that it will be useful, but
31 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
32 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 ;;; GNU General Public License for more details.
35 ;;; You should have received a copy of the GNU General Public License
36 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
38 (define-module (gnu packages ocaml)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages algebra)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bison)
44 #:use-module (gnu packages boost)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages emacs)
48 #:use-module (gnu packages emacs-xyz)
49 #:use-module (gnu packages flex)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages ghostscript)
52 #:use-module (gnu packages glib)
53 #:use-module (gnu packages gnome)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages libevent)
56 #:use-module (gnu packages libffi)
57 #:use-module (gnu packages llvm)
58 #:use-module (gnu packages m4)
59 #:use-module (gnu packages maths)
60 #:use-module (gnu packages multiprecision)
61 #:use-module (gnu packages ncurses)
62 #:use-module (gnu packages pcre)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages protobuf)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages rsync)
69 #:use-module (gnu packages sdl)
70 #:use-module (gnu packages sqlite)
71 #:use-module (gnu packages tex)
72 #:use-module (gnu packages texinfo)
73 #:use-module (gnu packages time)
74 #:use-module (gnu packages tls)
75 #:use-module (gnu packages virtualization)
76 #:use-module (gnu packages web)
77 #:use-module (gnu packages web-browsers)
78 #:use-module (gnu packages xml)
79 #:use-module (gnu packages xorg)
80 #:use-module (guix build-system dune)
81 #:use-module (guix build-system emacs)
82 #:use-module (guix build-system gnu)
83 #:use-module (guix build-system ocaml)
84 #:use-module (guix download)
85 #:use-module (guix git-download)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (guix packages)
88 #:use-module (guix svn-download)
89 #:use-module (guix utils)
90 #:use-module (guix memoization)
91 #:use-module ((srfi srfi-1) #:hide (zip)))
93 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
94 ;; their number, not their name.
95 (define (ocaml-forge-uri name version file-number)
96 (string-append "https://forge.ocamlcore.org/frs/download.php/"
97 (number->string file-number) "/" name "-" version
100 (define (janestreet-origin name version hash)
101 (origin (method url-fetch)
102 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
103 (version-major+minor version) "/files/"
104 name "-v" (version-major+minor+point version)
106 (sha256 (base32 hash))))
108 (define-public ocaml-4.11
115 "http://caml.inria.fr/pub/distrib/ocaml-"
116 (version-major+minor version)
117 "/ocaml-" version ".tar.xz"))
120 "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa"))))
121 (build-system gnu-build-system)
123 (list (search-path-specification
124 (variable "OCAMLPATH")
125 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
126 (search-path-specification
127 (variable "CAML_LD_LIBRARY_PATH")
128 (files (list "lib/ocaml/site-lib/stubslibs"
129 "lib/ocaml/site-lib/stublibs")))))
132 ("pkg-config" ,pkg-config)))
135 ;; For libiberty, needed for objdump support.
136 ("gcc:lib" ,(canonical-package gcc) "lib")
137 ("zlib" ,zlib))) ;also needed for objdump support
140 (modify-phases %standard-phases
141 (add-after 'unpack 'patch-/bin/sh-references
142 (lambda* (#:key inputs #:allow-other-keys)
143 (let* ((sh (string-append (assoc-ref inputs "bash")
145 (quoted-sh (string-append "\"" sh "\"")))
146 (with-fluids ((%default-port-encoding #f))
152 (format (current-error-port) "\
153 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
156 (find-files "." "\\.ml$"))
160 (invoke "make" "-j" (number->string (parallel-job-count))
164 (with-directory-excursion "testsuite"
165 (invoke "make" "all")))))))
166 (home-page "https://ocaml.org/")
167 (synopsis "The OCaml programming language")
169 "OCaml is a general purpose industrial-strength programming language with
170 an emphasis on expressiveness and safety. Developed for more than 20 years at
171 Inria it benefits from one of the most advanced type systems and supports
172 functional, imperative and object-oriented styles of programming.")
173 ;; The compiler is distributed under qpl1.0 with a change to choice of
174 ;; law: the license is governed by the laws of France. The library is
175 ;; distributed under lgpl2.0.
176 (license (list license:qpl license:lgpl2.0))))
178 (define-public ocaml-4.09
185 "http://caml.inria.fr/pub/distrib/ocaml-"
186 (version-major+minor version)
187 "/ocaml-" version ".tar.xz"))
190 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
192 (define-public ocaml-4.07
199 "http://caml.inria.fr/pub/distrib/ocaml-"
200 (version-major+minor version)
201 "/ocaml-" version ".tar.xz"))
204 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))))
206 (substitute-keyword-arguments (package-arguments ocaml-4.09)
208 `(modify-phases ,phases
210 (lambda* (#:key outputs #:allow-other-keys)
211 (let* ((out (assoc-ref outputs "out"))
212 (mandir (string-append out "/share/man")))
213 ;; Custom configure script doesn't recognize
214 ;; --prefix=<PREFIX> syntax (with equals sign).
215 (invoke "./configure"
217 "--mandir" mandir))))))))))
219 (define-public ocaml ocaml-4.11)
221 (define-public ocamlbuild
229 (url "https://github.com/ocaml/ocamlbuild")
231 (file-name (git-file-name name version))
233 (base32 "1hb5mcdz4wv7sh1pj7dq9q4fgz5h3zg7frpiya6s8zd3ypwzq0kh"))))
234 (build-system ocaml-build-system)
237 (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
238 (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
240 (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
241 "/lib/ocaml/site-lib")
242 (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
245 (modify-phases %standard-phases
247 ; some failures because of changes in OCaml's error message formating
249 (home-page "https://github.com/ocaml/ocamlbuild")
250 (synopsis "OCaml build tool")
251 (description "OCamlbuild is a generic build tool, that has built-in rules
252 for building OCaml library and programs.")
253 (license license:lgpl2.1+)))
255 (define-public ocaml-extlib
257 (name "ocaml-extlib")
261 (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
262 "extlib-" version ".tar.gz"))
265 "1sxmzc1mx3kg62j8kbk0dxkx8mkf1rn70h542cjzrziflznap0s1"))))
266 (build-system ocaml-build-system)
269 (modify-phases %standard-phases
270 (delete 'configure))))
272 `(("ocaml-cppo" ,ocaml-cppo)))
273 (home-page "https://github.com/ygrek/ocaml-extlib")
274 (synopsis "Complete and small extension for OCaml standard library")
275 (description "This library adds new functions to OCaml standard library
276 modules, modifies some functions in order to get better performances or
277 safety (tail-recursive) and also provides new modules which should be useful
278 for day to day programming.")
279 ;; With static-linking exception
280 (license license:lgpl2.1+)))
282 (define-public ocaml-cudf
289 (uri "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz")
292 "0771lwljqwwn3cryl0plny5a5dyyrj4z6bw66ha5n8yfbpcy8clr"))))
293 (build-system ocaml-build-system)
294 (propagated-inputs `(("ocaml-extlib" ,ocaml-extlib)))
297 ("ocamlbuild" ,ocamlbuild)
298 ("ocaml-ounit" ,ocaml-ounit)))
303 (string-append "BINDIR=" (assoc-ref %outputs "out")
306 (modify-phases %standard-phases
307 (delete 'configure))))
308 (home-page "https://www.mancoosi.org/cudf/")
309 (synopsis "CUDF library (part of the Mancoosi tools)")
310 (description "CUDF (for Common Upgradeability Description Format) is a
311 format for describing upgrade scenarios in package-based Free and Open Source
312 Software distribution.")
313 ;; With static-linking exception
314 (license license:lgpl2.1+)))
316 (define-public ocaml-mccs
323 (url "https://github.com/AltGr/ocaml-mccs")
325 (file-name (git-file-name name version))
328 "1gsad5cj03256i36wdjqk5pg51pyd48rpjazf0gfaakrn8lk438g"))))
329 (build-system dune-build-system)
330 (propagated-inputs `(("ocaml-cudf" ,ocaml-cudf)))
331 (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
332 (synopsis "Upgrade path problem solver")
333 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
334 Mccs take as input a CUDF problem and computes the best solution according to
335 a set of criteria. It relies on a Integer Programming solver or a
336 Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
337 underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
341 ;; With static-linking exception
344 (define-public ocaml-dose3
350 (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
353 "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
356 "ocaml-dose3-add-unix-dependency.patch"
357 "ocaml-dose3-Fix-for-ocaml-4.06.patch"
358 "ocaml-dose3-dont-make-printconf.patch"
359 "ocaml-dose3-Install-mli-cmx-etc.patch"))))
360 (build-system ocaml-build-system)
363 (list (string-append "SHELL="
364 (assoc-ref %build-inputs "bash")
367 (list (string-append "LIBDIR="
368 (assoc-ref %outputs "out")
369 "/lib/ocaml/site-lib"))))
371 `(("ocaml-graph" ,ocaml-graph)
372 ("ocaml-cudf" ,ocaml-cudf)
373 ("ocaml-extlib" ,ocaml-extlib)
374 ("ocaml-re" ,ocaml-re)))
377 ("python" ,python-2) ; for a test script
378 ("python2-pyyaml" ,python2-pyyaml) ; for a test script
379 ("ocaml-extlib" ,ocaml-extlib)
380 ("ocamlbuild" ,ocamlbuild)
381 ("ocaml-cppo" ,ocaml-cppo)))
382 (home-page "https://www.mancoosi.org/software/")
383 (synopsis "Package distribution management framework")
384 (description "Dose3 is a framework made of several OCaml libraries for
385 managing distribution packages and their dependencies. Though not tied to
386 any particular distribution, dose3 constitutes a pool of libraries which
387 enable analyzing packages coming from various distributions. Besides basic
388 functionalities for querying and setting package properties, dose3 also
389 implements algorithms for solving more complex problems such as monitoring
390 package evolutions, correct and complete dependency resolution and
391 repository-wide uninstallability checks.")
392 ;; with static-linking exception
393 (license license:lgpl2.1+)))
395 (define-public ocaml-down
402 (uri (string-append "https://erratique.ch/software/down/releases/down-"
406 "1nz2f5j17frgr2vrslcz9klmi6w9sm2vqwwwpi33ngcm3rgmsrlg"))))
407 (build-system ocaml-build-system)
409 `(#:tests? #f ;no tests
411 (modify-phases %standard-phases
414 (list "build" "--lib-dir"
415 (string-append (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))))
417 `(("ocaml-findlib" ,ocaml-findlib)
418 ("ocamlbuild" ,ocamlbuild)
419 ("ocaml-topkg" ,ocaml-topkg)
421 (home-page "https://erratique.ch/software/down")
422 (synopsis "OCaml toplevel (REPL) upgrade")
423 (description "Down is an unintrusive user experience upgrade for the
424 @command{ocaml} toplevel (REPL).
426 Simply load the zero dependency @code{down} library in the @command{ocaml}
427 toplevel and you get line edition, history, session support and identifier
428 completion and documentation with @command{ocp-index}.
430 Add this to your @file{~/.ocamlinit}:
436 You may also need to add this to your @file{~/.ocamlinit} and declare
437 the environment variable @code{OCAML_TOPLEVEL_PATH}:
441 try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
448 let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
449 |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
450 |> List.map (fun x -> x ^ \"/toplevel\")
451 (* remove the line below if you don't want to see the text
452 every time you start the toplevel *)
453 |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
454 |> List.iter Topdirs.dir_directory;;
456 (license license:isc)))
458 (define-public ocaml-opam-file-format
460 (name "ocaml-opam-file-format")
465 (url "https://github.com/ocaml/opam-file-format")
467 (file-name (git-file-name name version))
470 "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"))))
471 (build-system ocaml-build-system)
473 `(#:tests? #f; No tests
474 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
475 "/lib/ocaml/site-lib"))
477 (modify-phases %standard-phases
478 (delete 'configure))))
479 (home-page "https://opam.ocaml.org")
480 (synopsis "Parser and printer for the opam file syntax")
481 (description "This package contains a parser and a pretty-printer for
482 the opam file format.")
483 ;; With static-linking exception
484 (license license:lgpl2.1+)))
493 (url "https://github.com/ocaml/opam")
495 (file-name (git-file-name name version))
498 "1z0ls6xxa4ws5xw0am5gxmh5apnmyhgkcphrncp53w34j8sfydsj"))))
499 (build-system ocaml-build-system)
502 (list (string-append "SHELL="
503 (assoc-ref %build-inputs "bash")
506 ;; For some reason, 'ocp-build' needs $TERM to be set.
509 (string-append "SHELL="
510 (assoc-ref %build-inputs "bash")
513 #:test-target "tests"
515 #:phases (modify-phases %standard-phases
516 (add-before 'build 'pre-build
517 (lambda* (#:key inputs make-flags #:allow-other-keys)
518 (let ((bash (assoc-ref inputs "bash"))
519 (bwrap (string-append (assoc-ref inputs "bubblewrap")
521 (substitute* "src/core/opamSystem.ml"
523 (string-append "\"" bash "/bin/sh\""))
526 ;; Use bwrap from the store directly.
527 (substitute* "src/state/shellscripts/bwrap.sh"
528 (("-v bwrap") (string-append "-v " bwrap))
529 (("exec bwrap") (string-append "exec " bwrap))
530 ;; Mount /gnu and /run/current-system in the
531 ;; isolated environment when building with opam.
532 ;; This is necessary for packages to find external
533 ;; dependencies, such as a C compiler, make, etc...
534 (("^add_sys_mounts /usr")
535 "add_sys_mounts /gnu /run/current-system /usr"))
536 (substitute* "src/client/opamInitDefaults.ml"
537 (("\"bwrap\"") (string-append "\"" bwrap "\"")))
538 ;; Generating the documentation needs write access
540 (lambda (f) (chmod f #o644))
541 (find-files "doc" "."))
543 (add-before 'check 'pre-check
545 ;; The "repo" test attempts to open some of these files O_WRONLY
546 ;; and fails with a bogus "OpamSystem.File_not_found" otherwise.
548 (lambda (f) (chmod f #o644))
549 (find-files "tests/packages" "\\.opam$"))
551 (substitute* "tests/Makefile"
554 ;; By default tests run twice: once with a "local" repository
555 ;; and once with a git repository: disable the git tests to
556 ;; avoid the dependency.
562 ("ocaml-cppo" ,ocaml-cppo)
566 ("python" ,python-wrapper)
574 ("bubblewrap" ,bubblewrap)))
576 `(("ocaml-cmdliner" ,ocaml-cmdliner)
577 ("ocaml-dose3" ,ocaml-dose3)
578 ("ocaml-mccs" ,ocaml-mccs)
579 ("ocaml-opam-file-format" ,ocaml-opam-file-format)
580 ("ocaml-re" ,ocaml-re)))
581 (home-page "http://opam.ocamlpro.com/")
582 (synopsis "Package manager for OCaml")
584 "OPAM is a tool to manage OCaml packages. It supports multiple
585 simultaneous compiler installations, flexible package constraints, and a
586 Git-friendly development workflow.")
588 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
589 (license license:lgpl3)))
591 (define-public camlp5
599 (url "https://github.com/camlp5/camlp5")
600 (commit (string-append "rel" (string-delete #\. version)))))
601 (file-name (git-file-name name version))
603 (base32 "1d9spy3f5ahixm8nxxk086kpslzva669a5scn49am0s7vx4i71kp"))))
604 (build-system gnu-build-system)
608 `(#:tests? #f ; XXX TODO figure out how to run the tests
610 (modify-phases %standard-phases
612 (lambda* (#:key outputs #:allow-other-keys)
613 (let* ((out (assoc-ref outputs "out"))
614 (mandir (string-append out "/share/man")))
615 ;; Custom configure script doesn't recognize
616 ;; --prefix=<PREFIX> syntax (with equals sign).
617 (invoke "./configure"
619 "--mandir" mandir))))
620 (add-before 'build 'fix-/bin-references
622 (substitute* "config/Makefile"
627 (invoke "make" "-j" (number->string
628 (parallel-job-count))
630 ;; Required for findlib to find camlp5's libraries
631 (add-after 'install 'install-meta
632 (lambda* (#:key outputs #:allow-other-keys)
633 (install-file "etc/META" (string-append (assoc-ref outputs "out")
634 "/lib/ocaml/camlp5/"))
636 (home-page "https://camlp5.github.io/")
637 (synopsis "Pre-processor Pretty Printer for OCaml")
639 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
640 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
641 concrete syntax of the language (Quotations, Syntax Extensions).")
642 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
643 (license (list license:bsd-3 license:qpl))))
651 (uri (string-append "http://hevea.inria.fr/old/"
652 "hevea-" version ".tar.gz"))
655 "1pzyszxw90klpcmhjqrjfc8cw6c0gm4w2blim8ydyxb6rq6qml1s"))))
656 (build-system gnu-build-system)
660 `(("ocamlbuild" ,ocamlbuild)))
662 `(#:tests? #f ; no test suite
663 #:make-flags (list (string-append "PREFIX=" %output))
664 #:phases (modify-phases %standard-phases
666 (add-before 'build 'patch-/bin/sh
669 (("/bin/sh") (which "sh")))
671 (home-page "http://hevea.inria.fr/")
672 (synopsis "LaTeX to HTML translator")
674 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
675 written in Objective Caml.")
676 (license license:qpl)))
678 (define-public ocaml-num
686 (url "https://github.com/ocaml/num")
687 (commit (string-append "v" version))))
688 (file-name (git-file-name name version))
690 (base32 "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"))))
691 (build-system ocaml-build-system)
694 (modify-phases %standard-phases
696 (add-before 'build 'fix-makefile
697 (lambda* (#:key outputs #:allow-other-keys)
698 ;; This package supposes we install to the same directory as
699 ;; the ocaml package.
700 (substitute* "src/META"
701 (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
702 "/lib/ocaml/site-lib\"")))
703 (substitute* "src/Makefile"
704 (("\\) \\$\\(STDLIBDIR\\)")
705 (string-append ") " (assoc-ref outputs "out")
706 "/lib/ocaml/site-lib")))
708 (add-after 'install 'fix-stubslib
709 (lambda* (#:key outputs #:allow-other-keys)
710 (format #t "~a~%" (find-files "." ".*.so"))
711 (let ((stubdir (string-append (assoc-ref outputs "out")
712 "/lib/ocaml/site-lib/stublibs")))
713 (delete-file stubdir)
715 (install-file "src/dllnums.so" stubdir))
717 (home-page "https://github.com/ocaml/num")
718 (synopsis "Arbitrary-precision integer and rational arithmetic")
719 (description "OCaml-Num contains the legacy Num library for
720 arbitrary-precision integer and rational arithmetic that used to be part of
721 the OCaml core distribution.")
722 (license license:lgpl2.1+))); with linking exception
724 (define-public emacs-tuareg
725 ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
726 ;; deprecated" or 'lexical-binding' and others had been fixed.
727 (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545")
730 (name "emacs-tuareg")
731 (version (git-version "2.2.0" revision commit))
736 (url "https://github.com/ocaml/tuareg")
738 (file-name (git-file-name name version))
740 (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
741 (build-system gnu-build-system)
743 `(("emacs" ,emacs-minimal)
747 (modify-phases %standard-phases
748 (add-after 'unpack 'make-git-checkout-writable
750 (for-each make-file-writable (find-files "."))
753 (add-before 'install 'fix-install-path
754 (lambda* (#:key outputs #:allow-other-keys)
755 (substitute* "Makefile"
756 (("/emacs/site-lisp")
757 (string-append (assoc-ref %outputs "out")
758 "/share/emacs/site-lisp/")))
760 (add-after 'install 'post-install
761 (lambda* (#:key outputs #:allow-other-keys)
763 (string-append (assoc-ref outputs "out")
764 "/share/emacs/site-lisp/"
765 "tuareg-autoloads.el"))
767 (home-page "https://github.com/ocaml/tuareg")
768 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
769 (description "Tuareg helps editing OCaml code, to highlight important
770 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
772 (license license:gpl2+))))
774 (define-public ocaml-menhir
776 (name "ocaml-menhir")
782 (url "https://gitlab.inria.fr/fpottier/menhir.git")
784 (file-name (git-file-name name version))
786 (base32 "019izf51kdc7pzkw68zg8a2alc8lxw1gwdp7in970mr90n16b5zj"))))
787 (build-system dune-build-system)
791 `(#:tests? #f)) ; No check target
792 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
793 (synopsis "Parser generator")
794 (description "Menhir is a parser generator. It turns high-level grammar
795 specifications, decorated with semantic actions expressed in the OCaml
796 programming language into parsers, again expressed in OCaml. It is based on
797 Knuth’s LR(1) parser construction technique.")
798 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
799 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
801 (license (list license:gpl2+ license:qpl))))
803 (define-public ocaml-bigarray-compat
805 (name "ocaml-bigarray-compat")
810 (url "https://github.com/mirage/bigarray-compat")
811 (commit (string-append "v" version))))
812 (file-name (git-file-name name version))
815 "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz"))))
816 (build-system dune-build-system)
818 `(#:tests? #f)); no tests
819 (home-page "https://github.com/mirage/bigarray-compat")
820 (synopsis "OCaml compatibility library")
821 (description "This package contains a compatibility library for
822 @code{Stdlib.Bigarray} in OCaml.")
823 (license license:isc)))
825 (define-public lablgtk
832 (url "https://github.com/garrigue/lablgtk")
834 (file-name (git-file-name name version))
837 "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"))))
838 (build-system gnu-build-system)
841 ("findlib" ,ocaml-findlib)
842 ("pkg-config" ,pkg-config)))
843 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
844 ;; and gtk+-quartz-2.0 once available.
847 ("gtksourceview" ,gtksourceview-2)
848 ("libgnomecanvas" ,libgnomecanvas)
849 ("libgnomeui" ,libgnomeui)
850 ("libglade" ,libglade)
851 ("librsvg" ,librsvg)))
853 `(#:tests? #f ; no check target
855 ;; opt: also install cmxa files
856 #:make-flags (list "all" "opt"
857 (string-append "FINDLIBDIR="
858 (assoc-ref %outputs "out")
860 ;; Occasionally we would get "Error: Unbound module GtkThread" when
861 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
865 (modify-phases %standard-phases
866 (add-before 'install 'prepare-install
867 (lambda* (#:key inputs outputs #:allow-other-keys)
868 (let ((out (assoc-ref outputs "out"))
869 (ocaml (assoc-ref inputs "ocaml")))
870 ;; Install into the output and not the ocaml directory.
871 (mkdir-p (string-append out "/lib/ocaml"))
872 (substitute* "config.make"
875 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lablgtk))))
876 (home-page "http://lablgtk.forge.ocamlcore.org/")
877 (synopsis "GTK+ bindings for OCaml")
879 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
880 a strongly-typed object-oriented interface that is compatible with the
881 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
882 also provides bindings to
883 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
884 gnomeui, gtksourceview, gtkspell,
885 libglade (and it an generate OCaml code from .glade files),
886 libpanel, librsvg and quartz.")
887 (license license:lgpl2.1)))
889 (define-public ocaml4.07-lablgtk
892 (name "ocaml4.07-lablgtk")
894 `(("ocaml" ,ocaml-4.07)
895 ("findlib" ,ocaml4.07-findlib)
896 ("pkg-config" ,pkg-config)))
899 (define-public unison
906 (url "https://github.com/bcpierce00/unison")
907 (commit (string-append "v" version))))
908 (file-name (git-file-name name version))
911 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))
912 (patches (search-patches "unison-fix-ocaml-4.08.patch"))))
913 (build-system gnu-build-system)
915 "doc")) ; 1.9 MiB of documentation
917 `(("ocaml" ,ocaml-4.09)
919 ("ghostscript" ,ghostscript)
920 ("texlive" ,texlive-tiny)
925 `(#:parallel-build? #f
927 #:test-target "selftest"
928 #:tests? #f ; Tests require writing to $HOME.
929 ; If some $HOME is provided, they fail with the message
930 ; "Fatal error: Skipping some tests -- remove me!"
932 (modify-phases %standard-phases
934 (add-before 'install 'prepare-install
935 (lambda* (#:key outputs #:allow-other-keys)
936 (let* ((out (assoc-ref outputs "out"))
937 (bin (string-append out "/bin")))
939 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
941 (add-after 'install 'install-fsmonitor
942 (lambda* (#:key outputs #:allow-other-keys)
943 (let* ((out (assoc-ref outputs "out"))
944 (bin (string-append out "/bin")))
945 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
946 (install-file "src/unison-fsmonitor" bin)
948 (add-after 'install 'install-doc
949 (lambda* (#:key outputs #:allow-other-keys)
950 (let ((doc (string-append (assoc-ref outputs "doc")
951 "/share/doc/unison")))
953 ;; Remove an '\n' that prevents the doc to be generated
954 ;; correctly with newer hevea.
955 (substitute* "doc/local.tex"
956 (("----SNIP----.*") "----SNIP----"))
957 ;; This file needs write-permissions, because it's
958 ;; overwritten by 'docs' during documentation generation.
959 (chmod "src/strings.ml" #o600)
960 (invoke "make" "docs"
961 "TEXDIRECTIVES=\\\\draftfalse")
962 (for-each (lambda (f)
963 (install-file f doc))
965 (string-append "doc/unison-manual." ext))
966 ;; Install only html documentation,
967 ;; since the build is currently
968 ;; non-reproducible with the ps, pdf,
970 '(;; "ps" "pdf" "dvi"
973 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
974 (synopsis "File synchronizer")
976 "Unison is a file-synchronization tool. It allows two replicas of
977 a collection of files and directories to be stored on different hosts
978 (or different disks on the same host), modified separately, and then
979 brought up to date by propagating the changes in each replica
981 (license license:gpl3+)))
983 (define-public ocaml-findlib
985 (name "ocaml-findlib")
989 (uri (string-append "http://download.camlcity.org/download/"
990 "findlib" "-" version ".tar.gz"))
993 "00s3sfb02pnjmkax25pcnljcnhcggiliccfz69a72ic7gsjwz1cf"))))
994 (build-system gnu-build-system)
999 `(#:tests? #f ; no test suite
1000 #:parallel-build? #f
1001 #:make-flags (list "all" "opt")
1002 #:phases (modify-phases %standard-phases
1005 (lambda* (#:key inputs outputs #:allow-other-keys)
1006 (let ((out (assoc-ref outputs "out")))
1009 "-bindir" (string-append out "/bin")
1010 "-config" (string-append out "/etc/ocamfind.conf")
1011 "-mandir" (string-append out "/share/man")
1012 "-sitelib" (string-append out "/lib/ocaml/site-lib")
1015 (lambda* (#:key outputs #:allow-other-keys)
1016 (let ((out (assoc-ref outputs "out")))
1017 (invoke "make" "install"
1018 (string-append "OCAML_CORE_STDLIB="
1019 out "/lib/ocaml/site-lib"))))))))
1020 (home-page "http://projects.camlcity.org/projects/findlib.html")
1021 (synopsis "Management tool for OCaml libraries")
1023 "The \"findlib\" library provides a scheme to manage reusable software
1024 components (packages), and includes tools that support this scheme. Packages
1025 are collections of OCaml modules for which metainformation can be stored. The
1026 packages are kept in the file system hierarchy, but with strict directory
1027 structure. The library contains functions to look the directory up that
1028 stores a package, to query metainformation about a package, and to retrieve
1029 dependency information about multiple packages. There is also a tool that
1030 allows the user to enter queries on the command-line. In order to simplify
1031 compilation and linkage, there are new frontends of the various OCaml
1032 compilers that can directly deal with packages.")
1033 (license license:x11)))
1035 (define-public ocaml4.07-findlib
1037 (inherit ocaml-findlib)
1038 (name "ocaml4.07-findlib")
1041 ("ocaml" ,ocaml-4.07)))))
1043 (define-public ocaml4.09-findlib
1045 (inherit ocaml-findlib)
1046 (name "ocaml4.09-findlib")
1049 ("ocaml" ,ocaml-4.09)))))
1051 (define-public ocaml-ounit2
1053 (name "ocaml-ounit2")
1058 (url "https://github.com/gildor478/ounit.git")
1059 (commit (string-append "v" version))))
1060 (file-name (git-file-name name version))
1063 "0gxjw1bhmjcjzri6x6psqrkbbyq678b69bqfl9i1zswp7cj2lryg"))))
1064 (build-system dune-build-system)
1066 ;; XXX Should libev be a propagated-input of ocaml-lwt?
1067 `(("libev" ,libev)))
1069 `(("lwt" ,ocaml-lwt)
1070 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
1071 (home-page "https://github.com/gildor478/ounit")
1072 (synopsis "Unit testing framework for OCaml")
1073 (description "OUnit2 is a unit testing framework for OCaml. It is similar
1074 to JUnit and other XUnit testing frameworks.")
1075 (license license:expat)))
1077 ;; note that some tests may hang for no obvious reason.
1078 (define-public ocaml-ounit
1080 (name "ocaml-ounit")
1084 (uri (ocaml-forge-uri "ounit" version 1749))
1087 "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
1088 (build-system ocaml-build-system)
1090 `(("libxml2" ,libxml2) ; for xmllint
1091 ("ocamlbuild" ,ocamlbuild)))
1094 (modify-phases %standard-phases
1095 (delete 'check)))) ; tests are run during build
1096 (home-page "http://ounit.forge.ocamlcore.org")
1097 (synopsis "Unit testing framework for OCaml")
1098 (description "Unit testing framework for OCaml. It is similar to JUnit and
1099 other XUnit testing frameworks.")
1100 (license license:expat)))
1102 (define-public camlzip
1108 (uri (ocaml-forge-uri name version 1616))
1111 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
1112 (build-system ocaml-build-system)
1117 (modify-phases %standard-phases
1119 (add-after 'install 'install-camlzip
1120 (lambda* (#:key outputs #:allow-other-keys)
1121 (let* ((out (assoc-ref outputs "out"))
1122 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
1124 (call-with-output-file (string-append dir "/META")
1126 (format port "version=\"1.06\"\n")
1127 (format port "requires=\"unix\"\n")
1128 (format port "archive(byte)=\"zip.cma\"\n")
1129 (format port "archive(native)=\"zip.cmxa\"\n")
1130 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
1131 (format port "directory=\"../zip\"\n")))))))
1132 #:install-target "install-findlib"
1134 (list "all" "allopt"
1135 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
1137 (home-page "https://github.com/xavierleroy/camlzip")
1138 (synopsis "Provides easy access to compressed files")
1139 (description "Provides easy access to compressed files in ZIP, GZIP and
1140 JAR format. It provides functions for reading from and writing to compressed
1141 files in these formats.")
1142 (license license:lgpl2.1+)))
1144 (define-public ocamlmod
1150 (uri (ocaml-forge-uri name version 1702))
1153 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
1154 (build-system ocaml-build-system)
1156 `(("ounit" ,ocaml-ounit)
1157 ("ocamlbuild" ,ocamlbuild)))
1160 (modify-phases %standard-phases
1161 ;; Tests are done during build.
1163 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1164 (synopsis "Generate modules from OCaml source files")
1165 (description "Generate modules from OCaml source files.")
1166 (license license:lgpl2.1+))) ; with an exception
1168 (define-public ocaml-zarith
1170 (name "ocaml-zarith")
1175 (url "https://github.com/ocaml/Zarith")
1176 (commit (string-append "release-" version))))
1177 (file-name (git-file-name name version))
1180 "0hv5ywz1q2cgn8apfz490clwk5hcynr937g2v8i13x2ax4bnv0lz"))))
1181 (build-system ocaml-build-system)
1187 `(#:tests? #f ; no test target
1189 (modify-phases %standard-phases
1191 (lambda _ (invoke "./configure"))))))
1192 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1193 (synopsis "Implements arbitrary-precision integers")
1194 (description "Implements arithmetic and logical operations over
1195 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1196 over big integers. Small integers are represented as Caml unboxed integers,
1197 for speed and space economy.")
1198 (license license:lgpl2.1+))) ; with an exception
1200 (define-public ocaml-frontc
1202 (name "ocaml-frontc")
1207 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1208 (commit (string-append
1209 "V_" (string-join (string-split version #\.) "_")))))
1210 (file-name (git-file-name name version))
1213 "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
1214 (build-system ocaml-build-system)
1217 (modify-phases %standard-phases
1219 (add-after 'install 'install-meta
1220 (lambda* (#:key outputs #:allow-other-keys)
1221 (let ((out (assoc-ref outputs "out")))
1222 (with-output-to-file
1223 (string-append out "/lib/ocaml/frontc/META")
1227 "description = \"Parser for the C language\"
1228 version = \"" ,version "\"
1230 archive(byte) = \"frontc.cma\"
1231 archive(native) = \"frontc.cmxa\""))))
1232 (symlink (string-append out "/lib/ocaml/frontc")
1233 (string-append out "/lib/ocaml/FrontC"))))))
1234 #:make-flags (list (string-append "PREFIX="
1235 (assoc-ref %outputs "out"))
1236 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1237 (properties `((upstream-name . "FrontC")))
1238 (home-page "https://www.irit.fr/FrontC")
1239 (synopsis "C parser and lexer library")
1240 (description "FrontC is an OCAML library providing a C parser and lexer.
1241 The result is a syntactic tree easy to process with usual OCAML tree management.
1242 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1243 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1244 (license license:lgpl2.1)))
1246 (define-public ocaml-qcheck
1248 (name "ocaml-qcheck")
1254 (url "https://github.com/c-cube/qcheck")
1256 (file-name (git-file-name name version))
1258 (base32 "1llnfynhlndwyjig7wrayjnds2b3mggp5lw20dwxhn2i2lkkb22m"))))
1259 (build-system dune-build-system)
1263 (modify-phases %standard-phases
1264 (add-before 'build 'fix-deprecated
1266 (substitute* "src/core/QCheck.ml"
1267 (("Pervasives.compare") "compare"))
1270 `(("ocaml-alcotest" ,ocaml-alcotest)
1271 ("ocaml-ounit" ,ocaml-ounit)))
1273 `(("ocamlbuild" ,ocamlbuild)))
1274 (home-page "https://github.com/c-cube/qcheck")
1275 (synopsis "QuickCheck inspired property-based testing for OCaml")
1276 (description "QuickCheck inspired property-based testing for OCaml. This
1277 module checks invariants (properties of some types) over randomly
1278 generated instances of the type. It provides combinators for generating
1279 instances and printing them.")
1280 (license license:lgpl3+)))
1282 (define-public ocaml-qtest
1284 (name "ocaml-qtest")
1289 (url "https://github.com/vincent-hugot/qtest/")
1290 (commit (string-append "v" version))))
1291 (file-name (git-file-name name version))
1294 "0gddzan4vzs0vklsxhirdjrvx3rp7hhh2yr20vi13nq8rwkn9w29"))))
1295 (build-system dune-build-system)
1297 `(#:test-target "tests"))
1299 `(("ounit" ,ocaml-ounit)
1300 ("qcheck" ,ocaml-qcheck)))
1301 (home-page "https://github.com/vincent-hugot/qtest")
1302 (synopsis "Inline (Unit) Tests for OCaml")
1303 (description "Qtest extracts inline unit tests written using a special
1304 syntax in comments. Those tests are then run using the oUnit framework and the
1305 qcheck library. The possibilities range from trivial tests -- extremely simple
1306 to use -- to sophisticated random generation of test cases.")
1307 (license license:lgpl3+)))
1309 (define-public ocaml-stringext
1311 (name "ocaml-stringext")
1316 (url "https://github.com/rgrinberg/stringext")
1318 (file-name (git-file-name name version))
1321 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
1322 (build-system dune-build-system)
1324 `(#:test-target "."))
1326 `(("ocamlbuild" ,ocamlbuild)
1327 ("qtest" ,ocaml-qtest)))
1328 (home-page "https://github.com/rgrinberg/stringext")
1329 (synopsis "Extra string functions for OCaml")
1330 (description "Provides a single module named Stringext that provides a grab
1331 bag of often used but missing string functions from the stdlib. E.g, split,
1332 full_split, cut, rcut, etc..")
1333 ;; the only mention of a license in this project is in its `opam' file
1334 ;; where it says `mit'.
1335 (license license:expat)))
1337 (define dune-bootstrap
1344 (url "https://github.com/ocaml/dune")
1346 (file-name (git-file-name name version))
1349 "10qgx83fq8b522y9mpllrp0l5cgmr2bs5s7aix5img21hlbm34in"))))
1350 (build-system ocaml-build-system)
1352 `(#:tests? #f; require odoc
1353 #:make-flags (list "release"
1354 (string-append "PREFIX=" (assoc-ref %outputs "out"))
1355 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1356 "/lib/ocaml/site-lib"))
1358 (modify-phases %standard-phases
1360 (lambda* (#:key outputs #:allow-other-keys)
1361 (mkdir-p "src/dune")
1362 (invoke "./configure")
1364 (home-page "https://github.com/ocaml/dune")
1365 (synopsis "OCaml build system")
1366 (description "Dune is a build system that was designed to simplify the
1367 release of Jane Street packages. It reads metadata from @file{dune} files
1368 following a very simple s-expression syntax.")
1369 (license license:expat)))
1371 (define ocaml4.09-dune-bootstrap
1372 (package-with-ocaml4.09 dune-bootstrap))
1374 (define-public dune-configurator
1376 (inherit dune-bootstrap)
1377 (name "dune-configurator")
1378 (build-system dune-build-system)
1380 `(#:package "dune-configurator"
1381 #:dune ,dune-bootstrap
1382 ; require ppx_expect
1385 `(("ocaml-csexp" ,ocaml-csexp)))
1386 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
1387 (synopsis "Dune helper library for gathering system configuration")
1388 (description "Dune-configurator is a small library that helps writing
1389 OCaml scripts that test features available on the system, in order to generate
1390 config.h files for instance. Among other things, dune-configurator allows one to:
1393 @item test if a C program compiles
1394 @item query pkg-config
1395 @item import #define from OCaml header files
1396 @item generate config.h file
1399 (define-public ocaml4.09-dune-configurator
1401 (inherit dune-configurator)
1402 (name "ocaml4.09-dune-configurator")
1404 `(#:package "dune-configurator"
1406 #:dune ,ocaml4.09-dune-bootstrap
1408 #:findlib ,ocaml4.09-findlib))
1410 `(("ocaml-csexp" ,ocaml4.09-csexp)))))
1414 (inherit dune-bootstrap)
1416 `(("dune-configurator" ,dune-configurator)))
1417 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
1418 (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
1420 (define-public ocaml4.09-dune
1422 (inherit ocaml4.09-dune-bootstrap)
1424 `(("dune-configurator" ,dune-configurator)))))
1426 (define-public ocaml4.07-dune
1428 (inherit (package-with-ocaml4.07 dune-bootstrap))
1433 (url "https://github.com/ocaml/dune")
1435 (file-name (git-file-name "dune" version))
1438 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
1440 (define-public ocaml-csexp
1442 (name "ocaml-csexp")
1447 (url "https://github.com/ocaml-dune/csexp")
1449 (file-name (git-file-name name version))
1452 "190zppgvdjgghmrnx67ayzzk86qdjy3yn5fcrcw08wsh93384pl0"))))
1453 (build-system dune-build-system)
1455 `(#:tests? #f; FIXME: needs ppx_expect, but which version?
1456 #:dune ,dune-bootstrap
1458 (modify-phases %standard-phases
1459 (add-before 'build 'chmod
1461 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
1464 `(("ocaml-result" ,ocaml-result)))
1465 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
1466 (home-page "https://github.com/ocaml-dune/csexp")
1467 (synopsis "Parsing and printing of S-expressions in Canonical form")
1468 (description "This library provides minimal support for Canonical
1469 S-expressions. Canonical S-expressions are a binary encoding of
1470 S-expressions that is super simple and well suited for communication
1473 This library only provides a few helpers for simple applications. If
1474 you need more advanced support, such as parsing from more fancy input
1475 sources, you should consider copying the code of this library given
1476 how simple parsing S-expressions in canonical form is.
1478 To avoid a dependency on a particular S-expression library, the only
1479 module of this library is parameterised by the type of S-expressions.")
1480 (license license:expat)))
1482 (define-public ocaml4.09-csexp
1484 (inherit ocaml-csexp)
1485 (name "ocaml4.09-csexp")
1487 `(#:ocaml ,ocaml-4.09
1488 #:findlib ,ocaml4.09-findlib
1489 ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
1490 ((#:dune _) ocaml4.09-dune-bootstrap))))
1492 `(("ocaml-result" ,ocaml4.09-result)))))
1494 (define-public ocaml-migrate-parsetree
1496 (name "ocaml-migrate-parsetree")
1498 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1503 (url (string-append home-page ".git"))
1504 (commit (string-append "v" version))))
1505 (file-name (git-file-name name version))
1508 "0336vz0galjnsazbmkxjwdv1qvdqsx2rgrvp778xgq2fzasz45cx"))))
1509 (build-system dune-build-system)
1513 `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
1514 ("ocamlbuild" ,ocamlbuild)
1515 ("ocaml-result" ,ocaml-result)))
1516 (properties `((upstream-name . "ocaml-migrate-parsetree")))
1517 (synopsis "OCaml parsetree converter")
1518 (description "This library converts between parsetrees of different OCaml
1519 versions. For each version, there is a snapshot of the parsetree and conversion
1520 functions to the next and/or previous version.")
1521 (license license:lgpl2.1+)))
1523 (define-public ocaml-ppx-tools-versioned
1525 (name "ocaml-ppx-tools-versioned")
1530 (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
1532 (file-name (git-file-name name version))
1535 "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
1536 (build-system dune-build-system)
1539 #:package "ppx_tools_versioned"))
1541 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
1542 (properties `((upstream-name . "ppx_tools_versioned")))
1543 (home-page "https://github.com/let-def/ppx_tools_versioned")
1544 (synopsis "Variant of ppx_tools")
1545 (description "This package is a variant of ppx_tools based on
1546 ocaml-migrate-parsetree")
1547 (license license:expat)))
1549 (define-public ocaml-bitstring
1551 (name "ocaml-bitstring")
1555 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1556 "get/v" version ".tar.gz"))
1557 (file-name (string-append name "-" version ".tar.gz"))
1560 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
1561 (build-system dune-build-system)
1564 ("autoconf" ,autoconf)
1565 ("automake" ,automake)))
1567 `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
1569 `(#:package "bitstring"
1570 #:tests? #f; Tests fail to build
1572 (modify-phases %standard-phases
1573 (add-before 'build 'upgrade
1575 (invoke "dune" "upgrade")
1577 (home-page "https://github.com/xguerin/bitstring")
1578 (synopsis "Bitstrings and bitstring matching for OCaml")
1579 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1580 a syntax extension and library for OCaml. You can use this module to both parse
1581 and generate binary formats, files and protocols. Bitstring handling is added
1582 as primitives to the language, making it exceptionally simple to use and very
1584 (license license:isc)))
1586 (define-public ocaml-result
1588 (name "ocaml-result")
1593 (url "https://github.com/janestreet/result")
1595 (file-name (git-file-name name version))
1598 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
1599 (build-system dune-build-system)
1602 #:dune ,dune-bootstrap))
1603 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
1604 (home-page "https://github.com/janestreet/result")
1605 (synopsis "Compatibility Result module")
1606 (description "Uses the new result type defined in OCaml >= 4.03 while
1607 staying compatible with older version of OCaml should use the Result module
1608 defined in this library.")
1609 (license license:bsd-3)))
1611 (define-public ocaml4.09-result
1613 (inherit ocaml-result)
1614 (name "ocaml4.09-result")
1617 #:dune ,ocaml4.09-dune-bootstrap
1619 #:findlib ,ocaml4.09-findlib))))
1621 (define-public ocaml-topkg
1623 (name "ocaml-topkg")
1627 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1628 "topkg-" version ".tbz"))
1631 "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"))))
1632 (build-system ocaml-build-system)
1635 ("ocamlbuild" ,ocamlbuild)))
1637 `(("result" ,ocaml-result)))
1640 #:build-flags '("build")
1642 (modify-phases %standard-phases
1643 (delete 'configure))))
1644 (home-page "http://erratique.ch/software/topkg")
1645 (synopsis "Transitory OCaml software packager")
1646 (description "Topkg is a packager for distributing OCaml software. It
1647 provides an API to describe the files a package installs in a given build
1648 configuration and to specify information about the package's distribution,
1649 creation and publication procedures.")
1650 (license license:isc)))
1652 (define-public ocaml-rresult
1654 (name "ocaml-rresult")
1658 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1659 "rresult-" version ".tbz"))
1662 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1663 (build-system ocaml-build-system)
1666 ("ocamlbuild" ,ocamlbuild)))
1668 `(("topkg" ,ocaml-topkg)))
1671 #:build-flags '("build")
1673 (modify-phases %standard-phases
1674 (delete 'configure))))
1675 (home-page "http://erratique.ch/software/rresult")
1676 (synopsis "Result value combinators for OCaml")
1677 (description "Handle computation results and errors in an explicit and
1678 declarative manner, without resorting to exceptions. It defines combinators
1679 to operate on the result type available from OCaml 4.03 in the standard
1681 (license license:isc)))
1683 (define-public ocaml4.07-sqlite3
1685 (name "ocaml4.07-sqlite3")
1691 (url "https://github.com/mmottl/sqlite3-ocaml")
1693 (file-name (git-file-name name version))
1696 "1536agm5fgcqysszhpd3kmw7lkc5n5ni7gmlyglrbvmnmrwf3av2"))))
1697 (build-system dune-build-system)
1699 `(#:ocaml ,ocaml-4.07
1700 #:findlib ,ocaml4.07-findlib
1701 #:dune ,ocaml4.07-dune))
1703 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
1704 ("ocaml-stdio" ,ocaml4.07-stdio)
1705 ("pkg-config" ,pkg-config)))
1707 `(("sqlite" ,sqlite)))
1708 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1709 (synopsis "SQLite3 Bindings for OCaml")
1711 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1712 API. Sqlite3 is a self-contained, serverless, zero-configuration,
1713 transactional SQL database engine with outstanding performance for many use
1714 cases. These bindings are written in a way that enables a friendly
1715 coexistence with the old (version 2) SQLite and its OCaml wrapper
1716 @code{ocaml-sqlite}.")
1717 (license license:expat)))
1719 (define-public ocaml-csv
1727 (url "https://github.com/Chris00/ocaml-csv")
1729 (file-name (git-file-name name version))
1732 "19k48517s8y1zb91a1312a0n94cbh5i5dixndcrqjmf87kkz61zx"))))
1733 (build-system dune-build-system)
1737 (home-page "https://github.com/Chris00/ocaml-csv")
1738 (synopsis "Pure OCaml functions to read and write CSV")
1740 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1741 by all major spreadsheets. This library implements pure OCaml functions to
1742 read and write files in this format as well as some convenience functions to
1743 manipulate such data.")
1744 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
1745 ;; against the library to be released under any terms.
1746 (license license:lgpl2.1)))
1748 (define-public ocaml-mtime
1750 (name "ocaml-mtime")
1754 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1755 "mtime-" version ".tbz"))
1758 "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3"))))
1759 (build-system ocaml-build-system)
1761 `(("ocamlbuild" ,ocamlbuild)
1764 `(("topkg" ,ocaml-topkg)))
1767 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1769 (modify-phases %standard-phases
1770 (delete 'configure))))
1771 (home-page "http://erratique.ch/software/mtime")
1772 (synopsis "Monotonic wall-clock time for OCaml")
1773 (description "Access monotonic wall-clock time. It measures time
1774 spans without being subject to operating system calendar time adjustments.")
1775 (license license:isc)))
1777 (define-public ocaml-cmdliner
1779 (name "ocaml-cmdliner")
1783 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1784 "cmdliner-" version ".tbz"))
1787 "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"))))
1788 (build-system ocaml-build-system)
1790 `(("ocaml-result" ,ocaml-result)))
1792 `(("ocamlbuild" ,ocamlbuild)))
1795 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
1796 "/lib/ocaml/site-lib/cmdliner"))
1798 (modify-phases %standard-phases
1800 (add-before 'build 'fix-source-file-order
1802 (substitute* "build.ml"
1803 (("Sys.readdir dir")
1804 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
1806 (home-page "https://erratique.ch/software/cmdliner")
1807 (synopsis "Declarative definition of command line interfaces for OCaml")
1808 (description "Cmdliner is a module for the declarative definition of command
1809 line interfaces. It provides a simple and compositional mechanism to convert
1810 command line arguments to OCaml values and pass them to your functions. The
1811 module automatically handles syntax errors, help messages and UNIX man page
1812 generation. It supports programs with single or multiple commands and respects
1813 most of the POSIX and GNU conventions.")
1814 (license license:bsd-3)))
1816 (define-public ocaml-fmt
1823 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1826 "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
1827 (build-system ocaml-build-system)
1829 `(("ocamlbuild" ,ocamlbuild)
1831 ("topkg" ,ocaml-topkg)))
1833 `(("cmdliner" ,ocaml-cmdliner)
1834 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
1835 ("ocaml-uchar" ,ocaml-uchar)))
1836 (arguments `(#:tests? #f
1837 #:build-flags (list "build" "--with-base-unix" "true"
1838 "--with-cmdliner" "true")
1840 (modify-phases %standard-phases
1841 (delete 'configure))))
1842 (home-page "http://erratique.ch/software/fmt")
1843 (synopsis "OCaml Format pretty-printer combinators")
1844 (description "Fmt exposes combinators to devise Format pretty-printing
1846 (license license:isc)))
1848 (define-public ocaml-astring
1850 (name "ocaml-astring")
1855 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1858 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1859 (build-system ocaml-build-system)
1861 `(("ocamlbuild" ,ocamlbuild)
1863 ("topkg" ,ocaml-topkg)))
1866 #:build-flags (list "build")
1868 (modify-phases %standard-phases
1869 (delete 'configure))))
1870 (home-page "https://erratique.ch/software/astring")
1871 (synopsis "Alternative String module for OCaml")
1872 (description "Astring exposes an alternative String module for OCaml. This
1873 module balances minimality and expressiveness for basic, index-free, string
1874 processing and provides types and functions for substrings, string sets and
1875 string maps. The String module exposed by Astring has exception safe functions,
1876 removes deprecated and rarely used functions, alters some signatures and names,
1877 adds a few missing functions and fully exploits OCaml's newfound string
1879 (license license:isc)))
1881 (define-public ocaml-alcotest
1883 (name "ocaml-alcotest")
1887 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1888 "download/" version "/alcotest-" version ".tbz"))
1891 "1a43ilhwnj58pq3bi78ni46l9wh6klmmgfc93i94mvyx48bzzayx"))))
1892 (build-system dune-build-system)
1894 `(#:package "alcotest"
1897 `(("ocamlbuild" ,ocamlbuild)))
1899 `(("ocaml-astring" ,ocaml-astring)
1900 ("ocaml-cmdliner" ,ocaml-cmdliner)
1901 ("ocaml-fmt" ,ocaml-fmt)
1902 ("ocaml-re" ,ocaml-re)
1903 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
1904 ("ocaml-uuidm" ,ocaml-uuidm)
1905 ("ocaml-uutf" ,ocaml-uutf)))
1906 (home-page "https://github.com/mirage/alcotest")
1907 (synopsis "Lightweight OCaml test framework")
1908 (description "Alcotest exposes simple interface to perform unit tests. It
1909 exposes a simple TESTABLE module type, a check function to assert test
1910 predicates and a run function to perform a list of unit -> unit test callbacks.
1911 Alcotest provides a quiet and colorful output where only faulty runs are fully
1912 displayed at the end of the run (with the full logs ready to inspect), with a
1913 simple (yet expressive) query language to select the tests to run.")
1914 (license license:isc)))
1916 (define-public ocaml4.07-ppx-tools
1918 (name "ocaml4.07-ppx-tools")
1919 (version "5.1+4.06.0")
1924 (url "https://github.com/alainfrisch/ppx_tools")
1926 (file-name (git-file-name name version))
1928 "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"))))
1929 (build-system ocaml-build-system)
1931 `(#:phases (modify-phases %standard-phases (delete 'configure))
1934 #:findlib ,ocaml4.07-findlib))
1935 (properties `((upstream-name . "ppx_tools")))
1936 (home-page "https://github.com/alainfrisch/ppx_tools")
1937 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1938 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1939 (license license:expat)))
1941 (define-public ocaml-react
1943 (name "ocaml-react")
1948 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1951 "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"))))
1952 (build-system ocaml-build-system)
1954 `(("ocamlbuild" ,ocamlbuild)
1956 ("ocaml-topkg" ,ocaml-topkg)))
1959 #:build-flags (list "build")
1961 (modify-phases %standard-phases
1962 (delete 'configure))))
1963 (home-page "http://erratique.ch/software/react")
1964 (synopsis "Declarative events and signals for OCaml")
1965 (description "React is an OCaml module for functional reactive programming
1966 (FRP). It provides support to program with time varying values: declarative
1967 events and signals. React doesn't define any primitive event or signal, it
1968 lets the client choose the concrete timeline.")
1969 (license license:bsd-3)))
1971 (define-public ocaml-ssl
1979 (url "https://github.com/savonet/ocaml-ssl")
1981 (file-name (git-file-name name version))
1983 "04h02rvzrwp886n5hsx84rnc9b150iggy38g5v1x1rwz3pkdnmf0"))))
1984 (build-system dune-build-system)
1986 `(#:test-target "."))
1988 `(("autoconf" ,autoconf)
1989 ("automake" ,automake)
1991 (propagated-inputs `(("openssl" ,openssl)))
1992 (home-page "https://github.com/savonet/ocaml-ssl/")
1993 (synopsis "OCaml bindings for OpenSSL")
1995 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
1996 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
1997 (license license:lgpl2.1)))
1999 (define-public ocaml-mmap
2006 (url "https://github.com/mirage/mmap")
2007 (commit (string-append "v" version))))
2008 (file-name (git-file-name name version))
2011 "1jaismy5d1bhbbanysmr2k79px0yv6ya265dri3949nha1l23i60"))))
2012 (build-system dune-build-system)
2013 (home-page "https://github.com/mirage/mmap")
2014 (synopsis "File mapping for OCaml")
2015 (description "This project provides a @command{Mmap.map_file} function
2016 for mapping files in memory. This function is the same as the
2017 @command{Unix.map_file} function added in OCaml >= 4.06.")
2018 (license (list license:qpl license:lgpl2.0))))
2020 (define-public ocaml-lwt
2028 (url "https://github.com/ocsigen/lwt")
2030 (file-name (git-file-name name version))
2032 "1nl7rdnwfdhwcsm5zpay1nr9y5cbapd9x1qzily7zk9ab4v52m8g"))))
2033 (build-system dune-build-system)
2037 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
2038 ("ocaml-cppo" ,ocaml-cppo)
2039 ("pkg-config" ,pkg-config)))
2044 `(("ocaml-mmap" ,ocaml-mmap)
2045 ("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
2046 ("ocaml-result" ,ocaml-result)
2047 ("ocaml-seq" ,ocaml-seq)))
2048 (home-page "https://github.com/ocsigen/lwt")
2049 (synopsis "Cooperative threads and I/O in monadic style")
2050 (description "Lwt provides typed, composable cooperative threads. These
2051 make it easy to run normally-blocking I/O operations concurrently in a single
2052 process. Also, in many cases, Lwt threads can interact without the need for
2053 locks or other synchronization primitives.")
2054 (license license:lgpl2.1)))
2056 (define-public ocaml-lwt-react
2059 (name "ocaml-lwt-react")
2064 (url "https://github.com/ocsigen/lwt")
2065 ;; Version from opam
2067 (file-name (git-file-name name version))
2070 "0f7036srqz7zmnz0n164734smgkrqz78r1i35cg30x31kkr3pnn4"))))
2072 `(#:package "lwt_react"))
2073 (properties `((upstream-name . "lwt_react")))
2075 `(("ocaml-lwt" ,ocaml-lwt)
2076 ("ocaml-react" ,ocaml-react)))))
2078 (define-public ocaml-lwt-log
2080 (name "ocaml-lwt-log")
2085 (url "https://github.com/aantron/lwt_log")
2087 (file-name (git-file-name name version))
2090 "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
2091 (build-system dune-build-system)
2093 `(#:tests? #f)); require lwt_ppx
2095 `(("lwt" ,ocaml-lwt)))
2096 (properties `((upstream-name . "lwt_log")))
2097 (home-page "https://github.com/aantron/lwt_log")
2098 (synopsis "Logging library")
2099 (description "This package provides a deprecated logging component for
2101 (license license:lgpl2.1)))
2103 (define-public ocaml-logs
2109 (uri (string-append "http://erratique.ch/software/logs/releases/"
2110 "logs-" version ".tbz"))
2113 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
2114 (build-system ocaml-build-system)
2117 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2119 (modify-phases %standard-phases
2120 (delete 'configure))))
2122 `(("ocamlbuild" ,ocamlbuild)
2125 `(("fmt" ,ocaml-fmt)
2127 ("mtime" ,ocaml-mtime)
2128 ("result" ,ocaml-result)
2129 ("cmdliner" ,ocaml-cmdliner)
2130 ("topkg" ,ocaml-topkg)))
2131 (home-page "http://erratique.ch/software/logs")
2132 (synopsis "Logging infrastructure for OCaml")
2133 (description "Logs provides a logging infrastructure for OCaml. Logging is
2134 performed on sources whose reporting level can be set independently. Log
2135 message report is decoupled from logging and is handled by a reporter.")
2136 (license license:isc)))
2138 (define-public ocaml-fpath
2140 (name "ocaml-fpath")
2144 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2145 "fpath-" version ".tbz"))
2148 "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
2149 (build-system ocaml-build-system)
2152 #:build-flags (list "build")
2154 (modify-phases %standard-phases
2155 (delete 'configure))))
2157 `(("ocamlbuild" ,ocamlbuild)
2160 `(("topkg" ,ocaml-topkg)
2161 ("astring" ,ocaml-astring)))
2162 (home-page "http://erratique.ch/software/fpath")
2163 (synopsis "File system paths for OCaml")
2164 (description "Fpath is an OCaml module for handling file system paths with
2165 POSIX or Windows conventions. Fpath processes paths without accessing the
2166 file system and is independent from any system library.")
2167 (license license:isc)))
2169 (define-public ocaml-bos
2175 (uri (string-append "http://erratique.ch/software/bos/releases/"
2176 "bos-" version ".tbz"))
2179 "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"))))
2180 (build-system ocaml-build-system)
2183 #:build-flags (list "build")
2185 (modify-phases %standard-phases
2186 (delete 'configure))))
2188 `(("ocamlbuild" ,ocamlbuild)
2191 `(("topkg" ,ocaml-topkg)
2192 ("astring" ,ocaml-astring)
2194 ("fpath" ,ocaml-fpath)
2195 ("logs" ,ocaml-logs)
2196 ("rresult" ,ocaml-rresult)))
2197 (home-page "https://erratique.ch/software/bos")
2198 (synopsis "Basic OS interaction for OCaml")
2199 (description "Bos provides support for basic and robust interaction with
2200 the operating system in OCaml. It has functions to access the process
2201 environment, parse command line arguments, interact with the file system and
2202 run command line programs.")
2203 (license license:isc)))
2205 (define-public ocaml-xmlm
2211 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2212 "xmlm-" version ".tbz"))
2215 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
2216 (build-system ocaml-build-system)
2219 #:build-flags (list "build")
2221 (modify-phases %standard-phases
2222 (delete 'configure))))
2224 `(("ocamlbuild" ,ocamlbuild)
2225 ("ocaml-topkg" ,ocaml-topkg)
2227 (home-page "http://erratique.ch/software/xmlm")
2228 (synopsis "Streaming XML codec for OCaml")
2229 (description "Xmlm is a streaming codec to decode and encode the XML data
2230 format. It can process XML documents without a complete in-memory
2231 representation of the data.")
2232 (license license:isc)))
2234 (define-public ocaml4.07-gen
2236 (name "ocaml4.07-gen")
2241 (url "https://github.com/c-cube/gen")
2243 (file-name (git-file-name name version))
2246 "1h9g508rnj2j8va5nvhamzscp954vrkh0hdf4pn3d10pcfyslfg2"))))
2247 (build-system dune-build-system)
2249 `(#:tests? #f; no tests
2252 #:findlib ,ocaml4.07-findlib
2253 #:dune ,ocaml4.07-dune))
2255 `(("ocaml-odoc" ,(package-with-ocaml4.07 ocaml4.07-odoc))))
2257 `(("ocaml-qtest" ,(package-with-ocaml4.07 ocaml-qtest))
2258 ("ocaml-qcheck" ,(package-with-ocaml4.07 ocaml-qcheck))))
2259 (home-page "https://github.com/c-cube/gen/")
2260 (synopsis "Iterators for OCaml, both restartable and consumable")
2261 (description "Gen implements iterators of OCaml, that are both restartable
2263 (license license:bsd-2)))
2265 (define-public ocaml4.07-sedlex
2267 (name "ocaml4.07-sedlex")
2272 (url "https://github.com/ocaml-community/sedlex")
2273 (commit (string-append "v" version))))
2274 (file-name (git-file-name name version))
2277 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
2278 (build-system dune-build-system)
2280 `(#:tests? #f; no tests
2283 (modify-phases %standard-phases
2284 (add-before 'build 'copy-resources
2285 (lambda* (#:key inputs #:allow-other-keys)
2286 (with-directory-excursion "src/generator/data"
2289 (copy-file (assoc-ref inputs file) file))
2290 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
2293 (add-before 'build 'chmod
2295 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2298 #:findlib ,ocaml4.07-findlib
2299 #:dune ,ocaml4.07-dune))
2301 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
2303 `(("ocaml-gen" ,ocaml4.07-gen)
2304 ("ocaml-ppx-tools-versioned"
2305 ,(package-with-ocaml4.07 ocaml-ppx-tools-versioned))
2306 ("ocaml-uchar" ,(package-with-ocaml4.07 ocaml-uchar))))
2307 ;; These three files are needed by src/generator/data/dune, but would be
2308 ;; downloaded using curl at build time.
2310 `(("DerivedCoreProperties.txt"
2313 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
2316 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
2317 ("DerivedGeneralCategory.txt"
2320 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
2323 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
2327 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2330 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
2331 (home-page "https://www.cduce.org/download.html#side")
2332 (synopsis "Lexer generator for Unicode and OCaml")
2333 (description "Lexer generator for Unicode and OCaml.")
2334 (license license:expat)))
2336 (define-public ocaml-uchar
2338 (name "ocaml-uchar")
2343 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2344 version "/uchar-" version ".tbz"))
2346 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
2347 (build-system ocaml-build-system)
2350 #:build-flags (list "native=true" "native-dynlink=true")
2352 (modify-phases %standard-phases
2353 (delete 'configure))))
2355 `(("ocamlbuild" ,ocamlbuild)
2357 (home-page "https://github.com/ocaml/uchar")
2358 (synopsis "Compatibility library for OCaml's Uchar module")
2359 (description "The uchar package provides a compatibility library for the
2360 `Uchar` module introduced in OCaml 4.03.")
2361 (license license:lgpl2.1)))
2363 (define-public ocaml-uutf
2369 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2370 "uutf-" version ".tbz"))
2373 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
2374 (build-system ocaml-build-system)
2377 #:build-flags (list "build")
2379 (modify-phases %standard-phases
2380 (delete 'configure))))
2382 `(("ocamlbuild" ,ocamlbuild)
2384 ("topkg" ,ocaml-topkg)))
2386 `(("uchar" ,ocaml-uchar)
2387 ("cmdliner" ,ocaml-cmdliner)))
2388 (home-page "http://erratique.ch/software/uutf")
2389 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2390 (description "Uutf is a non-blocking streaming codec to decode and encode
2391 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2392 work character by character without blocking on IO. Decoders perform character
2393 position tracking and support newline normalization.
2395 Functions are also provided to fold over the characters of UTF encoded OCaml
2396 string values and to directly encode characters in OCaml Buffer.t values.")
2397 (license license:isc)))
2399 (define-public ocaml-jsonm
2401 (name "ocaml-jsonm")
2405 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2406 "jsonm-" version ".tbz"))
2409 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
2410 (build-system ocaml-build-system)
2413 #:build-flags (list "build")
2415 (modify-phases %standard-phases
2416 (delete 'configure))))
2418 `(("ocamlbuild" ,ocamlbuild)
2420 ("topkg" ,ocaml-topkg)))
2422 `(("uutf" ,ocaml-uutf)
2423 ("cmdliner" ,ocaml-cmdliner)))
2424 (home-page "http://erratique.ch/software/jsonm")
2425 (synopsis "Non-blocking streaming JSON codec for OCaml")
2426 (description "Jsonm is a non-blocking streaming codec to decode and encode
2427 the JSON data format. It can process JSON text without blocking on IO and
2428 without a complete in-memory representation of the data.")
2429 (license license:isc)))
2431 (define-public ocaml-ocp-indent
2433 (name "ocaml-ocp-indent")
2439 (url "https://github.com/OCamlPro/ocp-indent")
2441 (file-name (git-file-name name version))
2444 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
2445 (build-system dune-build-system)
2447 `(#:test-target "tests"
2448 #:build-flags (list "--profile=release")))
2450 `(("ocaml-cmdliner" ,ocaml-cmdliner)))
2451 (home-page "https://www.typerex.org/ocp-indent.html")
2452 (synopsis "Tool to indent OCaml programs")
2454 "Ocp-indent is based on an approximate, tolerant OCaml parser
2455 and a simple stack machine. Presets and configuration options are available,
2456 with the possibility to set them project-wide. It supports the most common
2457 syntax extensions, and it is extensible for others.
2459 This package includes:
2462 @item An indentor program, callable from the command-line or from within editors,
2463 @item Bindings for popular editors,
2464 @item A library that can be directly used by editor writers, or just for
2465 fault-tolerant and approximate parsing.
2467 (license license:lgpl2.1)))
2469 (define-public ocaml-ocp-index
2471 (name "ocaml-ocp-index")
2477 (url "https://github.com/OCamlPro/ocp-index")
2479 (file-name (git-file-name name version))
2482 "08r7mxdnxmhff37fw4hmrpjgckgi5kaiiiirwp4rmdl594z0h9c8"))))
2483 (build-system dune-build-system)
2485 `(#:package "ocp-index"))
2487 `(("ocaml-ocp-indent" ,ocaml-ocp-indent)
2488 ("ocaml-re" ,ocaml-re)
2489 ("ocaml-cmdliner" ,ocaml-cmdliner)))
2491 `(("ocaml-cppo" ,ocaml-cppo)))
2492 (home-page "https://www.typerex.org/ocp-index.html")
2493 (synopsis "Lightweight completion and documentation browsing for OCaml libraries")
2494 (description "This package includes only the @code{ocp-index} library
2495 and command-line tool.")
2496 ;; All files in libs/ are GNU lgpl2.1
2497 ;; For static linking, clause 6 of LGPL is lifted
2498 ;; All other files under GNU gpl3
2499 (license (list license:gpl3+
2500 license:lgpl2.1+))))
2502 (define-public ocaml-ocurl
2504 (name "ocaml-ocurl")
2508 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2512 "0n621cxb9012pj280c7821qqsdhypj8qy9qgrah79dkh6a8h2py6"))))
2513 (build-system ocaml-build-system)
2516 (modify-phases %standard-phases
2517 (add-before 'configure 'fix-/bin/sh
2518 (lambda* (#:key inputs #:allow-other-keys)
2519 (substitute* "configure"
2520 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2522 `(("pkg-config" ,pkg-config)))
2523 (inputs `(("curl" ,curl)))
2524 (home-page "http://ocurl.forge.ocamlcore.org/")
2525 (synopsis "OCaml bindings for libcurl")
2526 (description "Client-side URL transfer library, supporting HTTP and a
2527 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2528 (license license:isc)))
2530 (define-public ocaml-base64
2532 (name "ocaml-base64")
2537 (url "https://github.com/mirage/ocaml-base64")
2538 (commit (string-append "v" version))))
2539 (file-name (git-file-name name version))
2542 "0aa1m1sr8p1hgc10p96mij7p22r3qcysvzy6fz2jqamfgswchgqc"))))
2543 (build-system dune-build-system)
2546 (modify-phases %standard-phases
2547 (add-before 'build 'fix-dune
2549 ;; This package expects dune 2, which unbundled its configurator
2550 ;; module. We still use dune 1, so we need to let it know we need
2551 ;; its internal module.
2552 (substitute* "config/dune"
2553 (("dune-configurator") "dune.configurator"))
2556 `(("ocaml-alcotest" ,ocaml-alcotest)
2557 ("ocaml-bos" ,ocaml-bos)
2558 ("ocaml-rresult" ,ocaml-rresult)))
2559 (home-page "https://github.com/mirage/ocaml-base64")
2560 (synopsis "Base64 encoding for OCaml")
2561 (description "Base64 is a group of similar binary-to-text encoding schemes
2562 that represent binary data in an ASCII string format by translating it into a
2563 radix-64 representation. It is specified in RFC 4648.")
2564 (license license:isc)))
2566 (define-public ocamlify
2573 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
2574 version "/ocamlify-" version ".tar.gz"))
2576 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
2577 (build-system ocaml-build-system)
2579 `(#:tests? #f; no tests
2581 (modify-phases %standard-phases
2584 ;; This package uses pre-generated setup.ml by oasis, but is
2585 ;; a dependency of oasis. the pre-generated setup.ml is broken
2586 ;; with recent versions of OCaml, so we perform a bootstrap instead.
2588 (substitute* "src/OCamlifyConfig.ml.ab"
2589 (("$pkg_version") ,version))
2590 (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
2591 (with-directory-excursion "src"
2592 (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
2596 (lambda* (#:key outputs #:allow-other-keys)
2597 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
2599 (install-file "src/ocamlify" bin)
2601 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2602 (synopsis "Include files in OCaml code")
2603 (description "OCamlify creates OCaml source code by including
2604 whole files into OCaml string or string list. The code generated can be
2605 compiled as a standard OCaml file. It allows embedding external resources as
2607 (license license:lgpl2.1+))); with the OCaml static compilation exception
2609 (define-public omake
2615 (uri (string-append "http://download.camlcity.org/download/"
2616 "omake-" version ".tar.gz"))
2619 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
2620 (patches (search-patches "omake-fix-non-determinism.patch"))))
2621 (build-system ocaml-build-system)
2624 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2625 #:tests? #f ; no test target
2627 (modify-phases %standard-phases
2628 (add-before 'configure 'fix-makefile
2629 (lambda* (#:key outputs #:allow-other-keys)
2630 (substitute* "mk/osconfig_unix.mk"
2631 (("CC = cc") "CC = gcc")))))))
2632 (native-inputs `(("hevea" ,hevea)))
2633 (home-page "http://projects.camlcity.org/projects/omake.html")
2634 (synopsis "Build system designed for scalability and portability")
2635 (description "Similar to make utilities you may have used, but it features
2636 many additional enhancements, including:
2639 @item Support for projects spanning several directories or directory hierarchies.
2640 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2641 with full support for incremental builds.
2642 @item Dependency analysis takes the command lines into account — whenever the
2643 command line used to build a target changes, the target is considered
2645 @item Fully scriptable, includes a library that providing support for standard
2646 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2648 (license (list license:lgpl2.1 ; libmojave
2649 license:expat ; OMake scripts
2650 license:gpl2)))) ; OMake itself, with ocaml linking exception
2653 (define-public ocaml-batteries
2655 (name "ocaml-batteries")
2659 (uri (string-append "https://github.com/ocaml-batteries-team/"
2660 "batteries-included/releases/download/v"
2661 version "/batteries-" version ".tar.gz"))
2664 "08ghw87d56h1a6y1nnh3x2wy9xj25jqfk5sp6ma9nsyd37babb0h"))))
2665 (build-system ocaml-build-system)
2667 `(("ocamlbuild" ,ocamlbuild)
2668 ("qtest" ,ocaml-qtest)))
2670 `(("ocaml-num" ,ocaml-num)))
2673 (modify-phases %standard-phases
2674 (delete 'check) ; tests are run by the build phase
2675 (add-before 'build 'fix-nondeterminism
2677 (substitute* "setup.ml"
2678 (("Sys.readdir dirname")
2679 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
2682 (lambda* (#:key inputs outputs #:allow-other-keys)
2685 (substring str 0 (- (string-length str) 1)))
2687 (find-files "src" ".*.mliv")
2688 (find-files "src" ".*.mlv")
2689 (find-files "src" ".*.mlp")))))
2690 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2691 "-lflag" "-dllpath-all" files)
2692 (for-each (lambda (file)
2693 (copy-file (string-append "_build/" file) file))
2695 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2696 "-lflag" "-dllpath-all" "build/mkconf.byte")
2697 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2698 (invoke "make" "all")
2700 (home-page "http://batteries.forge.ocamlcore.org/")
2701 (synopsis "Development platform for the OCaml programming language")
2702 (description "Define a standard set of libraries which may be expected on
2703 every compliant installation of OCaml and organize these libraries into a
2704 hierarchy of modules.")
2705 (license license:lgpl2.1+)))
2707 (define-public ocaml4.07-pcre
2709 (name "ocaml4.07-pcre")
2714 (url "https://github.com/mmottl/pcre-ocaml")
2716 (file-name (git-file-name name version))
2719 "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
2720 (build-system dune-build-system)
2724 #:findlib ,ocaml4.07-findlib
2725 #:dune ,ocaml4.07-dune))
2727 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
2728 ("pcre:bin" ,pcre "bin")))
2729 (propagated-inputs `(("pcre" ,pcre)))
2730 (home-page "https://mmottl.github.io/pcre-ocaml")
2731 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2732 (description "Pcre-ocaml offers library functions for string pattern
2733 matching and substitution, similar to the functionality offered by the Perl
2735 (license license:lgpl2.1+))); with the OCaml link exception
2737 (define-public ocaml4.07-expect
2739 (name "ocaml4.07-expect")
2743 (uri (ocaml-forge-uri name version 1736))
2746 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2750 #:findlib ,ocaml4.07-findlib))
2751 (build-system ocaml-build-system)
2753 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))
2754 ("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
2755 ("ocaml-pcre" ,ocaml4.07-pcre)
2756 ("ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
2758 `(("batteries" ,(package-with-ocaml4.07 ocaml-batteries))))
2759 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2760 (synopsis "Simple implementation of expect")
2761 (description "Help building unitary testing of interactive program. You
2762 can match the question using a regular expression or a timeout.")
2763 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2765 (define-public ocaml-stdlib-shims
2767 (name "ocaml-stdlib-shims")
2772 (url "https://github.com/ocaml/stdlib-shims")
2774 (file-name (git-file-name name version))
2777 "007dwywsr5285z0np6a9nr0h8iqmyzfrlx6s5xaqcwj69zabsrjm"))))
2778 (build-system dune-build-system)
2779 (home-page "https://github.com/ocaml/stdlib-shims")
2780 (synopsis "OCaml stdlib features backport to older OCaml compilers")
2781 (description "This package backports some of the new stdlib features to
2782 older compilers, such as the Stdlib module. This allows projects that require
2783 compatibility with older compiler to use these new features in their code.")
2784 ;; with ocaml-linking exception
2785 (license license:lgpl2.1+)))
2787 (define-public ocaml-fileutils
2789 (name "ocaml-fileutils")
2794 (url "https://github.com/gildor478/ocaml-fileutils")
2795 (commit (string-append "v" version))))
2796 (file-name (git-file-name name version))
2799 "01qf51b8pb7vyfba7y0kb7ajwj1950im25d7f59821zwsibns3d9"))))
2800 (build-system dune-build-system)
2802 `(("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
2804 `(("ocaml-ounit" ,ocaml-ounit)))
2805 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2806 (synopsis "Pure OCaml functions to manipulate real file and filename")
2807 (description "Library to provide pure OCaml functions to manipulate real
2808 file (POSIX like) and filename.")
2809 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2811 (define-public ocaml-oasis
2813 (name "ocaml-oasis")
2817 (uri (ocaml-forge-uri name version 1757))
2820 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
2821 (modules '((guix build utils)))
2824 (substitute* "test/test-main/Test.ml"
2825 ;; most of these tests fail because ld cannot find crti.o, but according
2826 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
2827 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
2828 (("TestBaseCompat.tests;") "")
2829 (("TestExamples.tests;") "")
2830 (("TestFull.tests;") "")
2831 (("TestPluginDevFiles.tests;") "")
2832 (("TestPluginInternal.tests;") "")
2833 (("TestPluginOCamlbuild.tests;") "")
2834 (("TestPluginOMake.tests;") ""))
2836 (build-system ocaml-build-system)
2840 `(("ocamlbuild" ,ocamlbuild)
2841 ("ocamlify" ,ocamlify)
2842 ("ocamlmod" ,ocamlmod)))
2843 (home-page "https://oasis.forge.ocamlcore.org")
2844 (synopsis "Integrates a configure, build, install system in OCaml projects")
2845 (description "OASIS is a tool to integrate a configure, build and install
2846 system in your OCaml projects. It helps to create standard entry points in your
2847 build system and allows external tools to analyse your project easily.")
2848 (license license:lgpl2.1+))) ; with ocaml static compilation exception
2850 (define-public ocaml-cppo
2858 (url "https://github.com/mjambon/cppo")
2859 (commit (string-append "v" version))))
2860 (file-name (git-file-name name version))
2862 "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
2863 (build-system dune-build-system)
2866 #:build-flags (list "--profile" "release")))
2868 `(("ocamlbuild" ,ocamlbuild)))
2869 (home-page "https://github.com/mjambon/cppo")
2870 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2871 (description "Cppo is an equivalent of the C preprocessor for OCaml
2872 programs. It allows the definition of simple macros and file inclusion. Cppo is:
2874 @item more OCaml-friendly than @command{cpp}
2875 @item easy to learn without consulting a manual
2876 @item reasonably fast
2877 @item simple to install and to maintain.
2879 (license license:bsd-3)))
2881 (define-public ocaml-seq
2889 (url "https://github.com/c-cube/seq")
2891 (file-name (git-file-name name version))
2893 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
2894 (build-system ocaml-build-system)
2898 (modify-phases %standard-phases
2902 (lambda* (#:key outputs #:allow-other-keys)
2903 (let ((install-dir (string-append (assoc-ref outputs "out")
2904 "/lib/ocaml/site-lib/seq")))
2905 (mkdir-p install-dir)
2906 (with-output-to-file (string-append install-dir "/META")
2908 (display "name=\"seq\"
2909 version=\"[distributed with ocaml]\"
2910 description=\"dummy package for compatibility\"
2913 (home-page "https://github.com/c-cube/seq")
2914 (synopsis "OCaml's standard iterator type")
2915 (description "This package is a compatibility package for OCaml's
2916 standard iterator type starting from 4.07.")
2917 (license license:lgpl2.1+)))
2919 (define-public ocaml-re
2927 (url "https://github.com/ocaml/ocaml-re")
2929 (file-name (git-file-name name version))
2931 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
2932 (build-system dune-build-system)
2935 #:build-flags (list "--profile" "release")))
2937 `(("ocaml-seq" ,ocaml-seq)))
2939 `(("ounit" ,ocaml-ounit)))
2940 (home-page "https://github.com/ocaml/ocaml-re/")
2941 (synopsis "Regular expression library for OCaml")
2942 (description "Pure OCaml regular expressions with:
2944 @item Perl-style regular expressions (module Re_perl)
2945 @item Posix extended regular expressions (module Re_posix)
2946 @item Emacs-style regular expressions (module Re_emacs)
2947 @item Shell-style file globbing (module Re_glob)
2948 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
2950 (license license:expat)))
2952 (define-public ocaml-ocplib-endian
2954 (name "ocaml-ocplib-endian")
2959 (url "https://github.com/OCamlPro/ocplib-endian/")
2963 "0s1ld3kavz892b8awyxyg1mr98h2g61gy9ci5v6yb49bsii6wicw"))
2964 (file-name (git-file-name name version))))
2965 (build-system ocaml-build-system)
2967 `(("cppo" ,ocaml-cppo)
2968 ("ocamlbuild" ,ocamlbuild)))
2969 (home-page "https://github.com/OCamlPro/ocplib-endian")
2970 (synopsis "Optimised functions to read and write int16/32/64 from strings
2972 (description "Optimised functions to read and write int16/32/64 from strings
2973 and bigarrays, based on new primitives added in version 4.01. It works on
2974 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
2975 big- and little-endian, with their unsafe counter-parts.")
2976 (license license:lgpl2.1)))
2978 (define-public ocaml-cstruct
2980 (name "ocaml-cstruct")
2985 (url "https://github.com/mirage/ocaml-cstruct")
2986 (commit (string-append "v" version))))
2987 (file-name (git-file-name name version))
2990 "0m4bz0digcsc8l2msfikwcbi1y371kccx6xnkwrz212mf5mp98bv"))))
2991 (build-system dune-build-system)
2993 `(#:package "cstruct"
2996 `(("ocaml-alcotest" ,ocaml-alcotest)))
2997 (home-page "https://github.com/mirage/ocaml-cstruct")
2998 (synopsis "Access C structures via a camlp4 extension")
2999 (description "Cstruct is a library and syntax extension to make it easier
3000 to access C-like structures directly from OCaml. It supports both reading and
3001 writing to these structures, and they are accessed via the Bigarray module.")
3002 (license license:isc)))
3004 (define-public ocaml-hex
3011 (url "https://github.com/mirage/ocaml-hex")
3012 (commit (string-append "v" version))))
3013 (file-name (git-file-name name version))
3016 "0c8nhibcwy0ykzca4jn3gqb8ylq21ff88y82gl60wyzijr64rn0q"))))
3017 (build-system dune-build-system)
3019 `(#:test-target "."))
3021 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
3022 ("cstruct" ,ocaml-cstruct)))
3023 (home-page "https://github.com/mirage/ocaml-hex/")
3024 (synopsis "Minimal library providing hexadecimal converters")
3025 (description "Hex is a minimal library providing hexadecimal converters.")
3026 (license license:isc)))
3028 (define-public ocaml4.07-ezjsonm
3030 (name "ocaml4.07-ezjsonm")
3036 (url "https://github.com/mirage/ezjsonm")
3037 (commit (string-append "v" version))))
3038 (file-name (git-file-name name version))
3040 (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
3041 (build-system dune-build-system)
3043 `(#:package "ezjsonm"
3046 #:findlib ,ocaml4.07-findlib
3047 #:dune ,ocaml4.07-dune))
3049 `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))))
3051 `(("ocaml-hex" ,(package-with-ocaml4.07 ocaml-hex))
3052 ("ocaml-jsonm" ,(package-with-ocaml4.07 ocaml-jsonm))
3053 ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))))
3054 (home-page "https://github.com/mirage/ezjsonm/")
3055 (synopsis "Read and write JSON data")
3056 (description "Ezjsonm provides more convenient (but far less flexible) input
3057 and output functions that go to and from [string] values than jsonm. This avoids
3058 the need to write signal code, which is useful for quick scripts that manipulate
3060 (license license:isc)))
3062 (define-public ocaml4.07-uri
3064 (name "ocaml4.07-uri")
3070 (url "https://github.com/mirage/ocaml-uri")
3071 (commit (string-append "v" version))))
3072 (file-name (git-file-name name version))
3074 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
3075 (build-system dune-build-system)
3079 (modify-phases %standard-phases
3080 (add-before 'build 'update-deprecated
3082 (substitute* "lib/uri.ml"
3083 (("Re.get") "Re.Group.get")))))
3085 #:findlib ,ocaml4.07-findlib
3086 #:dune ,ocaml4.07-dune))
3088 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
3089 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)))
3091 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
3092 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
3093 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3094 (home-page "https://github.com/mirage/ocaml-uri")
3095 (synopsis "RFC3986 URI/URL parsing library")
3096 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3097 (license license:isc)))
3099 (define-public ocaml-easy-format
3101 (name "ocaml-easy-format")
3106 (url "https://github.com/mjambon/easy-format")
3108 (file-name (git-file-name name version))
3111 "1fc95q2ypck6m6rv3kiawwilh5ac93v2hcp823mj608d5kj79xkb"))))
3112 (build-system dune-build-system)
3114 `(#:package "easy-format"
3116 (modify-phases %standard-phases
3117 (add-before 'build 'make-writable
3122 (find-files "." "."))
3124 (home-page "https://github.com/mjambon/easy-format")
3125 (synopsis "Interface to the Format module")
3126 (description "Easy-format is a high-level and functional interface to the
3127 Format module of the OCaml standard library.")
3128 (license license:bsd-3)))
3130 (define-public ocaml4.07-piqilib
3132 (name "ocaml4.07-piqilib")
3138 (url "https://github.com/alavrik/piqi")
3139 (commit (string-append "v" version))))
3140 (file-name (git-file-name name version))
3142 (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
3143 (build-system ocaml-build-system)
3146 (modify-phases %standard-phases
3147 (add-before 'configure 'fix-ocamlpath
3149 (substitute* '("Makefile" "make/Makefile.ocaml")
3150 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
3153 (lambda* (#:key outputs #:allow-other-keys)
3154 (let ((out (assoc-ref outputs "out")))
3155 (substitute* "make/OCamlMakefile"
3156 (("/bin/sh") (which "bash")))
3157 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3158 (string-append out "/lib/ocaml/site-lib")))
3160 (add-after 'build 'build-ocaml
3161 (lambda* (#:key outputs #:allow-other-keys)
3162 (invoke "make" "ocaml")
3164 (add-after 'install 'install-ocaml
3165 (lambda* (#:key outputs #:allow-other-keys)
3166 (invoke "make" "ocaml-install")
3168 (add-after 'install-ocaml 'link-stubs
3169 (lambda* (#:key outputs #:allow-other-keys)
3170 (let* ((out (assoc-ref outputs "out"))
3171 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3172 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3174 (symlink (string-append lib "/dllpiqilib_stubs.so")
3175 (string-append stubs "/dllpiqilib_stubs.so"))
3178 #:findlib ,ocaml4.07-findlib))
3180 `(("which" ,which)))
3182 `(("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm))
3183 ("ocaml-sedlex" ,ocaml4.07-sedlex)
3184 ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))
3185 ("ocaml-base64" ,(package-with-ocaml4.07 ocaml-base64))))
3186 (home-page "http://piqi.org")
3187 (synopsis "Data serialization and conversion library")
3188 (description "Piqilib is the common library used by the piqi command-line
3189 tool and piqi-ocaml.")
3190 (license license:asl2.0)))
3192 (define-public ocaml-uuidm
3194 (name "ocaml-uuidm")
3198 (uri (string-append "http://erratique.ch/software/uuidm/"
3199 "releases/uuidm-" version ".tbz"))
3202 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
3203 (build-system ocaml-build-system)
3206 (list "build" "--tests" "true" "--with-cmdliner" "true")
3208 (modify-phases %standard-phases
3209 (delete 'configure))))
3211 `(("ocamlbuild" ,ocamlbuild)
3214 `(("cmdliner" ,ocaml-cmdliner)
3215 ("topkg" ,ocaml-topkg)))
3216 (home-page "http://erratique.ch/software/uuidm")
3217 (synopsis "Universally unique identifiers for OCaml")
3218 (description "Uuidm is an OCaml module implementing 128 bits universally
3219 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
3220 and 4 (random based) according to RFC 4122.")
3221 (license license:isc)))
3223 (define-public ocaml-graph
3225 (name "ocaml-graph")
3229 (uri (string-append "http://ocamlgraph.lri.fr/download/"
3230 "ocamlgraph-" version ".tar.gz"))
3233 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
3234 (build-system ocaml-build-system)
3236 `(#:install-target "install-findlib"
3239 (modify-phases %standard-phases
3240 (add-before 'configure 'set-shell
3241 (lambda* (#:key inputs #:allow-other-keys)
3242 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
3244 (inputs `(("lablgtk" ,lablgtk)))
3245 (properties `((upstream-name . "ocamlgraph")))
3246 (home-page "http://ocamlgraph.lri.fr/")
3247 (synopsis "Graph library for OCaml")
3248 (description "OCamlgraph is a generic graph library for OCaml.")
3249 (license license:lgpl2.1)))
3251 (define-public ocaml4.07-piqi
3253 (name "ocaml4.07-piqi")
3258 (url "https://github.com/alavrik/piqi-ocaml")
3259 (commit (string-append "v" version))))
3260 (file-name (git-file-name name version))
3263 "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"))))
3264 (build-system ocaml-build-system)
3267 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
3268 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
3271 (modify-phases %standard-phases
3272 (add-after 'unpack 'make-files-writable
3274 (for-each make-file-writable (find-files "."))
3276 (delete 'configure))
3278 #:findlib ,ocaml4.07-findlib))
3281 ("protobuf" ,protobuf))) ; for tests
3283 `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
3284 ("ocaml-piqilib" ,ocaml4.07-piqilib)
3285 ("ocaml-stdlib-shims" ,(package-with-ocaml4.07 ocaml-stdlib-shims))))
3286 (home-page "https://github.com/alavrik/piqi-ocaml")
3287 (synopsis "Protocol serialization system for OCaml")
3288 (description "Piqi is a multi-format data serialization system for OCaml.
3289 It provides a uniform interface for serializing OCaml data structures to JSON,
3290 XML and Protocol Buffers formats.")
3291 (license license:asl2.0)))
3297 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
3302 (commit (string-append "v" version))))
3303 (file-name (git-file-name name version))
3306 "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
3307 (build-system ocaml-build-system)
3309 `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
3310 ("clang" ,clang-3.8)
3311 ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
3313 `(("camlzip" ,(package-with-ocaml4.07 camlzip))
3314 ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
3315 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
3316 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
3317 ("ocaml-ezjsonm" ,ocaml4.07-ezjsonm)
3318 ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
3319 ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
3320 ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
3321 ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
3322 ("ocaml-piqi" ,ocaml4.07-piqi)
3323 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
3324 ("ocaml-utop" ,ocaml4.07-utop)
3325 ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
3326 ("ocaml-uri" ,ocaml4.07-uri)
3327 ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
3331 ("ncurses" ,ncurses)))
3335 (modify-phases %standard-phases
3336 (add-before 'configure 'fix-ncurses
3338 (substitute* "oasis/llvm"
3339 (("-lcurses") "-lncurses"))
3342 (lambda* (#:key outputs inputs #:allow-other-keys)
3343 ;; add write for user, to prevent a failure in the install phase
3346 (let ((stat (stat file)))
3347 (chmod file (+ #o200 (stat:mode stat)))))
3348 (find-files "." "."))
3349 (invoke "./configure" "--prefix"
3350 (assoc-ref outputs "out")
3353 (assoc-ref outputs "out")
3354 "/lib/ocaml/site-lib")
3355 "--with-llvm-version=3.8"
3356 "--with-llvm-config=llvm-config"
3357 "--enable-everything"))))
3359 #:findlib ,ocaml4.07-findlib))
3360 (synopsis "Binary Analysis Platform")
3361 (description "Binary Analysis Platform is a framework for writing program
3362 analysis tools, that target binary files. The framework consists of a plethora
3363 of libraries, plugins, and frontends. The libraries provide code reusability,
3364 the plugins facilitate extensibility, and the frontends serve as entry points.")
3365 (license license:expat)))
3367 (define-public ocaml-camomile
3369 (name "ocaml-camomile")
3371 (home-page "https://github.com/yoriyuki/Camomile")
3374 (uri (string-append home-page "/releases/download/" version
3375 "/camomile-" version ".tbz"))
3378 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
3379 (build-system dune-build-system)
3381 `(#:build-flags (list "--profile" "release")
3382 #:test-target "camomile-test"
3383 #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
3385 (modify-phases %standard-phases
3386 (add-before 'build 'fix-usr-share
3387 (lambda* (#:key outputs #:allow-other-keys)
3388 (substitute* '("Camomile/dune" "configure.ml")
3389 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
3391 (synopsis "Comprehensive Unicode library")
3392 (description "Camomile is a Unicode library for OCaml. Camomile provides
3393 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
3394 200 encodings, collation and locale-sensitive case mappings, and more. The
3395 library is currently designed for Unicode Standard 3.2.")
3396 ;; with an exception for linked libraries to use a different license
3397 (license license:lgpl2.0+)))
3399 (define-public ocaml4.07-charinfo-width
3401 (name "ocaml4.07-charinfo-width")
3405 (uri (string-append "https://bitbucket.org/zandoye/charinfo_width"
3406 "/get/" version ".tar.gz"))
3407 (file-name (string-append name "-" version ".tar.gz"))
3410 "00bv4p1yqs8y0z4z07wd9w9yyv669dikp9b04dcjbwpiy2wy0086"))))
3411 (build-system dune-build-system)
3413 `(#:ocaml ,ocaml-4.07
3414 #:findlib ,ocaml4.07-findlib
3415 #:dune ,ocaml4.07-dune))
3417 `(("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
3418 ("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))))
3420 `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
3422 `((upstream-name . "charInfo_width")))
3423 (home-page "https://bitbucket.org/zandoye/charinfo_width/")
3424 (synopsis "Determine column width for a character")
3425 (description "This module is implements purely in OCaml a character width
3426 function that follows the prototype of POSIX's wcwidth.")
3427 (license license:expat)))
3429 (define-public ocaml4.07-zed
3431 (name "ocaml4.07-zed")
3437 (url "https://github.com/diml/zed")
3439 (file-name (git-file-name name version))
3441 (base32 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
3442 (build-system dune-build-system)
3446 #:findlib ,ocaml4.07-findlib
3447 #:dune ,ocaml4.07-dune))
3449 `(("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))
3450 ("ocaml-charinfo-width" ,ocaml4.07-charinfo-width)
3451 ("ocaml-react" ,(package-with-ocaml4.07 ocaml-react))))
3452 (home-page "https://github.com/diml/zed")
3453 (synopsis "Abstract engine for text editing in OCaml")
3454 (description "Zed is an abstract engine for text edition. It can be used
3455 to write text editors, edition widgets, readlines, etc. You just have to
3456 connect an engine to your inputs and rendering functions to get an editor.")
3457 (license license:bsd-3)))
3459 (define-public ocaml4.07-lambda-term
3461 (name "ocaml4.07-lambda-term")
3467 (url "https://github.com/diml/lambda-term")
3469 (file-name (git-file-name name version))
3471 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
3472 (build-system dune-build-system)
3474 `(#:build-flags (list "--profile" "release")
3477 #:findlib ,ocaml4.07-findlib
3478 #:dune ,ocaml4.07-dune))
3480 `(("ocaml-lwt" ,(package-with-ocaml4.07 ocaml-lwt))
3481 ("ocaml-lwt-log" ,(package-with-ocaml4.07 ocaml-lwt-log))
3482 ("ocaml-lwt-react" ,(package-with-ocaml4.07 ocaml-lwt-react))
3483 ("ocaml-zed" ,ocaml4.07-zed)))
3485 `(("libev" ,libev)))
3486 (home-page "https://github.com/diml/lambda-term")
3487 (synopsis "Terminal manipulation library for OCaml")
3488 (description "Lambda-Term is a cross-platform library for manipulating the
3489 terminal. It provides an abstraction for keys, mouse events, colors, as well as
3490 a set of widgets to write curses-like applications. The main objective of
3491 Lambda-Term is to provide a higher level functional interface to terminal
3492 manipulation than, for example, ncurses, by providing a native OCaml interface
3493 instead of bindings to a C library.")
3494 (license license:bsd-3)))
3496 (define-public ocaml4.07-utop
3498 (name "ocaml4.07-utop")
3504 (url "https://github.com/ocaml-community/utop")
3506 (file-name (git-file-name name version))
3508 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
3509 (build-system dune-build-system)
3513 #:findlib ,ocaml4.07-findlib
3514 #:dune ,ocaml4.07-dune))
3516 `(("cppo" ,(package-with-ocaml4.07 ocaml-cppo))))
3518 `(("lambda-term" ,ocaml4.07-lambda-term)
3519 ("lwt" ,(package-with-ocaml4.07 ocaml-lwt))
3520 ("react" ,(package-with-ocaml4.07 ocaml-react))
3521 ("camomile" ,(package-with-ocaml4.07 ocaml-camomile))
3522 ("zed" ,ocaml4.07-zed)))
3523 (home-page "https://github.com/ocaml-community/utop")
3524 (synopsis "Improved interface to the OCaml toplevel")
3525 (description "UTop is an improved toplevel for OCaml. It can run in a
3526 terminal or in Emacs. It supports line editing, history, real-time and context
3527 sensitive completion, colors, and more.")
3528 (license license:bsd-3)))
3530 (define-public ocaml-integers
3532 (name "ocaml-integers")
3534 (home-page "https://github.com/ocamllabs/ocaml-integers")
3537 (uri (string-append home-page
3538 "/releases/download/v0.2.2/integers-"
3540 (file-name (string-append name "-" version ".tbz"))
3543 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
3544 (build-system ocaml-build-system)
3546 `(#:tests? #f; no tests
3547 #:build-flags (list "build")
3549 (modify-phases %standard-phases
3550 (delete 'configure))))
3552 `(("ocamlbuild" ,ocamlbuild)))
3554 `(("topkg" ,ocaml-topkg)
3556 (synopsis "Various signed and unsigned integer types for OCaml")
3557 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
3558 and 64-bit signed and unsigned integer types, together with aliases such as
3559 long and size_t whose sizes depend on the host platform.")
3560 (license license:expat)))
3562 (define-public ocaml-ctypes
3564 (name "ocaml-ctypes")
3566 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
3572 (file-name (git-file-name name version))
3575 "1b2q3h63ngf4x9qp65qwapf2dg9q0mcdah6qjm2q0c7v2p5vysv9"))))
3576 (build-system ocaml-build-system)
3578 `(#:tests? #f; require an old lwt
3580 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
3582 (modify-phases %standard-phases
3583 (add-after 'unpack 'make-writable
3587 (let ((stat (stat file)))
3588 (chmod file (+ #o200 (stat:mode stat)))))
3589 (find-files "." "."))
3591 (delete 'configure))))
3593 `(("pkg-config" ,pkg-config)))
3595 `(("libffi" ,libffi)
3596 ("ounit" ,ocaml-ounit)
3597 ("integers" ,ocaml-integers)
3599 ("topkg" ,ocaml-topkg)
3601 (synopsis "Library for binding to C libraries using pure OCaml")
3602 (description "Ctypes is a library for binding to C libraries using pure
3603 OCaml. The primary aim is to make writing C extensions as straightforward as
3604 possible. The core of ctypes is a set of combinators for describing the
3605 structure of C types -- numeric types, arrays, pointers, structs, unions and
3606 functions. You can use these combinators to describe the types of the
3607 functions that you want to call, then bind directly to those functions -- all
3608 without writing or generating any C!")
3609 (license license:expat)))
3611 (define-public ocaml-ocb-stubblr
3613 (name "ocaml-ocb-stubblr")
3615 (home-page "https://github.com/pqwy/ocb-stubblr")
3619 home-page "/releases/download/v0.1.1/ocb-stubblr-"
3621 (file-name (string-append name "-" version ".tbz"))
3624 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
3625 (build-system ocaml-build-system)
3627 `(#:build-flags (list "build" "--tests" "true")
3629 (modify-phases %standard-phases
3631 (add-before 'build 'fix-for-guix
3633 (substitute* "src/ocb_stubblr.ml"
3634 ;; Do not fail when opam is not present or initialized
3635 (("error_msgf \"error running opam\"") "\"\"")
3636 ;; Guix doesn't have cc, but it has gcc
3637 (("\"cc\"") "\"gcc\""))
3640 `(("topkg" ,ocaml-topkg)
3643 `(("astring" ,ocaml-astring)
3644 ("ocamlbuild" ,ocamlbuild)))
3645 (synopsis "OCamlbuild plugin for C stubs")
3646 (description "Ocb-stubblr is about ten lines of code that you need to
3647 repeat over, over, over and over again if you are using ocamlbuild to build
3648 OCaml projects that contain C stubs.")
3649 (license license:isc)))
3651 (define-public ocaml-tsdl
3655 (home-page "https://erratique.ch/software/tsdl")
3658 (uri (string-append home-page "/releases/tsdl-"
3660 (file-name (string-append name "-" version ".tar.gz"))
3663 "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"))))
3664 (build-system ocaml-build-system)
3666 `(#:build-flags '("build")
3667 #:tests? #f; tests require a display device
3669 (modify-phases %standard-phases
3670 (delete 'configure))))
3672 `(("ocamlbuild" ,ocamlbuild)
3673 ("ocaml-astring" ,ocaml-astring)
3675 ("pkg-config" ,pkg-config)))
3677 `(("topkg" ,ocaml-topkg)
3679 ("integers" ,ocaml-integers)
3680 ("ctypes" ,ocaml-ctypes)))
3681 (synopsis "Thin bindings to SDL for OCaml")
3682 (description "Tsdl is an OCaml library providing thin bindings to the
3683 cross-platform SDL C library.")
3684 (license license:isc)))
3686 (define-public dedukti
3690 (home-page "https://deducteam.github.io/")
3695 (url "https://github.com/deducteam/dedukti")
3696 (commit (string-append "v" version))))
3697 (file-name (git-file-name name version))
3700 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
3702 `(("menhir" ,ocaml-menhir)))
3704 `(("ocamlbuild" ,ocamlbuild)))
3705 (build-system ocaml-build-system)
3708 (modify-phases %standard-phases
3716 (invoke "make" "tests")
3718 (add-before 'install 'set-binpath
3719 ;; Change binary path in the makefile
3721 (let ((out (assoc-ref %outputs "out")))
3722 (substitute* "GNUmakefile"
3724 (string-append "BINDIR = " out "/bin"))))
3728 (invoke "make" "install")
3730 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
3732 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
3733 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
3734 dependent types. The λΠ-calculus modulo theory is itself an extension of the
3735 λΠ-calculus where the context contains variable declaration as well as rewrite
3736 rules. This system is not designed to develop proofs, but to check proofs
3737 developed in other systems. In particular, it enjoys a minimalistic syntax.")
3738 (license license:cecill-c)))
3740 (define-public emacs-dedukti-mode
3741 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
3743 (name "emacs-dedukti-mode")
3744 (version (git-version "0" "0" commit))
3745 (home-page "https://github.com/rafoo/dedukti-mode")
3753 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
3754 (file-name (git-file-name name version))))
3756 `(("dedukti" ,dedukti)))
3757 (build-system emacs-build-system)
3760 (modify-phases %standard-phases
3761 (add-before 'install 'patch-dkpath
3763 (let ((dkcheck-path (which "dkcheck")))
3764 (substitute* "dedukti-mode.el"
3765 (("dedukti-path \"(.*)\"")
3766 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
3767 (synopsis "Emacs major mode for Dedukti files")
3768 (description "This package provides an Emacs major mode for editing
3770 (license license:cecill-b))))
3772 (define-public emacs-flycheck-dedukti
3773 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
3775 (name "emacs-flycheck-dedukti")
3776 (version (git-version "0" "0" commit))
3777 (home-page "https://github.com/rafoo/flycheck-dedukti")
3785 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
3786 (file-name (git-file-name name version))))
3787 (build-system emacs-build-system)
3789 `(("dedukti-mode" ,emacs-dedukti-mode)
3790 ("flycheck-mode" ,emacs-flycheck)))
3791 (synopsis "Flycheck integration for the dedukti language")
3792 (description "This package provides a frontend for Flycheck to perform
3793 syntax checking on dedukti files.")
3794 (license license:cecill-b))))
3796 (define-public ocaml4.07-ppx-inline-test
3798 (name "ocaml4.07-ppx-inline-test")
3800 (home-page "https://github.com/janestreet/ppx_inline_test")
3805 (url (string-append home-page ".git"))
3806 (commit (string-append "v" version))))
3807 (file-name (git-file-name name version))
3810 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
3811 (build-system dune-build-system)
3813 ;see home page README for further information
3816 #:findlib ,ocaml4.07-findlib
3817 #:dune ,ocaml4.07-dune))
3819 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
3820 ("ocaml-migrate-parsetree"
3821 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
3822 ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
3823 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
3824 ("ocaml-stdio" ,ocaml4.07-stdio)
3825 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
3826 (properties `((upstream-name . "ppx_inline_test")))
3827 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3828 (description "This package contains a syntax extension for writing
3829 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
3831 (license license:expat)))
3833 (define-public ocaml-bindlib
3835 (name "ocaml-bindlib")
3841 (url "https://github.com/rlepigre/ocaml-bindlib")
3842 (commit (string-append "ocaml-bindlib_" version))))
3843 (file-name (git-file-name name version))
3846 "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
3847 (build-system ocaml-build-system)
3849 `(#:tests? #f ;no tests
3852 (modify-phases %standard-phases
3859 (invoke "make" "install"))))))
3861 `(("ocamlbuild" ,ocamlbuild)
3862 ("ocaml-findlib" ,ocaml-findlib)))
3863 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
3864 (synopsis "OCaml Bindlib library for bound variables")
3865 (description "Bindlib is a library allowing the manipulation of data
3866 structures with bound variables. It is particularly useful when writing ASTs
3867 for programming languages, but also for manipulating terms of the λ-calculus
3868 or quantified formulas.")
3869 (license license:gpl3+)))
3871 (define-public ocaml4.07-earley
3873 (name "ocaml4.07-earley")
3875 (home-page "https://github.com/rlepigre/ocaml-earley")
3880 (url (string-append home-page ".git"))
3882 (file-name (git-file-name name version))
3885 "18k7bi7krc4bvqnhijz1q0pfr0nfahghfjifci8rh1q4i5zd0xz5"))))
3886 (build-system dune-build-system)
3890 #:findlib ,ocaml4.07-findlib
3891 #:dune ,ocaml4.07-dune))
3892 (synopsis "Parsing library based on Earley Algorithm")
3893 (description "Earley is a parser combinator library base on Earley's
3894 algorithm. It is intended to be used in conjunction with an OCaml syntax
3895 extension which allows the definition of parsers inside the language. There
3896 is also support for writing OCaml syntax extensions in a camlp4 style.")
3897 (license license:cecill-b)))
3899 (define-public ocaml-timed
3901 (name "ocaml-timed")
3903 (home-page "https://github.com/rlepigre/ocaml-timed")
3907 (url (string-append home-page ".git"))
3908 (commit (string-append name "_" version))))
3911 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
3912 (file-name (git-file-name name version))))
3913 (build-system ocaml-build-system)
3916 (modify-phases %standard-phases
3923 (invoke "make" "install")))
3926 (invoke "make" "tests"))))))
3927 (synopsis "Timed references for imperative state")
3928 (description "Timed references for imperative state. This module provides
3929 an alternative type for references (or mutable cells) supporting undo/redo
3930 operations. In particular, an abstract notion of time is used to capture the
3931 state of the references at any given point, so that it can be restored. Note
3932 that usual reference operations only have a constant time / memory overhead
3933 (compared to those of the standard library).
3935 Moreover, we provide an alternative implementation based on the references
3936 of the standard library (Pervasives module). However, it is less efficient
3937 than the first one.")
3938 (license license:expat)))
3940 (define-public ocaml-biniou
3942 (name "ocaml-biniou")
3944 (home-page "https://github.com/mjambon/biniou")
3949 (url (string-append home-page ".git"))
3951 (file-name (git-file-name name version))
3954 "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
3955 (build-system dune-build-system)
3958 (modify-phases %standard-phases
3959 (add-before 'build 'make-writable
3964 (find-files "." "."))
3967 `(("ocaml-easy-format" ,ocaml-easy-format)))
3969 `(("which" ,which)))
3970 (synopsis "Data format designed for speed, safety, ease of use and backward
3972 (description "Biniou (pronounced \"be new\" is a binary data format
3973 designed for speed, safety, ease of use and backward compatibility as
3974 protocols evolve. Biniou is vastly equivalent to JSON in terms of
3975 functionality but allows implementations several times faster (4 times faster
3976 than yojson), with 25-35% space savings.")
3977 (license license:bsd-3)))
3979 (define-public ocaml-yojson
3981 (name "ocaml-yojson")
3983 (home-page "https://github.com/ocaml-community/yojson")
3988 (url (string-append home-page ".git"))
3990 (file-name (git-file-name name version))
3993 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
3994 (build-system dune-build-system)
3996 `(#:test-target "."))
3998 `(("ocaml-biniou" ,ocaml-biniou)
3999 ("ocaml-easy-format" ,ocaml-easy-format)))
4001 `(("ocaml-alcotest" ,ocaml-alcotest)
4002 ("ocaml-cppo" ,ocaml-cppo)))
4003 (synopsis "Low-level JSON library for OCaml")
4004 (description "Yojson is an optimized parsing and printing library for the
4005 JSON format. It addresses a few shortcomings of json-wheel including 2x
4006 speedup, polymorphic variants and optional syntax for tuples and variants.
4007 @code{ydump} is a pretty printing command-line program provided with the
4008 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4009 serializers and deserializers from type definitions.")
4010 (license license:bsd-3)))
4012 (define-public ocaml-craml
4014 (name "ocaml-craml")
4016 (home-page "https://github.com/realworldocaml/craml")
4021 (url (string-append home-page ".git"))
4023 (file-name (git-file-name name version))
4026 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
4027 (build-system dune-build-system)
4030 (modify-phases %standard-phases
4031 (add-before 'build 'upgrade
4033 (invoke "dune" "upgrade")
4036 `(("ocaml-fmt" ,ocaml-fmt)
4037 ("ocaml-astring" ,ocaml-astring)
4038 ("ocaml-logs" ,ocaml-logs)
4039 ("ocaml-cmdliner" ,ocaml-cmdliner)))
4041 "CRAM-testing framework for testing command line applications")
4042 (description "CRAM is a is functional testing framework for command line
4043 applications. @code{craml} is freely inspired by the
4044 Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
4045 format}. @code{craml} is released as a single binary (called @code{craml}).")
4046 (license license:isc)))
4048 (define-public ocaml-dot-merlin-reader
4050 (name "ocaml-dot-merlin-reader")
4056 (url "https://github.com/ocaml/merlin")
4057 (commit (string-append "v" version))))
4058 (file-name (git-file-name name version))
4061 "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
4062 (build-system dune-build-system)
4063 (arguments '(#:package "dot-merlin-reader"
4064 #:tests? #f)) ; no tests
4066 `(("ocaml-yojson" ,ocaml-yojson)
4067 ("ocaml-csexp" ,ocaml-csexp)
4068 ("ocaml-result" ,ocaml-result)))
4069 (home-page "https://ocaml.github.io/merlin/")
4070 (synopsis "Reads config files for @code{ocaml-merlin}")
4071 (description "@code{ocaml-dot-merlin-reader} is an external reader for
4072 @code{ocaml-merlin} configurations.")
4073 (license license:expat)))
4075 (define-public ocaml-merlin
4077 (name "ocaml-merlin")
4083 (url "https://github.com/ocaml/merlin")
4084 (commit (string-append "v" version))))
4085 (file-name (git-file-name name version))
4088 "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj"))))
4089 (build-system dune-build-system)
4090 (arguments '(#:package "merlin"
4091 #:test-target "tests"))
4093 `(("ocaml-yojson" ,ocaml-yojson)
4094 ("ocaml-csexp" ,ocaml-csexp)
4095 ("ocaml-result" ,ocaml-result)))
4097 `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader) ; required for tests
4098 ("ocaml-mdx" ,ocaml-mdx)
4100 (home-page "https://ocaml.github.io/merlin/")
4101 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
4102 (description "Merlin is an editor service that provides modern IDE
4103 features for OCaml. Emacs and Vim support is provided out-of-the-box.
4104 External contributors added support for Visual Studio Code, Sublime Text and
4106 (license license:expat)))
4108 ;; ocaml-merlin 3.4.2 can not be built with old version of dune used in
4109 ;; package-with-ocaml4.07
4110 (define-public ocaml4.07-merlin
4111 (package-with-ocaml4.07
4113 (inherit ocaml-merlin)
4114 (name "ocaml-merlin")
4120 (url "https://github.com/ocaml/merlin")
4121 (commit (string-append "v" version))))
4122 (file-name (git-file-name name version))
4125 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
4126 (build-system dune-build-system)
4128 `(("ocaml-yojson" ,ocaml-yojson)))
4130 `(("ocaml-findlib" ,ocaml-findlib)))
4132 `(#:package "merlin"
4133 ;; Errors in tests in version 3.2.2
4136 (define-public ocaml4.07-gsl
4138 (name "ocaml4.07-gsl")
4145 "https://github.com/mmottl/gsl-ocaml/releases/download/"
4146 version "/gsl-" version ".tbz"))
4149 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
4150 (build-system dune-build-system)
4154 (modify-phases %standard-phases
4155 (add-after 'unpack 'fix-gsl-directory
4156 (lambda* (#:key inputs #:allow-other-keys)
4157 (substitute* "src/config/discover.ml"
4158 (("/usr") (assoc-ref inputs "gsl")))
4161 #:findlib ,ocaml4.07-findlib
4162 #:dune ,ocaml4.07-dune))
4166 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4167 ("ocaml-stdio" ,ocaml4.07-stdio)))
4168 (home-page "https://mmottl.github.io/gsl-ocaml")
4169 (synopsis "Bindings to the GNU Scientific Library")
4171 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4172 the OCaml language.")
4173 (license license:gpl3+)))
4175 (define-public ocaml4.07-gsl-1
4177 (inherit ocaml4.07-gsl)
4181 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
4182 "/releases/download/v"
4183 version "/gsl-ocaml-" version ".tar.gz"))
4186 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
4187 (build-system ocaml-build-system)
4191 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
4193 `(#:ocaml ,ocaml-4.07
4194 #:findlib ,ocaml4.07-findlib))
4195 (propagated-inputs '())))
4197 (define-public cubicle
4203 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4207 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4208 (build-system gnu-build-system)
4210 `(("automake" ,automake)
4212 ("which" ,(@@ (gnu packages base) which))))
4214 `(("ocaml-num" ,ocaml-num)
4217 `(#:configure-flags (list "--with-z3")
4218 #:make-flags (list "QUIET=")
4221 (modify-phases %standard-phases
4222 (add-before 'configure 'configure-for-release
4224 (substitute* "Makefile.in"
4225 (("SVNREV=") "#SVNREV="))
4227 (add-before 'configure 'fix-/bin/sh
4229 (substitute* "configure"
4230 (("-/bin/sh") (string-append "-" (which "sh"))))
4232 (add-before 'configure 'fix-smt-z3wrapper.ml
4234 (substitute* "Makefile.in"
4237 (add-before 'configure 'fix-ocaml-num
4238 (lambda* (#:key inputs #:allow-other-keys)
4239 (substitute* "Makefile.in"
4240 (("= \\$\\(FUNCTORYLIB\\)")
4241 (string-append "= -I "
4242 (assoc-ref inputs "ocaml-num")
4243 "/lib/ocaml/site-lib"
4244 " $(FUNCTORYLIB)")))
4246 (home-page "http://cubicle.lri.fr/")
4247 (synopsis "Model checker for array-based systems")
4248 (description "Cubicle is a model checker for verifying safety properties
4249 of array-based systems. This is a syntactically restricted class of
4250 parametrized transition systems with states represented as arrays indexed by
4251 an arbitrary number of processes. Cache coherence protocols and mutual
4252 exclusion algorithms are typical examples of such systems.")
4253 (license license:asl2.0)))
4255 (define-public ocaml-sexplib0
4257 (name "ocaml-sexplib0")
4259 (home-page "https://github.com/janestreet/sexplib0")
4261 (janestreet-origin "sexplib0" version
4262 "0adrc0r1vvvr41dcpj8jwkzh1dfgqf0mks9xlnnskqfm3a51iavg"))
4263 (build-system dune-build-system)
4264 (arguments `(#:tests? #f)) ;no tests
4265 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
4266 (synopsis "Library containing the definition of S-expressions and some
4268 (description "Part of Jane Street's Core library The Core suite of
4269 libraries is an industrial strength alternative to OCaml's standard library
4270 that was developed by Jane Street, the largest industrial user of OCaml.")
4271 (license license:expat)))
4273 (define-public ocaml4.07-sexplib0
4274 (package-with-ocaml4.07
4276 (inherit ocaml-sexplib0)
4277 (name "ocaml-sexplib0")
4280 (janestreet-origin "sexplib0" version
4281 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
4282 (arguments `(#:tests? #f)) ; no tests
4285 (define-public ocaml-parsexp
4287 (name "ocaml-parsexp")
4289 (home-page "https://github.com/janestreet/parsexp")
4291 (janestreet-origin "parsexp" version
4292 "158znj19dvfdcwsgzs3rdhxpj1g4aw0d4nkfr8c05bahf0lnshlb"))
4293 (build-system dune-build-system)
4295 `(("ocaml-sexplib0" ,ocaml-sexplib0)
4296 ("ocaml-base" ,ocaml-base)))
4297 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
4298 (synopsis "S-expression parsing library")
4300 "This library provides generic parsers for parsing S-expressions from
4301 strings or other medium.
4303 The library is focused on performances but still provide full generic
4304 parsers that can be used with strings, bigstrings, lexing buffers,
4305 character streams or any other sources effortlessly.
4307 It provides three different class of parsers:
4310 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
4312 the parsers with positions, building compact position sequences so
4313 that one can recover original positions in order to report properly
4314 located errors at little cost
4316 the Concrete Syntax Tree parsers, produce values of type
4317 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
4318 syntax, including comments
4321 This library is portable and doesn't provide IO functions. To read
4322 s-expressions from files or other external sources, you should use
4324 (license license:expat)))
4326 (define-public ocaml4.07-parsexp
4327 (package-with-ocaml4.07
4329 (inherit ocaml-parsexp)
4330 (name "ocaml-parsexp")
4333 (janestreet-origin "parsexp" version
4334 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
4337 (define-public ocaml-sexplib
4339 (name "ocaml-sexplib")
4341 (home-page "https://github.com/janestreet/sexplib")
4343 (janestreet-origin "sexplib" version
4344 "12rlnc6fcrjfdn3gs2agi418sj54ighhs6dfll37zcv7mgywblm2"))
4345 (build-system dune-build-system)
4347 `(("ocaml-base" ,ocaml-base)
4348 ("ocaml-num" ,ocaml-num)
4349 ("ocaml-parsexp" ,ocaml-parsexp)
4350 ("ocaml-sexplib0" ,ocaml-sexplib0)))
4351 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
4353 "Library for serializing OCaml values to and from S-expressions")
4355 "This package is part of Jane Street's Core library. Sexplib contains
4356 functionality for parsing and pretty-printing s-expressions.")
4357 (license license:expat)))
4359 (define-public ocaml4.07-sexplib
4360 (package-with-ocaml4.07
4362 (inherit ocaml-sexplib)
4365 (janestreet-origin "sexplib" version
4366 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
4369 (define-public ocaml-base
4373 (home-page "https://github.com/janestreet/base")
4375 (janestreet-origin "base" version
4376 "1rkdhsgbcv0a8p29mwvpd2ldz8cjk97pixl43izm54wyin4lp778"))
4377 (build-system dune-build-system)
4379 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
4380 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
4382 "Full standard library replacement for OCaml")
4384 "Base is a complete and portable alternative to the OCaml standard
4385 library. It provides all standard functionalities one would expect
4386 from a language standard library. It uses consistent conventions
4387 across all of its module.
4389 Base aims to be usable in any context. As a result system dependent
4390 features such as I/O are not offered by Base. They are instead
4391 provided by companion libraries such as
4392 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
4393 (license license:expat)))
4395 (define-public ocaml4.07-base
4396 (package-with-ocaml4.07
4398 (inherit ocaml-base)
4403 ;; version 0.11.1 is not released on ocaml.janestreet.org.
4406 (url "https://github.com/janestreet/base.git")
4407 (commit (string-append "v" version))))
4408 (file-name (git-file-name name version))
4411 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
4414 (modify-phases %standard-phases
4416 ;; make warnings non fatal (jbuilder behaviour)
4418 (invoke "dune" "build" "@install" "--profile=release"))))
4420 #:findlib ,ocaml4.07-findlib
4421 #:dune ,ocaml4.07-dune))
4424 (define-public ocaml4.07-compiler-libs
4426 (name "ocaml4.07-compiler-libs")
4428 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
4433 (url (string-append home-page ".git"))
4434 (commit (string-append "v" version))))
4435 (file-name (git-file-name name version))
4438 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
4439 (build-system dune-build-system)
4441 `(#:tests? #f ;no tests
4443 #:findlib ,ocaml4.07-findlib
4444 #:dune ,ocaml4.07-dune))
4445 (properties `((upstream-name . "ocaml-compiler-libs")))
4446 (synopsis "Compiler libraries repackaged")
4447 (description "This package simply repackages the OCaml compiler libraries
4448 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
4449 is now @code{Ocaml_common.Ast_helper}.")
4450 (license license:expat)))
4452 (define-public ocaml4.07-stdio
4454 (name "ocaml4.07-stdio")
4456 (home-page "https://github.com/janestreet/stdio")
4461 (url (string-append home-page ".git"))
4462 (commit (string-append "v" version))))
4463 (file-name (git-file-name name version))
4466 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
4467 (build-system dune-build-system)
4469 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4470 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
4472 `(#:tests? #f ;no tests
4474 #:findlib ,ocaml4.07-findlib
4475 #:dune ,ocaml4.07-dune))
4476 (synopsis "Standard IO library for OCaml")
4478 "Stdio implements simple input/output functionalities for OCaml. It
4479 re-exports the input/output functions of the OCaml standard libraries using
4480 a more consistent API.")
4481 (license license:expat)))
4483 (define-public ocaml-ppx-derivers
4485 (name "ocaml-ppx-derivers")
4488 "https://github.com/ocaml-ppx/ppx_derivers")
4493 (url (string-append home-page ".git"))
4495 (file-name (git-file-name name version))
4498 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
4499 (build-system dune-build-system)
4501 '(#:tests? #f)) ;no tests
4502 (properties `((upstream-name . "ppx_derivers")))
4503 (synopsis "Shared @code{@@deriving} plugin registry")
4505 "Ppx_derivers is a tiny package whose sole purpose is to allow
4506 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
4507 as part of the same ocaml-migrate-parsetree driver.")
4508 (license license:bsd-3)))
4510 (define-public ocaml4.07-ppxlib
4512 (name "ocaml4.07-ppxlib")
4514 (home-page "https://github.com/ocaml-ppx/ppxlib")
4519 (url (string-append home-page ".git"))
4521 (file-name (git-file-name name version))
4524 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
4525 (build-system dune-build-system)
4527 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4528 ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
4529 ("ocaml-migrate-parsetree"
4530 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4531 ("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
4532 ("ocaml-stdio" ,ocaml4.07-stdio)
4533 ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
4534 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))))
4537 (modify-phases %standard-phases
4538 (add-before 'check 'set-topfind
4539 (lambda* (#:key inputs #:allow-other-keys)
4540 ;; add the line #directory ".." at the top of each file
4541 ;; using #use "topfind";; to be able to find topfind
4542 (let* ((findlib-path (assoc-ref inputs "findlib"))
4544 (string-append findlib-path "/lib/ocaml/site-lib")))
4545 (substitute* '("test/base/test.ml"
4546 "test/code_path/test.ml"
4547 "test/deriving/test.ml"
4548 "test/driver/attributes/test.ml"
4549 "test/driver/non-compressible-suffix/test.ml"
4550 "test/driver/transformations/test.ml")
4551 (("#use \"topfind\";;" all)
4552 (string-append "#directory \"" findlib-libdir "\"\n"
4556 #:findlib ,ocaml4.07-findlib
4557 #:dune ,ocaml4.07-dune))
4559 "Base library and tools for ppx rewriters")
4561 "A comprehensive toolbox for ppx development. It features:
4563 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
4564 independent of the version of OCaml;
4565 @item a library for library for ppx rewriters in general, and type-driven code
4566 generators in particular;
4568 a feature-full driver for OCaml AST transformers;
4569 @item a quotation mechanism allowing to write values representing the
4570 OCaml AST in the OCaml syntax;
4571 @item a generator of open recursion classes from type definitions.
4573 (license license:expat)))
4575 (define-public ocaml4.07-ppx-compare
4577 (name "ocaml4.07-ppx-compare")
4582 (url "https://github.com/janestreet/ppx_compare")
4583 (commit (string-append "v" version))))
4584 (file-name (git-file-name name version))
4587 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
4588 (build-system dune-build-system)
4590 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4591 ("ocaml-migrate-parsetree"
4592 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4593 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4595 `(#:ocaml ,ocaml-4.07
4596 #:findlib ,ocaml4.07-findlib
4597 #:dune ,ocaml4.07-dune))
4598 (properties `((upstream-name . "ppx_compare")))
4599 (home-page "https://github.com/janestreet/ppx_compare")
4600 (synopsis "Generation of comparison functions from types")
4601 (description "Generation of fast comparison functions from type expressions
4602 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
4603 from type representations. The scaffolded functions are usually much faster
4604 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
4605 flexibility by allowing you to override them for a specific type and more safety
4606 by making sure that you only compare comparable values.")
4607 (license license:asl2.0)))
4609 (define-public ocaml4.07-fieldslib
4611 (name "ocaml4.07-fieldslib")
4615 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4616 (version-major+minor version) "/files/"
4617 "fieldslib-v" version ".tar.gz"))
4620 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))))
4621 (build-system dune-build-system)
4626 #:findlib ,ocaml4.07-findlib
4627 #:dune ,ocaml4.07-dune))
4629 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4630 ("ocaml-migrate-parsetree"
4631 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4632 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4633 (properties `((upstream-name . "fieldslib")))
4634 (home-page "https://github.com/janestreet/fieldslib")
4635 (synopsis "Syntax extension to record fields")
4636 (description "Syntax extension to define first class values representing
4637 record fields, to get and set record fields, iterate and fold over all fields
4638 of a record and create new record values.")
4639 (license license:asl2.0)))
4641 (define-public ocaml4.07-variantslib
4643 (name "ocaml4.07-variantslib")
4647 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4648 (version-major+minor version)
4649 "/files/variantslib-v" version ".tar.gz"))
4652 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
4653 (build-system dune-build-system)
4658 #:findlib ,ocaml4.07-findlib
4659 #:dune ,ocaml4.07-dune))
4661 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4662 ("ocaml-migrate-parsetree"
4663 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4664 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4665 (properties `((upstream-name . "variantslib")))
4666 (home-page "https://github.com/janestreet/variantslib")
4667 (synopsis "OCaml variants as first class values")
4668 (description "The Core suite of libraries is an alternative to OCaml's
4670 (license license:asl2.0)))
4672 (define-public ocaml4.07-ppx-fields-conv
4674 (name "ocaml4.07-ppx-fields-conv")
4678 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4679 (version-major+minor version)
4680 "/files/ppx_fields_conv-v" version ".tar.gz"))
4683 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
4684 (build-system dune-build-system)
4686 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4687 ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
4688 ("ocaml-migrate-parsetree"
4689 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4690 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4692 `(#:ocaml ,ocaml-4.07
4693 #:findlib ,ocaml4.07-findlib
4694 #:dune ,ocaml4.07-dune))
4695 (properties `((upstream-name . "ppx_fields_conv")))
4696 (home-page "https://github.com/janestreet/ppx_fields_conv")
4697 (synopsis "Generation of accessor and iteration functions for ocaml records")
4698 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
4699 first class values representing record fields, and additional routines, to get
4700 and set record fields, iterate and fold over all fields of a record and create
4701 new record values.")
4702 (license license:asl2.0)))
4704 (define-public ocaml4.07-ppx-sexp-conv
4706 (name "ocaml4.07-ppx-sexp-conv")
4711 (url "https://github.com/janestreet/ppx_sexp_conv")
4712 (commit (string-append "v" version))))
4713 (file-name (git-file-name name version))
4716 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
4717 (build-system dune-build-system)
4719 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4720 ("ocaml-migrate-parsetree"
4721 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4722 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4724 `(#:ocaml ,ocaml-4.07
4725 #:findlib ,ocaml4.07-findlib
4726 #:dune ,ocaml4.07-dune))
4727 (properties `((upstream-name . "ppx_sexp_conv")))
4728 (home-page "https://github.com/janestreet/ppx_sexp_conv")
4729 (synopsis "Generation of S-expression conversion functions from type definitions")
4730 (description "This package generates S-expression conversion functions from type
4732 (license license:asl2.0)))
4734 (define-public ocaml4.07-ppx-variants-conv
4736 (name "ocaml4.07-ppx-variants-conv")
4741 (url "https://github.com/janestreet/ppx_variants_conv")
4742 (commit (string-append "v" version))))
4743 (file-name (git-file-name name version))
4746 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
4747 (build-system dune-build-system)
4749 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4750 ("ocaml-variantslib" ,ocaml4.07-variantslib)
4751 ("ocaml-migrate-parsetree"
4752 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4753 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4755 `(#:ocaml ,ocaml-4.07
4756 #:findlib ,ocaml4.07-findlib
4757 #:dune ,ocaml4.07-dune))
4759 `((upstream-name . "ppx_variants_conv")))
4761 "https://github.com/janestreet/ppx_variants_conv")
4762 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
4764 "This package generates accessors and iteration functions for OCaml
4766 (license license:asl2.0)))
4768 (define-public ocaml4.07-ppx-custom-printf
4770 (name "ocaml4.07-ppx-custom-printf")
4774 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4775 (version-major+minor version)
4776 "/files/ppx_custom_printf-v" version ".tar.gz"))
4779 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
4780 (build-system dune-build-system)
4782 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4783 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4784 ("ocaml-migrate-parsetree"
4785 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4786 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4788 `(#:ocaml ,ocaml-4.07
4789 #:findlib ,ocaml4.07-findlib
4790 #:dune ,ocaml4.07-dune))
4791 (properties `((upstream-name . "ppx_custom_printf")))
4792 (home-page "https://github.com/janestreet/ppx_custom_printf")
4793 (synopsis "Printf-style format-strings for user-defined string conversion")
4794 (description "Extensions to printf-style format-strings for user-defined
4795 string conversion.")
4796 (license license:asl2.0)))
4798 (define-public ocaml4.07-bin-prot
4800 (name "ocaml4.07-bin-prot")
4804 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4805 (version-major+minor version)
4806 "/files/bin_prot-v" version ".tar.gz"))
4809 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
4810 (build-system dune-build-system)
4812 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4813 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
4814 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
4815 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
4816 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4817 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
4818 ("ocaml-migrate-parsetree"
4819 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
4821 `(#:ocaml ,ocaml-4.07
4822 #:findlib ,ocaml4.07-findlib
4823 #:dune ,ocaml4.07-dune))
4824 (properties `((upstream-name . "bin_prot")))
4825 (home-page "https://github.com/janestreet/bin_prot")
4826 (synopsis "Binary protocol generator")
4827 (description "This library contains functionality for reading and writing
4828 OCaml-values in a type-safe binary protocol. It is extremely efficient,
4829 typically supporting type-safe marshalling and unmarshalling of even highly
4830 structured values at speeds sufficient to saturate a gigabit connection. The
4831 protocol is also heavily optimized for size, making it ideal for long-term
4832 storage of large amounts of data.")
4837 (define-public ocaml-octavius
4839 (name "ocaml-octavius")
4844 (url "https://github.com/ocaml-doc/octavius")
4845 (commit (string-append "v" version))))
4846 (file-name (git-file-name name version))
4849 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
4850 (build-system dune-build-system)
4853 (modify-phases %standard-phases
4854 (add-before 'build 'make-writable
4856 (for-each (lambda (file)
4858 (find-files "." "."))
4860 (properties `((upstream-name . "octavius")))
4861 (home-page "https://github.com/ocaml-doc/octavius")
4862 (synopsis "Ocamldoc comment syntax parser")
4863 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
4864 (license license:isc)))
4866 (define-public ocaml4.07-ppx-hash
4868 (name "ocaml4.07-ppx-hash")
4873 (url "https://github.com/janestreet/ppx_hash")
4874 (commit (string-append "v" version))))
4875 (file-name (git-file-name name version))
4878 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
4879 (build-system dune-build-system)
4881 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4882 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
4883 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4884 ("ocaml-migrate-parsetree"
4885 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4886 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4888 `(#:ocaml ,ocaml-4.07
4889 #:findlib ,ocaml4.07-findlib
4890 #:dune ,ocaml4.07-dune))
4891 (properties `((upstream-name . "ppx_hash")))
4892 (home-page "https://github.com/janestreet/ppx_hash")
4893 (synopsis "Generation of hash functions from type expressions and definitions")
4894 (description "This package is a collection of ppx rewriters that generate
4895 hash functions from type exrpessions and definitions.")
4896 (license license:asl2.0)))
4898 (define-public ocaml4.07-ppx-enumerate
4900 (name "ocaml4.07-ppx-enumerate")
4905 (url "https://github.com/janestreet/ppx_enumerate")
4906 (commit (string-append "v" version))))
4907 (file-name (git-file-name name version))
4910 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
4911 (build-system dune-build-system)
4913 `(#:tests? #f; no test suite
4915 #:findlib ,ocaml4.07-findlib
4916 #:dune ,ocaml4.07-dune))
4918 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4919 ("ocaml-migrate-parsetree"
4920 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4921 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4922 (properties `((upstream-name . "ppx_enumerate")))
4923 (home-page "https://github.com/janestreet/ppx_enumerate")
4924 (synopsis "Generate a list containing all values of a finite type")
4925 (description "Ppx_enumerate is a ppx rewriter which generates a definition
4926 for the list of all values of a type (for a type which only has finitely
4928 (license license:asl2.0)))
4930 (define-public ocaml4.07-ppx-bench
4932 (name "ocaml4.07-ppx-bench")
4936 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4937 (version-major+minor version)
4938 "/files/ppx_bench-v" version ".tar.gz"))
4941 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
4942 (build-system dune-build-system)
4947 #:findlib ,ocaml4.07-findlib
4948 #:dune ,ocaml4.07-dune))
4950 `(("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
4951 ("ocaml-migrate-parsetree"
4952 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4953 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4954 (properties `((upstream-name . "ppx_bench")))
4955 (home-page "https://github.com/janestreet/ppx_bench")
4956 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
4957 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
4958 (license license:asl2.0)))
4960 (define-public ocaml4.07-ppx-here
4962 (name "ocaml4.07-ppx-here")
4966 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4967 (version-major+minor version)
4968 "/files/ppx_here-v" version ".tar.gz"))
4971 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))))
4972 (build-system dune-build-system)
4977 #:findlib ,ocaml4.07-findlib
4978 #:dune ,ocaml4.07-dune))
4980 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
4981 ("ocaml-migrate-parsetree"
4982 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4983 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4984 (properties `((upstream-name . "ppx_here")))
4985 (home-page "https://github.com/janestreet/ppx_here")
4986 (synopsis "Expands [%here] into its location")
4988 "Part of the Jane Street's PPX rewriters collection.")
4989 (license license:asl2.0)))
4991 (define-public ocaml4.07-typerep
4993 (name "ocaml4.07-typerep")
4997 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4998 (version-major+minor version)
4999 "/files/typerep-v" version ".tar.gz"))
5002 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
5003 (build-system dune-build-system)
5007 #:findlib ,ocaml4.07-findlib
5008 #:dune ,ocaml4.07-dune))
5009 (propagated-inputs `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))))
5010 (home-page "https://github.com/janestreet/typerep")
5011 (synopsis "Typerep is a library for runtime types")
5012 (description "Typerep is a library for runtime types.")
5013 (license license:asl2.0)))
5015 (define-public ocaml4.07-ppx-sexp-value
5017 (name "ocaml4.07-ppx-sexp-value")
5021 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5022 (version-major+minor version)
5023 "/files/ppx_sexp_value-v" version ".tar.gz"))
5026 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
5027 (build-system dune-build-system)
5029 `(#:ocaml ,ocaml-4.07
5030 #:findlib ,ocaml4.07-findlib
5031 #:dune ,ocaml4.07-dune))
5033 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5034 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5035 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5036 ("ocaml-migrate-parsetree"
5037 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5038 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5039 (properties `((upstream-name . "ppx_sexp_value")))
5040 (home-page "https://github.com/janestreet/ppx_sexp_value")
5041 (synopsis "Simplify building s-expressions from ocaml values")
5042 (description "A ppx rewriter that simplifies building s-expressions from
5044 (license license:asl2.0)))
5046 (define-public ocaml4.07-ppx-sexp-message
5048 (name "ocaml4.07-ppx-sexp-message")
5052 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5053 (version-major+minor version)
5054 "/files/ppx_sexp_message-v" version ".tar.gz"))
5057 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
5058 (build-system dune-build-system)
5060 `(#:ocaml ,ocaml-4.07
5061 #:findlib ,ocaml4.07-findlib
5062 #:dune ,ocaml4.07-dune))
5064 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5065 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5066 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5067 ("ocaml-migrate-parsetree"
5068 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5069 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5070 (properties `((upstream-name . "ppx_sexp_message")))
5071 (home-page "https://github.com/janestreet/ppx_sexp_message")
5072 (synopsis "A ppx rewriter for easy construction of s-expressions")
5073 (description "Ppx_sexp_message aims to ease the creation of s-expressions
5074 in OCaml. This is mainly motivated by writing error and debugging messages,
5075 where one needs to construct a s-expression based on various element of the
5076 context such as function arguments.")
5077 (license license:asl2.0)))
5079 (define-public ocaml4.07-ppx-pipebang
5081 (name "ocaml4.07-ppx-pipebang")
5085 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5086 (version-major+minor version)
5087 "/files/ppx_pipebang-v" version ".tar.gz"))
5090 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
5091 (build-system dune-build-system)
5096 #:findlib ,ocaml4.07-findlib
5097 #:dune ,ocaml4.07-dune))
5099 `(("ocaml-migrate-parsetree"
5100 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5101 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5102 (properties `((upstream-name . "ppx_pipebang")))
5103 (home-page "https://github.com/janestreet/ppx_pipebang")
5104 (synopsis "Inline reverse application operators `|>` and `|!`")
5105 (description "A ppx rewriter that inlines reverse application operators
5106 @code{|>} and @code{|!}.")
5107 (license license:asl2.0)))
5109 (define-public ocaml4.07-ppx-optional
5111 (name "ocaml4.07-ppx-optional")
5115 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5116 (version-major+minor version)
5117 "/files/ppx_optional-v" version ".tar.gz"))
5120 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))))
5121 (build-system dune-build-system)
5126 #:findlib ,ocaml4.07-findlib
5127 #:dune ,ocaml4.07-dune))
5129 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5130 ("ocaml-migrate-parsetree"
5131 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5132 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5133 (properties `((upstream-name . "ppx_optional")))
5134 (home-page "https://github.com/janestreet/ppx_optional")
5135 (synopsis "Pattern matching on flat options")
5137 "A ppx rewriter that rewrites simple match statements with an if then
5139 (license license:asl2.0)))
5141 (define-public ocaml4.07-ppx-optcomp
5143 (name "ocaml4.07-ppx-optcomp")
5147 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5148 (version-major+minor version)
5149 "/files/ppx_optcomp-v" version ".tar.gz"))
5152 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))))
5153 (build-system dune-build-system)
5155 `(#:ocaml ,ocaml-4.07
5156 #:findlib ,ocaml4.07-findlib
5157 #:dune ,ocaml4.07-dune))
5159 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5160 ("ocaml-stdio" ,ocaml4.07-stdio)
5161 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5162 (properties `((upstream-name . "ppx_optcomp")))
5163 (home-page "https://github.com/janestreet/ppx_optcomp")
5164 (synopsis "Optional compilation for OCaml")
5165 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
5166 used to handle optional compilations of pieces of code depending of the word
5167 size, the version of the compiler, ...")
5168 (license license:asl2.0)))
5170 (define-public ocaml4.07-ppx-let
5172 (name "ocaml4.07-ppx-let")
5176 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5177 (version-major+minor version)
5178 "/files/ppx_let-v" version ".tar.gz"))
5181 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))))
5182 (build-system dune-build-system)
5184 `(#:ocaml ,ocaml-4.07
5185 #:findlib ,ocaml4.07-findlib
5186 #:dune ,ocaml4.07-dune))
5188 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5189 ("ocaml-migrate-parsetree"
5190 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5191 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5192 (properties `((upstream-name . "ppx_let")))
5193 (home-page "https://github.com/janestreet/ppx_let")
5194 (synopsis "Monadic let-bindings")
5195 (description "A ppx rewriter for monadic and applicative let bindings,
5196 match expressions, and if expressions.")
5197 (license license:asl2.0)))
5199 (define-public ocaml4.07-ppx-fail
5201 (name "ocaml4.07-ppx-fail")
5205 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5206 (version-major+minor version)
5207 "/files/ppx_fail-v" version ".tar.gz"))
5210 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
5211 (build-system dune-build-system)
5213 `(#:ocaml ,ocaml-4.07
5214 #:findlib ,ocaml4.07-findlib
5215 #:dune ,ocaml4.07-dune))
5217 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5218 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5219 ("ocaml-migrate-parsetree"
5220 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5221 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5222 (properties `((upstream-name . "ppx_fail")))
5223 (home-page "https://github.com/janestreet/ppx_fail")
5224 (synopsis "Add location to calls to failwiths")
5225 (description "Syntax extension that makes [failwiths] always include a
5227 (license license:asl2.0)))
5229 (define-public ocaml4.07-ppx-assert
5231 (name "ocaml4.07-ppx-assert")
5235 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5236 (version-major+minor version)
5237 "/files/ppx_assert-v" version ".tar.gz"))
5240 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))))
5241 (build-system dune-build-system)
5243 `(#:ocaml ,ocaml-4.07
5244 #:findlib ,ocaml4.07-findlib
5245 #:dune ,ocaml4.07-dune))
5247 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5248 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5249 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5250 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5251 ("ocaml-migrate-parsetree"
5252 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5253 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5254 (properties `((upstream-name . "ppx_assert")))
5255 (home-page "https://github.com/janestreet/ppx_assert")
5256 (synopsis "Assert-like extension nodes that raise useful errors on failure")
5257 (description "This package contains assert-like extension nodes that raise
5258 useful errors on failure.")
5259 (license license:asl2.0)))
5261 (define-public ocaml4.07-ppx-expect
5263 (name "ocaml4.07-ppx-expect")
5268 (url "https://github.com/janestreet/ppx_expect")
5269 (commit (string-append "v" version))))
5270 (file-name (git-file-name name version))
5273 "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"))))
5274 (build-system dune-build-system)
5276 `(#:ocaml ,ocaml-4.07
5277 #:findlib ,ocaml4.07-findlib
5278 #:dune ,ocaml4.07-dune))
5280 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5281 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5282 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5283 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
5284 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
5285 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5286 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5287 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5288 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
5289 ("ocaml-stdio" ,ocaml4.07-stdio)
5290 ("ocaml-migrate-parsetree"
5291 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5292 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)
5293 ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
5294 (properties `((upstream-name . "ppx_expect")))
5295 (home-page "https://github.com/janestreet/ppx_expect")
5296 (synopsis "Cram like framework for OCaml")
5297 (description "Expect-test is a framework for writing tests in OCaml, similar
5298 to Cram. Expect-tests mimics the existing inline tests framework with the
5299 @code{let%expect_test} construct. The body of an expect-test can contain
5300 output-generating code, interleaved with @code{%expect} extension expressions
5301 to denote the expected output.")
5302 (license license:asl2.0)))
5304 (define-public ocaml4.07-ppx-js-style
5306 (name "ocaml4.07-ppx-js-style")
5310 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5311 (version-major+minor version)
5312 "/files/ppx_js_style-v" version ".tar.gz"))
5315 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))))
5316 (build-system dune-build-system)
5321 #:findlib ,ocaml4.07-findlib
5322 #:dune ,ocaml4.07-dune))
5324 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5325 ("ocaml-migrate-parsetree"
5326 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5327 ("ocaml-octavius" ,(package-with-ocaml4.07 ocaml-octavius))
5328 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5329 (properties `((upstream-name . "ppx_js_style")))
5330 (home-page "https://github.com/janestreet/ppx_js_style")
5331 (synopsis "Code style checker for Jane Street Packages")
5332 (description "This package is a no-op ppx rewriter. It is used as a
5333 @code{lint} tool to enforce some coding conventions across all Jane Street
5335 (license license:asl2.0)))
5337 (define-public ocaml4.07-ppx-typerep-conv
5339 (name "ocaml4.07-ppx-typerep-conv")
5344 (url "https://github.com/janestreet/ppx_typerep_conv")
5345 (commit (string-append "v" version))))
5346 (file-name (git-file-name name version))
5349 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
5350 (build-system dune-build-system)
5354 #:findlib ,ocaml4.07-findlib
5355 #:dune ,ocaml4.07-dune))
5357 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5358 ("ocaml-typerep" ,ocaml4.07-typerep)
5359 ("ocaml-migrate-parsetree"
5360 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5361 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5362 (properties `((upstream-name . "ppx_typerep_conv")))
5363 (home-page "https://github.com/janestreet/ppx_typerep_conv")
5364 (synopsis "Generation of runtime types from type declarations")
5365 (description "This package can automatically generate runtime types
5366 from type definitions.")
5367 (license license:asl2.0)))
5369 (define-public ocaml4.07-ppx-base
5371 (name "ocaml4.07-ppx-base")
5375 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5376 (version-major+minor version)
5377 "/files/ppx_base-v" version ".tar.gz"))
5380 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))))
5381 (build-system dune-build-system)
5385 #:findlib ,ocaml4.07-findlib
5386 #:dune ,ocaml4.07-dune))
5388 `(("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5389 ("ocaml-ppx-enumerate" ,ocaml4.07-ppx-enumerate)
5390 ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
5391 ("ocaml-ppx-js-style" ,ocaml4.07-ppx-js-style)
5392 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5393 ("ocaml-migrate-parsetree"
5394 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5395 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5396 (properties `((upstream-name . "ppx_base")))
5397 (home-page "https://github.com/janestreet/ppx_base")
5398 (synopsis "Base set of ppx rewriters")
5399 (description "Ppx_base is the set of ppx rewriters used for Base.
5401 Note that Base doesn't need ppx to build, it is only used as a
5402 verification tool.")
5403 (license license:asl2.0)))
5405 (define-public ocaml4.07-ppx-bin-prot
5407 (name "ocaml4.07-ppx-bin-prot")
5412 (url "https://github.com/janestreet/ppx_bin_prot")
5413 (commit (string-append "v" version))))
5414 (file-name (git-file-name name version))
5417 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
5418 (build-system dune-build-system)
5420 ;; Cyclic dependency with ocaml-ppx-jane
5423 #:findlib ,ocaml4.07-findlib
5424 #:dune ,ocaml4.07-dune))
5426 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5427 ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
5428 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5429 ("ocaml-migrate-parsetree"
5430 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5431 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5432 (properties `((upstream-name . "ppx_bin_prot")))
5433 (home-page "https://github.com/janestreet/ppx_bin_prot")
5434 (synopsis "Generation of bin_prot readers and writers from types")
5435 (description "Generation of binary serialization and deserialization
5436 functions from type definitions.")
5437 (license license:asl2.0)))
5439 (define-public ocaml4.07-ppx-jane
5441 (name "ocaml4.07-ppx-jane")
5445 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5446 (version-major+minor version)
5447 "/files/ppx_jane-v" version ".tar.gz"))
5450 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
5451 (build-system dune-build-system)
5455 #:findlib ,ocaml4.07-findlib
5456 #:dune ,ocaml4.07-dune))
5458 `(("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5459 ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
5460 ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
5461 ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
5462 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
5463 ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
5464 ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
5465 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
5466 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5467 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5468 ("ocaml-ppx-let" ,ocaml4.07-ppx-let)
5469 ("ocaml-ppx-optcomp" ,ocaml4.07-ppx-optcomp)
5470 ("ocaml-ppx-optional" ,ocaml4.07-ppx-optional)
5471 ("ocaml-ppx-pipebang" ,ocaml4.07-ppx-pipebang)
5472 ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
5473 ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
5474 ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
5475 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
5476 ("ocaml-migrate-parsetree"
5477 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5478 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5479 (properties `((upstream-name . "ppx_jane")))
5480 (home-page "https://github.com/janestreet/ppx_jane")
5481 (synopsis "Standard Jane Street ppx rewriters")
5482 (description "This package installs a ppx-jane executable, which is a ppx
5483 driver including all standard Jane Street ppx rewriters.")
5484 (license license:asl2.0)))
5486 (define-public ocaml4.07-splittable-random
5488 (name "ocaml4.07-splittable-random")
5492 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5493 (version-major+minor version)
5494 "/files/splittable_random-v" version ".tar.gz"))
5497 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
5498 (build-system dune-build-system)
5500 `(#:ocaml ,ocaml-4.07
5501 #:findlib ,ocaml4.07-findlib
5502 #:dune ,ocaml4.07-dune))
5504 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5505 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5506 ("ocaml-migrate-parsetree"
5507 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
5508 (properties `((upstream-name . "splittable_random")))
5509 (home-page "https://github.com/janestreet/splittable_random")
5510 (synopsis "PRNG that can be split into independent streams")
5511 (description "This package provides a splittable
5512 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
5513 be used as a stream of random values; it can also be split to produce a
5514 second, independent stream of random values.
5516 This library implements a splittable pseudo-random number generator that sacrifices
5517 cryptographic-quality randomness in favor of performance.")
5518 (license license:asl2.0)))
5520 (define-public ocaml4.07-jane-street-headers
5522 (name "ocaml4.07-jane-street-headers")
5526 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5527 (version-major+minor version)
5528 "/files/jane-street-headers-v" version ".tar.gz"))
5531 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
5532 (build-system dune-build-system)
5536 #:findlib ,ocaml4.07-findlib
5537 #:dune ,ocaml4.07-dune))
5538 (home-page "https://github.com/janestreet/jane-street-headers")
5539 (synopsis "Jane Street C header files")
5540 (description "This package provides C header files shared between the
5541 various Jane Street packages.")
5542 (license license:asl2.0)))
5544 (define-public ocaml4.07-configurator
5546 (name "ocaml4.07-configurator")
5550 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5551 (version-major+minor version)
5552 "/files/configurator-v" version ".tar.gz"))
5555 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
5556 (build-system dune-build-system)
5561 #:findlib ,ocaml4.07-findlib
5562 #:dune ,ocaml4.07-dune))
5564 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5565 ("ocaml-stdio" ,ocaml4.07-stdio)))
5566 (home-page "https://github.com/janestreet/configurator")
5567 (synopsis "Helper library for gathering system configuration")
5568 (description "Configurator is a small library that helps writing OCaml
5569 scripts that test features available on the system, in order to generate config.h
5572 Configurator allows one to:
5574 @item test if a C program compiles
5575 @item query pkg-config
5576 @item import #define from OCaml header files
5577 @item generate config.h file
5579 (license license:asl2.0)))
5581 (define-public ocaml4.07-spawn
5583 (name "ocaml4.07-spawn")
5588 (url "https://github.com/janestreet/spawn")
5589 (commit (string-append "v" version))))
5590 (file-name (git-file-name name version))
5593 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
5594 (build-system dune-build-system)
5597 (modify-phases %standard-phases
5598 (add-before 'check 'fix-tests
5600 (substitute* "test/tests.ml"
5601 (("/bin/pwd") (which "pwd"))
5602 (("/bin/echo") (which "echo")))
5605 #:findlib ,ocaml4.07-findlib
5606 #:dune ,ocaml4.07-dune))
5608 `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
5609 (home-page "https://github.com/janestreet/spawn")
5610 (synopsis "Spawning sub-processes")
5612 "Spawn is a small library exposing only one functionality: spawning sub-process.
5614 It has three main goals:
5617 @item provide missing features of Unix.create_process such as providing a
5619 @item provide better errors when a system call fails in the
5620 sub-process. For instance if a command is not found, you get a proper
5621 @code{Unix.Unix_error} exception,
5622 @item improve performances by using vfork when available. It is often
5623 claimed that nowadays fork is as fast as vfork, however in practice
5624 fork takes time proportional to the process memory while vfork is
5625 constant time. In application using a lot of memory, vfork can be
5626 thousands of times faster than fork.
5628 (license license:asl2.0)))
5630 (define-public ocaml4.07-core
5632 (name "ocaml4.07-core")
5637 (url "https://github.com/janestreet/core")
5638 (commit (string-append "v" version))))
5639 (file-name (git-file-name name version))
5642 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
5643 (build-system dune-build-system)
5646 #:tests? #f; Require a cyclic dependency: core_extended
5648 #:findlib ,ocaml4.07-findlib
5649 #:dune ,ocaml4.07-dune))
5651 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5652 ("ocaml-configurator" ,ocaml4.07-configurator)
5653 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
5654 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5655 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5656 ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
5657 ("ocaml-spawn" ,ocaml4.07-spawn)
5658 ("ocaml-stdio" ,ocaml4.07-stdio)
5659 ("ocaml-migrate-parsetree"
5660 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5661 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
5662 (home-page "https://github.com/janestreet/core")
5663 (synopsis "Alternative to OCaml's standard library")
5664 (description "The Core suite of libraries is an alternative to OCaml's
5665 standard library that was developed by Jane Street.")
5666 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
5667 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
5668 (license license:asl2.0)))
5670 (define-public ocaml4.07-core-kernel
5672 (name "ocaml4.07-core-kernel")
5677 (url "https://github.com/janestreet/core_kernel")
5678 (commit (string-append "v" version))))
5679 (file-name (git-file-name name version))
5682 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
5683 (build-system dune-build-system)
5685 ;; Cyclic dependency with ocaml-core
5688 #:findlib ,ocaml4.07-findlib
5689 #:dune ,ocaml4.07-dune))
5691 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5692 ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
5693 ("ocaml-configurator" ,ocaml4.07-configurator)
5694 ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
5695 ("ocaml-jane-street-headers" ,ocaml4.07-jane-street-headers)
5696 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5697 ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
5698 ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
5699 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5700 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5701 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5702 ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
5703 ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))
5704 ("ocaml-splittable-random" ,ocaml4.07-splittable-random)
5705 ("ocaml-stdio" ,ocaml4.07-stdio)
5706 ("ocaml-typerep" ,ocaml4.07-typerep)
5707 ("ocaml-variantslib" ,ocaml4.07-variantslib)
5708 ("ocaml-migrate-parsetree"
5709 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
5710 (properties `((upstream-name . "core_kernel")))
5711 (home-page "https://github.com/janestreet/core_kernel")
5712 (synopsis "Portable standard library for OCaml")
5713 (description "Core is an alternative to the OCaml standard library.
5715 Core_kernel is the system-independent part of Core. It is aimed for cases when
5716 the full Core is not available, such as in Javascript.")
5718 ;; this package and parts of OCaml, relicensed by janestreet
5723 (define-public ocaml-markup
5725 (name "ocaml-markup")
5727 (home-page "https://github.com/aantron/markup.ml")
5732 (url (string-append home-page ".git"))
5734 (file-name (git-file-name name version))
5737 "09hkrf9pw6hpb9j06p5bddklpnjwdjpqza3bx2179l970yl67an9"))))
5738 (build-system dune-build-system)
5740 `(#:package "markup"))
5742 `(("libev" ,libev)))
5744 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
5745 ("ocaml-uchar" ,ocaml-uchar)
5746 ("ocaml-uutf" ,ocaml-uutf)
5747 ("ocaml-lwt" ,ocaml-lwt)))
5749 `(("ocaml-ounit2" ,ocaml-ounit2)
5750 ("pkg-config" ,pkg-config)))
5752 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
5753 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
5754 (description "Markup.ml provides an HTML parser and an XML parser. The
5755 parsers are wrapped in a simple interface: they are functions that transform
5756 byte streams to parsing signal streams. Streams can be manipulated in various
5757 ways, such as processing by fold, filter, and map, assembly into DOM tree
5758 structures, or serialization back to HTML or XML.
5760 Both parsers are based on their respective standards. The HTML parser, in
5761 particular, is based on the state machines defined in HTML5.
5763 The parsers are error-recovering by default, and accept fragments. This makes
5764 it very easy to get a best-effort parse of some input. The parsers can,
5765 however, be easily configured to be strict, and to accept only full documents.
5767 Apart from this, the parsers are streaming (do not build up a document in
5768 memory), non-blocking (can be used with threading libraries), lazy (do not
5769 consume input unless the signal stream is being read), and process the input in
5770 a single pass. They automatically detect the character encoding of the input
5771 stream, and convert everything to UTF-8.")
5772 (license license:bsd-3)))
5774 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
5775 ;; package-with-ocaml4.07
5776 (define-public ocaml-markup0.8.0
5778 (inherit ocaml-markup)
5779 (name "ocaml-markup")
5781 (home-page "https://github.com/aantron/markup.ml")
5786 (url (string-append home-page ".git"))
5788 (file-name (git-file-name name version))
5791 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
5794 (define-public ocaml-tyxml
5796 (name "ocaml-tyxml")
5802 (url "https://github.com/ocsigen/tyxml")
5804 (file-name (git-file-name name version))
5807 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
5808 (build-system dune-build-system)
5810 `(("ocaml-re" ,ocaml-re)
5811 ("ocaml-seq" ,ocaml-seq)
5812 ("ocaml-uutf" ,ocaml-uutf)
5813 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5814 ("ocaml-markup" ,ocaml-markup)))
5816 `(("ocaml-alcotest" ,ocaml-alcotest)))
5817 (arguments `(#:package "tyxml"))
5818 (home-page "https://github.com/ocsigen/tyxml/")
5819 (synopsis "TyXML is a library for building correct HTML and SVG documents")
5820 (description "TyXML provides a set of convenient combinators that uses the
5821 OCaml type system to ensure the validity of the generated documents. TyXML can
5822 be used with any representation of HTML and SVG: the textual one, provided
5823 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
5824 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
5825 also create your own representation and use it to instantiate a new set of
5827 (license license:lgpl2.1)))
5829 (define-public ocaml-bisect-ppx
5831 (name "ocaml-bisect-ppx")
5837 (url "https://github.com/aantron/bisect_ppx")
5839 (file-name (git-file-name name version))
5842 "0900vli5kw7s5kdam0n4cqsfsfqb7mdb3azn3i55595gilg1vyn8"))))
5843 (build-system dune-build-system)
5845 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
5846 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5847 ("ocaml-ounit" ,ocaml-ounit)))
5850 (modify-phases %standard-phases
5851 (add-before 'build 'fix-deprecated
5853 ;; Fixed upstream in 22dd1ad9a0c9629f60599c22d82c6488394d6d32, but
5854 ;; not in a release yet.
5855 (substitute* "src/ppx/instrument.ml"
5856 (("module Ast = Ast_405")
5857 "module Ast = Migrate_parsetree.Ast_405
5858 module Ast_405 = Ast"))
5860 (home-page "https://github.com/aantron/bisect_ppx")
5861 (synopsis "Code coverage for OCaml")
5862 (description "Bisect_ppx helps you test thoroughly. It is a small
5863 preprocessor that inserts instrumentation at places in your code, such as
5864 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
5865 nice HTML report showing which places were visited and which were missed.
5867 Usage is simple - add package bisect_ppx when building tests, run your tests,
5868 then run the Bisect_ppx report tool on the generated visitation files.")
5869 (license license:mpl2.0)))
5871 (define-public ocaml-odoc
5879 (url "https://github.com/ocaml/odoc")
5881 (file-name (git-file-name name version))
5883 (base32 "0fqfyz48q7ss5bc4c5phmp4s3ka3vc08b8gfk8fvyryvb4bq27jm"))))
5884 (build-system dune-build-system)
5886 `(("ocaml-alcotest" ,ocaml-alcotest)
5887 ("ocaml-markup" ,ocaml-markup)
5888 ("ocaml-sexplib" ,ocaml-sexplib)
5889 ("ocaml-re" ,ocaml-re)
5890 ("ocaml-uutf" ,ocaml-uutf)))
5892 `(("ocaml-astring" ,ocaml-astring)
5893 ("ocaml-cmdliner" ,ocaml-cmdliner)
5894 ("ocaml-cppo" ,ocaml-cppo)
5895 ("ocaml-fpath" ,ocaml-fpath)
5896 ("ocaml-result" ,ocaml-result)
5897 ("ocaml-tyxml" ,ocaml-tyxml)
5898 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
5899 ("tidy-html" ,tidy-html)))
5900 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
5901 (home-page "https://github.com/ocaml/odoc")
5902 (synopsis "OCaml documentation generator")
5903 (description "Odoc is a documentation generator for OCaml. It reads
5904 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
5907 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
5908 advantage over ocamldoc is an accurate cross-referencer, which handles the
5909 complexity of the OCaml module system.")
5910 (license license:isc)))
5912 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
5913 ;; with old version of dune used in package-with-ocaml4.07
5914 (define-public ocaml4.07-odoc
5915 (package-with-ocaml4.07
5917 (inherit ocaml-odoc)
5924 (url "https://github.com/ocaml/odoc")
5926 (file-name (git-file-name name version))
5928 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
5931 (define-public ocaml4.07-fftw3
5933 (name "ocaml4.07-fftw3")
5939 (url "https://github.com/Chris00/fftw-ocaml")
5941 (file-name (git-file-name name version))
5944 "0l66yagjkwdcib6q55wd8wiap50vi23qiahkghlvm28z7nvbclfk"))))
5945 (build-system dune-build-system)
5948 #:test-target "tests"
5950 #:findlib ,ocaml4.07-findlib
5951 #:dune ,ocaml4.07-dune))
5956 `(("ocaml-cppo" ,(package-with-ocaml4.07 ocaml-cppo))
5957 ("ocaml-lacaml" ,ocaml4.07-lacaml)))
5959 "https://github.com/Chris00/fftw-ocaml")
5961 "Bindings to FFTW3")
5963 "Bindings providing OCaml support for the seminal Fast Fourier Transform
5965 (license license:lgpl2.1))) ; with static linking exception.
5967 (define-public ocaml4.07-lacaml
5969 (name "ocaml4.07-lacaml")
5975 (url "https://github.com/mmottl/lacaml")
5977 (file-name (git-file-name name version))
5980 "180yb79a3qgx067qcpm50q12hrimjygf06rgkzbish9d1zfm670c"))))
5981 (build-system dune-build-system)
5983 `(#:tests? #f ; No test target.
5985 #:findlib ,ocaml4.07-findlib
5986 #:dune ,ocaml4.07-dune))
5988 `(("openblas" ,openblas)
5990 ("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
5991 ("ocaml-stdio" ,ocaml4.07-stdio)))
5992 (home-page "https://mmottl.github.io/lacaml/")
5994 "OCaml-bindings to BLAS and LAPACK")
5996 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
5997 LAPACK-library (Linear Algebra routines). It also contains many additional
5998 convenience functions for vectors and matrices.")
5999 (license license:lgpl2.1)))
6001 (define-public ocaml-cairo2
6003 (name "ocaml-cairo2")
6008 (url "https://github.com/Chris00/ocaml-cairo")
6010 (file-name (git-file-name name version))
6013 ;; NOTE: This patch will be obsolete on the
6014 ;; next tagged release. Remove it at that
6016 "ocaml-cairo2-caml_ba_array-fix.patch"))
6019 "0wzysis9fa850s68qh8vrvqc6svgllhwra3kzll2ibv0wmdqrich"))))
6020 (build-system dune-build-system)
6022 `(#:test-target "tests"))
6026 ("lablgtk" ,lablgtk)))
6028 `(("pkg-config" ,pkg-config)))
6029 (home-page "https://github.com/Chris00/ocaml-cairo")
6030 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
6031 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
6032 with support for multiple output devices. Currently supported output targets
6033 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
6034 and SVG file output.")
6035 (license license:lgpl3+)))
6037 (define-public ocaml-version
6039 (name "ocaml-version")
6045 (url "https://github.com/ocurrent/ocaml-version")
6046 (commit (string-append "v" version))))
6047 (file-name (git-file-name name version))
6050 "13770mp6adjjbx63zsbh6506dqxz241chw8c3y403sxpw45hnaw6"))))
6051 (build-system dune-build-system)
6052 (arguments `(#:tests? #f)) ; no tests
6054 "https://github.com/ocurrent/ocaml-version")
6056 "Manipulate, parse and generate OCaml compiler version strings")
6058 "This library provides facilities to parse version numbers of the OCaml
6059 compiler, and enumerates the various official OCaml releases and configuration
6061 (license license:isc)))
6063 (define-public ocaml-mdx
6070 (url "https://github.com/realworldocaml/mdx")
6072 (file-name (git-file-name name version))
6075 "10avyv99xkfqdq3gmq8gps770jpibbfslg97sbhgmp0dpwikz49d"))))
6076 (build-system dune-build-system)
6078 `(("ocaml-fmt" ,ocaml-fmt)
6079 ("ocaml-astring" ,ocaml-astring)
6080 ("ocaml-logs" ,ocaml-logs)
6081 ("ocaml-cmdliner" ,ocaml-cmdliner)
6082 ("ocaml-re" ,ocaml-re)
6083 ("ocaml-result" ,ocaml-result)
6084 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6085 ("ocaml-odoc" ,ocaml-odoc)
6086 ("ocaml-version" ,ocaml-version)))
6088 `(("ocaml-cppo" ,ocaml-cppo)
6089 ("ocaml-lwt" ,ocaml-lwt)
6090 ("ocaml-alcotest" ,ocaml-alcotest)))
6092 "https://github.com/realworldocaml/mdx")
6094 "Executable code blocks inside markdown files")
6096 "@code{ocaml-mdx} allows to execute code blocks inside markdown files.
6097 There are (currently) two sub-commands, corresponding
6098 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
6099 and tests (@code{ocaml-mdx test}]).
6101 The pre-processor mode allows to mix documentation and code,
6102 and to practice @dfn{literate programming} using markdown and OCaml.
6104 The test mode allows to ensure that shell scripts and OCaml fragments
6105 in the documentation always stays up-to-date.
6107 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
6108 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
6110 (license license:isc)))
6112 (define-public lablgtk3
6119 (url "https://github.com/garrigue/lablgtk")
6121 (file-name (git-file-name name version))
6124 "11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
6125 (build-system dune-build-system)
6130 (modify-phases %standard-phases
6131 (add-before 'build 'make-writable
6133 (for-each (lambda (file)
6135 (find-files "." "."))
6138 `(("ocaml-cairo2" ,ocaml-cairo2)))
6140 `(("camlp5" ,camlp5)
6142 ("gtksourceview-3" ,gtksourceview-3)
6143 ("gtkspell3" ,gtkspell3)))
6145 `(("pkg-config" ,pkg-config)))
6146 (home-page "https://github.com/garrigue/lablgtk")
6147 (synopsis "OCaml interface to GTK+3")
6148 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
6149 provides a strongly-typed object-oriented interface that is compatible with the
6150 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
6151 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
6152 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
6153 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
6154 ;; Version 2 only, with linking exception.
6155 (license license:lgpl2.0)))
6157 (define-public ocaml-reactivedata
6158 ;; Future releases will use dune.
6160 (name "ocaml-reactivedata")
6165 (url "https://github.com/ocsigen/reactiveData")
6167 (file-name (git-file-name name version))
6170 "0l5z0fsckqkywjbn2nwy3s55h85yx8scc4hq9qzr9ig3hrq1mfb0"))))
6173 (modify-phases %standard-phases
6175 (add-before 'build 'fix-deprecated
6178 "src/reactiveData.ml"
6179 (("Pervasives.compare") "compare"))
6181 (add-before 'install 'forget-makefile
6182 ;; Ensure we use opam to install files
6184 (delete-file "Makefile")
6186 (build-system ocaml-build-system)
6187 (properties `((upstream-name . "reactiveData")))
6189 `(("ocamlbuild" ,ocamlbuild)
6192 `(("ocaml-react" ,ocaml-react)))
6193 (home-page "https://github.com/ocsigen/reactiveData")
6194 (synopsis "Declarative events and signals for OCaml")
6196 "React is an OCaml module for functional reactive programming (FRP). It
6197 provides support to program with time varying values: declarative events and
6198 signals. React doesn't define any primitive event or signal, it lets the
6199 client chooses the concrete timeline.")
6200 (license license:lgpl2.1+)))
6202 (define make-ocaml-llvm
6203 ;; Make it a memoizing procedure so its callers below don't end up defining
6204 ;; two equal-but-not-eq "ocaml-llvm" packages for the default LLVM.
6213 (string-append "-DLLVM_OCAML_EXTERNAL_LLVM_LIBDIR="
6214 (assoc-ref %build-inputs "llvm") "/lib")
6215 "-DBUILD_SHARED_LIBS=TRUE"
6216 "-DLLVM_OCAML_OUT_OF_TREE=TRUE"
6217 (string-append "-DLLVM_OCAML_INSTALL_PATH="
6218 (assoc-ref %outputs "out") "/lib/ocaml/site-lib"))
6220 (modify-phases %standard-phases
6223 (invoke "make" "ocaml_all")))
6226 (invoke "cmake" "-P" "bindings/ocaml/cmake_install.cmake"))))))
6231 ("ocaml-findlib" ,ocaml-findlib)
6232 ("ocaml-ounit" ,ocaml-ounit)
6233 ("python" ,python)))
6235 `(("ocaml-integers" ,ocaml-integers)
6236 ("ocaml-ctypes" ,ocaml-ctypes)))
6237 (synopsis "OCaml bindings to LLVM")
6238 (description "This package contains the OCaml bindings distributed with
6241 (define-public ocaml-llvm (make-ocaml-llvm llvm))
6242 (define-public ocaml-llvm-9 (make-ocaml-llvm llvm-9))
6243 (define-public ocaml-llvm-10 (make-ocaml-llvm llvm-10))
6244 (define-public ocaml-llvm-11 (make-ocaml-llvm llvm-11))