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-2022 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, 2021 Simon Tournier <zimon.toutoune@gmail.com>
19 ;;; Copyright © 2020 divoplade <d@divoplade.fr>
20 ;;; Copyright © 2020, 2021, 2022 pukkamustard <pukkamustard@posteo.net>
21 ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
22 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
23 ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
24 ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
25 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
26 ;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
27 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
28 ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
30 ;;; This file is part of GNU Guix.
32 ;;; GNU Guix is free software; you can redistribute it and/or modify it
33 ;;; under the terms of the GNU General Public License as published by
34 ;;; the Free Software Foundation; either version 3 of the License, or (at
35 ;;; your option) any later version.
37 ;;; GNU Guix is distributed in the hope that it will be useful, but
38 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
39 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40 ;;; GNU General Public License for more details.
42 ;;; You should have received a copy of the GNU General Public License
43 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
45 (define-module (gnu packages ocaml)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages algebra)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages bison)
52 #:use-module (gnu packages boost)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages curl)
55 #:use-module (gnu packages emacs)
56 #:use-module (gnu packages emacs-xyz)
57 #:use-module (gnu packages flex)
58 #:use-module (gnu packages gcc)
59 #:use-module (gnu packages ghostscript)
60 #:use-module (gnu packages glib)
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages libevent)
65 #:use-module (gnu packages libffi)
66 #:use-module (gnu packages llvm)
67 #:use-module (gnu packages m4)
68 #:use-module (gnu packages maths)
69 #:use-module (gnu packages multiprecision)
70 #:use-module (gnu packages ncurses)
71 #:use-module (gnu packages node)
72 #:use-module (gnu packages pcre)
73 #:use-module (gnu packages perl)
74 #:use-module (gnu packages pkg-config)
75 #:use-module (gnu packages protobuf)
76 #:use-module (gnu packages python)
77 #:use-module (gnu packages python-xyz)
78 #:use-module (gnu packages rsync)
79 #:use-module (gnu packages sdl)
80 #:use-module (gnu packages sqlite)
81 #:use-module (gnu packages tex)
82 #:use-module (gnu packages texinfo)
83 #:use-module (gnu packages time)
84 #:use-module (gnu packages tls)
85 #:use-module (gnu packages version-control)
86 #:use-module (gnu packages virtualization)
87 #:use-module (gnu packages web)
88 #:use-module (gnu packages web-browsers)
89 #:use-module (gnu packages xml)
90 #:use-module (gnu packages xorg)
91 #:use-module (guix build-system dune)
92 #:use-module (guix build-system emacs)
93 #:use-module (guix build-system gnu)
94 #:use-module (guix build-system ocaml)
95 #:use-module (guix download)
96 #:use-module (guix gexp)
97 #:use-module (guix git-download)
98 #:use-module ((guix licenses) #:prefix license:)
99 #:use-module (guix packages)
100 #:use-module (guix svn-download)
101 #:use-module (guix utils)
102 #:use-module ((srfi srfi-1) #:hide (zip)))
104 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
105 ;; their number, not their name.
106 (define (ocaml-forge-uri name version file-number)
107 (string-append "https://forge.ocamlcore.org/frs/download.php/"
108 (number->string file-number) "/" name "-" version
111 (define (janestreet-origin name version hash)
112 (origin (method url-fetch)
113 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
114 (version-major+minor version) "/files/"
115 name "-v" (version-major+minor+point version)
117 (sha256 (base32 hash))))
119 (define-public camlboot
120 (let ((commit "45045d0afa82f7e9b7ea07314aab08be2d3cd64b")
124 (version (git-version "0.0.0" revision commit))
128 (url "https://github.com/Ekdohibs/camlboot")
131 (file-name (git-file-name name version))
134 "1f5gl3hzvixbgk0v3kmxiyn432znyy3jh5fa65cfzcaxzgfv1i1c"))
135 (modules '((guix build utils)))
138 ;; Remove bootstrap binaries and pre-generated source files,
139 ;; to ensure we actually bootstrap properly.
140 (for-each delete-file (find-files "ocaml-src" "^.depend$"))
141 (delete-file "ocaml-src/boot/ocamlc")
142 (delete-file "ocaml-src/boot/ocamllex")
146 (chmod file (logior (stat:mode (stat file)) #o200)))
147 (find-files "." "."))))))
148 (build-system gnu-build-system)
150 `(#:make-flags (list "_boot/ocamlc") ; build target
151 #:tests? #f ; no tests
153 (modify-phases %standard-phases
155 (add-before 'build 'no-autocompile
157 ;; prevent a guile warning
158 (setenv "GUILE_AUTO_COMPILE" "0")))
160 (lambda* (#:key outputs #:allow-other-keys)
161 (let* ((out (assoc-ref outputs "out"))
162 (bin (string-append out "/bin")))
164 (install-file "_boot/ocamlc" bin)
165 (rename-file "miniml/interp/lex.byte" "ocamllex")
166 (install-file "ocamllex" bin)))))))
170 ;; 10 hours, mostly for arm, more than 1 expected even on x86_64
171 `((max-silent-time . 36000)))
172 (home-page "https://github.com/Ekdohibs/camlboot")
173 (synopsis "OCaml source bootstrap")
174 (description "OCaml is written in OCaml. Its sources contain a pre-compiled
175 bytecode version of @command{ocamlc} and @command{ocamllex} that are used to
176 build the next version of the compiler. Camlboot implements a bootstrap for
177 the OCaml compiler and provides a bootstrapped equivalent to these files.
179 It contains a compiler for a small subset of OCaml written in Guile Scheme,
180 an interpreter for OCaml written in that subset and a manually-written lexer
181 for OCaml. These elements eliminate the need for the binary bootstrap in
182 OCaml and can effectively bootstrap OCaml 4.07.
184 This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
185 (license license:expat))))
187 (define-public ocaml-4.14
194 "http://caml.inria.fr/pub/distrib/ocaml-"
195 (version-major+minor version)
196 "/ocaml-" version ".tar.xz"))
199 "0axcc7c23pf4qinz4vxgkba6pwziwbp9i2ydwzar7x9zlp6diarn"))))
200 (build-system gnu-build-system)
202 (list (search-path-specification
203 (variable "OCAMLPATH")
204 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
205 (search-path-specification
206 (variable "CAML_LD_LIBRARY_PATH")
207 (files (list "lib/ocaml/site-lib/stubslibs"
208 "lib/ocaml/site-lib/stublibs")))))
210 (list perl pkg-config))
212 (list libx11 libiberty ;needed for objdump support
213 zlib)) ;also needed for objdump support
215 `(#:configure-flags '("--enable-ocamltest")
216 #:test-target "tests"
217 #:make-flags '("world.opt")
219 (modify-phases %standard-phases
220 (add-after 'unpack 'patch-/bin/sh-references
221 (lambda* (#:key inputs #:allow-other-keys)
222 (let* ((sh (search-input-file inputs "/bin/sh"))
223 (quoted-sh (string-append "\"" sh "\"")))
224 (with-fluids ((%default-port-encoding #f))
230 (format (current-error-port) "\
231 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
234 (find-files "." "\\.ml$")))))))))
235 (home-page "https://ocaml.org/")
236 (synopsis "The OCaml programming language")
238 "OCaml is a general purpose industrial-strength programming language with
239 an emphasis on expressiveness and safety. Developed for more than 20 years at
240 Inria it benefits from one of the most advanced type systems and supports
241 functional, imperative and object-oriented styles of programming.")
242 ;; The compiler is distributed under qpl1.0 with a change to choice of
243 ;; law: the license is governed by the laws of France. The library is
244 ;; distributed under lgpl2.0.
245 (license (list license:qpl license:lgpl2.0))))
247 (define-public ocaml-4.09
254 "http://caml.inria.fr/pub/distrib/ocaml-"
255 (version-major+minor version)
256 "/ocaml-" version ".tar.xz"))
257 (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
260 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
263 (modify-phases %standard-phases
264 (add-after 'unpack 'patch-/bin/sh-references
265 (lambda* (#:key inputs #:allow-other-keys)
266 (let* ((sh (search-input-file inputs "/bin/sh"))
267 (quoted-sh (string-append "\"" sh "\"")))
268 (with-fluids ((%default-port-encoding #f))
274 (format (current-error-port) "\
275 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
278 (find-files "." "\\.ml$"))))))
281 (invoke "make" "-j" (number->string (parallel-job-count))
285 (with-directory-excursion "testsuite"
286 (invoke "make" "all")))))))))
288 ;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot,
289 ;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
290 ;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files
291 ;; that we otherwise remove for bootstrap purposes.
292 (define ocaml-4.07-boot
300 "http://caml.inria.fr/pub/distrib/ocaml-"
301 (version-major+minor version)
302 "/ocaml-" version ".tar.xz"))
305 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
306 (patches (search-patches "ocaml-multiple-definitions.patch"))
307 (modules '((guix build utils)))
310 ;; Remove bootstrap binaries and pre-generated source files,
311 ;; to ensure we actually bootstrap properly.
312 (for-each delete-file (find-files "." "^.depend$"))
313 (delete-file "boot/ocamlc")
314 (delete-file "boot/ocamllex")))))
318 (modify-phases %standard-phases
319 (add-before 'configure 'copy-bootstrap
320 (lambda* (#:key inputs #:allow-other-keys)
321 (let ((camlboot (assoc-ref inputs "camlboot")))
322 (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex")
323 (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc")
324 (chmod "boot/ocamllex" #o755)
325 (chmod "boot/ocamlc" #o755))))
327 (lambda* (#:key outputs #:allow-other-keys)
328 (let* ((out (assoc-ref outputs "out"))
329 (mandir (string-append out "/share/man")))
330 (invoke "./configure"
332 "--mandir" mandir))))
334 (lambda* (#:key parallel-build? #:allow-other-keys)
335 (define* (make . args)
337 (append (if parallel-build?
338 `("-j" ,(number->string (parallel-job-count)))
341 ;; create empty .depend files because they are included by various
342 ;; Makefiles, and they have no rule to generate them.
343 (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend"
344 "tools/.depend" "lex/.depend" "asmrun/.depend"
345 "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend"
346 "ocamldoc/stdlib_non_prefixed/.depend"
347 "otherlibs/bigarray/.depend" "otherlibs/graph/.depend"
348 "otherlibs/raw_spacetime_lib/.depend" "otherlibs/str/.depend"
349 "otherlibs/systhreads/.depend" "otherlibs/threads/.depend"
350 "otherlibs/unix/.depend" "otherlibs/win32unix/.depend")
351 ;; We cannot build ocamldep until we have created all the .depend
352 ;; files, so replace it with ocamlc -depend.
353 (substitute* "tools/Makefile"
354 (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend"))
355 (substitute* '("otherlibs/graph/Makefile"
356 "otherlibs/systhreads/Makefile"
357 "otherlibs/threads/Makefile"
358 "otherlibs/unix/Makefile")
359 (("\\$\\(CAMLRUN\\) ../../tools/ocamldep")
360 "../../boot/ocamlc -depend"))
361 (substitute* '("otherlibs/bigarray/Makefile"
362 "otherlibs/raw_spacetime_lib/Makefile"
363 "otherlibs/str/Makefile"
364 "otherlibs/win32unix/Makefile")
365 (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep")
366 "../../boot/ocamlc -depend"))
367 ;; Ensure we copy needed file, so we can generate a proper .depend
368 (substitute* "ocamldoc/Makefile"
369 (("include Makefile.unprefix")
370 "include Makefile.unprefix
371 depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
372 ;; Generate required tools for `alldepend'
373 (make "-C" "byterun" "depend")
374 (make "-C" "byterun" "all")
375 (copy-file "byterun/ocamlrun" "boot/ocamlrun")
377 (copy-file "yacc/ocamlyacc" "boot/ocamlyacc")
378 (make "-C" "stdlib" "sys.ml")
379 (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend")
380 ;; Build and copy files later used by `tools'
381 (make "-C" "stdlib" "COMPILER="
382 "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives"
386 (copy-file file (string-append "boot/" (basename file))))
387 (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader"
388 (find-files "stdlib" ".*.cmi$")))
389 (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a")
390 ;; required for ocamldoc/stdlib_non_prefixed
391 (make "parsing/parser.mli")
392 ;; required for dependencies
394 "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .."
395 "make_opcodes" "cvt_emit")
396 ;; generate all remaining .depend files
398 (string-append "ocamllex=" (getcwd) "/boot/ocamlrun "
399 (getcwd) "/boot/ocamllex")
400 (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend")
401 (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend")
402 (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend"))
404 (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives"
408 "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives"
411 (lambda* (#:key outputs #:allow-other-keys)
412 (let* ((out (assoc-ref outputs "out"))
413 (bin (string-append out "/bin"))
414 (depends (string-append out "/share/depends")))
417 (install-file "ocamlc" bin)
418 (install-file "lex/ocamllex" bin)
421 (let ((dir (string-append depends "/" (dirname file))))
423 (install-file file dir)))
424 (find-files "." "^\\.depend$"))))))))
426 `(("camlboot" ,camlboot)
428 ("pkg-config" ,pkg-config)))))
430 (define-public ocaml-4.07
432 (inherit ocaml-4.07-boot)
435 (substitute-keyword-arguments (package-arguments ocaml-4.09)
437 `(modify-phases ,phases
438 (add-before 'configure 'copy-bootstrap
439 (lambda* (#:key inputs #:allow-other-keys)
440 (let ((ocaml (assoc-ref inputs "ocaml")))
441 (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex")
442 (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc")
443 (chmod "boot/ocamllex" #o755)
444 (chmod "boot/ocamlc" #o755)
445 (let ((rootdir (getcwd)))
446 (with-directory-excursion (string-append ocaml "/share/depends")
449 (copy-file file (string-append rootdir "/" file)))
450 (find-files "." ".")))))))
452 (lambda* (#:key outputs #:allow-other-keys)
453 (let* ((out (assoc-ref outputs "out"))
454 (mandir (string-append out "/share/man")))
455 ;; Custom configure script doesn't recognize
456 ;; --prefix=<PREFIX> syntax (with equals sign).
457 (invoke "./configure"
459 "--mandir" mandir))))))))
461 `(("ocaml" ,ocaml-4.07-boot)
463 ("pkg-config" ,pkg-config)))))
465 (define-public ocaml ocaml-4.14)
467 (define-public ocamlbuild
475 (url "https://github.com/ocaml/ocamlbuild")
477 (file-name (git-file-name name version))
479 (base32 "00ma0g6ajll9awp2bp303bawac8ync4k9w2a6vix0k4nw3003gb4"))))
480 (build-system ocaml-build-system)
483 ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
484 (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
485 (string-append "OCAMLBUILD_LIBDIR=" #$output
486 "/lib/ocaml/site-lib")
487 (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
489 (modify-phases %standard-phases
491 ; some failures because of changes in OCaml's error message formating
493 (home-page "https://github.com/ocaml/ocamlbuild")
494 (synopsis "OCaml build tool")
495 (description "OCamlbuild is a generic build tool, that has built-in rules
496 for building OCaml library and programs.")
497 (license license:lgpl2.1+)))
499 (define-public camlidl
507 (url "https://github.com/xavierleroy/camlidl")
508 (commit "camlidl109")))
510 (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))
511 (file-name (git-file-name name version))))
512 (build-system gnu-build-system)
514 `(#:tests? #f ;; No test suite
518 "BINDIR=" (assoc-ref %outputs "out") "/bin")
520 "OCAMLLIB=" (assoc-ref %outputs "out") "/lib/ocaml/site-lib/camlidl"))
522 (modify-phases %standard-phases
526 (copy-file "config/Makefile.unix" "config/Makefile")
527 ;; Note: do not pass '-jN' as this appears to not be
528 ;; parallel-safe (race condition related to libcamlidl.a).
529 (invoke "make" "all")
531 (add-before 'install 'create-target-directories
532 (lambda* (#:key outputs #:allow-other-keys)
533 (let ((out (string-append (assoc-ref outputs "out"))))
535 (string-append out "/bin"))
537 (string-append out "/lib/ocaml/site-lib/camlidl/stublibs"))
539 (string-append out "/lib/ocaml/site-lib/camlidl/caml")))
541 (add-after 'install 'install-meta
542 (lambda* (#:key outputs #:allow-other-keys)
543 (let ((out (assoc-ref outputs "out")))
545 (string-append out "/lib/ocaml/site-lib/camlidl/META")
549 "description = \"Stub code generator for OCaml/C interface\"
550 version = \"" ,version "\"
552 archive(byte) = \"com.cma\"
553 archive(native) = \"com.cmxa\"")))))
557 (home-page "https://github.com/xavierleroy/camlidl")
558 (synopsis "Stub code generator for OCaml/C interface")
560 "Camlidl is a stub code generator for Objective Caml. It generates stub
561 code for interfacing Caml with C from an IDL description of the C functions.")
562 (license license:lgpl2.1)))
564 (define-public ocaml-extlib
566 (name "ocaml-extlib")
570 (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
571 "extlib-" version ".tar.gz"))
574 "1jydzw2n84cfiz9y6lk4gih4wbr8jybanmiryfs01svd07g4vpjq"))))
575 (build-system ocaml-build-system)
578 (modify-phases %standard-phases
579 (delete 'configure))))
582 (home-page "https://github.com/ygrek/ocaml-extlib")
583 (synopsis "Complete and small extension for OCaml standard library")
584 (description "This library adds new functions to OCaml standard library
585 modules, modifies some functions in order to get better performances or
586 safety (tail-recursive) and also provides new modules which should be useful
587 for day to day programming.")
588 ;; With static-linking exception
589 (license license:lgpl2.1+)))
591 (define-public ocaml-cudf
598 (url "https://gitlab.com/irill/cudf")
599 (commit (string-append "v" version))))
600 (file-name (git-file-name name version))
603 "1lvrmpscbk1kjv5ag5bzlzv520xk5zw2haf6q7chvz98gcm9g0hk"))))
604 (build-system dune-build-system)
606 '(#:test-target "."))
607 (propagated-inputs (list ocaml-extlib))
608 (native-inputs (list ocaml-ounit2))
609 (home-page "https://www.mancoosi.org/cudf/")
610 (synopsis "CUDF library (part of the Mancoosi tools)")
612 "@acronym{CUDF, Common Upgradeability Description Format} is a format for
613 describing upgrade scenarios in package-based software distributions.")
614 ;; With static-linking exception
615 (license license:lgpl2.1+)))
617 (define-public ocaml-mccs
624 (url "https://github.com/AltGr/ocaml-mccs")
626 (file-name (git-file-name name version))
629 "17bvm0jhhs8h3p5sbb65asj53a8sxl634cc0kvcivpams74837zq"))))
630 (build-system dune-build-system)
631 (propagated-inputs (list ocaml-cudf))
632 (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
633 (synopsis "Upgrade path problem solver")
634 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
635 Mccs take as input a CUDF problem and computes the best solution according to
636 a set of criteria. It relies on a Integer Programming solver or a
637 Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
638 underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
642 ;; With static-linking exception
645 (define-public ocaml-dose3
651 (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
654 "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
657 "ocaml-dose3-add-unix-dependency.patch"
658 "ocaml-dose3-Fix-for-ocaml-4.06.patch"
659 "ocaml-dose3-dont-make-printconf.patch"
660 "ocaml-dose3-Install-mli-cmx-etc.patch"))))
661 (build-system ocaml-build-system)
663 `(#:tests? #f ;the test suite requires python 2
665 ,#~(list (string-append "SHELL="
666 #+(file-append (canonical-package bash-minimal)
669 ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))))
671 (list ocaml-graph ocaml-cudf ocaml-extlib ocaml-re))
677 (home-page "https://www.mancoosi.org/software/")
678 (synopsis "Package distribution management framework")
679 (description "Dose3 is a framework made of several OCaml libraries for
680 managing distribution packages and their dependencies. Though not tied to
681 any particular distribution, dose3 constitutes a pool of libraries which
682 enable analyzing packages coming from various distributions. Besides basic
683 functionalities for querying and setting package properties, dose3 also
684 implements algorithms for solving more complex problems such as monitoring
685 package evolutions, correct and complete dependency resolution and
686 repository-wide uninstallability checks.")
687 ;; with static-linking exception
688 (license license:lgpl2.1+)))
690 (define-public ocaml-down
697 (uri (string-append "https://erratique.ch/software/down/releases/down-"
701 "1q467y6qz96ndiybpmggdcnrcip49kxw2i93pb54j1xjzkv1vnl1"))))
702 (build-system ocaml-build-system)
704 `(#:tests? #f ;no tests
706 (modify-phases %standard-phases
709 ,#~(list "build" "--lib-dir"
710 (string-append #$output "/lib/ocaml/site-lib"))))
712 (list ocaml-findlib ocamlbuild ocaml-topkg opam))
713 (home-page "https://erratique.ch/software/down")
714 (synopsis "OCaml toplevel (REPL) upgrade")
715 (description "Down is an unintrusive user experience upgrade for the
716 @command{ocaml} toplevel (REPL).
718 Simply load the zero dependency @code{down} library in the @command{ocaml}
719 toplevel and you get line edition, history, session support and identifier
720 completion and documentation with @command{ocp-index}.
722 Add this to your @file{~/.ocamlinit}:
728 You may also need to add this to your @file{~/.ocamlinit} and declare
729 the environment variable @code{OCAML_TOPLEVEL_PATH}:
733 try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
740 let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
741 |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
742 |> List.map (fun x -> x ^ \"/toplevel\")
743 (* remove the line below if you don't want to see the text
744 every time you start the toplevel *)
745 |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
746 |> List.iter Topdirs.dir_directory;;
748 (license license:isc)))
750 (define-public ocaml-opam-file-format
752 (name "ocaml-opam-file-format")
757 (url "https://github.com/ocaml/opam-file-format")
759 (file-name (git-file-name name version))
762 "0dmnb1mqdy4913f9ma446hi5m99q7hfibj6j0m8x2wsfnfy2fw62"))))
763 (build-system ocaml-build-system)
765 `(#:tests? #f; No tests
766 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
767 "/lib/ocaml/site-lib"))
769 (modify-phases %standard-phases
770 (delete 'configure))))
771 (home-page "https://opam.ocaml.org")
772 (synopsis "Parser and printer for the opam file syntax")
773 (description "This package contains a parser and a pretty-printer for
774 the opam file format.")
775 ;; With static-linking exception
776 (license license:lgpl2.1+)))
785 (url "https://github.com/ocaml/opam")
787 (file-name (git-file-name name version))
790 "1mw535zsw7xlvpgwnk1dan76z3f7lh5imlg0s6kdyhfg0iqisjd7"))))
791 (build-system dune-build-system)
795 (modify-phases %standard-phases
796 (add-before 'build 'pre-build
797 (lambda* (#:key inputs make-flags #:allow-other-keys)
798 (let ((bash (assoc-ref inputs "bash"))
799 (bwrap (search-input-file inputs "/bin/bwrap")))
800 (substitute* "src/core/opamSystem.ml"
802 (string-append "\"" bash "/bin/sh\""))
805 ;; Use bwrap from the store directly.
806 (substitute* "src/state/shellscripts/bwrap.sh"
807 (("-v bwrap") (string-append "-v " bwrap))
808 (("exec bwrap") (string-append "exec " bwrap))
809 ;; Mount /gnu and /run/current-system in the
810 ;; isolated environment when building with opam.
811 ;; This is necessary for packages to find external
812 ;; dependencies, such as a C compiler, make, etc...
813 (("^add_sys_mounts /usr")
814 (string-append "add_sys_mounts "
816 " /run/current-system /usr")))
817 (substitute* "src/client/opamInitDefaults.ml"
818 (("\"bwrap\"") (string-append "\"" bwrap "\""))))))
819 (add-before 'check 'prepare-checks
820 (lambda* (#:key inputs #:allow-other-keys)
821 ;; Opam tests need to run an isolated environment from a writable
823 (mkdir-p "test-home")
824 (setenv "HOME" (string-append (getcwd) "/test-home"))
825 (with-output-to-file (string-append (getcwd) "/test-home/.gitconfig")
828 email = guix@localhost.none
829 name = Guix Builder")
832 ;; Opam tests require data from opam-repository. Instead of
833 ;; downloading them with wget from the guix environment, copy the
834 ;; content to the expected directory.
835 (substitute* "tests/reftests/dune.inc"
836 (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
837 (string-append "rmdir %{targets}) (run cp -r "
838 (assoc-ref inputs (string-append "opam-repo-" commit))
839 "/ %{targets}) (run chmod +w -R %{targets}"))
840 (("wget[^)]*") "touch %{targets}")
841 ;; Disable a failing test because it tries to clone a git
842 ;; repository from inside bwrap
843 (("diff upgrade-format.test upgrade-format.out") "run true")
844 ;; Disable a failing test because it tries to figure out which
845 ;; distro this is, and it doesn't know Guix
846 (("diff pin.unix.test pin.unix.out") "run true")
847 ;; Disable a failing test because of a failed expansion
848 (("diff opamroot-versions.test opamroot-versions.out") "run true")
849 ;; Disable a failing test, probably because the repository we
850 ;; replaced is not as expected
851 (("diff opamrt-big-upgrade.test opamrt-big-upgrade.out") "run true"))
852 (substitute* "tests/reftests/dune"
853 ;; Because of our changes to the previous file, we cannot check
854 ;; it can be regenerated
855 (("diff dune.inc dune.inc.gen") "run true"))
856 ;; Ensure we can run the generated build.sh (no /bin/sh)
857 (substitute* '("tests/reftests/legacy-local.test"
858 "tests/reftests/legacy-git.test")
861 (search-input-file inputs "/bin/sh"))))
862 (substitute* "tests/reftests/testing-env"
864 (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
865 (assoc-ref inputs "libc") "/lib"))))))))
867 (let ((opam-repo (lambda (commit hash)
871 (url "https://github.com/ocaml/opam-repository")
873 (file-name (git-file-name "opam-repo" commit))
874 (sha256 (base32 hash))))))
876 ("ocaml-cppo" ,ocaml-cppo)
881 ("python" ,python-wrapper)
887 ("opam-repo-009e00fa" ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2"
888 "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
889 ("opam-repo-7090735c" ,(opam-repo "7090735c9d1dd2dc481c4128c5ef4d3667238f15"
890 "1bccsgjhlp64lmvfjfn6viywf3x73ji75myg9ssf1ij1fkmabn0z"))
891 ("opam-repo-a5d7cdc0" ,(opam-repo "a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd"
892 "0z7kawqisy07088p5xjxwpvmvzlbj1d9cgdipsj90yx7nc5qh369"))
893 ("opam-repo-ad4dd344" ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
894 "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
895 ("opam-repo-c1d23f0e" ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0"
896 "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii"))
897 ("opam-repo-f372039d" ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701"
898 "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
900 (list ocaml ncurses curl bubblewrap))
902 (list ocaml-cmdliner ocaml-dose3 ocaml-mccs ocaml-opam-file-format
904 (home-page "http://opam.ocamlpro.com/")
905 (synopsis "Package manager for OCaml")
907 "OPAM is a tool to manage OCaml packages. It supports multiple
908 simultaneous compiler installations, flexible package constraints, and a
909 Git-friendly development workflow.")
911 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
912 (license license:lgpl3)))
914 (define-public ocaml-camlp-streams
916 (name "ocaml-camlp-streams")
922 (url "https://github.com/ocaml/camlp-streams")
923 (commit (string-append "v" version))))
924 (file-name (git-file-name name version))
926 (base32 "0r3wvffkzyyk4als78akirxanzbib5hvc3kvwxpk36mlmc38aywh"))))
927 (build-system dune-build-system)
931 (home-page "https://github.com/ocaml/camlp-streams")
932 (synopsis "Stream and Genlex libraries for use with Camlp4 and Camlp5")
934 "This package provides two library modules:
937 @item Stream: imperative streams, with in-place update and memoization of
938 the latest element produced.
939 @item Genlex: a small parameterized lexical analyzer producing streams of
940 tokens from streams of characters.
943 The two modules are designed for use with Camlp4 and Camlp5: The stream
944 patterns and stream expressions of Camlp4/Camlp5 consume and produce data of
945 type 'a Stream.t. The Genlex tokenizer can be used as a simple lexical
946 analyzer for Camlp4/Camlp5-generated parsers.
948 The Stream module can also be used by hand-written recursive-descent parsers,
949 but is not very convenient for this purpose.
951 The Stream and Genlex modules have been part of the OCaml standard library for a
952 long time, and have been distributed as part of the core OCaml system. They
953 will be removed from the OCaml standard library at some future point, but will
954 be maintained and distributed separately in the camlpstreams package.")
955 (license license:lgpl2.1)))
957 (define-public camlp5
965 (url "https://github.com/camlp5/camlp5")
966 (commit (string-append "rel" version))))
967 (file-name (git-file-name name version))
969 (base32 "1fnvmaw9cland09pjx5h6w3f6fz9s23l4nbl4m9fcaa2i4dpraz6"))))
970 (build-system gnu-build-system)
972 `(#:tests? #f ; XXX TODO figure out how to run the tests
974 (modify-phases %standard-phases
976 (lambda* (#:key outputs #:allow-other-keys)
977 (let* ((out (assoc-ref outputs "out"))
978 (mandir (string-append out "/share/man")))
979 ;; Custom configure script doesn't recognize
980 ;; --prefix=<PREFIX> syntax (with equals sign).
981 (invoke "./configure"
983 "--mandir" mandir))))
984 (add-before 'build 'fix-/bin-references
986 (substitute* "config/Makefile"
991 (invoke "make" "-j" (number->string
992 (parallel-job-count))
994 ;; Required for findlib to find camlp5's libraries
995 (add-after 'install 'install-meta
996 (lambda* (#:key outputs #:allow-other-keys)
997 (install-file "etc/META" (string-append (assoc-ref outputs "out")
998 "/lib/ocaml/camlp5/"))
1001 (list ocaml ocaml-camlp-streams))
1003 (list perl ocaml-findlib))
1004 (home-page "https://camlp5.github.io/")
1005 (synopsis "Pre-processor Pretty Printer for OCaml")
1007 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
1008 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
1009 concrete syntax of the language (Quotations, Syntax Extensions).")
1010 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
1011 (license (list license:bsd-3 license:qpl))))
1013 (define-public hevea
1019 (uri (string-append "http://hevea.inria.fr/old/"
1020 "hevea-" version ".tar.gz"))
1023 "1jwydkb9ldb1sx815c364dxgr569f2rbbzgxbn2kanrybpdbm2gi"))))
1024 (build-system gnu-build-system)
1030 `(#:tests? #f ; no test suite
1031 #:make-flags (list (string-append "PREFIX=" %output))
1032 #:phases (modify-phases %standard-phases
1034 (add-before 'build 'patch-/bin/sh
1036 (substitute* "_tags"
1037 (("/bin/sh") (which "sh")))
1039 (home-page "http://hevea.inria.fr/")
1040 (synopsis "LaTeX to HTML translator")
1042 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
1043 written in Objective Caml.")
1044 (license license:qpl)))
1046 (define-public ocaml-num
1054 (url "https://github.com/ocaml/num")
1055 (commit (string-append "v" version))))
1056 (file-name (git-file-name name version))
1058 (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
1059 (build-system dune-build-system)
1062 (modify-phases %standard-phases
1063 (add-after 'unpack 'fix-race
1065 ;; There's a race between bng.o and bng_generic.c. Both depend on
1066 ;; the architecture specific bng.c, but only the latter declares
1068 (mkdir-p "_build/default/src")
1071 (copy-file f (string-append "_build/default/" f)))
1072 (find-files "src" "bng_.*\\.c")))))))
1073 (home-page "https://github.com/ocaml/num")
1074 (synopsis "Arbitrary-precision integer and rational arithmetic")
1075 (description "OCaml-Num contains the legacy Num library for
1076 arbitrary-precision integer and rational arithmetic that used to be part of
1077 the OCaml core distribution.")
1078 (license license:lgpl2.1+))); with linking exception
1080 (define-public emacs-tuareg
1081 ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
1082 ;; deprecated" or 'lexical-binding' and others had been fixed.
1083 (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545")
1086 (name "emacs-tuareg")
1087 (version (git-version "2.2.0" revision commit))
1092 (url "https://github.com/ocaml/tuareg")
1094 (file-name (git-file-name name version))
1096 (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
1097 (build-system gnu-build-system)
1099 `(("emacs" ,emacs-minimal)
1103 (modify-phases %standard-phases
1104 (add-after 'unpack 'make-git-checkout-writable
1106 (for-each make-file-writable (find-files "."))
1109 (add-before 'install 'fix-install-path
1110 (lambda* (#:key outputs #:allow-other-keys)
1111 (substitute* "Makefile"
1112 (("/emacs/site-lisp")
1113 (string-append (assoc-ref %outputs "out")
1114 "/share/emacs/site-lisp/")))
1116 (add-after 'install 'post-install
1117 (lambda* (#:key outputs #:allow-other-keys)
1118 (symlink "tuareg.el"
1119 (string-append (assoc-ref outputs "out")
1120 "/share/emacs/site-lisp/"
1121 "tuareg-autoloads.el"))
1123 (home-page "https://github.com/ocaml/tuareg")
1124 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
1125 (description "Tuareg helps editing OCaml code, to highlight important
1126 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
1128 (license license:gpl2+))))
1130 (define-public ocaml-menhir
1132 (name "ocaml-menhir")
1133 (version "20220210")
1138 (url "https://gitlab.inria.fr/fpottier/menhir.git")
1140 (file-name (git-file-name name version))
1142 (base32 "0f31isr3cyiishflz6qr4xc3gp9xwf32r3vxdvm5wnr2my1fnn1n"))))
1143 (build-system dune-build-system)
1147 `(#:tests? #f)) ; No check target
1148 (properties `((ocaml4.07-variant . ,(delay (strip-ocaml4.07-variant ocaml-menhir)))))
1149 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
1150 (synopsis "Parser generator")
1151 (description "Menhir is a parser generator. It turns high-level grammar
1152 specifications, decorated with semantic actions expressed in the OCaml
1153 programming language into parsers, again expressed in OCaml. It is based on
1154 Knuth’s LR(1) parser construction technique.")
1155 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
1156 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
1157 ;; are QPL licensed.
1158 (license (list license:gpl2+ license:qpl))))
1160 (define-public ocaml-bigarray-compat
1162 (name "ocaml-bigarray-compat")
1167 (url "https://github.com/mirage/bigarray-compat")
1168 (commit (string-append "v" version))))
1169 (file-name (git-file-name name version))
1172 "0hif5baiwswdblymyfbxh9066pfqynlz5vj3b2brpn0a12k6i5fq"))))
1173 (build-system dune-build-system)
1175 `(#:tests? #f)); no tests
1176 (home-page "https://github.com/mirage/bigarray-compat")
1177 (synopsis "OCaml compatibility library")
1178 (description "This package contains a compatibility library for
1179 @code{Stdlib.Bigarray} in OCaml.")
1180 (license license:isc)))
1182 (define-public lablgtk
1189 (url "https://github.com/garrigue/lablgtk")
1191 (file-name (git-file-name name version))
1194 "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
1195 (build-system gnu-build-system)
1198 ("findlib" ,ocaml-findlib)
1199 ("pkg-config" ,pkg-config)))
1200 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
1201 ;; and gtk+-quartz-2.0 once available.
1210 `(#:tests? #f ; no check target
1212 ;; opt: also install cmxa files
1213 #:make-flags (list "all" "opt"
1214 (string-append "FINDLIBDIR="
1215 (assoc-ref %outputs "out")
1217 ;; Occasionally we would get "Error: Unbound module GtkThread" when
1218 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
1219 #:parallel-build? #f
1222 (modify-phases %standard-phases
1223 (add-before 'install 'prepare-install
1224 (lambda* (#:key inputs outputs #:allow-other-keys)
1225 (let ((out (assoc-ref outputs "out"))
1226 (ocaml (assoc-ref inputs "ocaml")))
1227 ;; Install into the output and not the ocaml directory.
1228 (mkdir-p (string-append out "/lib/ocaml"))
1229 (substitute* "config.make"
1232 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lablgtk))))
1233 (home-page "http://lablgtk.forge.ocamlcore.org/")
1234 (synopsis "GTK+ bindings for OCaml")
1236 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
1237 a strongly-typed object-oriented interface that is compatible with the
1238 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
1239 also provides bindings to
1240 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
1241 gnomeui, gtksourceview, gtkspell,
1242 libglade (and it an generate OCaml code from .glade files),
1243 libpanel, librsvg and quartz.")
1244 (license license:lgpl2.1)))
1246 (define-public ocaml4.07-lablgtk
1249 (name "ocaml4.07-lablgtk")
1251 `(("ocaml" ,ocaml-4.07)
1252 ("findlib" ,ocaml4.07-findlib)
1253 ("pkg-config" ,pkg-config)))
1256 (define-public unison
1263 (url "https://github.com/bcpierce00/unison")
1264 (commit (string-append "v" version))))
1265 (file-name (git-file-name name version))
1268 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))
1269 (patches (search-patches "unison-fix-ocaml-4.08.patch"))))
1270 (build-system gnu-build-system)
1272 "doc")) ; 1.9 MiB of documentation
1274 `(("ocaml" ,ocaml-4.09)
1275 ;; For documentation
1276 ("ghostscript" ,ghostscript)
1277 ("texlive" ,(texlive-updmap.cfg
1278 (list texlive-fonts-ec texlive-dvips-l3backend)))
1283 `(#:parallel-build? #f
1284 #:parallel-tests? #f
1285 #:test-target "selftest"
1286 #:tests? #f ; Tests require writing to $HOME.
1287 ; If some $HOME is provided, they fail with the message
1288 ; "Fatal error: Skipping some tests -- remove me!"
1290 (modify-phases %standard-phases
1292 (add-before 'install 'prepare-install
1293 (lambda* (#:key outputs #:allow-other-keys)
1294 (let* ((out (assoc-ref outputs "out"))
1295 (bin (string-append out "/bin")))
1297 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
1299 (add-after 'install 'install-fsmonitor
1300 (lambda* (#:key outputs #:allow-other-keys)
1301 (let* ((out (assoc-ref outputs "out"))
1302 (bin (string-append out "/bin")))
1303 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
1304 (install-file "src/unison-fsmonitor" bin)
1306 (add-after 'install 'install-doc
1307 (lambda* (#:key outputs #:allow-other-keys)
1308 (let ((doc (string-append (assoc-ref outputs "doc")
1309 "/share/doc/unison")))
1311 ;; Remove an '\n' that prevents the doc to be generated
1312 ;; correctly with newer hevea.
1313 (substitute* "doc/local.tex"
1314 (("----SNIP----.*") "----SNIP----"))
1315 ;; This file needs write-permissions, because it's
1316 ;; overwritten by 'docs' during documentation generation.
1317 (chmod "src/strings.ml" #o600)
1318 (invoke "make" "docs"
1319 "TEXDIRECTIVES=\\\\draftfalse")
1320 (for-each (lambda (f)
1321 (install-file f doc))
1323 (string-append "doc/unison-manual." ext))
1324 ;; Install only html documentation,
1325 ;; since the build is currently
1326 ;; non-reproducible with the ps, pdf,
1328 '(;; "ps" "pdf" "dvi"
1331 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
1332 (synopsis "File synchronizer")
1334 "Unison is a file-synchronization tool. It allows two replicas of
1335 a collection of files and directories to be stored on different hosts
1336 (or different disks on the same host), modified separately, and then
1337 brought up to date by propagating the changes in each replica
1339 (license license:gpl3+)))
1341 (define-public ocaml-findlib
1343 (name "ocaml-findlib")
1347 (uri (string-append "http://download.camlcity.org/download/"
1348 "findlib" "-" version ".tar.gz"))
1351 "0hfcwamcvinmww59b5i4yxbf0kxyzkp5qv3d1c7ybn9q52vgq463"))))
1352 (build-system gnu-build-system)
1356 `(#:tests? #f ; no test suite
1357 #:parallel-build? #f
1358 #:make-flags (list "all" "opt")
1359 #:phases (modify-phases %standard-phases
1362 (lambda* (#:key inputs outputs #:allow-other-keys)
1363 (let ((out (assoc-ref outputs "out")))
1366 "-bindir" (string-append out "/bin")
1367 "-config" (string-append out "/etc/ocamfind.conf")
1368 "-mandir" (string-append out "/share/man")
1369 "-sitelib" (string-append out "/lib/ocaml/site-lib")
1372 (lambda* (#:key outputs #:allow-other-keys)
1373 (let ((out (assoc-ref outputs "out")))
1374 (invoke "make" "install"
1375 (string-append "OCAML_CORE_STDLIB="
1376 out "/lib/ocaml/site-lib"))))))))
1377 (home-page "http://projects.camlcity.org/projects/findlib.html")
1378 (synopsis "Management tool for OCaml libraries")
1380 "The \"findlib\" library provides a scheme to manage reusable software
1381 components (packages), and includes tools that support this scheme. Packages
1382 are collections of OCaml modules for which metainformation can be stored. The
1383 packages are kept in the file system hierarchy, but with strict directory
1384 structure. The library contains functions to look the directory up that
1385 stores a package, to query metainformation about a package, and to retrieve
1386 dependency information about multiple packages. There is also a tool that
1387 allows the user to enter queries on the command-line. In order to simplify
1388 compilation and linkage, there are new frontends of the various OCaml
1389 compilers that can directly deal with packages.")
1390 (license license:x11)))
1392 (define-public ocaml4.07-findlib
1394 (inherit ocaml-findlib)
1395 (name "ocaml4.07-findlib")
1397 (list m4 ocaml-4.07))))
1399 (define-public ocaml4.09-findlib
1401 (inherit ocaml-findlib)
1402 (name "ocaml4.09-findlib")
1404 (list m4 ocaml-4.09))))
1406 (define-public ocaml-ounit2
1408 (name "ocaml-ounit2")
1413 (url "https://github.com/gildor478/ounit.git")
1414 (commit (string-append "v" version))))
1415 (file-name (git-file-name name version))
1418 "04c841hpk2yij370w30w3pis8nibnr28v74mpq2qz7z5gb8l07p1"))))
1419 (build-system dune-build-system)
1421 (list ocaml-lwt ocaml-stdlib-shims))
1422 (home-page "https://github.com/gildor478/ounit")
1423 (synopsis "Unit testing framework for OCaml")
1424 (description "OUnit2 is a unit testing framework for OCaml. It is similar
1425 to JUnit and other XUnit testing frameworks.")
1426 (license license:expat)))
1428 ;; note that some tests may hang for no obvious reason.
1429 (define-public ocaml-ounit
1431 (inherit ocaml-ounit2)
1432 (name "ocaml-ounit")
1435 (modify-phases %standard-phases
1438 (invoke "make" "install-ounit" ,(string-append "version="
1439 (package-version ocaml-ounit2))))))))
1441 (list ocaml-ounit2))
1442 (home-page "http://ounit.forge.ocamlcore.org")
1443 (synopsis "Unit testing framework for OCaml")
1444 (description "Unit testing framework for OCaml. It is similar to JUnit and
1445 other XUnit testing frameworks.")
1446 (license license:expat)))
1448 (define-public camlzip
1455 (url "https://github.com/xavierleroy/camlzip")
1456 (commit (string-append
1458 (string-join (string-split version #\.) "")))))
1459 (file-name (git-file-name name version))
1462 "16jnn3czxnvyjngnz167x5kw097k7izdqvkix8qvgvhdmgvqm89b"))))
1463 (build-system ocaml-build-system)
1468 (modify-phases %standard-phases
1469 (delete 'configure))
1470 #:install-target "install-findlib"
1472 ,#~(list "all" "allopt"
1473 (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
1474 (home-page "https://github.com/xavierleroy/camlzip")
1475 (synopsis "Provides easy access to compressed files")
1476 (description "Provides easy access to compressed files in ZIP, GZIP and
1477 JAR format. It provides functions for reading from and writing to compressed
1478 files in these formats.")
1479 (license license:lgpl2.1+)))
1481 (define-public ocamlmod
1487 (uri (ocaml-forge-uri name version 1702))
1490 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
1491 (build-system ocaml-build-system)
1493 `(("ounit" ,ocaml-ounit)
1494 ("ocamlbuild" ,ocamlbuild)))
1497 (modify-phases %standard-phases
1498 ;; Tests are done during build.
1500 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1501 (synopsis "Generate modules from OCaml source files")
1502 (description "Generate modules from OCaml source files.")
1503 (license license:lgpl2.1+))) ; with an exception
1505 (define-public ocaml-zarith
1507 (name "ocaml-zarith")
1512 (url "https://github.com/ocaml/Zarith")
1513 (commit (string-append "release-" version))))
1514 (file-name (git-file-name name version))
1517 "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"))))
1518 (build-system ocaml-build-system)
1524 `(#:tests? #f ; no test target
1526 (modify-phases %standard-phases
1528 (lambda _ (invoke "./configure")))
1529 (add-after 'install 'move-sublibs
1530 (lambda* (#:key outputs #:allow-other-keys)
1531 (let* ((out (assoc-ref outputs "out"))
1532 (lib (string-append out "/lib/ocaml/site-lib")))
1533 (mkdir-p (string-append lib "/stublibs"))
1534 (rename-file (string-append lib "/zarith/dllzarith.so")
1535 (string-append lib "/stublibs/dllzarith.so"))))))))
1536 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1537 (synopsis "Implements arbitrary-precision integers")
1538 (description "Implements arithmetic and logical operations over
1539 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1540 over big integers. Small integers are represented as Caml unboxed integers,
1541 for speed and space economy.")
1542 (license license:lgpl2.1+))) ; with an exception
1544 (define-public ocaml-frontc
1546 (name "ocaml-frontc")
1551 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1552 (commit (string-append "v" version))))
1553 (file-name (git-file-name name version))
1556 "1mi1vh4qgscnb470qwidccaqd068j1bqlz6pf6wddk21paliwnqb"))))
1557 (build-system dune-build-system)
1559 `(#:test-target "test.t"
1561 (modify-phases %standard-phases
1562 (add-after 'unpack 'make-writable
1564 (for-each make-file-writable (find-files "." ".")))))))
1566 (list ocaml-menhir ocaml-odoc))
1567 (properties `((upstream-name . "FrontC")
1568 (ocaml4.07-variant . ,(delay ocaml4.07-frontc))))
1569 (home-page "https://www.irit.fr/FrontC")
1570 (synopsis "C parser and lexer library")
1571 (description "FrontC is an OCAML library providing a C parser and lexer.
1572 The result is a syntactic tree easy to process with usual OCAML tree management.
1573 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1574 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1575 (license license:lgpl2.1)))
1577 (define-public ocaml4.07-frontc
1578 (package-with-ocaml4.07
1580 (inherit ocaml-frontc)
1585 (url "https://github.com/mirage/ocaml-base64")
1586 (commit (string-append
1587 "V_" (string-join (string-split version #\.) "_")))))
1588 (file-name (git-file-name "ocaml-frontc" version))
1591 "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
1592 (build-system ocaml-build-system)
1595 (modify-phases %standard-phases
1597 (add-after 'install 'install-meta
1598 (lambda* (#:key outputs #:allow-other-keys)
1599 (let ((out (assoc-ref outputs "out")))
1600 (with-output-to-file
1601 (string-append out "/lib/ocaml/frontc/META")
1605 "description = \"Parser for the C language\"
1606 version = \"" ,version "\"
1608 archive(byte) = \"frontc.cma\"
1609 archive(native) = \"frontc.cmxa\""))))
1610 (symlink (string-append out "/lib/ocaml/frontc")
1611 (string-append out "/lib/ocaml/FrontC"))))))
1612 #:make-flags ,#~(list (string-append "PREFIX=" #$output)
1613 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1616 (define-public ocaml-qcheck
1618 (name "ocaml-qcheck")
1624 (url "https://github.com/c-cube/qcheck")
1625 (commit (string-append "v" version))))
1626 (file-name (git-file-name name version))
1628 (base32 "0g3r8lrw6fsdphgpnp08saxyxk1vd3chpmb564ir2qnsp716vz6z"))))
1629 (build-system dune-build-system)
1631 `(#:test-target "."))
1633 (list ocaml-alcotest ocaml-ounit))
1636 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-qcheck))))
1637 (home-page "https://github.com/c-cube/qcheck")
1638 (synopsis "QuickCheck inspired property-based testing for OCaml")
1639 (description "QuickCheck inspired property-based testing for OCaml. This
1640 module checks invariants (properties of some types) over randomly
1641 generated instances of the type. It provides combinators for generating
1642 instances and printing them.")
1643 (license license:lgpl3+)))
1645 (define-public ocaml4.07-qcheck
1646 (package-with-ocaml4.07
1648 (inherit ocaml-qcheck)
1653 (url "https://github.com/c-cube/qcheck")
1655 (file-name (git-file-name "ocaml-qcheck" version))
1658 "1llnfynhlndwyjig7wrayjnds2b3mggp5lw20dwxhn2i2lkkb22m"))))
1661 (define-public ocaml-qtest
1663 (name "ocaml-qtest")
1668 (url "https://github.com/vincent-hugot/qtest/")
1669 (commit (string-append "v" version))))
1670 (file-name (git-file-name name version))
1673 "04ghjshh6104xyglm0db9kv90m62qla5f4bfrlndv6dsvgw3rdjl"))))
1674 (build-system dune-build-system)
1676 `(#:test-target "tests"))
1678 `(("ounit" ,ocaml-ounit)
1679 ("qcheck" ,ocaml-qcheck)))
1680 (home-page "https://github.com/vincent-hugot/qtest")
1681 (synopsis "Inline (Unit) Tests for OCaml")
1682 (description "Qtest extracts inline unit tests written using a special
1683 syntax in comments. Those tests are then run using the oUnit framework and the
1684 qcheck library. The possibilities range from trivial tests -- extremely simple
1685 to use -- to sophisticated random generation of test cases.")
1686 (license license:lgpl3+)))
1688 (define-public ocaml-stringext
1690 (name "ocaml-stringext")
1695 (url "https://github.com/rgrinberg/stringext")
1697 (file-name (git-file-name name version))
1700 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
1701 (build-system dune-build-system)
1703 `(#:test-target "."))
1705 `(("ocamlbuild" ,ocamlbuild)
1706 ("qtest" ,ocaml-qtest)))
1707 (home-page "https://github.com/rgrinberg/stringext")
1708 (synopsis "Extra string functions for OCaml")
1709 (description "Provides a single module named Stringext that provides a grab
1710 bag of often used but missing string functions from the stdlib. E.g, split,
1711 full_split, cut, rcut, etc..")
1712 ;; the only mention of a license in this project is in its `opam' file
1713 ;; where it says `mit'.
1714 (license license:expat)))
1716 (define dune-bootstrap
1723 (url "https://github.com/ocaml/dune")
1725 (file-name (git-file-name name version))
1728 "02zn79l7y7rvy7b6bimlf5qymrvzc43w8q7l4jx3k8wzn2g5326z"))))
1729 (build-system ocaml-build-system)
1731 `(#:tests? #f; require odoc
1732 #:make-flags ,#~(list "release"
1733 (string-append "PREFIX=" #$output)
1734 (string-append "LIBDIR=" #$output
1735 "/lib/ocaml/site-lib"))
1737 (modify-phases %standard-phases
1739 (lambda* (#:key outputs #:allow-other-keys)
1740 (mkdir-p "src/dune")
1741 (invoke "./configure")
1743 (home-page "https://github.com/ocaml/dune")
1744 (synopsis "OCaml build system")
1745 (description "Dune is a build system that was designed to simplify the
1746 release of Jane Street packages. It reads metadata from @file{dune} files
1747 following a very simple s-expression syntax.")
1748 (license license:expat)))
1750 (define ocaml4.09-dune-bootstrap
1751 (package-with-ocaml4.09 dune-bootstrap))
1753 (define-public dune-configurator
1755 (inherit dune-bootstrap)
1756 (name "dune-configurator")
1757 (build-system dune-build-system)
1759 `(#:package "dune-configurator"
1760 #:dune ,dune-bootstrap
1761 ; require ppx_expect
1764 (modify-phases %standard-phases
1765 ;; When building dune, these directories are normally removed after
1767 (add-before 'build 'remove-vendor
1769 (delete-file-recursively "vendor/csexp")
1770 (delete-file-recursively "vendor/pp"))))))
1773 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
1774 (synopsis "Dune helper library for gathering system configuration")
1775 (description "Dune-configurator is a small library that helps writing
1776 OCaml scripts that test features available on the system, in order to generate
1777 config.h files for instance. Among other things, dune-configurator allows one to:
1780 @item test if a C program compiles
1781 @item query pkg-config
1782 @item import #define from OCaml header files
1783 @item generate config.h file
1786 (define-public ocaml4.09-dune-configurator
1788 (inherit dune-configurator)
1789 (name "ocaml4.09-dune-configurator")
1791 `(,@(package-arguments dune-configurator)
1792 #:dune ,ocaml4.09-dune-bootstrap
1794 #:findlib ,ocaml4.09-findlib))
1796 `(("ocaml-csexp" ,ocaml4.09-csexp)))))
1800 (inherit dune-bootstrap)
1802 (list dune-configurator))
1803 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
1804 (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
1806 (define-public ocaml4.09-dune
1808 (inherit ocaml4.09-dune-bootstrap)
1810 (list dune-configurator))))
1812 (define-public ocaml4.07-dune
1814 (inherit (package-with-ocaml4.07 dune-bootstrap))
1819 (url "https://github.com/ocaml/dune")
1821 (file-name (git-file-name "dune" version))
1824 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
1826 (define-public ocaml-csexp
1828 (name "ocaml-csexp")
1833 (url "https://github.com/ocaml-dune/csexp")
1835 (file-name (git-file-name name version))
1838 "1v5y4x1a21193h8q536c0s0d8hv3hyyky4pgzm2dw9807v36s2x4"))))
1839 (build-system dune-build-system)
1841 `(#:tests? #f; FIXME: needs ppx_expect, but which version?
1842 #:dune ,dune-bootstrap
1844 (modify-phases %standard-phases
1845 (add-before 'build 'chmod
1847 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
1850 (list ocaml-result))
1851 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
1852 (home-page "https://github.com/ocaml-dune/csexp")
1853 (synopsis "Parsing and printing of S-expressions in Canonical form")
1854 (description "This library provides minimal support for Canonical
1855 S-expressions. Canonical S-expressions are a binary encoding of
1856 S-expressions that is super simple and well suited for communication
1859 This library only provides a few helpers for simple applications. If
1860 you need more advanced support, such as parsing from more fancy input
1861 sources, you should consider copying the code of this library given
1862 how simple parsing S-expressions in canonical form is.
1864 To avoid a dependency on a particular S-expression library, the only
1865 module of this library is parameterised by the type of S-expressions.")
1866 (license license:expat)))
1868 (define-public ocaml4.09-csexp
1870 (inherit ocaml-csexp)
1871 (name "ocaml4.09-csexp")
1873 `(#:ocaml ,ocaml-4.09
1874 #:findlib ,ocaml4.09-findlib
1875 ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
1876 ((#:dune _) ocaml4.09-dune-bootstrap))))
1878 `(("ocaml-result" ,ocaml4.09-result)))))
1880 (define-public ocaml-migrate-parsetree
1882 (name "ocaml-migrate-parsetree")
1884 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1891 (file-name (git-file-name name version))
1894 "0a1qy0ik36j8hpqxvh3fxf4aibjqax989mihj73jncchv8qv4ynq"))))
1895 (build-system dune-build-system)
1896 (arguments `(#:tests? #f))
1898 (list ocaml-ppx-derivers ocamlbuild ocaml-result))
1899 (properties `((upstream-name . "ocaml-migrate-parsetree")
1900 (ocaml4.07-variant . ,(delay ocaml4.07-migrate-parsetree))))
1901 (synopsis "OCaml parsetree converter")
1902 (description "This library converts between parsetrees of different OCaml
1903 versions. For each version, there is a snapshot of the parsetree and conversion
1904 functions to the next and/or previous version.")
1905 (license license:lgpl2.1+)))
1907 ;; OCaml 4.07 packages require version 1.*
1908 (define-public ocaml4.07-migrate-parsetree
1909 (package-with-ocaml4.07
1911 (inherit ocaml-migrate-parsetree)
1912 (name "ocaml-migrate-parsetree")
1914 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1920 (commit (string-append "v" version))))
1921 (file-name (git-file-name name version))
1924 "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
1925 (properties '((upstream-name . "ocaml-migrate-parsetree"))))))
1927 (define-public ocaml4.07-ppx-tools-versioned
1928 (package-with-ocaml4.07
1930 (name "ocaml-ppx-tools-versioned")
1935 (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
1937 (file-name (git-file-name name version))
1940 "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
1941 (build-system dune-build-system)
1944 #:package "ppx_tools_versioned"))
1946 (list ocaml-migrate-parsetree))
1947 (properties `((upstream-name . "ppx_tools_versioned")))
1948 (home-page "https://github.com/let-def/ppx_tools_versioned")
1949 (synopsis "Variant of ppx_tools")
1950 (description "This package is a variant of ppx_tools based on
1951 ocaml-migrate-parsetree")
1952 (license license:expat))))
1954 (define-public ocaml-linenoise
1956 (name "ocaml-linenoise")
1961 (url "https://github.com/ocaml-community/ocaml-linenoise")
1962 (commit (string-append "v" version))))
1963 (file-name (git-file-name name version))
1966 "0s98695skz1wvrak0rdlh80w3cv6piic1dxqpn9rv1yymbklafg4"))))
1967 (build-system dune-build-system)
1971 (propagated-inputs (list ocaml-result ocaml-odoc))
1972 (home-page "https://github.com/ocaml-community/ocaml-linenoise")
1973 (synopsis "Lightweight readline alternative")
1974 (description "This package is a line-reading library for OCaml that aims
1975 to replace readline.")
1976 (license license:bsd-2)))
1978 (define-public ocaml-bitstring
1980 (name "ocaml-bitstring")
1985 (url "https://github.com/xguerin/bitstring")
1986 (commit (string-append "v" version))))
1987 (file-name (git-file-name name version))
1990 "0mghsl8b2zd2676mh1r9142hymhvzy9cw8kgkjmirxkn56wbf56b"))))
1991 (build-system dune-build-system)
1993 (list time autoconf automake))
1995 (list ocaml-stdlib-shims))
1997 `(#:package "bitstring"
1998 #:tests? #f; Tests fail to build
2000 (modify-phases %standard-phases
2001 (add-before 'build 'upgrade
2003 (invoke "dune" "upgrade")
2005 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-bitstring))))
2006 (home-page "https://github.com/xguerin/bitstring")
2007 (synopsis "Bitstrings and bitstring matching for OCaml")
2008 (description "Adds Erlang-style bitstrings and matching over bitstrings as
2009 a syntax extension and library for OCaml. You can use this module to both parse
2010 and generate binary formats, files and protocols. Bitstring handling is added
2011 as primitives to the language, making it exceptionally simple to use and very
2013 (license license:isc)))
2015 (define-public ocaml4.07-bitstring
2016 (package-with-ocaml4.07
2018 (inherit ocaml-bitstring)
2022 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
2023 "get/v" version ".tar.gz"))
2024 (file-name (string-append "ocaml-bitsring-" version ".tar.gz"))
2027 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
2029 `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)))
2032 (define-public ocaml-ppx-bitstring
2034 (inherit ocaml-bitstring)
2035 (name "ocaml-ppx-bitstring")
2037 `(#:package "ppx_bitstring"
2040 (propagated-inputs (list ocaml-bitstring ocaml-ppxlib))
2041 (native-inputs (list ocaml-ounit))
2042 (properties `((upstream-name . "ppx_bitstring")))
2043 (synopsis "PPX extension for bitstrings and bitstring matching")
2045 "This package provides a way to write bitstrings and matching over
2046 bitsrings in Erlang style as primitives to the language.")))
2048 (define-public ocaml-result
2050 (name "ocaml-result")
2055 (url "https://github.com/janestreet/result")
2057 (file-name (git-file-name name version))
2060 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
2061 (build-system dune-build-system)
2064 #:dune ,dune-bootstrap))
2065 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
2066 (home-page "https://github.com/janestreet/result")
2067 (synopsis "Compatibility Result module")
2068 (description "Uses the new result type defined in OCaml >= 4.03 while
2069 staying compatible with older version of OCaml should use the Result module
2070 defined in this library.")
2071 (license license:bsd-3)))
2073 (define-public ocaml4.09-result
2075 (inherit ocaml-result)
2076 (name "ocaml4.09-result")
2079 #:dune ,ocaml4.09-dune-bootstrap
2081 #:findlib ,ocaml4.09-findlib))))
2083 (define-public ocaml-topkg
2085 (name "ocaml-topkg")
2089 (uri (string-append "http://erratique.ch/software/topkg/releases/"
2090 "topkg-" version ".tbz"))
2093 "1iyinmcfqpprk7k4cc51nqgypayprbj4larwcfqw86k5dri84825"))))
2094 (build-system ocaml-build-system)
2096 (list opam ocamlbuild))
2098 `(("result" ,ocaml-result)))
2101 #:build-flags '("build")
2103 (modify-phases %standard-phases
2104 (delete 'configure))))
2105 (home-page "https://erratique.ch/software/topkg")
2106 (synopsis "Transitory OCaml software packager")
2107 (description "Topkg is a packager for distributing OCaml software. It
2108 provides an API to describe the files a package installs in a given build
2109 configuration and to specify information about the package's distribution,
2110 creation and publication procedures.")
2111 (license license:isc)))
2113 (define-public ocaml-rresult
2115 (name "ocaml-rresult")
2119 (uri (string-append "http://erratique.ch/software/rresult/releases/"
2120 "rresult-" version ".tbz"))
2123 "0h2mjyzhay1p4k7n0mzaa7hlc7875kiy6m1i3r1n03j6hddpzahi"))))
2124 (build-system ocaml-build-system)
2126 (list opam ocamlbuild))
2128 `(("topkg" ,ocaml-topkg)))
2131 #:build-flags '("build")
2133 (modify-phases %standard-phases
2134 (delete 'configure))))
2135 (home-page "https://erratique.ch/software/rresult")
2136 (synopsis "Result value combinators for OCaml")
2137 (description "Handle computation results and errors in an explicit and
2138 declarative manner, without resorting to exceptions. It defines combinators
2139 to operate on the result type available from OCaml 4.03 in the standard
2141 (license license:isc)))
2143 (define-public ocaml-sqlite3
2145 (name "ocaml-sqlite3")
2151 (url "https://github.com/mmottl/sqlite3-ocaml")
2153 (file-name (git-file-name name version))
2156 "1ksm0a490315sf0yy8lmva5f3bgr0jnllffanyq89431grpj6x15"))))
2157 (build-system dune-build-system)
2158 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sqlite3))))
2160 (list dune-configurator ocaml-odoc))
2162 (list ocaml-ppx-inline-test pkg-config sqlite))
2163 (home-page "https://mmottl.github.io/sqlite3-ocaml")
2164 (synopsis "SQLite3 Bindings for OCaml")
2166 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
2167 API. Sqlite3 is a self-contained, serverless, zero-configuration,
2168 transactional SQL database engine with outstanding performance for many use
2169 cases. These bindings are written in a way that enables a friendly
2170 coexistence with the old (version 2) SQLite and its OCaml wrapper
2171 @code{ocaml-sqlite}.")
2172 (license license:expat)))
2174 (define-public ocaml4.07-sqlite3
2175 (package-with-ocaml4.07
2177 (inherit ocaml-sqlite3)
2183 (url "https://github.com/mmottl/sqlite3-ocaml")
2185 (file-name (git-file-name "ocaml-sqlite3" version))
2188 "15mmq7ak5facpfawfrc6hjz211gli7jab52iqdsihfvh790xm55f"))))
2191 (modify-phases %standard-phases
2192 (add-before 'build 'chmod
2194 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2197 `(("ocaml-odoc" ,ocaml-odoc)))
2200 (define-public ocaml-csv
2208 (url "https://github.com/Chris00/ocaml-csv")
2210 (file-name (git-file-name name version))
2213 "0y2hlqlmqs7r4y5mfzc5qdv7gdp3wxbwpz458vf7fj4593vg94cf"))))
2214 (build-system dune-build-system)
2218 (home-page "https://github.com/Chris00/ocaml-csv")
2219 (synopsis "Pure OCaml functions to read and write CSV")
2221 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
2222 by all major spreadsheets. This library implements pure OCaml functions to
2223 read and write files in this format as well as some convenience functions to
2224 manipulate such data.")
2225 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
2226 ;; against the library to be released under any terms.
2227 (license license:lgpl2.1)))
2229 (define-public ocaml-mtime
2231 (name "ocaml-mtime")
2235 (uri (string-append "http://erratique.ch/software/mtime/releases/"
2236 "mtime-" version ".tbz"))
2239 "1xy6lg52n2zynp4p164ym9j0f1b95j5n4bi5y4mbdrry9w99h32m"))))
2240 (build-system ocaml-build-system)
2242 (list ocamlbuild opam))
2244 `(("topkg" ,ocaml-topkg)))
2247 #:build-flags (list "build")
2249 (modify-phases %standard-phases
2250 (delete 'configure))))
2251 (home-page "https://erratique.ch/software/mtime")
2252 (synopsis "Monotonic wall-clock time for OCaml")
2253 (description "Access monotonic wall-clock time. It measures time
2254 spans without being subject to operating system calendar time adjustments.")
2255 (license license:isc)))
2257 (define-public ocaml-calendar
2259 ;; Commit from 2019-02-03.
2260 (let ((commit "a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da")
2263 (name "ocaml-calendar")
2264 ;; Makefile.in says 2.04.
2265 (version (git-version "2.04" revision commit))
2270 (url "https://github.com/ocaml-community/calendar")
2272 (file-name (git-file-name name version))
2275 "09d9gyqm3zkf3z2m9fx87clqihx6brf8rnzm4yq7c8kf1p572hmc"))))
2276 (build-system gnu-build-system)
2278 '(#:test-target "tests"
2280 (modify-phases %standard-phases
2281 (add-after 'unpack 'make-deterministic
2283 (substitute* "Makefile.in"
2284 (("`date`") "no date for reproducibility"))))
2285 (add-before 'install 'set-environment-variables
2286 (lambda* (#:key outputs #:allow-other-keys)
2287 (let ((out (assoc-ref outputs "out")))
2288 (setenv "OCAMLFIND_DESTDIR"
2289 (string-append out "/lib/ocaml/site-lib"))
2290 (setenv "OCAMLFIND_LDCONF" "ignore")
2291 (mkdir-p (string-append
2292 out "/lib/ocaml/site-lib/calendar"))))))))
2294 (list autoconf automake))
2297 ("ocamlfind" ,ocaml-findlib)))
2298 (home-page "https://github.com/ocaml-community/calendar")
2299 (synopsis "OCaml library for handling dates and times")
2300 (description "This package provides types and operations over
2302 ;; With linking exception.
2303 (license license:lgpl2.1+))))
2305 (define-public ocaml-cmdliner
2307 (name "ocaml-cmdliner")
2311 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2312 "cmdliner-" version ".tbz"))
2315 "1yxm4x34cbi06bfld601ds9drlbnyx0797ym3n6yyh4rlz1qgbm1"))))
2316 (build-system ocaml-build-system)
2318 (list ocaml-result))
2323 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
2324 "/lib/ocaml/site-lib/cmdliner"))
2326 (modify-phases %standard-phases
2328 (add-before 'build 'fix-source-file-order
2330 (substitute* "build.ml"
2331 (("Sys.readdir dir")
2332 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
2334 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-cmdliner))))
2335 (home-page "https://erratique.ch/software/cmdliner")
2336 (synopsis "Declarative definition of command line interfaces for OCaml")
2337 (description "Cmdliner is a module for the declarative definition of command
2338 line interfaces. It provides a simple and compositional mechanism to convert
2339 command line arguments to OCaml values and pass them to your functions. The
2340 module automatically handles syntax errors, help messages and UNIX man page
2341 generation. It supports programs with single or multiple commands and respects
2342 most of the POSIX and GNU conventions.")
2343 (license license:bsd-3)))
2345 (define-public ocaml4.07-cmdliner
2346 (package-with-ocaml4.07
2348 (inherit ocaml-cmdliner)
2352 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2353 "cmdliner-" version ".tbz"))
2356 "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw"))))
2359 (define-public ocaml-fmt
2366 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2369 "0q8j2in2473xh7k4hfgnppv9qy77f2ih89yp6yhpbp92ba021yzi"))))
2370 (build-system ocaml-build-system)
2372 `(("ocamlbuild" ,ocamlbuild)
2374 ("topkg" ,ocaml-topkg)))
2376 `(("cmdliner" ,ocaml-cmdliner)
2377 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
2378 ("ocaml-uchar" ,ocaml-uchar)))
2379 (arguments `(#:tests? #f
2380 #:build-flags (list "build" "--with-base-unix" "true"
2381 "--with-cmdliner" "true")
2383 (modify-phases %standard-phases
2384 (delete 'configure))))
2385 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-fmt))))
2386 (home-page "https://erratique.ch/software/fmt")
2387 (synopsis "OCaml Format pretty-printer combinators")
2388 (description "Fmt exposes combinators to devise Format pretty-printing
2390 (license license:isc)))
2392 (define-public ocaml4.07-fmt
2393 (package-with-ocaml4.07
2399 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2403 "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
2406 (define-public ocaml-astring
2408 (name "ocaml-astring")
2413 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
2416 "1ykhg9gd3iy7zsgyiy2p9b1wkpqg9irw5pvcqs3sphq71iir4ml6"))))
2417 (build-system ocaml-build-system)
2419 `(("ocamlbuild" ,ocamlbuild)
2421 ("topkg" ,ocaml-topkg)))
2424 #:build-flags (list "build")
2426 (modify-phases %standard-phases
2427 (delete 'configure))))
2428 (home-page "https://erratique.ch/software/astring")
2429 (synopsis "Alternative String module for OCaml")
2430 (description "Astring exposes an alternative String module for OCaml. This
2431 module balances minimality and expressiveness for basic, index-free, string
2432 processing and provides types and functions for substrings, string sets and
2433 string maps. The String module exposed by Astring has exception safe functions,
2434 removes deprecated and rarely used functions, alters some signatures and names,
2435 adds a few missing functions and fully exploits OCaml's newfound string
2437 (license license:isc)))
2439 (define-public ocaml-alcotest
2441 (name "ocaml-alcotest")
2446 (url "https://github.com/mirage/alcotest")
2448 (file-name (git-file-name name version))
2451 "195612n7p8y5ba6n19glql7qffl8n3aqkl9nrlln5lb9739gpv4w"))))
2452 (build-system dune-build-system)
2454 `(#:package "alcotest"
2457 (modify-phases %standard-phases
2458 (add-after 'unpack 'fix-test-format
2460 ;; cmdliner changed the format and the tests fail
2461 (substitute* "test/e2e/alcotest/failing/unknown_option.expected"
2463 (("\\.\\.\\.") "…")))))))
2474 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-alcotest))))
2475 (home-page "https://github.com/mirage/alcotest")
2476 (synopsis "Lightweight OCaml test framework")
2477 (description "Alcotest exposes simple interface to perform unit tests. It
2478 exposes a simple TESTABLE module type, a check function to assert test
2479 predicates and a run function to perform a list of unit -> unit test callbacks.
2480 Alcotest provides a quiet and colorful output where only faulty runs are fully
2481 displayed at the end of the run (with the full logs ready to inspect), with a
2482 simple (yet expressive) query language to select the tests to run.")
2483 (license license:isc)))
2485 (define-public ocaml4.07-alcotest
2486 (package-with-ocaml4.07
2488 (inherit ocaml-alcotest)
2493 (url "https://github.com/mirage/alcotest")
2495 (file-name (git-file-name "ocaml-alcotest" version))
2498 "1frwi185z4aadmaf0vp8xk5227nyg7nmh28ijj5l7ncjr5slvhz8"))))
2500 `(#:package "alcotest"
2504 (define-public ocaml-ppx-tools
2506 (name "ocaml-ppx-tools")
2512 (url "https://github.com/alainfrisch/ppx_tools")
2514 (file-name (git-file-name name version))
2517 "0fwibah2hgllrnbdrmfqil5gr5raf6pb5h2zx6zs1h3d4ykvy8k8"))))
2518 (build-system dune-build-system)
2524 (properties `((upstream-name . "ppx_tools")))
2525 (home-page "https://github.com/alainfrisch/ppx_tools")
2526 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
2528 "Ppx_tools provides tools for authors of ppx rewriters and other
2530 (license license:expat)))
2532 (define-public ocaml-react
2534 (name "ocaml-react")
2539 (uri (string-append "http://erratique.ch/software/react/releases/react-"
2542 "16cg4byj8lfbbw96dhh8sks5y9n1c3fshz7f2p8m7wgisqax7bf4"))))
2543 (build-system ocaml-build-system)
2545 (list ocamlbuild opam ocaml-topkg))
2548 #:build-flags (list "build")
2550 (modify-phases %standard-phases
2551 (delete 'configure))))
2552 (home-page "https://erratique.ch/software/react")
2553 (synopsis "Declarative events and signals for OCaml")
2554 (description "React is an OCaml module for functional reactive programming
2555 (FRP). It provides support to program with time varying values: declarative
2556 events and signals. React doesn't define any primitive event or signal, it
2557 lets the client choose the concrete timeline.")
2558 (license license:bsd-3)))
2560 (define-public ocaml-ssl
2568 (url "https://github.com/savonet/ocaml-ssl")
2570 (file-name (git-file-name name version))
2572 "1dr7yghbv0wncvggd2105bj097msgrdzxd9wjkw1xxf2vvp0j1bi"))))
2573 (build-system dune-build-system)
2575 `(#:test-target "."))
2577 (list autoconf automake ocaml-alcotest which))
2578 (propagated-inputs (list openssl))
2579 (home-page "https://github.com/savonet/ocaml-ssl/")
2580 (synopsis "OCaml bindings for OpenSSL")
2582 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
2583 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
2584 (license license:lgpl2.1)))
2586 (define-public ocaml-mmap
2593 (url "https://github.com/mirage/mmap")
2594 (commit (string-append "v" version))))
2595 (file-name (git-file-name name version))
2598 "1a7w7l682cbksn2zlmz24gb519x7wb65ivr5vndm9x5pi9fw5pfb"))))
2599 (build-system dune-build-system)
2600 (propagated-inputs (list ocaml-bigarray-compat))
2601 (home-page "https://github.com/mirage/mmap")
2602 (synopsis "File mapping for OCaml")
2603 (description "This project provides a @command{Mmap.map_file} function
2604 for mapping files in memory. This function is the same as the
2605 @command{Unix.map_file} function added in OCaml >= 4.06.")
2606 (license (list license:qpl license:lgpl2.0))))
2608 (define-public ocaml-lwt
2616 (url "https://github.com/ocsigen/lwt")
2618 (file-name (git-file-name name version))
2620 "0cfmhw4nsnwba49p06l9fbnbcq75w9fd3kvrr615ihjc9frlmjsy"))))
2621 (build-system dune-build-system)
2625 (list ocaml-cppo pkg-config))
2629 (list ocaml-mmap ocaml-ocplib-endian ocaml-result ocaml-seq libev))
2630 (home-page "https://github.com/ocsigen/lwt")
2631 (synopsis "Cooperative threads and I/O in monadic style")
2632 (description "Lwt provides typed, composable cooperative threads. These
2633 make it easy to run normally-blocking I/O operations concurrently in a single
2634 process. Also, in many cases, Lwt threads can interact without the need for
2635 locks or other synchronization primitives.")
2636 (license license:lgpl2.1)))
2638 (define-public ocaml-luv
2644 (uri (string-append "https://github.com/aantron/luv/releases/download/"
2645 version "/luv-" version ".tar.gz"))
2648 "0hrsi8n2l31bcwgj847df4chjgqb9lmwkaky8fvvi15k25rz9v6c"))
2649 (modules '((guix build utils)))
2652 ;; Remove bundled configure and libuv.
2653 (delete-file-recursively "src/c/vendor")
2655 (build-system dune-build-system)
2658 #~(modify-phases %standard-phases
2659 (add-before 'build 'use-system-libuv
2661 (setenv "LUV_USE_SYSTEM_LIBUV" "yes")))
2663 (lambda* (#:key tests? #:allow-other-keys)
2665 (invoke "dune" "runtest" "--no-buffer" "--force")))))))
2666 (inputs (list libuv))
2667 (propagated-inputs (list ocaml-ctypes ocaml-result ocaml-odoc))
2668 (native-inputs (list ocaml-base ocaml-alcotest))
2669 (home-page "https://github.com/aantron/luv")
2670 (synopsis "Binding to libuv: cross-platform asynchronous I/O")
2672 "Luv is a binding to libuv, the cross-platform C library that does
2673 asynchronous I/O in Node.js and runs its main loop. Besides asynchronous I/O,
2674 libuv also supports multiprocessing and multithreading. Multiple event loops
2675 can be run in different threads. libuv also exposes a lot of other
2676 functionality, amounting to a full OS API, and an alternative to the standard
2678 (license license:expat)))
2680 (define-public ocaml-lwt-react
2683 (name "ocaml-lwt-react")
2688 (url "https://github.com/ocsigen/lwt")
2689 ;; Version from opam
2691 (file-name (git-file-name name version))
2694 "12sglfwdx4anfslj437g7gxchklgzfvba6i4p478kmqr56j2xd0c"))))
2696 `(#:package "lwt_react"))
2697 (properties `((upstream-name . "lwt_react")))
2699 (list ocaml-lwt ocaml-react))))
2701 (define-public ocaml-lwt-log
2703 (name "ocaml-lwt-log")
2708 (url "https://github.com/aantron/lwt_log")
2710 (file-name (git-file-name name version))
2713 "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
2714 (build-system dune-build-system)
2716 `(#:tests? #f)); require lwt_ppx
2718 `(("lwt" ,ocaml-lwt)))
2719 (properties `((upstream-name . "lwt_log")))
2720 (home-page "https://github.com/aantron/lwt_log")
2721 (synopsis "Logging library")
2722 (description "This package provides a deprecated logging component for
2724 (license license:lgpl2.1)))
2726 (define-public ocaml-logs
2732 (uri (string-append "http://erratique.ch/software/logs/releases/"
2733 "logs-" version ".tbz"))
2736 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
2737 (build-system ocaml-build-system)
2740 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2742 (modify-phases %standard-phases
2743 (delete 'configure))))
2745 (list ocamlbuild opam))
2747 `(("fmt" ,ocaml-fmt)
2749 ("mtime" ,ocaml-mtime)
2750 ("result" ,ocaml-result)
2751 ("cmdliner" ,ocaml-cmdliner)
2752 ("topkg" ,ocaml-topkg)))
2753 (home-page "https://erratique.ch/software/logs")
2754 (synopsis "Logging infrastructure for OCaml")
2755 (description "Logs provides a logging infrastructure for OCaml. Logging is
2756 performed on sources whose reporting level can be set independently. Log
2757 message report is decoupled from logging and is handled by a reporter.")
2758 (license license:isc)))
2760 (define-public ocaml-fpath
2762 (name "ocaml-fpath")
2766 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2767 "fpath-" version ".tbz"))
2770 "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"))))
2771 (build-system ocaml-build-system)
2774 #:build-flags (list "build")
2776 (modify-phases %standard-phases
2777 (delete 'configure))))
2779 (list ocamlbuild opam))
2781 `(("topkg" ,ocaml-topkg)
2782 ("astring" ,ocaml-astring)))
2783 (home-page "https://erratique.ch/software/fpath")
2784 (synopsis "File system paths for OCaml")
2785 (description "Fpath is an OCaml module for handling file system paths with
2786 POSIX or Windows conventions. Fpath processes paths without accessing the
2787 file system and is independent from any system library.")
2788 (license license:isc)))
2790 (define-public ocaml-bos
2796 (uri (string-append "http://erratique.ch/software/bos/releases/"
2797 "bos-" version ".tbz"))
2800 "0dwg7lpaq30rvwc5z1gij36fn9xavvpah1bj8ph9gmhhddw2xmnq"))))
2801 (build-system ocaml-build-system)
2804 #:build-flags (list "build")
2806 (modify-phases %standard-phases
2807 (delete 'configure))))
2809 (list ocamlbuild opam))
2811 `(("topkg" ,ocaml-topkg)
2812 ("astring" ,ocaml-astring)
2814 ("fpath" ,ocaml-fpath)
2815 ("logs" ,ocaml-logs)
2816 ("rresult" ,ocaml-rresult)))
2817 (home-page "https://erratique.ch/software/bos")
2818 (synopsis "Basic OS interaction for OCaml")
2819 (description "Bos provides support for basic and robust interaction with
2820 the operating system in OCaml. It has functions to access the process
2821 environment, parse command line arguments, interact with the file system and
2822 run command line programs.")
2823 (license license:isc)))
2825 (define-public ocaml-xml-light
2827 (name "ocaml-xml-light")
2832 (url "https://github.com/ncannasse/xml-light")
2834 (file-name (git-file-name name version))
2837 "089ywjz84y4p5iln94y54vh03b5fm2zrl2dld1398dyrby96dp6s"))))
2838 (build-system ocaml-build-system)
2840 (list #:tests? #f ; There are no tests.
2842 #~(modify-phases %standard-phases
2843 (add-after 'unpack 'prefix
2845 (substitute* "Makefile"
2846 (("`\\$\\(OCAMLC\\) -where`")
2847 (string-append #$output "/lib/ocaml/site-lib/xml-light")))))
2848 (delete 'configure) ; no configure
2849 (add-before 'install 'mkdir
2851 (mkdir-p (string-append #$output "/lib/ocaml/site-lib/xml-light"))))
2854 (invoke "make" "install_ocamlfind"))))))
2855 (home-page "https://github.com/ncannasse/xml-light")
2856 (synopsis "Minimal XML parser & printer for OCaml")
2858 "Xml-Light provides functions to parse an XML document into an OCaml data
2859 structure, work with it, and print it back to an XML document. It also
2860 supports DTD parsing and checking, and is entirely written in OCaml, hence it
2861 does not require additional C libraries.")
2862 (license license:lgpl2.1+))) ; with linking exception
2864 (define-public ocaml-xmlm
2870 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2871 "xmlm-" version ".tbz"))
2874 "1ynrjba3wm3axscvggrfijfgsznmphhxnkffqch67l9xiqjm44h9"))))
2875 (build-system ocaml-build-system)
2878 #:build-flags (list "build")
2880 (modify-phases %standard-phases
2881 (delete 'configure))))
2883 (list ocamlbuild ocaml-topkg opam))
2884 (home-page "https://erratique.ch/software/xmlm")
2885 (synopsis "Streaming XML codec for OCaml")
2886 (description "Xmlm is a streaming codec to decode and encode the XML data
2887 format. It can process XML documents without a complete in-memory
2888 representation of the data.")
2889 (license license:isc)))
2891 (define-public ocaml-gen
2898 (url "https://github.com/c-cube/gen")
2899 (commit (string-append "v" version))))
2900 (file-name (git-file-name name version))
2903 "1z5nw5wljvcqp8q07h336bbvf9paynia0jsdh4486hlkbmr1ask1"))))
2904 (build-system dune-build-system)
2909 (list ocaml-odoc ocaml-seq))
2911 (list ocaml-qtest ocaml-qcheck))
2912 (home-page "https://github.com/c-cube/gen/")
2913 (synopsis "Iterators for OCaml, both restartable and consumable")
2914 (description "Gen implements iterators of OCaml, that are both restartable
2916 (license license:bsd-2)))
2918 (define-public ocaml-sedlex
2920 (name "ocaml-sedlex")
2925 (url "https://github.com/ocaml-community/sedlex")
2926 (commit (string-append "v" version))))
2927 (file-name (git-file-name name version))
2930 "062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"))))
2931 (build-system dune-build-system)
2933 `(#:tests? #f ; no tests
2936 (modify-phases %standard-phases
2937 (add-before 'build 'copy-resources
2938 (lambda* (#:key inputs #:allow-other-keys)
2939 (with-directory-excursion "src/generator/data"
2940 ;; Newer versions of dune emit an error if files it wants to
2941 ;; build already exist. Delete the dune file so dune doesn't
2943 (delete-file "dune")
2946 (copy-file (assoc-ref inputs file) file))
2947 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
2950 (add-before 'build 'chmod
2952 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2955 (list ocaml-gen ocaml-ppxlib ocaml-uchar))
2956 ;; These three files are needed by src/generator/data/dune, but would be
2957 ;; downloaded using curl at build time.
2959 `(("DerivedCoreProperties.txt"
2962 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
2965 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
2966 ("DerivedGeneralCategory.txt"
2969 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
2972 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
2976 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2979 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
2980 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sedlex))))
2981 (home-page "https://www.cduce.org/download.html#side")
2982 (synopsis "Lexer generator for Unicode and OCaml")
2983 (description "Lexer generator for Unicode and OCaml.")
2984 (license license:expat)))
2986 (define-public ocaml4.07-sedlex
2987 (package-with-ocaml4.07
2989 (inherit ocaml-sedlex)
2990 (name "ocaml-sedlex")
2995 (url "https://github.com/ocaml-community/sedlex")
2996 (commit (string-append "v" version))))
2997 (file-name (git-file-name name version))
3000 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
3002 `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
3003 ,@(package-propagated-inputs ocaml-sedlex)))
3006 (define-public ocaml-uchar
3008 (name "ocaml-uchar")
3013 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
3014 version "/uchar-" version ".tbz"))
3016 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
3017 (build-system ocaml-build-system)
3020 #:build-flags (list "native=true" "native-dynlink=true")
3022 (modify-phases %standard-phases
3023 (delete 'configure))))
3025 (list ocamlbuild opam))
3026 (home-page "https://github.com/ocaml/uchar")
3027 (synopsis "Compatibility library for OCaml's Uchar module")
3028 (description "The uchar package provides a compatibility library for the
3029 `Uchar` module introduced in OCaml 4.03.")
3030 (license license:lgpl2.1)))
3032 (define-public ocaml-uutf
3038 (uri (string-append "http://erratique.ch/software/uutf/releases/"
3039 "uutf-" version ".tbz"))
3042 "0s05r8ggp1g97zq4rnvbxzj22pv8ld0k5wsdw662jw0y7mhsawl7"))))
3043 (build-system ocaml-build-system)
3046 #:build-flags (list "build")
3048 (modify-phases %standard-phases
3049 (delete 'configure))))
3051 `(("ocamlbuild" ,ocamlbuild)
3053 ("topkg" ,ocaml-topkg)))
3055 `(("uchar" ,ocaml-uchar)
3056 ("cmdliner" ,ocaml-cmdliner)))
3057 (home-page "https://erratique.ch/software/uutf")
3058 (synopsis "Non-blocking streaming Unicode codec for OCaml")
3059 (description "Uutf is a non-blocking streaming codec to decode and encode
3060 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
3061 work character by character without blocking on IO. Decoders perform character
3062 position tracking and support newline normalization.
3064 Functions are also provided to fold over the characters of UTF encoded OCaml
3065 string values and to directly encode characters in OCaml Buffer.t values.")
3066 (license license:isc)))
3068 (define-public ocaml-uunf
3075 (uri (string-append "https://erratique.ch/software/uunf/releases/uunf-"
3079 "17wv0nm3vvwcbzb1b09akw8jblmigyhbfmh1sy9lkb5756ni94a2"))))
3080 (build-system ocaml-build-system)
3082 `(#:build-flags (list "build" "--tests" "true")
3084 (modify-phases %standard-phases
3086 (add-before 'check 'check-data
3087 (lambda* (#:key inputs #:allow-other-keys)
3088 (copy-file (assoc-ref inputs "NormalizationTest.txt")
3089 "test/NormalizationTest.txt")
3092 `(("ocamlbuild" ,ocamlbuild)
3094 ("topkg" ,ocaml-topkg)
3095 ;; Test data is otherwise downloaded with curl
3096 ("NormalizationTest.txt"
3099 (uri (string-append "https://www.unicode.org/Public/"
3101 "/ucd/NormalizationTest.txt"))
3102 (file-name (string-append "NormalizationTest-" version ".txt"))
3104 (base32 "0c93pqdkksf7b7zw8y2w0h9i5kkrsdjmh2cr5clrrhp6mg10rcvw"))))))
3105 (propagated-inputs (list ocaml-uutf))
3106 (home-page "https://erratique.ch/software/uunf")
3107 (synopsis "Unicode text normalization for OCaml")
3109 "Uunf is an OCaml library for normalizing Unicode text. It supports all
3110 Unicode normalization forms. The library is independent from any
3111 IO mechanism or Unicode text data structure and it can process text
3112 without a complete in-memory representation.")
3113 (license license:isc)))
3115 (define-public ocaml-jsonm
3117 (name "ocaml-jsonm")
3121 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
3122 "jsonm-" version ".tbz"))
3125 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
3126 (build-system ocaml-build-system)
3129 #:build-flags (list "build")
3131 (modify-phases %standard-phases
3132 (delete 'configure))))
3134 `(("ocamlbuild" ,ocamlbuild)
3136 ("topkg" ,ocaml-topkg)))
3138 `(("uutf" ,ocaml-uutf)
3139 ("cmdliner" ,ocaml-cmdliner)))
3140 (home-page "https://erratique.ch/software/jsonm")
3141 (synopsis "Non-blocking streaming JSON codec for OCaml")
3142 (description "Jsonm is a non-blocking streaming codec to decode and encode
3143 the JSON data format. It can process JSON text without blocking on IO and
3144 without a complete in-memory representation of the data.")
3145 (license license:isc)))
3147 (define-public ocaml-ocp-indent
3149 (name "ocaml-ocp-indent")
3155 (url "https://github.com/OCamlPro/ocp-indent")
3157 (file-name (git-file-name name version))
3160 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
3161 (build-system dune-build-system)
3163 `(#:test-target "tests"))
3165 (list ocaml-cmdliner))
3166 (home-page "https://www.typerex.org/ocp-indent.html")
3167 (synopsis "Tool to indent OCaml programs")
3169 "Ocp-indent is based on an approximate, tolerant OCaml parser
3170 and a simple stack machine. Presets and configuration options are available,
3171 with the possibility to set them project-wide. It supports the most common
3172 syntax extensions, and it is extensible for others.
3174 This package includes:
3177 @item An indentor program, callable from the command-line or from within editors,
3178 @item Bindings for popular editors,
3179 @item A library that can be directly used by editor writers, or just for
3180 fault-tolerant and approximate parsing.
3182 (license license:lgpl2.1)))
3184 (define-public ocaml-ocp-index
3186 (name "ocaml-ocp-index")
3192 (url "https://github.com/OCamlPro/ocp-index")
3194 (file-name (git-file-name name version))
3197 "1gbigw5s2cafkr82n9vkxbb892qfkykj0adj0hrdkrkw8j6rfl0j"))))
3198 (build-system dune-build-system)
3200 `(#:package "ocp-index"))
3202 (list ocaml-ocp-indent ocaml-re ocaml-cmdliner))
3205 (home-page "https://www.typerex.org/ocp-index.html")
3206 (synopsis "Lightweight completion and documentation browsing for OCaml libraries")
3207 (description "This package includes only the @code{ocp-index} library
3208 and command-line tool.")
3209 ;; All files in libs/ are GNU lgpl2.1
3210 ;; For static linking, clause 6 of LGPL is lifted
3211 ;; All other files under GNU gpl3
3212 (license (list license:gpl3+
3213 license:lgpl2.1+))))
3215 (define-public ocaml-ocurl
3217 (name "ocaml-ocurl")
3221 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
3225 "0qvpsqbq4qbd397n0nlv9cwlqfyjw7gfb5mmq1awvnklr0c9fdg0"))))
3226 (build-system ocaml-build-system)
3229 (modify-phases %standard-phases
3230 (add-before 'configure 'fix-/bin/sh
3231 (lambda* (#:key inputs #:allow-other-keys)
3232 (substitute* "configure"
3233 (("-/bin/sh") (string-append "-" (which "bash")))))))))
3236 (inputs (list curl))
3237 (home-page "http://ocurl.forge.ocamlcore.org/")
3238 (synopsis "OCaml bindings for libcurl")
3239 (description "Client-side URL transfer library, supporting HTTP and a
3240 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
3241 (license license:isc)))
3243 (define-public ocaml-base64
3245 (name "ocaml-base64")
3250 (url "https://github.com/mirage/ocaml-base64")
3251 (commit (string-append "v" version))))
3252 (file-name (git-file-name name version))
3255 "068hwdbpl7vx9jjpxdc6a10zqd8xa55j3xx7ga6fnwrlfsbs2pjj"))))
3256 (build-system dune-build-system)
3258 (list ocaml-alcotest ocaml-bos ocaml-rresult))
3259 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base64))))
3260 (home-page "https://github.com/mirage/ocaml-base64")
3261 (synopsis "Base64 encoding for OCaml")
3262 (description "Base64 is a group of similar binary-to-text encoding schemes
3263 that represent binary data in an ASCII string format by translating it into a
3264 radix-64 representation. It is specified in RFC 4648.")
3265 (license license:isc)))
3267 (define-public ocaml4.07-base64
3268 (package-with-ocaml4.07
3270 (inherit ocaml-base64)
3275 (url "https://github.com/mirage/ocaml-base64")
3276 (commit (string-append "v" version))))
3277 (file-name (git-file-name "ocaml-base64" version))
3280 "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy"))))
3282 ;; Tests are likely incompatible with our recent alcotest
3286 (define-public ocamlify
3293 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
3294 version "/ocamlify-" version ".tar.gz"))
3296 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
3297 (build-system ocaml-build-system)
3299 `(#:tests? #f; no tests
3301 (modify-phases %standard-phases
3304 ;; This package uses pre-generated setup.ml by oasis, but is
3305 ;; a dependency of oasis. the pre-generated setup.ml is broken
3306 ;; with recent versions of OCaml, so we perform a bootstrap instead.
3308 (substitute* "src/OCamlifyConfig.ml.ab"
3309 (("$pkg_version") ,version))
3310 (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
3311 (with-directory-excursion "src"
3312 (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
3316 (lambda* (#:key outputs #:allow-other-keys)
3317 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
3319 (install-file "src/ocamlify" bin)
3321 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
3322 (synopsis "Include files in OCaml code")
3323 (description "OCamlify creates OCaml source code by including
3324 whole files into OCaml string or string list. The code generated can be
3325 compiled as a standard OCaml file. It allows embedding external resources as
3327 (license license:lgpl2.1+))); with the OCaml static compilation exception
3329 (define-public omake
3335 (uri (string-append "http://download.camlcity.org/download/"
3336 "omake-" version ".tar.gz"))
3339 "1i7pcv53kqplrbdx9mllrhbv4j57zf87xwq18r16cvn1lbc6mqal"))
3340 (patches (search-patches "omake-fix-non-determinism.patch"))))
3341 (build-system ocaml-build-system)
3344 ,#~(list (string-append "PREFIX=" #$output))
3345 #:tests? #f ; no test target
3347 (modify-phases %standard-phases
3348 (add-before 'configure 'fix-makefile
3349 (lambda* (#:key outputs #:allow-other-keys)
3350 (substitute* "mk/osconfig_unix.mk"
3351 (("CC = cc") "CC = gcc")))))))
3352 (native-inputs (list hevea))
3353 (home-page "http://projects.camlcity.org/projects/omake.html")
3354 (synopsis "Build system designed for scalability and portability")
3355 (description "Similar to make utilities you may have used, but it features
3356 many additional enhancements, including:
3359 @item Support for projects spanning several directories or directory hierarchies.
3360 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
3361 with full support for incremental builds.
3362 @item Dependency analysis takes the command lines into account — whenever the
3363 command line used to build a target changes, the target is considered
3365 @item Fully scriptable, includes a library that providing support for standard
3366 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
3368 (license (list license:lgpl2.1 ; libmojave
3369 license:expat ; OMake scripts
3370 license:gpl2)))) ; OMake itself, with ocaml linking exception
3373 (define-public ocaml-benchmark
3375 (name "ocaml-benchmark")
3381 (url "https://github.com/Chris00/ocaml-benchmark")
3383 (file-name (git-file-name name version))
3385 (base32 "0d0vdfjgjzf1y6wkd714d8b0piv1z9qav5ahsapynqzk4b4ahhnp"))))
3386 (build-system dune-build-system)
3387 (arguments `(#:test-target "tests"))
3388 (home-page "https://github.com/Chris00/ocaml-benchmark")
3389 (synopsis "Benchmark running times of code")
3391 "This module provides a set of tools to measure the running times of
3392 your functions and to easily compare the results. A statistical test
3393 is used to determine whether the results truly differ.")
3394 (license license:lgpl3+)))
3396 (define-public ocaml-batteries
3398 (name "ocaml-batteries")
3403 (url "https://github.com/ocaml-batteries-team/batteries-included")
3404 (commit (string-append "v" version))))
3405 (file-name (git-file-name name version))
3408 "07387jp93civ9p1q2ixmq8qkzzyssp94ssxd4w2ndvkg1nr6kfcl"))))
3409 (build-system ocaml-build-system)
3410 (propagated-inputs (list ocaml-num))
3412 (list ocamlbuild ocaml-benchmark ocaml-qcheck ocaml-qtest))
3415 (modify-phases %standard-phases
3416 (add-after 'unpack 'make-writable
3418 (for-each make-file-writable (find-files "." "."))))
3419 (add-before 'build 'fix-nondeterminism
3421 (substitute* "setup.ml"
3422 (("Sys.readdir dirname")
3423 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
3425 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-batteries))))
3426 (home-page "http://batteries.forge.ocamlcore.org/")
3427 (synopsis "Development platform for the OCaml programming language")
3428 (description "Define a standard set of libraries which may be expected on
3429 every compliant installation of OCaml and organize these libraries into a
3430 hierarchy of modules.")
3431 (license license:lgpl2.1+)))
3433 (define-public ocaml4.07-batteries
3434 (package-with-ocaml4.07
3436 (inherit ocaml-batteries)
3441 (url "https://github.com/ocaml-batteries-team/batteries-included")
3442 (commit (string-append "v" version))))
3443 (file-name (git-file-name "ocaml-batteries" version))
3446 "02fxa1nkp7rpiwfp04n0sagdp9lad4dh9bvljp95xfshm1cx7y4q"))))
3449 (modify-phases %standard-phases
3450 (delete 'check) ; tests are run by the build phase
3451 (add-before 'build 'fix-nondeterminism
3453 (substitute* "setup.ml"
3454 (("Sys.readdir dirname")
3455 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
3458 (lambda* (#:key inputs outputs #:allow-other-keys)
3461 (substring str 0 (- (string-length str) 1)))
3463 (find-files "src" ".*.mliv")
3464 (find-files "src" ".*.mlv")
3465 (find-files "src" ".*.mlp")))))
3466 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
3467 "-lflag" "-dllpath-all" files)
3468 (for-each (lambda (file)
3469 (copy-file (string-append "_build/" file) file))
3471 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
3472 "-lflag" "-dllpath-all" "build/mkconf.byte")
3473 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
3474 (invoke "make" "all")
3477 `(("ocamlbuild" ,ocamlbuild)
3478 ("qtest" ,ocaml-qtest)))
3481 (define-public ocaml-pcre
3489 (url "https://github.com/mmottl/pcre-ocaml")
3491 (file-name (git-file-name name version))
3494 "048k1rl17fcml000yh8fnghk1a06h14lbyrnk9nbigxsymrz6cq2"))))
3495 (build-system dune-build-system)
3500 (list dune-configurator pcre))
3502 `(("pcre:bin" ,pcre "bin")))
3503 (home-page "https://mmottl.github.io/pcre-ocaml")
3505 "Bindings to the Perl Compatibility Regular Expressions library")
3506 (description "Pcre-ocaml offers library functions for string
3507 pattern matching and substitution, similar to the functionality
3508 offered by the Perl language.")
3509 ;; With static linking exception
3510 (license license:lgpl2.1+)))
3512 (define-public ocaml-expect
3514 (name "ocaml-expect")
3518 (uri (ocaml-forge-uri name version 1736))
3521 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
3524 (build-system ocaml-build-system)
3526 `(("ocamlbuild" ,ocamlbuild)
3527 ("ocaml-num" ,ocaml-num)
3528 ("ocaml-pcre" ,ocaml-pcre)
3529 ("ounit" ,ocaml-ounit)))
3531 `(("batteries" ,ocaml-batteries)))
3532 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
3533 (synopsis "Simple implementation of expect")
3534 (description "This package provides utilities for building unitary testing
3535 of interactive program. You can match the question using a regular expression
3537 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
3539 (define-public ocaml-stdlib-shims
3541 (name "ocaml-stdlib-shims")
3546 (url "https://github.com/ocaml/stdlib-shims")
3548 (file-name (git-file-name name version))
3551 "0gmg8w67j3ww17llk7hl4dx0vq7p50rn5s4ib9sy984k543rz59h"))))
3552 (build-system dune-build-system)
3553 (home-page "https://github.com/ocaml/stdlib-shims")
3554 (synopsis "OCaml stdlib features backport to older OCaml compilers")
3555 (description "This package backports some of the new stdlib features to
3556 older compilers, such as the Stdlib module. This allows projects that require
3557 compatibility with older compiler to use these new features in their code.")
3558 ;; with ocaml-linking exception
3559 (license license:lgpl2.1+)))
3561 (define-public ocaml-fileutils
3563 (name "ocaml-fileutils")
3568 (url "https://github.com/gildor478/ocaml-fileutils")
3569 (commit (string-append "v" version))))
3570 (file-name (git-file-name name version))
3573 "0aa7p5qymi8p7iqym42yk2akjd1ff81fvaks82nhjc533zl01pnf"))))
3574 (build-system dune-build-system)
3576 (list ocaml-stdlib-shims))
3579 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
3580 (synopsis "Pure OCaml functions to manipulate real file and filename")
3581 (description "Library to provide pure OCaml functions to manipulate real
3582 file (POSIX like) and filename.")
3583 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
3585 (define-public ocaml-oasis
3587 (name "ocaml-oasis")
3591 (uri (ocaml-forge-uri name version 1757))
3594 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
3595 (modules '((guix build utils)))
3598 (substitute* "test/test-main/Test.ml"
3599 ;; most of these tests fail because ld cannot find crti.o, but according
3600 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
3601 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
3602 (("TestBaseCompat.tests;") "")
3603 (("TestExamples.tests;") "")
3604 (("TestFull.tests;") "")
3605 (("TestPluginDevFiles.tests;") "")
3606 (("TestPluginInternal.tests;") "")
3607 (("TestPluginOCamlbuild.tests;") "")
3608 (("TestPluginOMake.tests;") ""))
3610 (build-system ocaml-build-system)
3614 (list ocamlbuild ocamlify ocamlmod))
3615 (home-page "https://oasis.forge.ocamlcore.org")
3616 (synopsis "Integrates a configure, build, install system in OCaml projects")
3617 (description "OASIS is a tool to integrate a configure, build and install
3618 system in your OCaml projects. It helps to create standard entry points in your
3619 build system and allows external tools to analyse your project easily.")
3620 (license license:lgpl2.1+))) ; with ocaml static compilation exception
3622 (define-public ocaml-cppo
3630 (url "https://github.com/mjambon/cppo")
3631 (commit (string-append "v" version))))
3632 (file-name (git-file-name name version))
3634 "1c8jlr2s0allw1h6czz5q24vn5jsnrrh44j7hjyilzaifm17dlrm"))))
3635 (build-system dune-build-system)
3640 (home-page "https://github.com/mjambon/cppo")
3641 (synopsis "Equivalent of the C preprocessor for OCaml programs")
3642 (description "Cppo is an equivalent of the C preprocessor for OCaml
3643 programs. It allows the definition of simple macros and file inclusion. Cppo is:
3645 @item more OCaml-friendly than @command{cpp}
3646 @item easy to learn without consulting a manual
3647 @item reasonably fast
3648 @item simple to install and to maintain.
3650 (license license:bsd-3)))
3652 (define-public ocaml-seq
3660 (url "https://github.com/c-cube/seq")
3662 (file-name (git-file-name name version))
3664 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
3665 (build-system ocaml-build-system)
3669 (modify-phases %standard-phases
3673 (lambda* (#:key outputs #:allow-other-keys)
3674 (let ((install-dir (string-append (assoc-ref outputs "out")
3675 "/lib/ocaml/site-lib/seq")))
3676 (mkdir-p install-dir)
3677 (with-output-to-file (string-append install-dir "/META")
3679 (display "name=\"seq\"
3680 version=\"[distributed with ocaml]\"
3681 description=\"dummy package for compatibility\"
3684 (home-page "https://github.com/c-cube/seq")
3685 (synopsis "OCaml's standard iterator type")
3686 (description "This package is a compatibility package for OCaml's
3687 standard iterator type starting from 4.07.")
3688 (license license:lgpl2.1+)))
3690 (define-public ocaml-re
3698 (url "https://github.com/ocaml/ocaml-re")
3700 (file-name (git-file-name name version))
3702 (base32 "1g0vmpx6ylv8m0w77zarn215pgb4czc6gcpb2fi5da1s307zwr0w"))))
3703 (build-system dune-build-system)
3705 `(#:test-target "."))
3709 `(("ounit" ,ocaml-ounit)))
3710 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-re))))
3711 (home-page "https://github.com/ocaml/ocaml-re/")
3712 (synopsis "Regular expression library for OCaml")
3713 (description "Pure OCaml regular expressions with:
3715 @item Perl-style regular expressions (module Re_perl)
3716 @item Posix extended regular expressions (module Re_posix)
3717 @item Emacs-style regular expressions (module Re_emacs)
3718 @item Shell-style file globbing (module Re_glob)
3719 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
3721 (license license:expat)))
3723 (define-public ocaml4.07-re
3724 (package-with-ocaml4.07
3730 (modify-phases %standard-phases
3731 (add-after 'unpack 'fix-dune-version
3733 (delete-file "dune-project"))))))
3736 (define-public ocaml-ocplib-endian
3738 (name "ocaml-ocplib-endian")
3743 (url "https://github.com/OCamlPro/ocplib-endian/")
3747 "1klj4g451s7m5r8bxmwc1rpvngpqdm40csnx9smgc06pwy2fax2c"))
3748 (file-name (git-file-name name version))))
3749 (build-system dune-build-system)
3751 `(#:test-target "tests"))
3753 `(("cppo" ,ocaml-cppo)))
3754 (home-page "https://github.com/OCamlPro/ocplib-endian")
3755 (synopsis "Optimised functions to read and write int16/32/64 from strings
3757 (description "Optimised functions to read and write int16/32/64 from strings
3758 and bigarrays, based on new primitives added in version 4.01. It works on
3759 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
3760 big- and little-endian, with their unsafe counter-parts.")
3761 (license license:lgpl2.1)))
3763 (define-public ocaml-cstruct
3765 (name "ocaml-cstruct")
3770 (url "https://github.com/mirage/ocaml-cstruct")
3771 (commit (string-append "v" version))))
3772 (file-name (git-file-name name version))
3775 "0dpbirs6lzp0bclr3wcw407jjspll7iy66z18zks3mjccvlxd21w"))))
3776 (build-system dune-build-system)
3778 `(#:package "cstruct"
3781 (list ocaml-bigarray-compat))
3783 (list ocaml-alcotest))
3784 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-cstruct))))
3785 (home-page "https://github.com/mirage/ocaml-cstruct")
3786 (synopsis "Access C structures via a camlp4 extension")
3787 (description "Cstruct is a library and syntax extension to make it easier
3788 to access C-like structures directly from OCaml. It supports both reading and
3789 writing to these structures, and they are accessed via the Bigarray module.")
3790 (license license:isc)))
3792 (define-public ocaml4.07-cstruct
3793 (package-with-ocaml4.07
3795 (inherit ocaml-cstruct)
3800 (url "https://github.com/mirage/ocaml-cstruct")
3801 (commit (string-append "v" version))))
3802 (file-name (git-file-name "ocaml-cstruct" version))
3805 "0jj3whs8r3jc524i9bb67rffh7y7r157hjgvws0bkxijxpjzwkbk"))))
3808 (define-public ocaml-hex
3815 (url "https://github.com/mirage/ocaml-hex")
3816 (commit (string-append "v" version))))
3817 (file-name (git-file-name name version))
3820 "0xnl5wxd2qrba7phm3mdrjwd2kk26kb17dv94ciwp49ljcj28qc1"))))
3821 (build-system dune-build-system)
3823 `(#:test-target "."))
3825 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
3826 ("cstruct" ,ocaml-cstruct)))
3827 (home-page "https://github.com/mirage/ocaml-hex/")
3828 (synopsis "Minimal library providing hexadecimal converters")
3829 (description "Hex is a minimal library providing hexadecimal converters.")
3830 (license license:isc)))
3832 (define-public ocaml-ezjsonm
3834 (name "ocaml-ezjsonm")
3840 (url "https://github.com/mirage/ezjsonm")
3841 (commit (string-append "v" version))))
3842 (file-name (git-file-name name version))
3844 (base32 "004knljxqxn9zq0rnq7q7wxl4nwlzydm8p9f5cqkl8il5yl5zkjm"))))
3845 (build-system dune-build-system)
3847 `(#:package "ezjsonm"
3849 (native-inputs (list ocaml-alcotest js-of-ocaml node))
3850 (propagated-inputs (list ocaml-jsonm ocaml-uutf ocaml-sexplib0 ocaml-hex))
3851 (home-page "https://github.com/mirage/ezjsonm/")
3852 (synopsis "Read and write JSON data")
3853 (description "Ezjsonm provides more convenient (but far less flexible) input
3854 and output functions that go to and from [string] values than jsonm. This avoids
3855 the need to write signal code, which is useful for quick scripts that manipulate
3857 (license license:isc)))
3859 (define-public ocaml-uri
3863 (home-page "https://github.com/mirage/ocaml-uri")
3869 (commit (string-append "v" version))))
3870 (file-name (git-file-name name version))
3873 "1bgkc66cq00mgnkz3i535srwzwc4cpdsv0mly5dzvvq33451xwf0"))))
3874 (build-system dune-build-system)
3875 (arguments '(#:package "uri"
3878 (list ocaml-stringext ocaml-angstrom))
3880 (list ocaml-ounit ocaml-ppx-sexp-conv))
3881 (properties `((upstream-name . "uri")
3882 (ocaml4.07-variant ,(delay ocaml4.07-uri))))
3883 (synopsis "RFC3986 URI/URL parsing library")
3884 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3885 (license license:isc)))
3887 (define-public ocaml4.07-uri
3889 (name "ocaml4.07-uri")
3895 (url "https://github.com/mirage/ocaml-uri")
3896 (commit (string-append "v" version))))
3897 (file-name (git-file-name name version))
3899 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
3900 (build-system dune-build-system)
3904 (modify-phases %standard-phases
3905 (add-before 'build 'update-deprecated
3907 (substitute* "lib/uri.ml"
3908 (("Re.get") "Re.Group.get")))))
3910 #:findlib ,ocaml4.07-findlib
3911 #:dune ,ocaml4.07-dune))
3913 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
3914 ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))))
3916 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
3917 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
3918 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3919 (properties `((upstream-name . "uri")))
3920 (home-page "https://github.com/mirage/ocaml-uri")
3921 (synopsis "RFC3986 URI/URL parsing library")
3922 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3923 (license license:isc)))
3925 (define-public ocaml-easy-format
3927 (name "ocaml-easy-format")
3932 (url "https://github.com/mjambon/easy-format")
3934 (file-name (git-file-name name version))
3937 "0xap6az4yyb60vb1jfs640wl3cf4njv78p538x9ihhf9f6ij3nh8"))))
3938 (build-system dune-build-system)
3940 `(#:package "easy-format"
3942 (modify-phases %standard-phases
3943 (add-before 'build 'make-writable
3948 (find-files "." "."))
3950 (home-page "https://github.com/mjambon/easy-format")
3951 (synopsis "Interface to the Format module")
3952 (description "Easy-format is a high-level and functional interface to the
3953 Format module of the OCaml standard library.")
3954 (license license:bsd-3)))
3956 (define-public ocaml-piqilib
3958 (name "ocaml-piqilib")
3964 (url "https://github.com/alavrik/piqi")
3965 (commit (string-append "v" version))))
3966 (file-name (git-file-name name version))
3968 (base32 "0mbhfrfrik3jlzx9zz680g0qdvv0b7cbjz28cgdlryp7nk4v4kx8"))))
3969 (build-system ocaml-build-system)
3972 (modify-phases %standard-phases
3973 (add-before 'configure 'fix-ocamlpath
3975 (substitute* '("Makefile" "make/Makefile.ocaml")
3976 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))))
3978 (lambda* (#:key outputs #:allow-other-keys)
3979 (let ((out (assoc-ref outputs "out")))
3980 (substitute* "make/OCamlMakefile"
3981 (("/bin/sh") (which "bash")))
3982 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3983 (string-append out "/lib/ocaml/site-lib")))))
3984 (add-after 'build 'build-ocaml
3985 (lambda* (#:key outputs #:allow-other-keys)
3986 (invoke "make" "ocaml")))
3987 (add-after 'install 'install-ocaml
3988 (lambda* (#:key outputs #:allow-other-keys)
3989 (invoke "make" "ocaml-install")))
3990 (add-after 'install-ocaml 'link-stubs
3991 (lambda* (#:key outputs #:allow-other-keys)
3992 (let* ((out (assoc-ref outputs "out"))
3993 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3994 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3996 (symlink (string-append lib "/dllpiqilib_stubs.so")
3997 (string-append stubs "/dllpiqilib_stubs.so"))))))))
4001 `(("ocaml-xmlm" ,ocaml-xmlm)
4002 ("ocaml-sedlex" ,ocaml-sedlex)
4003 ("ocaml-easy-format" ,ocaml-easy-format)
4004 ("ocaml-base64" ,ocaml-base64)))
4005 (home-page "http://piqi.org")
4006 (synopsis "Data serialization and conversion library")
4007 (description "Piqilib is the common library used by the piqi command-line
4008 tool and piqi-ocaml.")
4009 (license license:asl2.0)))
4011 (define-public ocaml-uuidm
4013 (name "ocaml-uuidm")
4017 (uri (string-append "http://erratique.ch/software/uuidm/"
4018 "releases/uuidm-" version ".tbz"))
4021 "1cr6xlzla9fmd587lfhzac0icifspjnqi9f4cdafshj3jn85nrpw"))))
4022 (build-system ocaml-build-system)
4025 (list "build" "--tests" "true" "--with-cmdliner" "true")
4027 (modify-phases %standard-phases
4028 (delete 'configure))))
4030 (list ocamlbuild opam))
4032 `(("cmdliner" ,ocaml-cmdliner)
4033 ("topkg" ,ocaml-topkg)))
4034 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-uuidm))))
4035 (home-page "https://erratique.ch/software/uuidm")
4036 (synopsis "Universally unique identifiers for OCaml")
4037 (description "Uuidm is an OCaml module implementing 128 bits universally
4038 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
4039 and 4 (random based) according to RFC 4122.")
4040 (license license:isc)))
4042 (define-public ocaml4.07-uuidm
4043 (package-with-ocaml4.07
4045 (inherit ocaml-uuidm)
4049 (uri (string-append "http://erratique.ch/software/uuidm/"
4050 "releases/uuidm-" version ".tbz"))
4053 "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"))))
4056 (define-public ocaml-graph
4058 (name "ocaml-graph")
4062 (uri (string-append "http://ocamlgraph.lri.fr/download/"
4063 "ocamlgraph-" version ".tar.gz"))
4066 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
4067 (build-system ocaml-build-system)
4069 `(#:install-target "install-findlib"
4072 (modify-phases %standard-phases
4073 (add-before 'configure 'set-shell
4074 (lambda* (#:key inputs #:allow-other-keys)
4075 (setenv "CONFIG_SHELL"
4076 (search-input-file inputs "/bin/sh")))))))
4077 (inputs (list lablgtk))
4078 (properties `((upstream-name . "ocamlgraph")))
4079 (home-page "http://ocamlgraph.lri.fr/")
4080 (synopsis "Graph library for OCaml")
4081 (description "OCamlgraph is a generic graph library for OCaml.")
4082 (license license:lgpl2.1)))
4084 (define-public ocaml-piqi
4091 (url "https://github.com/alavrik/piqi-ocaml")
4092 (commit (string-append "v" version))))
4093 (file-name (git-file-name name version))
4096 "12m9vxir0cs2155nxs0a3m3npf3w79kyxf9a5lmf18qvvgismfz8"))))
4097 (build-system ocaml-build-system)
4100 ,#~(list (string-append "DESTDIR=" #$output)
4101 (string-append "SHELL="
4102 #+(file-append (canonical-package bash-minimal)
4105 (modify-phases %standard-phases
4106 (add-after 'unpack 'make-files-writable
4108 (for-each make-file-writable (find-files "."))
4110 (delete 'configure))))
4112 (list which protobuf)) ; for tests
4114 `(("ocaml-num" ,ocaml-num)
4115 ("ocaml-piqilib" ,ocaml-piqilib)
4116 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
4117 (home-page "https://github.com/alavrik/piqi-ocaml")
4118 (synopsis "Protocol serialization system for OCaml")
4119 (description "Piqi is a multi-format data serialization system for OCaml.
4120 It provides a uniform interface for serializing OCaml data structures to JSON,
4121 XML and Protocol Buffers formats.")
4122 (license license:asl2.0)))
4124 (define-public ocaml-ppx-bap
4126 (name "ocaml-ppx-bap")
4131 (url "https://github.com/BinaryAnalysisPlatform/ppx_bap")
4132 (commit (string-append "v" (version-major+minor version)))))
4133 (file-name (git-file-name name version))
4136 "1c6rcdp8bicdiwqc2mb59cl9l2vxlp3y8hmnr9x924fq7acly248"))))
4137 (build-system dune-build-system)
4141 (propagated-inputs (list ocaml-base-quickcheck
4148 ocaml-ppx-fields-conv
4153 ocaml-ppx-sexp-value
4154 ocaml-ppx-variants-conv
4156 (properties `((upstream-name . "ppx_bap")))
4157 (home-page "https://github.com/BinaryAnalysisPlatform/ppx_bap")
4158 (synopsis "The set of ppx rewriters for BAP")
4160 "@code{ppx_bap} is the set of blessed ppx rewriters used in BAP projects.
4161 It fills the same role as @code{ppx_base} or @code{ppx_jane} (from which it is
4162 derived), but doesn't impose any style requirements and has only the minimal
4163 necessary set of rewriters.")
4164 (license license:expat)))
4169 (version "2.5.0-alpha")
4170 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
4175 (commit (string-append "v" version))))
4176 (file-name (git-file-name name version))
4179 "1fw9pp0xnssc08qqfkcafffap4f46hw7zmk80gif5yc4nazga8w5"))))
4180 (build-system ocaml-build-system)
4185 #~(modify-phases %standard-phases
4186 (add-before 'configure 'fix-ncurses
4188 (substitute* "oasis/llvm"
4189 (("-lcurses") "-lncurses"))
4192 (lambda* (#:key outputs inputs #:allow-other-keys)
4193 (for-each make-file-writable (find-files "." "."))
4194 ;; Package name changed
4195 (substitute* "oasis/elf-loader"
4196 (("bitstring.ppx") "ppx_bitstring"))
4197 ;; We don't have a monolithic llvm
4198 (substitute* "oasis/llvm.setup.ml.in"
4199 (("llvm_static = \"true\"") "true"))
4200 (invoke "./configure" "--prefix"
4201 (assoc-ref outputs "out")
4204 (assoc-ref outputs "out")
4205 "/lib/ocaml/site-lib")
4206 (string-append "--with-llvm-version=" #$(package-version llvm))
4207 "--with-llvm-config=llvm-config"
4209 "--disable-llvm-static"
4211 "--enable-everything"))))))
4212 (native-inputs (list clang ocaml-oasis ocaml-ounit))
4236 (list gmp llvm ncurses))
4237 (synopsis "Binary Analysis Platform")
4238 (description "Binary Analysis Platform is a framework for writing program
4239 analysis tools, that target binary files. The framework consists of a plethora
4240 of libraries, plugins, and frontends. The libraries provide code reusability,
4241 the plugins facilitate extensibility, and the frontends serve as entry points.")
4242 (license license:expat)))
4244 (define-public ocaml-camomile
4246 (name "ocaml-camomile")
4248 (home-page "https://github.com/yoriyuki/Camomile")
4251 (uri (string-append home-page "/releases/download/" version
4252 "/camomile-" version ".tbz"))
4255 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
4256 (build-system dune-build-system)
4258 `(#:test-target "camomile-test"
4259 #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
4261 (modify-phases %standard-phases
4262 (add-before 'build 'fix-usr-share
4263 (lambda* (#:key outputs #:allow-other-keys)
4264 (substitute* '("Camomile/dune" "configure.ml")
4265 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
4267 (synopsis "Comprehensive Unicode library")
4268 (description "Camomile is a Unicode library for OCaml. Camomile provides
4269 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
4270 200 encodings, collation and locale-sensitive case mappings, and more. The
4271 library is currently designed for Unicode Standard 3.2.")
4272 ;; with an exception for linked libraries to use a different license
4273 (license license:lgpl2.0+)))
4275 (define-public ocaml-charinfo-width
4276 ;; Add LICENSE file and Dune tests
4277 (let ((commit "20aaaa6dca8f1e0b1ace55b6f2a8ba5e5910b620"))
4279 (name "ocaml-charinfo-width")
4280 (version (git-version "1.1.0" "1" commit))
4281 (home-page "https://github.com/kandu/charinfo_width/")
4287 (file-name (git-file-name name version))
4290 "04gil5hxm2jax9paw3i24d8zyzhyl5cphzfyryvy2lcrm3c485q0"))))
4291 (build-system dune-build-system)
4293 (list ocaml-result ocaml-camomile))
4295 (list ocaml-ppx-expect))
4297 `((upstream-name . "charInfo_width")))
4298 (synopsis "Determine column width for a character")
4299 (description "This module implements purely in OCaml a character width
4300 function that follows the prototype of POSIX's wcwidth.")
4301 (license license:expat))))
4303 (define-public ocaml-zed
4307 (home-page "https://github.com/ocaml-community/zed")
4314 (file-name (git-file-name name version))
4316 (base32 "1g171kk5wxnk66d4vwz2crh5i19vhqghp78iybl5am17gl9qf8pb"))))
4317 (build-system dune-build-system)
4327 `(#:test-target "."))
4328 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-zed))))
4329 (synopsis "Abstract engine for text edition in OCaml")
4331 "This module provides an abstract engine for text edition. It can be
4332 used to write text editors, edition widgets, readlines, and more. The module
4333 Zed uses Camomile to fully support the Unicode specification, and implements
4334 an UTF-8 encoded string type with validation, and a rope datastructure to
4335 achieve efficient operations on large Unicode buffers. Zed also features a
4336 regular expression search on ropes. To support efficient text edition
4337 capabilities, Zed provides macro recording and cursor management facilities.")
4338 (license license:bsd-3)))
4340 (define-public ocaml4.07-zed
4341 (package-with-ocaml4.07
4348 (url "https://github.com/ocaml-community/zed")
4350 (file-name (git-file-name "ocaml4.07-zed" version))
4353 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
4355 `(("ocaml-charInfo-width" ,ocaml-charinfo-width)
4356 ("ocaml-camomile" ,ocaml-camomile)
4357 ("ocaml-react" ,ocaml-react)))
4360 (define-public ocaml-lambda-term
4362 (name "ocaml-lambda-term")
4364 (home-page "https://github.com/ocaml-community/lambda-term")
4370 (file-name (git-file-name name version))
4373 "1pkamblc6h0rsbk901cqn3xr9gqa3g8wrwyx5zryaqvb2xpbhp8b"))))
4374 (build-system dune-build-system)
4376 `(#:test-target "."))
4385 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lambda-term))))
4386 (synopsis "Terminal manipulation library for OCaml")
4387 (description "Lambda-Term is a cross-platform library for manipulating the
4388 terminal. It provides an abstraction for keys, mouse events, colors, as well as
4389 a set of widgets to write curses-like applications. The main objective of
4390 Lambda-Term is to provide a higher level functional interface to terminal
4391 manipulation than, for example, ncurses, by providing a native OCaml interface
4392 instead of bindings to a C library.")
4393 (license license:bsd-3)))
4395 (define-public ocaml4.07-lambda-term
4396 (package-with-ocaml4.07
4398 (inherit ocaml-lambda-term)
4404 (url "https://github.com/ocaml-community/lambda-term")
4406 (file-name (git-file-name "ocaml4.07-lambda-term" version))
4408 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
4410 `(("ocaml-lwt" ,ocaml-lwt)
4411 ("ocaml-lwt-log" ,ocaml-lwt-log)
4412 ("ocaml-lwt-react" ,ocaml-lwt-react)
4413 ("ocaml-zed" ,ocaml-zed)))
4416 (define-public ocaml-utop
4424 (url "https://github.com/ocaml-community/utop")
4426 (file-name (git-file-name name version))
4428 (base32 "1pcix3h9f7is06581iax4i08zkd6sv8y5hy1vvxhqhcsd9z0qfl3"))))
4429 (build-system dune-build-system)
4431 `(#:test-target "."))
4435 (list ocaml-lambda-term
4441 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-utop))))
4442 (home-page "https://github.com/ocaml-community/utop")
4443 (synopsis "Improved interface to the OCaml toplevel")
4444 (description "UTop is an improved toplevel for OCaml. It can run in a
4445 terminal or in Emacs. It supports line editing, history, real-time and context
4446 sensitive completion, colors, and more.")
4447 (license license:bsd-3)))
4449 (define-public ocaml4.07-utop
4450 (package-with-ocaml4.07
4452 (inherit ocaml-utop)
4458 (url "https://github.com/ocaml-community/utop")
4460 (file-name (git-file-name "ocaml4.07-utop" version))
4462 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
4464 `(("ocaml-lambda-term" ,ocaml-lambda-term)
4465 ("ocaml-lwt" ,ocaml-lwt)
4466 ("ocaml-react" ,ocaml-react)
4467 ("ocaml-camomile" ,ocaml-camomile)
4468 ("ocaml-zed" ,ocaml-zed)))
4471 (define-public ocaml-ptmap
4473 (name "ocaml-ptmap")
4478 (string-append "https://github.com/backtracking/ptmap/releases/download/"
4479 version "/ptmap-" version ".tbz"))
4482 "1apk61fc1y1g7x3m3c91fnskvxp6i0vk5nxwvipj56k7x2pzilgb"))))
4483 (build-system dune-build-system)
4486 #~(modify-phases %standard-phases
4488 (lambda* (#:key tests? #:allow-other-keys)
4490 (invoke "dune" "runtest")))))))
4491 (propagated-inputs (list ocaml-stdlib-shims ocaml-seq))
4492 (home-page "https://github.com/backtracking/ptmap")
4493 (synopsis "Maps of integers implemented as Patricia trees")
4495 "An implementation inspired by Okasaki & Gill's paper 'Fast Mergeable
4497 (license license:lgpl2.1))) ; with linking exception
4499 (define-public ocaml-integers
4501 (name "ocaml-integers")
4503 (home-page "https://github.com/ocamllabs/ocaml-integers")
4509 (file-name (git-file-name name version))
4512 "0c0bmy53ag6504kih0cvnp4yf7mbcimb18m1mgs592ffb0zj1rff"))))
4513 (build-system dune-build-system)
4515 `(#:tests? #f)) ; no tests
4517 (list ocaml-stdlib-shims))
4518 (synopsis "Various signed and unsigned integer types for OCaml")
4519 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
4520 and 64-bit signed and unsigned integer types, together with aliases such as
4521 long and size_t whose sizes depend on the host platform.")
4522 (license license:expat)))
4524 (define-public ocaml-ctypes
4526 (name "ocaml-ctypes")
4528 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
4534 (file-name (git-file-name name version))
4537 "0ilzq9qzvwv9rc08cc9wchsx636zp870i7qvqmbigaa2qb812m0z"))))
4538 (build-system ocaml-build-system)
4541 (modify-phases %standard-phases
4542 (add-after 'unpack 'make-writable
4544 (for-each make-file-writable
4546 (delete 'configure))))
4548 `(("pkg-config" ,pkg-config)
4549 ("ounit" ,ocaml-ounit)
4550 ("lwt" ,ocaml-lwt)))
4552 `(("bigarray-compat" ,ocaml-bigarray-compat)
4553 ("integers" ,ocaml-integers)))
4556 (synopsis "Library for binding to C libraries using pure OCaml")
4557 (description "Ctypes is a library for binding to C libraries using pure
4558 OCaml. The primary aim is to make writing C extensions as straightforward as
4559 possible. The core of ctypes is a set of combinators for describing the
4560 structure of C types -- numeric types, arrays, pointers, structs, unions and
4561 functions. You can use these combinators to describe the types of the
4562 functions that you want to call, then bind directly to those functions -- all
4563 without writing or generating any C!")
4564 (license license:expat)))
4566 (define-public ocaml-ocb-stubblr
4568 (name "ocaml-ocb-stubblr")
4570 (home-page "https://github.com/pqwy/ocb-stubblr")
4574 home-page "/releases/download/v0.1.1/ocb-stubblr-"
4576 (file-name (string-append name "-" version ".tbz"))
4579 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
4580 (build-system ocaml-build-system)
4582 `(#:build-flags (list "build" "--tests" "true")
4584 (modify-phases %standard-phases
4586 (add-before 'build 'fix-for-guix
4588 (substitute* "src/ocb_stubblr.ml"
4589 ;; Do not fail when opam is not present or initialized
4590 (("error_msgf \"error running opam\"") "\"\"")
4591 ;; Guix doesn't have cc, but it has gcc
4592 (("\"cc\"") "\"gcc\""))
4595 `(("topkg" ,ocaml-topkg)
4598 `(("astring" ,ocaml-astring)
4599 ("ocamlbuild" ,ocamlbuild)))
4600 (synopsis "OCamlbuild plugin for C stubs")
4601 (description "Ocb-stubblr is about ten lines of code that you need to
4602 repeat over, over, over and over again if you are using ocamlbuild to build
4603 OCaml projects that contain C stubs.")
4604 (license license:isc)))
4606 (define-public ocaml-tsdl
4610 (home-page "https://erratique.ch/software/tsdl")
4613 (uri (string-append home-page "/releases/tsdl-"
4615 (file-name (string-append name "-" version ".tar.gz"))
4618 "1m565jgfanijjzp64c1rylahkpmrrb03ywj202j49n06nvwp788s"))))
4619 (build-system ocaml-build-system)
4621 `(#:build-flags '("build")
4622 #:tests? #f; tests require a display device
4624 (modify-phases %standard-phases
4625 (delete 'configure))))
4627 (list ocamlbuild ocaml-astring opam pkg-config))
4629 `(("topkg" ,ocaml-topkg)
4631 ("integers" ,ocaml-integers)
4632 ("ctypes" ,ocaml-ctypes)))
4633 (synopsis "Thin bindings to SDL for OCaml")
4634 (description "Tsdl is an OCaml library providing thin bindings to the
4635 cross-platform SDL C library.")
4636 (license license:isc)))
4638 (define-public dedukti
4642 (home-page "https://deducteam.github.io/")
4647 (url "https://github.com/deducteam/dedukti")
4648 (commit (string-append "v" version))))
4649 (file-name (git-file-name name version))
4652 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
4654 `(("menhir" ,ocaml-menhir)))
4657 (build-system ocaml-build-system)
4660 ,#~(modify-phases %standard-phases
4667 (invoke "make" "tests")))
4668 (add-before 'install 'set-binpath
4669 ;; Change binary path in the makefile
4671 (substitute* "GNUmakefile"
4673 (string-append "BINDIR = " #$output "/bin")))))
4676 (invoke "make" "install"))))))
4677 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4679 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4680 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4681 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4682 λΠ-calculus where the context contains variable declaration as well as rewrite
4683 rules. This system is not designed to develop proofs, but to check proofs
4684 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4685 (license license:cecill-c)))
4687 (define-public emacs-dedukti-mode
4688 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
4690 (name "emacs-dedukti-mode")
4691 (version (git-version "0" "0" commit))
4692 (home-page "https://github.com/rafoo/dedukti-mode")
4700 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
4701 (file-name (git-file-name name version))))
4704 (build-system emacs-build-system)
4707 (modify-phases %standard-phases
4708 (add-before 'install 'patch-dkpath
4710 (let ((dkcheck-path (which "dkcheck")))
4711 (substitute* "dedukti-mode.el"
4712 (("dedukti-path \"(.*)\"")
4713 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
4714 (synopsis "Emacs major mode for Dedukti files")
4715 (description "This package provides an Emacs major mode for editing
4717 (license license:cecill-b))))
4719 (define-public emacs-flycheck-dedukti
4720 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
4722 (name "emacs-flycheck-dedukti")
4723 (version (git-version "0" "0" commit))
4724 (home-page "https://github.com/rafoo/flycheck-dedukti")
4732 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
4733 (file-name (git-file-name name version))))
4734 (build-system emacs-build-system)
4736 (list emacs-dedukti-mode emacs-flycheck))
4737 (synopsis "Flycheck integration for the dedukti language")
4738 (description "This package provides a frontend for Flycheck to perform
4739 syntax checking on dedukti files.")
4740 (license license:cecill-b))))
4742 (define-public ocaml-jst-config
4744 (name "ocaml-jst-config")
4750 (url "https://github.com/janestreet/jst-config")
4751 (commit (string-append "v" version))))
4752 (file-name (git-file-name name version))
4755 "1yp5p63clvaxmkf7vlasgyapxc31x29c154pyq63n0fvi2fpf4y3"))))
4756 (build-system dune-build-system)
4757 (arguments '(#:tests? #f)) ; no tests
4759 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
4760 (home-page "https://github.com/janestreet/jst-config")
4761 (synopsis "Compile-time configuration for Jane Street libraries")
4762 (description "Defines compile-time constants used in Jane Street libraries
4763 such as Base, Core, and Async. This package has an unstable interface; it is
4764 intended only to share configuration between different packages from Jane
4765 Street. Future updates may not be backward-compatible, and we do not
4766 recommend using this package directly.")
4767 (license license:expat)))
4769 (define-public ocaml-jane-street-headers
4771 (name "ocaml-jane-street-headers")
4775 "jane-street-headers" version
4776 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
4777 (build-system dune-build-system)
4778 (arguments '(#:tests? #f)) ; no tests
4779 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-jane-street-headers))))
4780 (home-page "https://github.com/janestreet/jane-street-headers")
4781 (synopsis "Jane Street C header files")
4782 (description "C header files shared between the various Jane Street
4784 (license license:expat)))
4786 (define-public ocaml-time-now
4788 (name "ocaml-time-now")
4793 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
4794 (build-system dune-build-system)
4795 (arguments '(#:tests? #f)) ; no tests
4797 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
4798 ocaml-ppx-base ocaml-ppx-optcomp))
4799 (properties `((upstream-name . "time_now")))
4801 "https://github.com/janestreet/time_now")
4802 (synopsis "Reports the current time")
4804 "Provides a single function to report the current time in nanoseconds
4805 since the start of the Unix epoch.")
4806 (license license:expat)))
4808 (define-public ocaml-ppx-inline-test
4810 (name "ocaml-ppx-inline-test")
4812 (home-page "https://github.com/janestreet/ppx_inline_test")
4817 (url (string-append home-page ".git"))
4818 (commit (string-append "v" version))))
4819 (file-name (git-file-name name version))
4822 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
4823 (build-system dune-build-system)
4825 `(#:tests? #f)) ;see home page README for further information
4828 ocaml-migrate-parsetree
4834 (properties `((upstream-name . "ppx_inline_test")
4835 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
4836 (synopsis "Syntax extension for writing in-line tests in ocaml code")
4837 (description "This package contains a syntax extension for writing
4838 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
4840 (license license:expat)))
4842 (define-public ocaml4.07-ppx-inline-test
4843 (package-with-ocaml4.07
4845 (inherit ocaml-ppx-inline-test)
4846 (name "ocaml-ppx-inline-test")
4848 (home-page "https://github.com/janestreet/ppx_inline_test")
4853 (url (string-append home-page ".git"))
4854 (commit (string-append "v" version))))
4855 (file-name (git-file-name name version))
4858 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
4860 `(("ocaml-base" ,ocaml-base)
4861 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4862 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
4863 ("ocaml-sexplib0" ,ocaml-sexplib0)
4864 ("ocaml-stdio" ,ocaml-stdio)
4865 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4866 (properties `((upstream-name . "ppx_inline_test"))))))
4868 (define-public ocaml-bindlib
4870 (name "ocaml-bindlib")
4876 (url "https://github.com/rlepigre/ocaml-bindlib")
4878 (file-name (git-file-name name version))
4881 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
4882 (build-system dune-build-system)
4884 `(#:test-target "."))
4886 (list ocamlbuild ocaml-findlib))
4887 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
4888 (synopsis "OCaml Bindlib library for bound variables")
4889 (description "Bindlib is a library allowing the manipulation of data
4890 structures with bound variables. It is particularly useful when writing ASTs
4891 for programming languages, but also for manipulating terms of the λ-calculus
4892 or quantified formulas.")
4893 (license license:gpl3+)))
4895 (define-public ocaml-earley
4897 (name "ocaml-earley")
4899 (home-page "https://github.com/rlepigre/ocaml-earley")
4904 (url (string-append home-page ".git"))
4906 (file-name (git-file-name name version))
4909 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
4910 (build-system dune-build-system)
4912 `(#:test-target "."))
4914 (list ocaml-stdlib-shims))
4915 (synopsis "Parsing library based on Earley Algorithm")
4916 (description "Earley is a parser combinator library base on Earley's
4917 algorithm. It is intended to be used in conjunction with an OCaml syntax
4918 extension which allows the definition of parsers inside the language. There
4919 is also support for writing OCaml syntax extensions in a camlp4 style.")
4920 (license license:cecill-b)))
4922 (define-public ocaml-timed
4924 (name "ocaml-timed")
4926 (home-page "https://github.com/rlepigre/ocaml-timed")
4930 (url (string-append home-page ".git"))
4934 "1aqmkpjv5jk95lc2m3qyyrhw8ra7n9wj8pv3bfc83l737zv0hjn1"))
4935 (file-name (git-file-name name version))))
4936 (build-system dune-build-system)
4938 '(#:test-target "."))
4939 (synopsis "Timed references for imperative state")
4940 (description "Timed references for imperative state. This module provides
4941 an alternative type for references (or mutable cells) supporting undo/redo
4942 operations. In particular, an abstract notion of time is used to capture the
4943 state of the references at any given point, so that it can be restored. Note
4944 that usual reference operations only have a constant time / memory overhead
4945 (compared to those of the standard library).
4947 Moreover, we provide an alternative implementation based on the references
4948 of the standard library (Pervasives module). However, it is less efficient
4949 than the first one.")
4950 (license license:expat)))
4952 (define-public ocaml-biniou
4954 (name "ocaml-biniou")
4956 (home-page "https://github.com/mjambon/biniou")
4961 (url (string-append home-page ".git"))
4963 (file-name (git-file-name name version))
4966 "1gd4nqffm9h7dzxyvpfpww24l61fqgazyh3p5f7k9jvgyv9y4vcn"))))
4967 (build-system dune-build-system)
4970 (modify-phases %standard-phases
4971 (add-before 'build 'make-writable
4972 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
4974 (list ocaml-easy-format ocaml-camlp-streams))
4977 (synopsis "Data format designed for speed, safety, ease of use and backward
4979 (description "Biniou (pronounced \"be new\" is a binary data format
4980 designed for speed, safety, ease of use and backward compatibility as
4981 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4982 functionality but allows implementations several times faster (4 times faster
4983 than yojson), with 25-35% space savings.")
4984 (license license:bsd-3)))
4986 (define-public ocaml-yojson
4988 (name "ocaml-yojson")
4990 (home-page "https://github.com/ocaml-community/yojson")
4995 (url (string-append home-page ".git"))
4997 (file-name (git-file-name name version))
5000 "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
5001 (build-system dune-build-system)
5004 #:package "yojson"))
5005 (propagated-inputs (list ocaml-seq))
5006 (native-inputs (list ocaml-alcotest ocaml-cppo))
5007 (synopsis "Low-level JSON library for OCaml")
5008 (description "Yojson is an optimized parsing and printing library for the
5009 JSON format. It addresses a few shortcomings of json-wheel including 2x
5010 speedup, polymorphic variants and optional syntax for tuples and variants.
5011 @code{ydump} is a pretty printing command-line program provided with the
5012 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
5013 serializers and deserializers from type definitions.")
5014 (license license:bsd-3)))
5016 (define-public ocaml-craml
5018 (name "ocaml-craml")
5020 (home-page "https://github.com/realworldocaml/craml")
5025 (url (string-append home-page ".git"))
5027 (file-name (git-file-name name version))
5030 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
5031 (build-system dune-build-system)
5034 (modify-phases %standard-phases
5035 (add-before 'build 'upgrade
5037 (invoke "dune" "upgrade")
5040 (list ocaml-fmt ocaml-astring ocaml-logs ocaml-cmdliner))
5042 "CRAM-testing framework for testing command line applications")
5043 (description "CRAM is a is functional testing framework for command line
5044 applications. @code{craml} is freely inspired by the
5045 Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
5046 format}. @code{craml} is released as a single binary (called @code{craml}).")
5047 (license license:isc)))
5049 (define-public ocaml-merlin-lib
5051 (name "ocaml-merlin-lib")
5057 (url "https://github.com/ocaml/merlin")
5058 (commit (string-append "v" version))))
5059 (file-name (git-file-name name version))
5062 "1cpa9x45w54l4mqqmc8z3s5gscggw37gb6z9i7wwss86fj1wgclh"))))
5063 (build-system dune-build-system)
5064 (arguments '(#:package "merlin-lib"
5065 #:tests? #f)) ; no tests
5066 (propagated-inputs (list ocaml-csexp ocaml-menhir))
5067 (home-page "https://ocaml.github.io/merlin/")
5068 (synopsis "Merlin libraries")
5069 (description "These libraries provides access to low-level compiler
5070 interfaces and the standard higher-level merlin protocol.")
5071 (license license:expat)))
5073 (define-public ocaml-dot-merlin-reader
5075 (inherit ocaml-merlin-lib)
5076 (name "ocaml-dot-merlin-reader")
5077 (arguments '(#:package "dot-merlin-reader"
5078 #:tests? #f)) ; no tests
5079 (propagated-inputs (list ocaml-merlin-lib))
5080 (synopsis "Reads config files for @code{ocaml-merlin}")
5081 (description "@code{ocaml-dot-merlin-reader} is an external reader for
5082 @code{ocaml-merlin} configurations.")))
5084 (define-public ocaml-merlin
5086 (inherit ocaml-dot-merlin-reader)
5087 (name "ocaml-merlin")
5089 '(#:package "merlin"
5091 (modify-phases %standard-phases
5093 (lambda* (#:key tests? #:allow-other-keys)
5095 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
5096 (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
5098 (list ocaml-dot-merlin-reader ; required for tests
5100 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
5101 (description "Merlin is an editor service that provides modern IDE
5102 features for OCaml. Emacs and Vim support is provided out-of-the-box.
5103 External contributors added support for Visual Studio Code, Sublime Text and
5105 (license license:expat)))
5107 (define-public ocaml-gsl
5116 "https://github.com/mmottl/gsl-ocaml/releases/download/"
5117 version "/gsl-" version ".tbz"))
5120 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
5121 (build-system dune-build-system)
5125 (modify-phases %standard-phases
5126 (add-after 'unpack 'fix-gsl-directory
5127 (lambda* (#:key inputs #:allow-other-keys)
5128 (substitute* "src/config/discover.ml"
5129 (("/usr") (assoc-ref inputs "gsl"))))))))
5133 (list ocaml-base ocaml-stdio))
5134 (home-page "https://mmottl.github.io/gsl-ocaml")
5135 (synopsis "Bindings to the GNU Scientific Library")
5137 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
5138 the OCaml language.")
5139 (license license:gpl3+)))
5141 (define-public ocaml4.07-gsl-1
5142 (package-with-ocaml4.07
5148 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
5149 "/releases/download/v"
5150 version "/gsl-ocaml-" version ".tar.gz"))
5153 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
5154 (build-system ocaml-build-system)
5156 `(("gsl" ,gsl-static)))
5158 `(("ocamlbuild" ,ocamlbuild)))
5160 (propagated-inputs '()))))
5162 (define-public cubicle
5168 (uri (string-append "http://cubicle.lri.fr/cubicle-"
5172 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
5173 (build-system gnu-build-system)
5175 (list automake ocaml
5176 (@@ (gnu packages base) which)))
5178 (list ocaml-num z3))
5180 `(#:configure-flags (list "--with-z3")
5181 #:make-flags (list "QUIET=")
5184 (modify-phases %standard-phases
5185 (add-before 'configure 'make-deterministic
5187 (substitute* "Makefile.in"
5188 (("`date`") "no date for reproducibility"))))
5189 (add-before 'configure 'configure-for-release
5191 (substitute* "Makefile.in"
5192 (("SVNREV=") "#SVNREV="))
5194 (add-before 'configure 'fix-/bin/sh
5196 (substitute* "configure"
5197 (("-/bin/sh") (string-append "-" (which "sh"))))
5199 (add-before 'configure 'fix-smt-z3wrapper.ml
5201 (substitute* "Makefile.in"
5204 (add-before 'configure 'fix-ocaml-num
5205 (lambda* (#:key inputs #:allow-other-keys)
5206 (substitute* "Makefile.in"
5207 (("nums.cma") "num.cma num_core.cma")
5208 (("= \\$\\(FUNCTORYLIB\\)")
5209 (string-append "= -I "
5210 (assoc-ref inputs "ocaml-num")
5211 "/lib/ocaml/site-lib/num/core -I "
5212 (assoc-ref inputs "ocaml-num")
5213 "/lib/ocaml/site-lib/num"
5214 " $(FUNCTORYLIB)")))
5216 (home-page "http://cubicle.lri.fr/")
5217 (synopsis "Model checker for array-based systems")
5218 (description "Cubicle is a model checker for verifying safety properties
5219 of array-based systems. This is a syntactically restricted class of
5220 parametrized transition systems with states represented as arrays indexed by
5221 an arbitrary number of processes. Cache coherence protocols and mutual
5222 exclusion algorithms are typical examples of such systems.")
5223 (license license:asl2.0)))
5225 (define-public ocaml-sexplib0
5227 (name "ocaml-sexplib0")
5229 (home-page "https://github.com/janestreet/sexplib0")
5234 (commit (string-append "v" version))))
5235 (file-name (git-file-name name version))
5238 "05m93g4m4jhj1v8pazg3s2ydcfymr3h4476yjhdca5fm4sn35bg8"))))
5239 (build-system dune-build-system)
5240 (arguments `(#:tests? #f)) ;no tests
5241 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
5242 (synopsis "Library containing the definition of S-expressions and some
5244 (description "Part of Jane Street's Core library The Core suite of
5245 libraries is an industrial strength alternative to OCaml's standard library
5246 that was developed by Jane Street, the largest industrial user of OCaml.")
5247 (license license:expat)))
5249 (define-public ocaml4.07-sexplib0
5250 (package-with-ocaml4.07
5252 (inherit ocaml-sexplib0)
5253 (name "ocaml-sexplib0")
5256 (janestreet-origin "sexplib0" version
5257 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
5258 (arguments `(#:tests? #f)) ; no tests
5261 (define-public ocaml-parsexp
5263 (name "ocaml-parsexp")
5265 (home-page "https://github.com/janestreet/parsexp")
5270 (commit (string-append "v" version))))
5271 (file-name (git-file-name name version))
5274 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
5275 (build-system dune-build-system)
5277 (list ocaml-sexplib0 ocaml-base))
5278 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
5279 (synopsis "S-expression parsing library")
5281 "This library provides generic parsers for parsing S-expressions from
5282 strings or other medium.
5284 The library is focused on performances but still provide full generic
5285 parsers that can be used with strings, bigstrings, lexing buffers,
5286 character streams or any other sources effortlessly.
5288 It provides three different class of parsers:
5291 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
5293 the parsers with positions, building compact position sequences so
5294 that one can recover original positions in order to report properly
5295 located errors at little cost
5297 the Concrete Syntax Tree parsers, produce values of type
5298 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
5299 syntax, including comments
5302 This library is portable and doesn't provide IO functions. To read
5303 s-expressions from files or other external sources, you should use
5305 (license license:expat)))
5307 (define-public ocaml4.07-parsexp
5308 (package-with-ocaml4.07
5310 (inherit ocaml-parsexp)
5311 (name "ocaml-parsexp")
5314 (janestreet-origin "parsexp" version
5315 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
5318 (define-public ocaml-sexplib
5320 (name "ocaml-sexplib")
5322 (home-page "https://github.com/janestreet/sexplib")
5327 (commit (string-append "v" version))))
5328 (file-name (git-file-name name version))
5331 "1gcvcc0jw6pb69wwfjnaqz1jk5simap2kdb7g43v7v7mksg8sh9f"))))
5332 (build-system dune-build-system)
5334 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
5335 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
5337 "Library for serializing OCaml values to and from S-expressions")
5339 "This package is part of Jane Street's Core library. Sexplib contains
5340 functionality for parsing and pretty-printing s-expressions.")
5341 (license license:expat)))
5343 (define-public ocaml4.07-sexplib
5344 (package-with-ocaml4.07
5346 (inherit ocaml-sexplib)
5349 (janestreet-origin "sexplib" version
5350 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
5353 (define-public ocaml-base
5357 (home-page "https://github.com/janestreet/base")
5362 (url "https://github.com/janestreet/base")
5363 (commit (string-append "v" version))))
5364 (file-name (git-file-name name version))
5367 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
5368 (build-system dune-build-system)
5370 (list ocaml-sexplib0))
5371 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
5373 "Full standard library replacement for OCaml")
5375 "Base is a complete and portable alternative to the OCaml standard
5376 library. It provides all standard functionalities one would expect
5377 from a language standard library. It uses consistent conventions
5378 across all of its module.
5380 Base aims to be usable in any context. As a result system dependent
5381 features such as I/O are not offered by Base. They are instead
5382 provided by companion libraries such as
5383 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5384 (license license:expat)))
5386 (define-public ocaml4.07-base
5387 (package-with-ocaml4.07
5389 (inherit ocaml-base)
5394 ;; version 0.11.1 is not released on ocaml.janestreet.org.
5397 (url "https://github.com/janestreet/base.git")
5398 (commit (string-append "v" version))))
5399 (file-name (git-file-name name version))
5402 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5405 (define-public ocaml-compiler-libs
5407 (name "ocaml-compiler-libs")
5409 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5415 (commit (string-append "v" version))))
5416 (file-name (git-file-name name version))
5419 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
5420 (build-system dune-build-system)
5421 (arguments `(#:tests? #f)) ;no tests
5422 (properties `((upstream-name . "ocaml-compiler-libs")
5423 (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
5424 (synopsis "Compiler libraries repackaged")
5425 (description "This package simply repackages the OCaml compiler libraries
5426 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5427 is now @code{Ocaml_common.Ast_helper}.")
5428 (license license:expat)))
5430 (define-public ocaml4.07-compiler-libs
5431 (package-with-ocaml4.07
5433 (inherit ocaml-compiler-libs)
5434 (name "ocaml-compiler-libs")
5436 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5442 (commit (string-append "v" version))))
5443 (file-name (git-file-name name version))
5446 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5447 (properties `((upstream-name . "ocaml-compiler-libs"))))))
5449 (define-public ocaml-stdio
5451 (name "ocaml-stdio")
5453 (home-page "https://github.com/janestreet/stdio")
5455 (janestreet-origin "stdio" version
5456 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
5457 (build-system dune-build-system)
5459 (list ocaml-base ocaml-sexplib0))
5460 (arguments `(#:tests? #f)) ;no tests
5461 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
5462 (synopsis "Standard IO library for OCaml")
5464 "Stdio implements simple input/output functionalities for OCaml. It
5465 re-exports the input/output functions of the OCaml standard libraries using
5466 a more consistent API.")
5467 (license license:expat)))
5469 (define-public ocaml4.07-stdio
5470 (package-with-ocaml4.07
5472 (inherit ocaml-stdio)
5475 (janestreet-origin "stdio" version
5476 "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
5479 (define-public ocaml-ppx-deriving
5481 (name "ocaml-ppx-deriving")
5487 (url "https://github.com/ocaml-ppx/ppx_deriving")
5488 (commit (string-append "v" version))))
5489 (file-name (git-file-name name version))
5492 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
5493 (build-system dune-build-system)
5495 `(#:test-target "."))
5497 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
5499 (list ocaml-cppo ocaml-ounit2))
5500 (properties `((upstream-name . "ppx_deriving")))
5501 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
5502 (synopsis "Type-driven code generation for OCaml")
5504 "Ppx_deriving provides common infrastructure for generating code based
5505 on type definitions, and a set of useful plugins for common tasks.")
5506 (license license:expat)))
5508 (define-public ocaml-ppx-derivers
5510 (name "ocaml-ppx-derivers")
5513 "https://github.com/ocaml-ppx/ppx_derivers")
5518 (url (string-append home-page ".git"))
5520 (file-name (git-file-name name version))
5523 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
5524 (build-system dune-build-system)
5526 '(#:tests? #f)) ;no tests
5527 (properties `((upstream-name . "ppx_derivers")))
5528 (synopsis "Shared @code{@@deriving} plugin registry")
5530 "Ppx_derivers is a tiny package whose sole purpose is to allow
5531 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5532 as part of the same ocaml-migrate-parsetree driver.")
5533 (license license:bsd-3)))
5535 (define-public ocaml-ppxlib
5537 (name "ocaml-ppxlib")
5539 (home-page "https://github.com/ocaml-ppx/ppxlib")
5546 (file-name (git-file-name name version))
5549 "0wlqvyqy9ccp7z981blv42aqwq7zfq93cakbahjyy48hiiir6vp2"))))
5550 (build-system dune-build-system)
5553 (modify-phases %standard-phases
5554 (add-after 'unpack 'fix-test-format
5556 ;; Since sexplib >= 0.15, error formating has changed
5557 (substitute* "test/driver/exception_handling/run.t"
5558 (("\\(Failure ") "Failure("))
5559 (substitute* "test/base/test.ml"
5560 (("Invalid_argument \\((.*)\\)." _ m)
5561 (string-append "Invalid_argument " m "."))
5562 (("\\(Invalid_argument (.*)\\)" _ m)
5563 (string-append "Invalid_argument " m ".")))
5564 (substitute* "test/ppx_import_support/test.ml"
5565 (("\\(Failure") "Failure")
5566 ((" \"(Some ppx-es.*)\")" _ m)
5567 (string-append " \"" m "\"."))))))))
5571 ocaml-migrate-parsetree
5577 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
5579 "Base library and tools for ppx rewriters")
5581 "A comprehensive toolbox for ppx development. It features:
5583 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5584 independent of the version of OCaml;
5585 @item a library for library for ppx rewriters in general, and type-driven code
5586 generators in particular;
5588 a feature-full driver for OCaml AST transformers;
5589 @item a quotation mechanism allowing to write values representing the
5590 OCaml AST in the OCaml syntax;
5591 @item a generator of open recursion classes from type definitions.
5593 (license license:expat)))
5595 (define-public ocaml4.07-ppxlib
5596 (package-with-ocaml4.07
5598 (inherit ocaml-ppxlib)
5599 (name "ocaml-ppxlib")
5601 (home-page "https://github.com/ocaml-ppx/ppxlib")
5608 (file-name (git-file-name name version))
5611 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
5612 (build-system dune-build-system)
5615 (modify-phases %standard-phases
5616 (add-before 'check 'set-topfind
5617 (lambda* (#:key inputs #:allow-other-keys)
5618 ;; add the line #directory ".." at the top of each file
5619 ;; using #use "topfind";; to be able to find topfind
5620 (let* ((findlib-path (assoc-ref inputs "findlib"))
5622 (string-append findlib-path "/lib/ocaml/site-lib")))
5623 (substitute* '("test/base/test.ml"
5624 "test/code_path/test.ml"
5625 "test/deriving/test.ml"
5626 "test/driver/attributes/test.ml"
5627 "test/driver/non-compressible-suffix/test.ml"
5628 "test/driver/transformations/test.ml")
5629 (("#use \"topfind\";;" all)
5630 (string-append "#directory \"" findlib-libdir "\"\n"
5635 (define-public ocaml-ppx-compare
5637 (name "ocaml-ppx-compare")
5640 (janestreet-origin "ppx_compare" version
5641 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
5642 (build-system dune-build-system)
5644 ;; Tests are currenlty failing
5645 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
5648 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5649 (properties `((upstream-name . "ppx_compare")
5650 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
5651 (home-page "https://github.com/janestreet/ppx_compare")
5652 (synopsis "Generation of comparison functions from types")
5653 (description "Generation of fast comparison functions from type expressions
5654 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
5655 from type representations. The scaffolded functions are usually much faster
5656 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
5657 flexibility by allowing you to override them for a specific type and more safety
5658 by making sure that you only compare comparable values.")
5659 (license license:asl2.0)))
5661 (define-public ocaml4.07-ppx-compare
5662 (package-with-ocaml4.07
5664 (inherit ocaml-ppx-compare)
5665 (name "ocaml-ppx-compare")
5667 (home-page "https://github.com/janestreet/ppx_compare")
5672 (commit (string-append "v" version))))
5673 (file-name (git-file-name name version))
5676 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
5677 (properties `((upstream-name . "ppx_compare"))))))
5679 (define-public ocaml-fieldslib
5681 (name "ocaml-fieldslib")
5683 (source (janestreet-origin
5685 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
5686 (build-system dune-build-system)
5687 (arguments `(#:tests? #f)) ; No tests
5689 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5690 (properties `((upstream-name . "fieldslib")
5691 (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
5692 (home-page "https://github.com/janestreet/fieldslib")
5693 (synopsis "Syntax extension to record fields")
5694 (description "Syntax extension to define first class values representing
5695 record fields, to get and set record fields, iterate and fold over all fields
5696 of a record and create new record values.")
5697 (license license:asl2.0)))
5699 (define-public ocaml4.07-fieldslib
5700 (package-with-ocaml4.07
5702 (inherit ocaml-fieldslib)
5704 (source (janestreet-origin
5706 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
5707 (properties `((upstream-name . "fieldslib"))))))
5709 (define-public ocaml-variantslib
5711 (name "ocaml-variantslib")
5714 (janestreet-origin "variantslib" version
5715 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
5716 (build-system dune-build-system)
5721 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5722 (properties `((upstream-name . "variantslib")
5723 (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
5724 (home-page "https://github.com/janestreet/variantslib")
5725 (synopsis "OCaml variants as first class values")
5726 (description "The Core suite of libraries is an alternative to OCaml's
5728 (license license:asl2.0)))
5730 (define-public ocaml4.07-variantslib
5731 (package-with-ocaml4.07
5733 (inherit ocaml-variantslib)
5734 (name "ocaml-variantslib")
5738 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5739 (version-major+minor version)
5740 "/files/variantslib-v" version ".tar.gz"))
5743 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
5744 (properties `((upstream-name . "variantslib"))))))
5746 (define-public ocaml-ppx-fields-conv
5748 (name "ocaml-ppx-fields-conv")
5750 (home-page "https://github.com/janestreet/ppx_fields_conv")
5756 (commit (string-append "v" version))))
5757 (file-name (git-file-name name version))
5760 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
5761 (build-system dune-build-system)
5763 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
5765 (properties `((upstream-name . "ppx_fields_conv")
5766 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
5767 (synopsis "Generation of accessor and iteration functions for ocaml records")
5768 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
5769 first class values representing record fields, and additional routines, to get
5770 and set record fields, iterate and fold over all fields of a record and create
5771 new record values.")
5772 (license license:asl2.0)))
5774 (define-public ocaml4.07-ppx-fields-conv
5775 (package-with-ocaml4.07
5777 (inherit ocaml-ppx-fields-conv)
5779 (source (janestreet-origin
5780 "ppx_fields_conv" version
5781 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
5782 (properties `((upstream-name . "ppx_fields_conv"))))))
5784 (define-public ocaml-ppx-sexp-conv
5786 (name "ocaml-ppx-sexp-conv")
5788 (home-page "https://github.com/janestreet/ppx_sexp_conv")
5794 (commit (string-append "v" version))))
5795 (file-name (git-file-name name version))
5798 "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"))))
5799 (build-system dune-build-system)
5801 (list ocaml-base ocaml-ppxlib))
5802 (properties `((upstream-name . "ppx_sexp_conv")
5803 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
5804 (synopsis "Generation of S-expression conversion functions from type definitions")
5805 (description "This package generates S-expression conversion functions from type
5807 (license license:asl2.0)))
5809 (define-public ocaml4.07-ppx-sexp-conv
5810 (package-with-ocaml4.07
5812 (inherit ocaml-ppx-sexp-conv)
5813 (name "ocaml-ppx-sexp-conv")
5818 (url "https://github.com/janestreet/ppx_sexp_conv")
5819 (commit (string-append "v" version))))
5820 (file-name (git-file-name name version))
5823 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
5824 (properties `((upstream-name . "ppx_sexp_conv"))))))
5826 (define-public ocaml-ppx-variants-conv
5828 (name "ocaml-ppx-variants-conv")
5834 (url "https://github.com/janestreet/ppx_variants_conv")
5835 (commit (string-append "v" version))))
5836 (file-name (git-file-name name version))
5839 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
5840 (build-system dune-build-system)
5842 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
5845 `((upstream-name . "ppx_variants_conv")
5846 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
5848 "https://github.com/janestreet/ppx_variants_conv")
5849 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
5851 "This package generates accessors and iteration functions for OCaml
5853 (license license:asl2.0)))
5855 (define-public ocaml4.07-ppx-variants-conv
5856 (package-with-ocaml4.07
5858 (inherit ocaml-ppx-variants-conv)
5859 (name "ocaml-ppx-variants-conv")
5865 (url "https://github.com/janestreet/ppx_variants_conv")
5866 (commit (string-append "v" version))))
5867 (file-name (git-file-name name version))
5870 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
5871 (properties `((upstream-name . "ppx_variants_conv"))))))
5873 (define-public ocaml-ppx-custom-printf
5875 (name "ocaml-ppx-custom-printf")
5877 (home-page "https://github.com/janestreet/ppx_custom_printf")
5883 (commit (string-append "v" version))))
5884 (file-name (git-file-name name version))
5887 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
5888 (build-system dune-build-system)
5890 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
5892 (properties `((upstream-name . "ppx_custom_printf")
5893 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
5894 (synopsis "Printf-style format-strings for user-defined string conversion")
5895 (description "Extensions to printf-style format-strings for user-defined
5896 string conversion.")
5897 (license license:asl2.0)))
5899 (define-public ocaml4.07-ppx-custom-printf
5900 (package-with-ocaml4.07
5902 (inherit ocaml-ppx-custom-printf)
5906 "ppx_custom_printf" version
5907 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
5908 (properties `((upstream-name . "ppx_custom_printf"))))))
5910 (define-public ocaml-bin-prot
5912 (name "ocaml-bin-prot")
5918 (url "https://github.com/janestreet/bin_prot")
5919 (commit (string-append "v" version))))
5920 (file-name (git-file-name name version))
5922 (base32 "1qfqglscc25wwnjx7byqmjcnjww1msnr8940gyg8h93wdq43fjnh"))))
5923 (build-system dune-build-system)
5927 ocaml-ppx-custom-printf
5928 ocaml-ppx-fields-conv
5931 ocaml-ppx-variants-conv))
5932 (properties `((upstream-name . "bin_prot")
5933 (ocaml4.07-variant . ,(delay ocaml4.07-bin-prot))))
5934 (home-page "https://github.com/janestreet/bin_prot")
5935 (synopsis "Binary protocol generator")
5936 (description "This library contains functionality for reading and writing
5937 OCaml-values in a type-safe binary protocol. It is extremely efficient,
5938 typically supporting type-safe marshalling and unmarshalling of even highly
5939 structured values at speeds sufficient to saturate a gigabit connection. The
5940 protocol is also heavily optimized for size, making it ideal for long-term
5941 storage of large amounts of data.")
5942 (license license:expat)))
5944 (define-public ocaml4.07-bin-prot
5945 (package-with-ocaml4.07
5947 (inherit ocaml-bin-prot)
5951 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5952 (version-major+minor version)
5953 "/files/bin_prot-v" version ".tar.gz"))
5956 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
5957 (propagated-inputs (list ocaml-base
5959 ocaml-ppx-custom-printf
5960 ocaml-ppx-fields-conv
5961 ocaml-ppx-variants-conv
5962 ocaml-migrate-parsetree))
5968 (define-public ocaml-octavius
5970 (name "ocaml-octavius")
5975 (url "https://github.com/ocaml-doc/octavius")
5976 (commit (string-append "v" version))))
5977 (file-name (git-file-name name version))
5980 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
5981 (build-system dune-build-system)
5984 (modify-phases %standard-phases
5985 (add-before 'build 'make-writable
5987 (for-each (lambda (file)
5989 (find-files "." "."))
5991 (properties `((upstream-name . "octavius")))
5992 (home-page "https://github.com/ocaml-doc/octavius")
5993 (synopsis "Ocamldoc comment syntax parser")
5994 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
5995 (license license:isc)))
5997 (define-public ocaml-sha
6003 (uri (string-append "https://github.com/djs55/ocaml-sha/releases/download/"
6004 version "/sha-" version ".tbz"))
6007 "1dzzhchknnbrpp5s81iqbvmqp4s0l75yrq8snj70ch3wkarmgg9z"))))
6008 (build-system dune-build-system)
6009 (propagated-inputs (list ocaml-stdlib-shims ocaml-odoc))
6010 (native-inputs (list ocaml-ounit2))
6011 (home-page "https://github.com/djs55/ocaml-sha")
6012 (synopsis "OCaml binding to the SHA cryptographic functions")
6014 "This is the binding for SHA interface code in OCaml, offering the same
6015 interface as the MD5 digest included in the OCaml standard library. It
6016 currently provides SHA1, SHA256 and SHA512 hash functions.")
6017 (license license:isc)))
6019 (define-public ocaml-ppx-hash
6021 (name "ocaml-ppx-hash")
6024 (janestreet-origin "ppx_hash" version
6025 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
6026 (build-system dune-build-system)
6028 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
6029 ocaml-migrate-parsetree ocaml-ppxlib))
6030 (properties `((upstream-name . "ppx_hash")
6031 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
6032 (home-page "https://github.com/janestreet/ppx_hash")
6033 (synopsis "Generation of hash functions from type expressions and definitions")
6034 (description "This package is a collection of ppx rewriters that generate
6035 hash functions from type exrpessions and definitions.")
6036 (license license:asl2.0)))
6038 (define-public ocaml4.07-ppx-hash
6039 (package-with-ocaml4.07
6041 (inherit ocaml-ppx-hash)
6042 (name "ocaml-ppx-hash")
6043 (home-page "https://github.com/janestreet/ppx_hash")
6049 (commit (string-append "v" version))))
6050 (file-name (git-file-name name version))
6053 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
6054 (properties `((upstream-name . "ppx_hash"))))))
6056 (define-public ocaml-ppx-enumerate
6058 (name "ocaml-ppx-enumerate")
6062 "ppx_enumerate" version
6063 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
6064 (build-system dune-build-system)
6066 `(#:tests? #f)) ; no test suite
6068 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6069 (properties `((upstream-name . "ppx_enumerate")
6070 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
6071 (home-page "https://github.com/janestreet/ppx_enumerate")
6072 (synopsis "Generate a list containing all values of a finite type")
6073 (description "Ppx_enumerate is a ppx rewriter which generates a definition
6074 for the list of all values of a type (for a type which only has finitely
6076 (license license:asl2.0)))
6078 (define-public ocaml4.07-ppx-enumerate
6079 (package-with-ocaml4.07
6081 (inherit ocaml-ppx-enumerate)
6082 (name "ocaml-ppx-enumerate")
6084 (home-page "https://github.com/janestreet/ppx_enumerate")
6089 (commit (string-append "v" version))))
6090 (file-name (git-file-name name version))
6093 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
6094 (properties `((upstream-name . "ppx_enumerate"))))))
6096 (define-public ocaml-ppx-bench
6098 (name "ocaml-ppx-bench")
6104 (url "https://github.com/janestreet/ppx_bench")
6105 (commit (string-append "v" version))))
6106 (file-name (git-file-name name version))
6108 (base32 "0bc0gbm922417wqisafxh35jslcp7xy1s0h0a1q32rhx0ivxx3g6"))))
6109 (build-system dune-build-system)
6113 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
6114 (properties `((upstream-name . "ppx_bench")
6115 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bench))))
6116 (home-page "https://github.com/janestreet/ppx_bench")
6117 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
6118 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
6119 (license license:expat)))
6121 (define-public ocaml4.07-ppx-bench
6122 (package-with-ocaml4.07
6124 (inherit ocaml-ppx-bench)
6128 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6129 (version-major+minor version)
6130 "/files/ppx_bench-v" version ".tar.gz"))
6133 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
6135 (list ocaml-ppx-inline-test ocaml-migrate-parsetree ocaml-ppxlib))
6137 (license license:asl2.0))))
6139 (define-public ocaml-ppx-here
6141 (name "ocaml-ppx-here")
6144 (janestreet-origin "ppx_here" version
6145 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
6146 (build-system dune-build-system)
6151 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6152 (properties `((upstream-name . "ppx_here")
6153 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
6154 (home-page "https://github.com/janestreet/ppx_here")
6155 (synopsis "Expands [%here] into its location")
6157 "Part of the Jane Street's PPX rewriters collection.")
6158 (license license:asl2.0)))
6160 (define-public ocaml4.07-ppx-here
6161 (package-with-ocaml4.07
6163 (inherit ocaml-ppx-here)
6166 (janestreet-origin "ppx_here" version
6167 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
6168 (properties `((upstream-name . "ppx_here"))))))
6170 (define-public ocaml-typerep
6172 (name "ocaml-typerep")
6178 (url "https://github.com/janestreet/typerep")
6179 (commit (string-append "v" version))))
6180 (file-name (git-file-name name version))
6182 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
6183 (build-system dune-build-system)
6184 (arguments `(#:tests? #f)); no tests
6185 (propagated-inputs (list ocaml-base))
6186 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-typerep))))
6187 (home-page "https://github.com/janestreet/typerep")
6188 (synopsis "Typerep is a library for runtime types")
6189 (description "Typerep is a library for runtime types.")
6190 (license license:expat)))
6192 (define-public ocaml4.07-typerep
6193 (package-with-ocaml4.07
6195 (inherit ocaml-typerep)
6199 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6200 (version-major+minor version)
6201 "/files/typerep-v" version ".tar.gz"))
6204 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
6206 (license license:asl2.0))))
6208 (define-public ocaml-ppx-sexp-value
6210 (name "ocaml-ppx-sexp-value")
6216 (url "https://github.com/janestreet/ppx_sexp_value")
6217 (commit (string-append "v" version))))
6218 (file-name (git-file-name name version))
6220 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
6221 (build-system dune-build-system)
6223 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6224 (properties `((upstream-name . "ppx_sexp_value")
6225 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-value))))
6226 (home-page "https://github.com/janestreet/ppx_sexp_value")
6227 (synopsis "Simplify building s-expressions from ocaml values")
6228 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
6229 building s-expressions from ocaml values.")
6230 (license license:expat)))
6232 (define-public ocaml4.07-ppx-sexp-value
6233 (package-with-ocaml4.07
6235 (inherit ocaml-ppx-sexp-value)
6239 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6240 (version-major+minor version)
6241 "/files/ppx_sexp_value-v" version ".tar.gz"))
6244 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
6249 ocaml-migrate-parsetree
6252 (license license:asl2.0))))
6254 (define-public ocaml-ppx-sexp-message
6256 (name "ocaml-ppx-sexp-message")
6262 (url "https://github.com/janestreet/ppx_sexp_message")
6263 (commit (string-append "v" version))))
6264 (file-name (git-file-name name version))
6266 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
6267 (build-system dune-build-system)
6269 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6270 (properties `((upstream-name . "ppx_sexp_message")
6271 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-message))))
6272 (home-page "https://github.com/janestreet/ppx_sexp_message")
6273 (synopsis "Ppx rewriter for easy construction of s-expressions")
6274 (description "Ppx_sexp_message aims to ease the creation of s-expressions
6275 in OCaml. This is mainly motivated by writing error and debugging messages,
6276 where one needs to construct a s-expression based on various element of the
6277 context such as function arguments.")
6278 (license license:expat)))
6280 (define-public ocaml4.07-ppx-sexp-message
6281 (package-with-ocaml4.07
6283 (inherit ocaml-ppx-sexp-message)
6287 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6288 (version-major+minor version)
6289 "/files/ppx_sexp_message-v" version ".tar.gz"))
6292 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
6297 ocaml-migrate-parsetree
6300 (license license:asl2.0))))
6302 (define-public ocaml-ppx-pipebang
6304 (name "ocaml-ppx-pipebang")
6310 (url "https://github.com/janestreet/ppx_pipebang")
6311 (commit (string-append "v" version))))
6312 (file-name (git-file-name name version))
6314 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
6315 (build-system dune-build-system)
6316 (arguments `(#:tests? #f)); no tests
6317 (propagated-inputs (list ocaml-ppxlib))
6318 (properties `((upstream-name . "ppx_pipebang")
6319 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-pipebang))))
6320 (home-page "https://github.com/janestreet/ppx_pipebang")
6321 (synopsis "Inline reverse application operators `|>` and `|!`")
6322 (description "A ppx rewriter that inlines reverse application operators
6323 @code{|>} and @code{|!}.")
6324 (license license:expat)))
6326 (define-public ocaml4.07-ppx-pipebang
6327 (package-with-ocaml4.07
6329 (inherit ocaml-ppx-pipebang)
6333 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6334 (version-major+minor version)
6335 "/files/ppx_pipebang-v" version ".tar.gz"))
6338 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
6339 (propagated-inputs (list ocaml-migrate-parsetree ocaml-ppxlib))
6341 (license license:asl2.0))))
6343 (define-public ocaml-ppx-module-timer
6345 (name "ocaml-ppx-module-timer")
6351 (url "https://github.com/janestreet/ppx_module_timer")
6352 (commit (string-append "v" version))))
6353 (file-name (git-file-name name version))
6355 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
6356 (build-system dune-build-system)
6358 `(#:tests? #f)); no tests
6360 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
6361 (properties `((upstream-name . "ppx_module_timer")))
6362 (home-page "https://github.com/janestreet/ppx_module_timer")
6363 (synopsis "Ppx rewriter that records top-level module startup times")
6364 (description "Modules using @samp{ppx_module_timer} have instrumentation
6365 to record their startup time.")
6366 (license license:expat)))
6368 (define-public ocaml-ppx-fixed-literal
6370 (name "ocaml-ppx-fixed-literal")
6376 (url "https://github.com/janestreet/ppx_fixed_literal")
6377 (commit (string-append "v" version))))
6378 (file-name (git-file-name name version))
6380 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
6381 (build-system dune-build-system)
6383 `(#:tests? #f)); no tests
6384 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6385 (properties `((upstream-name . "ppx_fixed_literal")))
6386 (home-page "https://github.com/janestreet/ppx_fixed_literal")
6387 (synopsis "Simpler notation for fixed point literals")
6389 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
6390 literal of the form 1.0v to conversion functions currently in scope.")
6391 (license license:expat)))
6393 (define-public ocaml-ppx-optional
6395 (name "ocaml-ppx-optional")
6399 "ppx_optional" version
6400 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
6401 (build-system dune-build-system)
6402 (arguments `(#:tests? #f)) ; No tests
6404 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6405 (properties `((upstream-name . "ppx_optional")
6406 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
6407 (home-page "https://github.com/janestreet/ppx_optional")
6408 (synopsis "Pattern matching on flat options")
6410 "A ppx rewriter that rewrites simple match statements with an if then
6412 (license license:asl2.0)))
6414 (define-public ocaml4.07-ppx-optional
6415 (package-with-ocaml4.07
6417 (inherit ocaml-ppx-optional)
6421 "ppx_optional" version
6422 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
6423 (properties `((upstream-name . "ppx_optional"))))))
6425 (define-public ocaml-ppx-optcomp
6427 (name "ocaml-ppx-optcomp")
6429 (home-page "https://github.com/janestreet/ppx_optcomp")
6435 (commit (string-append "v" version))))
6436 (file-name (git-file-name name version))
6439 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
6440 (build-system dune-build-system)
6442 (list ocaml-base ocaml-stdio ocaml-ppxlib))
6443 (properties `((upstream-name . "ppx_optcomp")
6444 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
6445 (synopsis "Optional compilation for OCaml")
6446 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
6447 used to handle optional compilations of pieces of code depending of the word
6448 size, the version of the compiler, ...")
6449 (license license:asl2.0)))
6451 (define-public ocaml4.07-ppx-optcomp
6452 (package-with-ocaml4.07
6454 (inherit ocaml-ppx-optcomp)
6458 "ppx_optcomp" version
6459 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
6460 (properties `((upstream-name . "ppx_optcomp"))))))
6462 (define-public ocaml-ppx-let
6464 (name "ocaml-ppx-let")
6467 (janestreet-origin "ppx_let" version
6468 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
6469 (build-system dune-build-system)
6471 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
6472 (properties `((upstream-name . "ppx_let")
6473 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
6474 (home-page "https://github.com/janestreet/ppx_let")
6475 (synopsis "Monadic let-bindings")
6476 (description "A ppx rewriter for monadic and applicative let bindings,
6477 match expressions, and if expressions.")
6478 (license license:asl2.0)))
6480 (define-public ocaml4.07-ppx-let
6481 (package-with-ocaml4.07
6483 (inherit ocaml-ppx-let)
6486 (janestreet-origin "ppx_let" version
6487 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
6489 (properties `((upstream-name . "ppx_let"))))))
6491 (define-public ocaml-ppx-fail
6493 (name "ocaml-ppx-fail")
6499 (url "https://github.com/janestreet/ppx_fail")
6500 (commit (string-append "v" version))))
6501 (file-name (git-file-name name version))
6503 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
6504 (build-system dune-build-system)
6505 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
6506 (properties `((upstream-name . "ppx_fail")
6507 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fail))))
6508 (home-page "https://github.com/janestreet/ppx_fail")
6509 (synopsis "Add location to calls to failwiths")
6510 (description "Syntax extension that makes [failwiths] always include a
6512 (license license:expat)))
6514 (define-public ocaml4.07-ppx-fail
6515 (package-with-ocaml4.07
6517 (inherit ocaml-ppx-fail)
6521 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6522 (version-major+minor version)
6523 "/files/ppx_fail-v" version ".tar.gz"))
6526 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
6528 (list ocaml-base ocaml-ppx-here ocaml-migrate-parsetree ocaml-ppxlib))
6530 (license license:asl2.0))))
6532 (define-public ocaml-ppx-cold
6534 (name "ocaml-ppx-cold")
6536 (home-page "https://github.com/janestreet/ppx_cold")
6538 (janestreet-origin "ppx_cold" version
6539 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
6540 (build-system dune-build-system)
6541 (arguments `(#:test-target "tests"))
6543 (list ocaml-base ocaml-ppxlib))
6544 (properties `((upstream-name . "ppx_cold")))
6545 (synopsis "Syntax extension for indicating cold path")
6547 "This package contains an syntax extension to indicate that the code is
6548 on the cold path and should be kept out of the way to avoid polluting the
6549 instruction cache on the hot path. See also
6550 https://github.com/ocaml/ocaml/issues/8563.")
6551 (license license:expat)))
6553 (define-public ocaml-ppx-assert
6555 (name "ocaml-ppx-assert")
6558 (janestreet-origin "ppx_assert" version
6559 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
6560 (build-system dune-build-system)
6567 ocaml-migrate-parsetree
6569 (properties `((upstream-name . "ppx_assert")
6570 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
6571 (home-page "https://github.com/janestreet/ppx_assert")
6572 (synopsis "Assert-like extension nodes that raise useful errors on failure")
6573 (description "This package contains assert-like extension nodes that raise
6574 useful errors on failure.")
6575 (license license:asl2.0)))
6577 (define-public ocaml4.07-ppx-assert
6578 (package-with-ocaml4.07
6580 (inherit ocaml-ppx-assert)
6583 (janestreet-origin "ppx_assert" version
6584 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
6586 `(("ocaml-base" ,ocaml-base)
6587 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6588 ("ocaml-ppx-here" ,ocaml-ppx-here)
6589 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6590 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6591 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6592 (properties `((upstream-name . "ppx_assert"))))))
6594 (define-public ocaml-ppx-expect
6596 (name "ocaml-ppx-expect")
6602 (url "https://github.com/janestreet/ppx_expect")
6603 (commit (string-append "v" version))))
6604 (file-name (git-file-name name version))
6607 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
6608 (build-system dune-build-system)
6612 ocaml-ppx-inline-test
6615 ocaml-migrate-parsetree
6617 (properties `((upstream-name . "ppx_expect")
6618 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
6619 (home-page "https://github.com/janestreet/ppx_expect")
6620 (synopsis "Cram like framework for OCaml")
6621 (description "Expect-test is a framework for writing tests in OCaml, similar
6622 to Cram. Expect-tests mimics the existing inline tests framework with the
6623 @code{let%expect_test} construct. The body of an expect-test can contain
6624 output-generating code, interleaved with @code{%expect} extension expressions
6625 to denote the expected output.")
6626 (license license:asl2.0)))
6628 (define-public ocaml4.07-ppx-expect
6629 (package-with-ocaml4.07
6631 (inherit ocaml-ppx-expect)
6634 (janestreet-origin "ppx_expect" version
6635 "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
6637 `(("ocaml-base" ,ocaml-base)
6638 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
6639 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6640 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
6641 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
6642 ("ocaml-ppx-here" ,ocaml-ppx-here)
6643 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
6644 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6645 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
6646 ("ocaml-stdio" ,ocaml-stdio)
6647 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6648 ("ocaml-ppxlib" ,ocaml-ppxlib)
6649 ("ocaml-re" ,ocaml-re)))
6650 (properties `((upstream-name . "ppx_expect"))))))
6652 (define-public ocaml-ppx-js-style
6654 (name "ocaml-ppx-js-style")
6660 (url "https://github.com/janestreet/ppx_js_style")
6661 (commit (string-append "v" version))))
6662 (file-name (git-file-name name version))
6665 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
6666 (build-system dune-build-system)
6667 (arguments `(#:tests? #f)) ; No tests
6669 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
6670 (properties `((upstream-name . "ppx_js_style")
6671 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
6672 (home-page "https://github.com/janestreet/ppx_js_style")
6673 (synopsis "Code style checker for Jane Street Packages")
6674 (description "This package is a no-op ppx rewriter. It is used as a
6675 @code{lint} tool to enforce some coding conventions across all Jane Street
6677 (license license:asl2.0)))
6679 (define-public ocaml4.07-ppx-js-style
6680 (package-with-ocaml4.07
6682 (inherit ocaml-ppx-js-style)
6685 (janestreet-origin "ppx_js_style" version
6686 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
6687 (properties `((upstream-name . "ppx_js_style"))))))
6689 (define-public ocaml-ppx-typerep-conv
6691 (name "ocaml-ppx-typerep-conv")
6697 (url "https://github.com/janestreet/ppx_typerep_conv/")
6698 (commit (string-append "v" version))))
6699 (file-name (git-file-name name version))
6701 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
6702 (build-system dune-build-system)
6704 `(#:test-target "."))
6705 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
6706 (properties `((upstream-name . "ppx_typerep_conv")
6707 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
6708 (home-page "https://github.com/janestreet/ppx_typerep_conv")
6709 (synopsis "Generation of runtime types from type declarations")
6710 (description "This package can automatically generate runtime types
6711 from type definitions.")
6712 (license license:expat)))
6714 (define-public ocaml4.07-ppx-typerep-conv
6715 (package-with-ocaml4.07
6717 (inherit ocaml-ppx-typerep-conv)
6722 (url "https://github.com/janestreet/ppx_typerep_conv")
6723 (commit (string-append "v" version))))
6724 (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
6727 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
6730 (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
6731 (license license:asl2.0))))
6733 (define-public ocaml-ppx-string
6735 (name "ocaml-ppx-string")
6741 (url "https://github.com/janestreet/ppx_string")
6742 (commit (string-append "v" version))))
6743 (file-name (git-file-name name version))
6745 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
6746 (build-system dune-build-system)
6747 (arguments `(#:tests? #f)); no tests
6749 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
6750 (properties `((upstream-name . "ppx_string")))
6751 (home-page "https://github.com/janestreet/ppx_string")
6752 (synopsis "Ppx extension for string interpolation")
6753 (description "This extension provides a syntax for string interpolation.")
6754 (license license:expat)))
6756 (define-public ocaml-ppx-stable
6758 (name "ocaml-ppx-stable")
6764 (url "https://github.com/janestreet/ppx_stable")
6765 (commit (string-append "v" version))))
6766 (file-name (git-file-name name version))
6768 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
6769 (build-system dune-build-system)
6771 `(#:test-target "tests"))
6772 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6773 (properties `((upstream-name . "ppx_stable")))
6774 (home-page "https://github.com/janestreet/ppx_stable")
6775 (synopsis "Stable types conversions generator")
6776 (description "This package is a ppx extension for easier implementation of
6777 conversion functions between almost identical types.")
6778 (license license:expat)))
6780 (define-public ocaml-ppx-base
6782 (name "ocaml-ppx-base")
6787 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
6788 (build-system dune-build-system)
6790 `(#:test-target "."))
6792 (list ocaml-ppx-compare
6798 ocaml-migrate-parsetree
6800 (properties `((upstream-name . "ppx_base")
6801 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
6802 (home-page "https://github.com/janestreet/ppx_base")
6803 (synopsis "Base set of ppx rewriters")
6804 (description "Ppx_base is the set of ppx rewriters used for Base.
6806 Note that Base doesn't need ppx to build, it is only used as a
6807 verification tool.")
6808 (license license:asl2.0)))
6810 (define-public ocaml4.07-ppx-base
6811 (package-with-ocaml4.07
6813 (inherit ocaml-ppx-base)
6818 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
6820 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
6821 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
6822 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
6823 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
6824 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6825 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6826 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6827 (properties `((upstream-name . "ppx_base"))))))
6829 (define-public ocaml-ppx-bin-prot
6831 (name "ocaml-ppx-bin-prot")
6837 (url "https://github.com/janestreet/ppx_bin_prot")
6838 (commit (string-append "v" version))))
6839 (file-name (git-file-name name version))
6841 (base32 "1280wsls061fmvmdysjqn3lv4mnkyg400jnjf4jyfr14s33h1ad5"))))
6842 (build-system dune-build-system)
6844 ;; Cyclic dependency with ocaml-ppx-jane
6847 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
6848 (properties `((upstream-name . "ppx_bin_prot")
6849 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bin-prot))))
6850 (home-page "https://github.com/janestreet/ppx_bin_prot")
6851 (synopsis "Generation of bin_prot readers and writers from types")
6852 (description "Generation of binary serialization and deserialization
6853 functions from type definitions.")
6854 (license license:expat)))
6856 (define-public ocaml4.07-ppx-bin-prot
6857 (package-with-ocaml4.07
6859 (inherit ocaml-ppx-bin-prot)
6864 (url "https://github.com/janestreet/ppx_bin_prot")
6865 (commit (string-append "v" version))))
6866 (file-name (git-file-name "ocaml4.07-ppx-bin-prot" version))
6869 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
6874 ocaml-migrate-parsetree
6877 (license license:asl2.0))))
6879 (define-public ocaml-ppx-ignore-instrumentation
6881 (name "ocaml-ppx-ignore-instrumentation")
6887 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
6888 (commit (string-append "v" version))))
6889 (file-name (git-file-name name version))
6891 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
6892 (build-system dune-build-system)
6894 `(#:tests? #f)) ;no tests
6895 (propagated-inputs (list ocaml-ppxlib))
6896 (properties `((upstream-name . "ppx_ignore_instrumentation")))
6897 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
6898 (synopsis "Ignore Jane Street specific instrumentation extensions")
6900 "Ignore Jane Street specific instrumentation extensions from internal
6901 PPXs or compiler features not yet upstreamed.")
6902 (license license:expat)))
6904 (define-public ocaml-ppx-log
6906 (name "ocaml-ppx-log")
6912 (url "https://github.com/janestreet/ppx_log")
6913 (commit (string-append "v" version))))
6914 (file-name (git-file-name name version))
6916 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
6917 (build-system dune-build-system)
6922 ocaml-ppx-sexp-message
6925 (properties `((upstream-name . "ppx_log")))
6926 (home-page "https://github.com/janestreet/ppx_log")
6927 (synopsis "Extension nodes for lazily rendering log messages")
6928 (description "This package provides ppx_sexp_message-like extension
6929 nodes for lazily rendering log messages.")
6930 (license license:expat)))
6932 (define-public ocaml-ppx-disable-unused-warnings
6934 (name "ocaml-ppx-disable-unused-warnings")
6940 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
6941 (commit (string-append "v" version))))
6942 (file-name (git-file-name name version))
6944 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
6945 (build-system dune-build-system)
6947 `(#:test-target "tests"))
6948 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6949 (properties `((upstream-name . "ppx_disable_unused_warnings")))
6950 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
6951 (synopsis "Simple ppx extension for commonly unused warnings")
6952 (description "This package expands @code{@@disable_unused_warnings} into
6953 @code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
6954 (license license:expat)))
6956 (define-public ocaml-ppx-jane
6958 (name "ocaml-ppx-jane")
6964 (url "https://github.com/janestreet/ppx_jane")
6965 (commit (string-append "v" version))))
6966 (file-name (git-file-name name version))
6968 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
6969 (build-system dune-build-system)
6971 `(#:test-target "."))
6973 (list ocaml-base-quickcheck
6978 ocaml-ppx-custom-printf
6979 ocaml-ppx-disable-unused-warnings
6981 ocaml-ppx-fields-conv
6982 ocaml-ppx-fixed-literal
6984 ocaml-ppx-ignore-instrumentation
6985 ocaml-ppx-inline-test
6988 ocaml-ppx-module-timer
6992 ocaml-ppx-sexp-message
6993 ocaml-ppx-sexp-value
6996 ocaml-ppx-typerep-conv
6997 ocaml-ppx-variants-conv
6999 (properties `((upstream-name . "ppx_jane")
7000 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-jane))))
7001 (home-page "https://github.com/janestreet/ppx_jane")
7002 (synopsis "Standard Jane Street ppx rewriters")
7003 (description "This package installs a ppx-jane executable, which is a ppx
7004 driver including all standard Jane Street ppx rewriters.")
7005 (license license:expat)))
7007 (define-public ocaml4.07-ppx-jane
7008 (package-with-ocaml4.07
7010 (inherit ocaml-ppx-jane)
7014 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7015 (version-major+minor version)
7016 "/files/ppx_jane-v" version ".tar.gz"))
7019 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
7021 (list ocaml-ppx-assert
7025 ocaml-ppx-custom-printf
7028 ocaml-ppx-fields-conv
7030 ocaml-ppx-inline-test
7035 ocaml-ppx-sexp-message
7036 ocaml-ppx-sexp-value
7037 ocaml-ppx-typerep-conv
7038 ocaml-ppx-variants-conv
7039 ocaml-migrate-parsetree
7042 (license license:asl2.0))))
7044 (define-public ocaml-base-bigstring
7046 (name "ocaml-base-bigstring")
7052 (url "https://github.com/janestreet/base_bigstring")
7053 (commit (string-append "v" version))))
7054 (file-name (git-file-name name version))
7056 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
7057 (build-system dune-build-system)
7058 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
7059 (properties `((upstream-name . "base_bigstring")))
7060 (home-page "https://github.com/janestreet/base_bigstring")
7061 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
7062 (description "This package provides string type based on [Bigarray], for
7063 use in I/O and C-bindings.")
7064 (license license:expat)))
7066 (define-public ocaml-splittable-random
7068 (name "ocaml-splittable-random")
7074 (url "https://github.com/janestreet/splittable_random")
7075 (commit (string-append "v" version))))
7076 (file-name (git-file-name name version))
7078 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
7079 (build-system dune-build-system)
7084 ocaml-ppx-inline-test
7085 ocaml-ppx-sexp-message))
7086 (properties `((upstream-name . "splittable_random")
7087 (ocaml-4.07-variant . ,(delay ocaml4.07-splittable-random))))
7088 (home-page "https://github.com/janestreet/splittable_random")
7089 (synopsis "PRNG that can be split into independent streams")
7090 (description "This package provides a splittable
7091 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
7092 be used as a stream of random values; it can also be split to produce a
7093 second, independent stream of random values.
7095 This library implements a splittable pseudo-random number generator that sacrifices
7096 cryptographic-quality randomness in favor of performance.")
7097 (license license:expat)))
7099 (define-public ocaml4.07-splittable-random
7100 (package-with-ocaml4.07
7102 (inherit ocaml-splittable-random)
7106 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7107 (version-major+minor version)
7108 "/files/splittable_random-v" version ".tar.gz"))
7111 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
7113 (list ocaml-base ocaml-ppx-jane ocaml-migrate-parsetree))
7115 (license license:asl2.0))))
7117 (define-public ocaml-base-quickcheck
7119 (name "ocaml-base-quickcheck")
7125 (url "https://github.com/janestreet/base_quickcheck")
7126 (commit (string-append "v" version))))
7127 (file-name (git-file-name name version))
7129 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
7130 (build-system dune-build-system)
7134 ocaml-ppx-fields-conv
7136 ocaml-ppx-sexp-message
7137 ocaml-ppx-sexp-value
7138 ocaml-splittable-random
7140 (properties `((upstream-name . "base_quickcheck")))
7141 (home-page "https://github.com/janestreet/base_quickcheck")
7143 "Randomized testing framework, designed for compatibility with Base")
7145 "@samp{base-quickcheck} provides randomized testing in the style of
7146 Haskell's Quickcheck library, with support for built-in types as well as
7147 types provided by Base.")
7148 (license license:expat)))
7150 (define-public ocaml4.07-jane-street-headers
7152 (name "ocaml4.07-jane-street-headers")
7156 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7157 (version-major+minor version)
7158 "/files/jane-street-headers-v" version ".tar.gz"))
7161 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
7162 (build-system dune-build-system)
7166 #:findlib ,ocaml4.07-findlib
7167 #:dune ,ocaml4.07-dune))
7168 (home-page "https://github.com/janestreet/jane-street-headers")
7169 (synopsis "Jane Street C header files")
7170 (description "This package provides C header files shared between the
7171 various Jane Street packages.")
7172 (license license:asl2.0)))
7174 (define-public ocaml4.07-configurator
7176 (name "ocaml4.07-configurator")
7180 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7181 (version-major+minor version)
7182 "/files/configurator-v" version ".tar.gz"))
7185 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
7186 (build-system dune-build-system)
7191 #:findlib ,ocaml4.07-findlib
7192 #:dune ,ocaml4.07-dune))
7194 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
7195 ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
7196 (home-page "https://github.com/janestreet/configurator")
7197 (synopsis "Helper library for gathering system configuration")
7198 (description "Configurator is a small library that helps writing OCaml
7199 scripts that test features available on the system, in order to generate config.h
7202 Configurator allows one to:
7204 @item test if a C program compiles
7205 @item query pkg-config
7206 @item import #define from OCaml header files
7207 @item generate config.h file
7209 (license license:asl2.0)))
7211 (define-public ocaml-spawn
7213 (name "ocaml-spawn")
7218 (url "https://github.com/janestreet/spawn")
7219 (commit (string-append "v" version))))
7220 (file-name (git-file-name name version))
7223 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
7224 (build-system dune-build-system)
7225 (propagated-inputs (list ocaml-odoc))
7226 (native-inputs (list ocaml-ppx-expect))
7228 `((ocaml4.07-variant . ,(delay ocaml4.07-spawn))))
7229 (home-page "https://github.com/janestreet/spawn")
7230 (synopsis "Spawning sub-processes")
7232 "Spawn is a small library exposing only one functionality: spawning sub-process.
7234 It has three main goals:
7237 @item provide missing features of Unix.create_process such as providing a
7239 @item provide better errors when a system call fails in the
7240 sub-process. For instance if a command is not found, you get a proper
7241 @code{Unix.Unix_error} exception,
7242 @item improve performances by using vfork when available. It is often
7243 claimed that nowadays fork is as fast as vfork, however in practice
7244 fork takes time proportional to the process memory while vfork is
7245 constant time. In application using a lot of memory, vfork can be
7246 thousands of times faster than fork.
7248 (license license:asl2.0)))
7250 (define-public ocaml4.07-spawn
7251 (package-with-ocaml4.07
7253 (inherit ocaml-spawn)
7258 (url "https://github.com/janestreet/spawn")
7259 (commit (string-append "v" version))))
7260 (file-name (git-file-name "ocaml4.07-spawn" version))
7263 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
7266 (modify-phases %standard-phases
7267 (add-before 'check 'fix-tests
7269 (substitute* "test/tests.ml"
7270 (("/bin/pwd") (which "pwd"))
7271 (("/bin/echo") (which "echo")))
7274 #:findlib ,ocaml4.07-findlib
7275 #:dune ,ocaml4.07-dune))
7276 (propagated-inputs '())
7279 (define-public ocaml-core
7287 (url "https://github.com/janestreet/core")
7288 (commit (string-append "v" version))))
7289 (file-name (git-file-name name version))
7291 (base32 "1m2ybvlz9zlb2d0jc0j7wdgd18mx9sh3ds2ylkv0cfjx1pzi0l25"))))
7292 (build-system dune-build-system)
7295 #:tests? #f)); Require a cyclic dependency: core_extended
7298 ocaml-base-bigstring
7299 ocaml-base-quickcheck
7302 ocaml-jane-street-headers
7307 ocaml-ppx-inline-test
7310 ocaml-ppx-sexp-message
7312 ocaml-splittable-random
7317 (home-page "https://github.com/janestreet/core")
7318 (synopsis "Alternative to OCaml's standard library")
7319 (description "The Core suite of libraries is an alternative to OCaml's
7320 standard library that was developed by Jane Street.")
7321 ;; Also contains parts of OCaml, relicensed to expat, as permitted
7322 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7323 (license license:expat)))
7325 (define-public ocaml4.07-core
7326 (package-with-ocaml4.07
7328 (inherit ocaml-core)
7333 (url "https://github.com/janestreet/core")
7334 (commit (string-append "v" version))))
7335 (file-name (git-file-name "ocaml4.07-core" version))
7338 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
7341 ocaml4.07-configurator
7348 ocaml-migrate-parsetree
7350 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
7351 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7352 (license license:asl2.0))))
7354 (define-public ocaml-int-repr
7356 (name "ocaml-int-repr")
7362 (url "https://github.com/janestreet/int_repr")
7363 (commit (string-append "v" version))))
7364 (file-name (git-file-name name version))
7366 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
7367 (build-system dune-build-system)
7369 `(#:tests? #f)) ;no tests
7370 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
7371 (properties `((upstream-name . "int_repr")))
7372 (home-page "https://github.com/janestreet/int_repr")
7373 (synopsis "Integers of various widths")
7374 (description "Integers of various widths.")
7375 (license license:expat)))
7377 (define-public ocaml-core-kernel
7379 (name "ocaml-core-kernel")
7385 (url "https://github.com/janestreet/core_kernel")
7386 (commit (string-append "v" version))))
7387 (file-name (git-file-name name version))
7389 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
7390 (build-system dune-build-system)
7392 ;; Cyclic dependency with ocaml-core
7395 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
7396 (properties `((upstream-name . "core_kernel")
7397 (ocaml4.07-variant . ,(delay ocaml4.07-core-kernel))))
7398 (home-page "https://github.com/janestreet/core_kernel")
7399 (synopsis "Portable standard library for OCaml")
7400 (description "Core is an alternative to the OCaml standard library.
7402 Core_kernel is the system-independent part of Core. It is aimed for cases when
7403 the full Core is not available, such as in Javascript.")
7404 (license license:expat)))
7406 (define-public ocaml4.07-core-kernel
7407 (package-with-ocaml4.07
7409 (inherit ocaml-core-kernel)
7414 (url "https://github.com/janestreet/core_kernel")
7415 (commit (string-append "v" version))))
7416 (file-name (git-file-name "ocaml4.07-core-kernel" version))
7419 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
7423 ocaml4.07-configurator
7425 ocaml-jane-street-headers
7429 ocaml-ppx-inline-test
7432 ocaml-ppx-sexp-message
7434 ocaml-splittable-random
7438 ocaml-migrate-parsetree))
7441 ;; this package and parts of OCaml, relicensed by janestreet
7446 (define-public ocaml-timezone
7448 (name "ocaml-timezone")
7454 (url "https://github.com/janestreet/timezone")
7455 (commit (string-append "v" version))))
7456 (file-name (git-file-name name version))
7458 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
7459 (build-system dune-build-system)
7460 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7461 (home-page "https://github.com/janestreet/timezone")
7462 (synopsis "Time-zone handling")
7464 "Timezone handles parsing timezone data and create @code{Timezone.t}
7465 that can later be used to manipulate time in core_kernel or core.")
7466 (license license:expat)))
7468 (define-public ocaml-markup
7470 (name "ocaml-markup")
7472 (home-page "https://github.com/aantron/markup.ml")
7477 (url (string-append home-page ".git"))
7479 (file-name (git-file-name name version))
7482 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
7483 (build-system dune-build-system)
7485 `(#:package "markup"))
7487 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
7489 (list ocaml-ounit2 pkg-config))
7491 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
7492 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
7493 (description "Markup.ml provides an HTML parser and an XML parser. The
7494 parsers are wrapped in a simple interface: they are functions that transform
7495 byte streams to parsing signal streams. Streams can be manipulated in various
7496 ways, such as processing by fold, filter, and map, assembly into DOM tree
7497 structures, or serialization back to HTML or XML.
7499 Both parsers are based on their respective standards. The HTML parser, in
7500 particular, is based on the state machines defined in HTML5.
7502 The parsers are error-recovering by default, and accept fragments. This makes
7503 it very easy to get a best-effort parse of some input. The parsers can,
7504 however, be easily configured to be strict, and to accept only full documents.
7506 Apart from this, the parsers are streaming (do not build up a document in
7507 memory), non-blocking (can be used with threading libraries), lazy (do not
7508 consume input unless the signal stream is being read), and process the input in
7509 a single pass. They automatically detect the character encoding of the input
7510 stream, and convert everything to UTF-8.")
7511 (license license:bsd-3)))
7513 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
7514 ;; package-with-ocaml4.07
7515 (define-public ocaml-markup0.8.0
7517 (inherit ocaml-markup)
7518 (name "ocaml-markup")
7520 (home-page "https://github.com/aantron/markup.ml")
7525 (url (string-append home-page ".git"))
7527 (file-name (git-file-name name version))
7530 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
7532 (list ocaml-ounit pkg-config))
7535 (define-public ocaml-tyxml
7537 (name "ocaml-tyxml")
7543 (url "https://github.com/ocsigen/tyxml")
7545 (file-name (git-file-name name version))
7548 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
7549 (build-system dune-build-system)
7551 (list ocaml-re ocaml-seq ocaml-uutf))
7553 (list ocaml-alcotest))
7554 (arguments `(#:package "tyxml"))
7555 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-tyxml))))
7556 (home-page "https://github.com/ocsigen/tyxml/")
7557 (synopsis "TyXML is a library for building correct HTML and SVG documents")
7558 (description "TyXML provides a set of convenient combinators that uses the
7559 OCaml type system to ensure the validity of the generated documents. TyXML can
7560 be used with any representation of HTML and SVG: the textual one, provided
7561 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
7562 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
7563 also create your own representation and use it to instantiate a new set of
7565 (license license:lgpl2.1)))
7567 (define-public ocaml4.07-tyxml
7568 (package-with-ocaml4.07
7570 (inherit ocaml-tyxml)
7575 (url "https://github.com/ocsigen/tyxml")
7577 (file-name (git-file-name "ocaml-tyxml" version))
7580 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
7583 (define-public ocaml-bisect-ppx
7585 (name "ocaml-bisect-ppx")
7591 (url "https://github.com/aantron/bisect_ppx")
7593 (file-name (git-file-name name version))
7596 "0562rwwnhqlf5alxl1wd1n0xs0k4aamxafrh8bbmh5yl3i5rxrx4"))))
7597 (build-system dune-build-system)
7599 (list ocaml-ppxlib ocaml-cmdliner))
7601 ;; Tests require ocamlformat which would lead to circular dependencies
7603 (properties `((upstream-name . "bisect_ppx")
7604 (ocaml4.07-variant . ,(delay ocaml4.07-bisect-ppx))))
7605 (home-page "https://github.com/aantron/bisect_ppx")
7606 (synopsis "Code coverage for OCaml")
7607 (description "Bisect_ppx helps you test thoroughly. It is a small
7608 preprocessor that inserts instrumentation at places in your code, such as
7609 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
7610 nice HTML report showing which places were visited and which were missed.
7612 Usage is simple - add package bisect_ppx when building tests, run your tests,
7613 then run the Bisect_ppx report tool on the generated visitation files.")
7614 (license license:mpl2.0)))
7616 (define-public ocaml4.07-bisect-ppx
7617 (package-with-ocaml4.07
7619 (inherit ocaml-bisect-ppx)
7625 (url "https://github.com/aantron/bisect_ppx")
7627 (file-name (git-file-name "ocaml-bisect-ppx" version))
7630 "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
7632 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
7633 ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
7634 ,@(package-propagated-inputs ocaml-bisect-ppx)))
7636 `(("ocaml-ounit2" ,ocaml-ounit2)))
7639 ;; tests require git and network
7641 (properties '((upstream-name . "bisect_ppx"))))))
7643 (define-public ocaml-odoc
7646 ;; 2.2.0-alpha contains fixes for Dune 3.0 compatibility
7647 ;; (https://github.com/ocaml/odoc/commit/6ac97f3148f7791ec7451785ef4dbd9ca0daf2d1)
7648 (version "2.2.0-alpha")
7653 (url "https://github.com/ocaml/odoc")
7655 (file-name (git-file-name name version))
7657 (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
7658 (build-system dune-build-system)
7660 `(#:tests? #f; not compatible with current version of ocaml-yojson
7662 (modify-phases %standard-phases
7663 (add-after 'unpack 'fix-test
7665 ;; test results expects #!/bin/sh but gets a store path instead
7666 (substitute* "test/xref2/with.t/run.t"
7667 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
7675 ocaml-migrate-parsetree
7681 (list ocaml-alcotest
7691 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
7692 (home-page "https://github.com/ocaml/odoc")
7693 (synopsis "OCaml documentation generator")
7694 (description "Odoc is a documentation generator for OCaml. It reads
7695 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
7698 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
7699 advantage over ocamldoc is an accurate cross-referencer, which handles the
7700 complexity of the OCaml module system.")
7701 (license license:isc)))
7703 (define-public ocaml-odoc-parser
7705 (name "ocaml-odoc-parser")
7711 (url "https://github.com/ocaml-doc/odoc-parser")
7713 (file-name (git-file-name name version))
7716 "1x48kf051xs98rd6cri591bk1ccp9hyp93n1rlf6qnxic55jw683"))))
7717 (build-system dune-build-system)
7719 (list ocaml-astring ocaml-camlp-streams ocaml-result))
7721 (list ocaml-ppx-expect))
7722 (home-page "https://github.com/ocaml-doc/odoc-parser")
7723 (synopsis "Parser for ocaml documentation comments")
7725 "This package provides a library for parsing the contents of OCaml
7726 documentation comments, formatted using Odoc syntax, an extension of the
7727 language understood by ocamldoc.")
7728 (license license:isc)))
7730 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
7731 ;; with old version of dune used in package-with-ocaml4.07
7732 (define-public ocaml4.07-odoc
7733 (package-with-ocaml4.07
7735 (inherit ocaml-odoc)
7742 (url "https://github.com/ocaml/odoc")
7744 (file-name (git-file-name name version))
7746 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
7749 `(("ocaml-alcotest" ,ocaml-alcotest)
7750 ("ocaml-markup" ,ocaml-markup)
7751 ("ocaml-sexplib" ,ocaml-sexplib)
7752 ("ocaml-re" ,ocaml-re)
7753 ("ocaml-uutf" ,ocaml-uutf)))
7755 `(("ocaml-astring" ,ocaml-astring)
7756 ("ocaml-cmdliner" ,ocaml-cmdliner)
7757 ("ocaml-cppo" ,ocaml-cppo)
7758 ("ocaml-fpath" ,ocaml-fpath)
7759 ("ocaml-result" ,ocaml-result)
7760 ("ocaml-tyxml" ,ocaml-tyxml)
7761 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
7762 ("tidy-html" ,tidy-html)))
7765 (define-public ocaml-fftw3
7767 (name "ocaml-fftw3")
7773 (url "https://github.com/Chris00/fftw-ocaml")
7775 (file-name (git-file-name name version))
7778 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
7779 (build-system dune-build-system)
7781 `(#:test-target "tests"))
7785 (list ocaml-cppo ocaml-lacaml))
7787 "https://github.com/Chris00/fftw-ocaml")
7789 "Bindings to FFTW3")
7791 "Bindings providing OCaml support for the seminal Fast Fourier Transform
7793 (license license:lgpl2.1))) ; with static linking exception.
7795 (define-public ocaml-lacaml
7797 (name "ocaml-lacaml")
7803 (url "https://github.com/mmottl/lacaml")
7805 (file-name (git-file-name name version))
7808 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
7809 (modules '((guix build utils)))
7810 (snippet '(substitute* '("src/dune" "src/config/dune")
7811 (("-march=native") "")))))
7812 (properties '((tunable? . #t)))
7813 (build-system dune-build-system)
7815 `(#:tests? #f)) ; No test target.
7817 (list openblas lapack ocaml-base ocaml-stdio))
7818 (home-page "https://mmottl.github.io/lacaml/")
7820 "OCaml-bindings to BLAS and LAPACK")
7822 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
7823 LAPACK-library (Linear Algebra routines). It also contains many additional
7824 convenience functions for vectors and matrices.")
7825 (license license:lgpl2.1)))
7827 (define-public ocaml-cairo2
7829 (name "ocaml-cairo2")
7834 (url "https://github.com/Chris00/ocaml-cairo")
7836 (file-name (git-file-name name version))
7839 "1m0wh0s0sqjfa3mgq99lwk0dsg0bwxipaz93hq18m0lz5fqxib1m"))))
7840 (build-system dune-build-system)
7842 `(#:test-target "tests"))
7846 ("lablgtk" ,lablgtk)))
7849 (home-page "https://github.com/Chris00/ocaml-cairo")
7850 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
7851 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
7852 with support for multiple output devices. Currently supported output targets
7853 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
7854 and SVG file output.")
7855 (license license:lgpl3+)))
7857 (define-public ocaml-version
7859 (name "ocaml-version")
7865 (url "https://github.com/ocurrent/ocaml-version")
7866 (commit (string-append "v" version))))
7867 (file-name (git-file-name name version))
7870 "1pnw2ym021j48zknhbi1kdiyfv9si8p2l04rdzbv4g51fclsqs92"))))
7871 (build-system dune-build-system)
7872 (arguments `(#:tests? #f)) ; no tests
7873 (properties '((upstream-name . "ocaml-version")))
7875 "https://github.com/ocurrent/ocaml-version")
7877 "Manipulate, parse and generate OCaml compiler version strings")
7879 "This library provides facilities to parse version numbers of the OCaml
7880 compiler, and enumerates the various official OCaml releases and configuration
7882 (license license:isc)))
7884 (define-public ocaml-mdx
7891 (url "https://github.com/realworldocaml/mdx")
7893 (file-name (git-file-name name version))
7896 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
7897 (build-system dune-build-system)
7900 (modify-phases %standard-phases
7901 (add-after 'unpack 'fix-test-format
7903 ;; cmdliner changed the format and the tests fail
7904 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
7905 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
7907 (("COMMAND") "[COMMAND]")
7908 (("\\.\\.\\.") "…")))))))
7920 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
7922 "https://github.com/realworldocaml/mdx")
7924 "Executable code blocks inside markdown files")
7926 "@code{ocaml-mdx} executes code blocks inside markdown files.
7927 There are (currently) two sub-commands, corresponding
7928 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
7929 and tests (@code{ocaml-mdx test}]).
7931 The pre-processor mode allows mixing documentation and code,
7932 and to practice @dfn{literate programming} using markdown and OCaml.
7934 The test mode ensures that shell scripts and OCaml fragments
7935 in the documentation always stays up-to-date.
7937 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
7938 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
7940 (license license:isc)))
7942 (define-public ocaml-mparser
7944 (name "ocaml-mparser")
7950 (url "https://github.com/murmour/mparser")
7952 (file-name (git-file-name name version))
7955 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
7956 (build-system dune-build-system)
7959 '(#:package "mparser"
7961 (home-page "https://github.com/murmour/mparser")
7962 (synopsis "Simple monadic parser combinator library")
7964 "This library implements a rather complete and efficient monadic parser
7965 combinator library similar to the Parsec library for Haskell by Daan Leijen and
7966 the FParsec library for FSharp by Stephan Tolksdorf.")
7967 ;; With static linking exception.
7968 (license license:lgpl2.1+)))
7970 (define-public ocaml-mparser-re
7972 (inherit ocaml-mparser)
7973 (name "ocaml-mparser-re")
7976 '(#:package "mparser-re"
7979 (list ocaml-mparser ocaml-re))
7980 (synopsis "MParser plugin for RE-based regular expressions")
7981 (description "This package provides RE-based regular expressions
7982 support for Mparser.")))
7984 (define-public ocaml-mparser-pcre
7986 (inherit ocaml-mparser)
7987 (name "ocaml-mparser-pcre")
7990 '(#:package "mparser-pcre"
7993 (list ocaml-mparser ocaml-pcre))
7994 (synopsis "MParser plugin for PCRE-based regular expressions")
7995 (description "This package provides PCRE-based regular expressions
7996 support for Mparser.")))
7998 (define-public lablgtk3
8005 (url "https://github.com/garrigue/lablgtk")
8007 (file-name (git-file-name name version))
8010 "11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
8011 (build-system dune-build-system)
8015 (modify-phases %standard-phases
8016 (add-before 'build 'make-writable
8018 (for-each (lambda (file)
8020 (find-files "." "."))))
8021 (add-before 'build 'set-version
8023 (substitute* "dune-project"
8024 (("\\(name lablgtk3\\)")
8025 (string-append "(name lablgtk3)\n(version " ,version ")"))))))))
8027 (list ocaml-cairo2))
8029 (list camlp5 gtk+ gtksourceview-3 gtkspell3))
8032 (home-page "https://github.com/garrigue/lablgtk")
8033 (synopsis "OCaml interface to GTK+3")
8034 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
8035 provides a strongly-typed object-oriented interface that is compatible with the
8036 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
8037 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
8038 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
8039 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
8040 ;; Version 2 only, with linking exception.
8041 (license license:lgpl2.0)))
8043 (define-public ocaml-reactivedata
8045 (name "ocaml-reactivedata")
8050 (url "https://github.com/ocsigen/reactiveData")
8052 (file-name (git-file-name name version))
8055 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
8057 `(#:tests? #f)) ;no tests
8058 (build-system dune-build-system)
8059 (properties `((upstream-name . "reactiveData")))
8062 (home-page "https://github.com/ocsigen/reactiveData")
8063 (synopsis "Declarative events and signals for OCaml")
8065 "React is an OCaml module for functional reactive programming (FRP). It
8066 provides support to program with time varying values: declarative events and
8067 signals. React doesn't define any primitive event or signal, it lets the
8068 client chooses the concrete timeline.")
8069 (license license:lgpl2.1+)))
8071 (define-public ocaml-uucd
8078 (uri (string-append "https://erratique.ch/software/uucd/releases/"
8079 "uucd-" version ".tbz"))
8082 "0fc737v5gj3339jx4x9xr096lxrpwvp6vaiylhavcvsglcwbgm30"))))
8083 (build-system ocaml-build-system)
8085 '(#:build-flags '("build" "--tests" "true")
8087 (modify-phases %standard-phases
8088 (delete 'configure))))
8092 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8093 (home-page "https://erratique.ch/software/uucd")
8094 (synopsis "Unicode character database decoder for OCaml")
8095 (description "Uucd is an OCaml module to decode the data of the Unicode
8096 character database from its XML representation. It provides high-level (but
8097 not necessarily efficient) access to the data so that efficient
8098 representations can be extracted.")
8099 (license license:isc)))
8101 (define-public ocaml-uucp
8108 (uri (string-append "https://erratique.ch/software/uucp/releases/"
8109 "uucp-" version ".tbz"))
8112 "1yx9nih3d9prb9zizq8fzmmqylf24a6yifhf81h33znrj5xn1mpj"))))
8113 (build-system ocaml-build-system)
8115 '(#:build-flags '("build" "--tests" "true")
8117 (modify-phases %standard-phases
8118 (delete 'configure))))
8127 (home-page "https://erratique.ch/software/uucp")
8128 (synopsis "Unicode character properties for OCaml")
8129 (description "Uucp is an OCaml library providing efficient access to a
8130 selection of character properties of the Unicode character database.")
8131 (license license:isc)))
8133 (define-public ocaml-uuseg
8135 (name "ocaml-uuseg")
8140 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
8141 "uuseg-" version ".tbz"))
8144 "1g9zyzjkhqxgbb9mh3cgaawscwdazv6y8kdqvmy6yhnimmfqv25p"))))
8145 (build-system ocaml-build-system)
8147 '(#:build-flags '("build" "--tests" "true")
8149 (modify-phases %standard-phases
8150 (delete 'configure))))
8152 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
8154 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8155 (home-page "https://erratique.ch/software/uuseg")
8156 (synopsis "Unicode text segmentation for OCaml")
8157 (description "Uuseg is an OCaml library for segmenting Unicode text. It
8158 implements the locale independent Unicode text segmentation algorithms to
8159 detect grapheme cluster, word and sentence boundaries and the Unicode line
8160 breaking algorithm to detect line break opportunities.
8162 The library is independent from any IO mechanism or Unicode text data
8163 structure and it can process text without a complete in-memory
8165 (license license:isc)))
8167 (define-public ocaml-fix
8170 (version "20220121")
8175 (url "https://gitlab.inria.fr/fpottier/fix")
8177 (file-name (git-file-name name version))
8180 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
8181 (build-system dune-build-system)
8185 (home-page "https://gitlab.inria.fr/fpottier/fix")
8186 (synopsis "Facilities for memoization and fixed points")
8187 (description "This package provides helpers with various constructions
8188 that involve memoization and recursion.")
8189 (license license:lgpl2.0)))
8191 (define-public ocaml-dune-build-info
8194 (name "ocaml-dune-build-info")
8195 (build-system dune-build-system)
8197 '(#:package "dune-build-info"
8198 ;; No separate test suite from dune.
8202 (synopsis "Embed build information inside an executable")
8203 (description "This package allows one to access information about how the
8204 executable was built, such as the version of the project at which it was built
8205 or the list of statically linked libraries with their versions. It supports
8206 reporting the version from the version control system during development to
8207 get an precise reference of when the executable was built.")))
8209 (define-public ocaml-either
8211 (name "ocaml-either")
8217 (url "https://github.com/mirage/either")
8219 (file-name (git-file-name name version))
8221 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
8222 (build-system dune-build-system)
8226 (home-page "https://github.com/mirage/either")
8227 (synopsis "Compatibility Either module")
8228 (description "This library is a compatibility module for the Either module
8229 defined in OCaml 4.12.0.")
8230 (license license:expat)))
8232 (define-public ocamlformat
8234 (name "ocamlformat")
8240 (url "https://github.com/ocaml-ppx/ocamlformat")
8242 (file-name (git-file-name name version))
8245 "0y1j5mwwrliy6a78cmpi6j8gw425shghqg9ylyl3qw5fx4b088pp"))))
8246 (build-system dune-build-system)
8248 '(#:package "ocamlformat"
8250 (modify-phases %standard-phases
8251 ;; Tests related to other packages
8252 (add-after 'unpack 'remove-unrelated-tests
8254 (delete-file-recursively "test/rpc")))
8255 (add-after 'unpack 'fix-test-format
8257 (substitute* "test/cli/repl_file_errors.t/run.t"
8258 ((" ;;") ";;")))))))
8263 ocaml-dune-build-info
8276 (list git-minimal ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
8277 (home-page "https://github.com/ocaml-ppx/ocamlformat")
8278 (synopsis "Auto-formatter for OCaml code")
8279 (description "OCamlFormat is a tool to automatically format OCaml code in
8281 (license license:expat)))
8283 (define-public ocaml-bigstringaf
8285 (name "ocaml-bigstringaf")
8287 (home-page "https://github.com/inhabitedtype/bigstringaf")
8294 (file-name (git-file-name name version))
8297 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
8298 (build-system dune-build-system)
8300 '(#:test-target "."))
8302 (list ocaml-bigarray-compat))
8304 (list ocaml-alcotest pkg-config))
8306 "Bigstring intrinsics and fast blits based on memcpy/memmove")
8308 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
8309 not widely-known, sometimes misused, and so programs that use Bigstrings are
8310 slower than they have to be. And even if a library got that part right and
8311 exposed the intrinsics properly, the compiler doesn't have any fast blits
8312 between Bigstrings and other string-like types. @code{bigstringaf} provides
8313 these missing pieces.")
8314 (license license:bsd-3)))
8316 (define-public ocaml-trie
8320 (home-page "https://github.com/kandu/trie/")
8327 (file-name (git-file-name name version))
8329 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
8330 (build-system dune-build-system)
8332 '(#:tests? #f)) ;no tests
8333 (synopsis "Strict impure trie tree")
8335 "This module implements strict impure trie tree data structure for
8337 (license license:expat)))
8339 (define-public ocaml-mew
8343 (home-page "https://github.com/kandu/mew")
8350 (file-name (git-file-name name version))
8352 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
8353 (build-system dune-build-system)
8355 (list ocaml-result ocaml-trie))
8357 (list ocaml-ppx-expect))
8358 (synopsis "General modal editing engine generator")
8360 "This package provides the core modules of Modal Editing Witch, a general
8361 modal editing engine generator.")
8362 (license license:expat)))
8364 (define-public ocaml-mew-vi
8366 (name "ocaml-mew-vi")
8368 (home-page "https://github.com/kandu/mew_vi")
8375 (file-name (git-file-name name version))
8377 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
8378 (build-system dune-build-system)
8380 (list ocaml-mew ocaml-react))
8382 (list ocaml-ppx-expect))
8383 (properties `((upstream-name . "mew_vi")))
8384 (synopsis "Modal editing VI-like editing engine generator")
8385 (description "This module provides a vi-like modal editing engine
8387 (license license:expat)))
8389 (define-public ocaml-syntax-shims
8391 (name "ocaml-syntax-shims")
8393 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
8400 (file-name (git-file-name name version))
8403 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
8404 (build-system dune-build-system)
8406 `((upstream-name . "ocaml-syntax-shims")))
8408 "Backport new syntax to older OCaml versions")
8410 "This package backports new language features such as @code{let+} to older
8412 (license license:expat)))
8414 (define-public ocaml-angstrom
8416 (name "ocaml-angstrom")
8418 (home-page "https://github.com/inhabitedtype/angstrom")
8425 (file-name (git-file-name name version))
8428 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
8429 (build-system dune-build-system)
8431 ;; Only build the base angstrom package.
8432 '(#:package "angstrom"
8435 (list ocaml-bigstringaf))
8437 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
8438 (synopsis "Parser combinators built for speed and memory-efficiency")
8440 "Angstrom is a parser-combinator library that makes it easy to write
8441 efficient, expressive, and reusable parsers suitable for high-performance
8442 applications. It exposes monadic and applicative interfaces for composition,
8443 and supports incremental input through buffered and unbuffered interfaces.
8444 Both interfaces give the user total control over the blocking behavior of
8445 their application, with the unbuffered interface enabling zero-copy IO.
8446 Parsers are backtracking by default and support unbounded lookahead.")
8447 (license license:bsd-3)))
8449 (define-public ocaml-graphics
8451 (name "ocaml-graphics")
8453 (home-page "https://github.com/ocaml/graphics")
8460 (file-name (git-file-name name version))
8463 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
8464 (build-system dune-build-system)
8467 (synopsis "The OCaml graphics library")
8469 "The graphics library provides a set of portable drawing primitives.
8470 Drawing takes place in a separate window that is created when
8471 Graphics.open_graph is called. This library used to be distributed with OCaml
8473 (license license:lgpl2.1+)))
8475 (define-public ocaml-uri-sexp
8478 (name "ocaml-uri-sexp")
8480 '(#:package "uri-sexp"
8483 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
8484 (native-inputs (list ocaml-ounit))
8485 (synopsis "RFC3986 URI/URL parsing library")
8486 (description "This package adds S-exp support to @code{ocaml-uri}.")))
8488 (define-public ocaml-cohttp
8490 (name "ocaml-cohttp")
8496 (url "https://github.com/mirage/ocaml-cohttp")
8497 (commit (string-append "v" version))))
8498 (file-name (git-file-name name version))
8501 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
8502 (build-system dune-build-system)
8504 '(#:package "cohttp"
8505 #:test-target "cohttp_test/src"))
8515 (list ocaml-fmt ocaml-jsonm ocaml-alcotest))
8516 (home-page "https://github.com/mirage/ocaml-cohttp")
8517 (synopsis "OCaml library for HTTP clients and servers")
8519 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
8520 HTTP parser, and implementations using various asynchronous programming
8522 (license license:isc)))
8524 (define-public js-of-ocaml
8526 (name "js-of-ocaml")
8532 (url "https://github.com/ocsigen/js_of_ocaml")
8534 (file-name (git-file-name name version))
8536 (base32 "0iyhl9z57j53j2jvyqcwmxhbvy23l6g80aa0abmlgwam14yskspf"))))
8537 (build-system dune-build-system)
8539 `(#:tests? #f ;tests assume ocaml 4.13
8555 (list node ocaml-ppx-expect ocaml-num))
8556 (properties `((upstream-name . "js_of_ocaml")))
8557 (home-page "https://ocsigen.org/js_of_ocaml/")
8558 (synopsis "Compiler from OCaml bytecode to Javascript")
8559 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
8560 It makes it possible to run pure OCaml programs in JavaScript environment like
8561 browsers and Node.js.")
8562 (license license:lgpl2.1+)))
8564 (define-public ocaml-afl-persistent
8566 (name "ocaml-afl-persistent")
8572 (url "https://github.com/stedolan/ocaml-afl-persistent")
8573 (commit (string-append "v" version))))
8574 (file-name (git-file-name name version))
8577 "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
8578 (build-system ocaml-build-system)
8581 (modify-phases %standard-phases
8585 (invoke "./build.sh")))
8586 ;; XXX: The tests are already run in the build.sh script.
8590 (home-page "https://github.com/stedolan/ocaml-afl-persistent")
8591 (synopsis "Use afl-fuzz in persistent mode")
8593 "afl-fuzz normally works by repeatedly forking the program being tested.
8594 Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
8595 repeated forking and is much faster.")
8596 (license license:expat)))
8598 (define-public ocaml-pprint
8600 (name "ocaml-pprint")
8601 (version "20220103")
8602 (home-page "https://github.com/fpottier/pprint")
8609 (file-name (git-file-name name version))
8612 "09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"))))
8613 (build-system dune-build-system)
8614 (synopsis "OCaml pretty-printing combinator library and rendering
8616 (description "This OCaml library offers a set of combinators for building
8617 so-called documents as well as an efficient engine for converting documents to
8618 a textual, fixed-width format. The engine takes care of indentation and line
8619 breaks, while respecting the constraints imposed by the structure of the
8620 document and by the text width.")
8621 (license license:lgpl2.0)))
8623 (define-public ocaml-crowbar
8625 (name "ocaml-crowbar")
8627 (home-page "https://github.com/stedolan/crowbar")
8633 (commit (string-append "v" version))))
8634 (file-name (git-file-name name version))
8637 "11f3kiw58g8njx15akx16xcplzvzdw9y6c4jpyfxylkxws4g0f6j"))))
8638 (build-system dune-build-system)
8640 `(#:test-target "."))
8642 (list ocaml-ocplib-endian
8644 ocaml-afl-persistent))
8646 (list ocaml-calendar
8652 (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
8653 (description "Crowbar is a library for testing code, combining
8654 QuickCheck-style property-based testing and the magical bug-finding powers of
8655 @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
8656 (license license:expat)))
8658 (define-public ocaml-eqaf
8662 (home-page "https://github.com/mirage/eqaf")
8668 (commit (string-append "v" version))))
8669 (file-name (git-file-name name version))
8672 "16ics56wiqyng70dy2hqikicm8ag1mv5w1h7hkiwvydw1x2j2rsl"))))
8673 (build-system dune-build-system)
8674 (propagated-inputs (list ocaml-cstruct))
8675 (native-inputs (list ocaml-alcotest ocaml-crowbar))
8676 (synopsis "OCaml library for constant-time equal function on string")
8677 (description "This OCaml library provides an equal function on string in
8678 constant-time to avoid timing-attack with crypto stuff.")
8679 (license license:expat)))
8681 (define-public ocaml-digestif
8683 (name "ocaml-digestif")
8685 (home-page "https://github.com/mirage/digestif")
8691 (commit (string-append "v" version))))
8692 (file-name (git-file-name name version))
8695 "0mc233d63y04jznsn3bxncgv7fkvyngbv6hcka412iq0y3x4qsmq"))))
8696 (build-system dune-build-system)
8697 (propagated-inputs (list ocaml-eqaf))
8707 (synopsis "Simple hash algorithms in OCaml")
8709 "Digestif is an OCaml library that provides implementations of hash
8710 algorithms. Implemented hash algorithms include MD5, SHA1, SHA224, SHA256,
8711 SHA384, SHA512, Blake2b, Blake2s and RIPEMD160.")
8712 (license license:expat)))
8714 (define-public ocaml-bibtex2html
8716 (name "ocaml-bibtex2html")
8721 (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
8722 (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
8723 (build-system ocaml-build-system)
8726 (modify-phases %standard-phases
8727 (add-after 'unpack 'patch-/bin/sh
8729 (substitute* "configure" (("/bin/sh") (which "bash")))
8730 (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
8734 ("texlive" ,(texlive-updmap.cfg
8735 (list texlive-fonts-ec texlive-preprint
8736 texlive-hyperref texlive-bibtex)))))
8739 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
8740 (synopsis "BibTeX to HTML translator")
8741 (description "This package allows you to produce, from a set of
8742 bibliography files in BibTeX format, a bibliography in HTML format.")
8743 (license license:gpl2)))