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>
29 ;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
31 ;;; This file is part of GNU Guix.
33 ;;; GNU Guix is free software; you can redistribute it and/or modify it
34 ;;; under the terms of the GNU General Public License as published by
35 ;;; the Free Software Foundation; either version 3 of the License, or (at
36 ;;; your option) any later version.
38 ;;; GNU Guix is distributed in the hope that it will be useful, but
39 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
40 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41 ;;; GNU General Public License for more details.
43 ;;; You should have received a copy of the GNU General Public License
44 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
46 (define-module (gnu packages ocaml)
47 #:use-module (gnu packages)
48 #:use-module (gnu packages algebra)
49 #:use-module (gnu packages autotools)
50 #:use-module (gnu packages base)
51 #:use-module (gnu packages bash)
52 #:use-module (gnu packages bison)
53 #:use-module (gnu packages boost)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages curl)
56 #:use-module (gnu packages emacs)
57 #:use-module (gnu packages emacs-xyz)
58 #:use-module (gnu packages flex)
59 #:use-module (gnu packages gcc)
60 #:use-module (gnu packages ghostscript)
61 #:use-module (gnu packages glib)
62 #:use-module (gnu packages gnome)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages libevent)
66 #:use-module (gnu packages libffi)
67 #:use-module (gnu packages llvm)
68 #:use-module (gnu packages m4)
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages multiprecision)
71 #:use-module (gnu packages ncurses)
72 #:use-module (gnu packages node)
73 #:use-module (gnu packages pcre)
74 #:use-module (gnu packages perl)
75 #:use-module (gnu packages pkg-config)
76 #:use-module (gnu packages protobuf)
77 #:use-module (gnu packages python)
78 #:use-module (gnu packages python-xyz)
79 #:use-module (gnu packages rsync)
80 #:use-module (gnu packages sdl)
81 #:use-module (gnu packages sqlite)
82 #:use-module (gnu packages tex)
83 #:use-module (gnu packages texinfo)
84 #:use-module (gnu packages time)
85 #:use-module (gnu packages tls)
86 #:use-module (gnu packages version-control)
87 #:use-module (gnu packages virtualization)
88 #:use-module (gnu packages web)
89 #:use-module (gnu packages web-browsers)
90 #:use-module (gnu packages xml)
91 #:use-module (gnu packages xorg)
92 #:use-module (guix build-system dune)
93 #:use-module (guix build-system emacs)
94 #:use-module (guix build-system gnu)
95 #:use-module (guix build-system ocaml)
96 #:use-module (guix download)
97 #:use-module (guix gexp)
98 #:use-module (guix git-download)
99 #:use-module ((guix licenses) #:prefix license:)
100 #:use-module (guix packages)
101 #:use-module (guix svn-download)
102 #:use-module (guix utils)
103 #:use-module ((srfi srfi-1) #:hide (zip)))
105 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
106 ;; their number, not their name.
107 (define (ocaml-forge-uri name version file-number)
108 (string-append "https://forge.ocamlcore.org/frs/download.php/"
109 (number->string file-number) "/" name "-" version
112 (define (janestreet-origin name version hash)
113 (origin (method url-fetch)
114 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
115 (version-major+minor version) "/files/"
116 name "-v" (version-major+minor+point version)
118 (sha256 (base32 hash))))
120 (define-public camlboot
121 (let ((commit "45045d0afa82f7e9b7ea07314aab08be2d3cd64b")
125 (version (git-version "0.0.0" revision commit))
129 (url "https://github.com/Ekdohibs/camlboot")
132 (file-name (git-file-name name version))
135 "1f5gl3hzvixbgk0v3kmxiyn432znyy3jh5fa65cfzcaxzgfv1i1c"))
136 (modules '((guix build utils)))
139 ;; Remove bootstrap binaries and pre-generated source files,
140 ;; to ensure we actually bootstrap properly.
141 (for-each delete-file (find-files "ocaml-src" "^.depend$"))
142 (delete-file "ocaml-src/boot/ocamlc")
143 (delete-file "ocaml-src/boot/ocamllex")
147 (chmod file (logior (stat:mode (stat file)) #o200)))
148 (find-files "." "."))))))
149 (build-system gnu-build-system)
151 `(#:make-flags (list "_boot/ocamlc") ; build target
152 #:tests? #f ; no tests
154 (modify-phases %standard-phases
156 (add-before 'build 'no-autocompile
158 ;; prevent a guile warning
159 (setenv "GUILE_AUTO_COMPILE" "0")))
161 (lambda* (#:key outputs #:allow-other-keys)
162 (let* ((out (assoc-ref outputs "out"))
163 (bin (string-append out "/bin")))
165 (install-file "_boot/ocamlc" bin)
166 (rename-file "miniml/interp/lex.byte" "ocamllex")
167 (install-file "ocamllex" bin)))))))
171 ;; 10 hours, mostly for arm, more than 1 expected even on x86_64
172 `((max-silent-time . 36000)))
173 (home-page "https://github.com/Ekdohibs/camlboot")
174 (synopsis "OCaml source bootstrap")
175 (description "OCaml is written in OCaml. Its sources contain a pre-compiled
176 bytecode version of @command{ocamlc} and @command{ocamllex} that are used to
177 build the next version of the compiler. Camlboot implements a bootstrap for
178 the OCaml compiler and provides a bootstrapped equivalent to these files.
180 It contains a compiler for a small subset of OCaml written in Guile Scheme,
181 an interpreter for OCaml written in that subset and a manually-written lexer
182 for OCaml. These elements eliminate the need for the binary bootstrap in
183 OCaml and can effectively bootstrap OCaml 4.07.
185 This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
186 (license license:expat))))
188 (define-public ocaml-4.14
195 "http://caml.inria.fr/pub/distrib/ocaml-"
196 (version-major+minor version)
197 "/ocaml-" version ".tar.xz"))
200 "0axcc7c23pf4qinz4vxgkba6pwziwbp9i2ydwzar7x9zlp6diarn"))))
201 (build-system gnu-build-system)
203 (list (search-path-specification
204 (variable "OCAMLPATH")
205 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
206 (search-path-specification
207 (variable "CAML_LD_LIBRARY_PATH")
208 (files (list "lib/ocaml/site-lib/stubslibs"
209 "lib/ocaml/site-lib/stublibs")))))
211 (list perl pkg-config))
213 (list libx11 libiberty ;needed for objdump support
214 zlib)) ;also needed for objdump support
216 `(#:configure-flags '("--enable-ocamltest")
217 #:test-target "tests"
218 #:make-flags '("world.opt")
220 (modify-phases %standard-phases
221 (add-after 'unpack 'patch-/bin/sh-references
222 (lambda* (#:key inputs #:allow-other-keys)
223 (let* ((sh (search-input-file inputs "/bin/sh"))
224 (quoted-sh (string-append "\"" sh "\"")))
225 (with-fluids ((%default-port-encoding #f))
231 (format (current-error-port) "\
232 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
235 (find-files "." "\\.ml$")))))))))
236 (home-page "https://ocaml.org/")
237 (synopsis "The OCaml programming language")
239 "OCaml is a general purpose industrial-strength programming language with
240 an emphasis on expressiveness and safety. Developed for more than 20 years at
241 Inria it benefits from one of the most advanced type systems and supports
242 functional, imperative and object-oriented styles of programming.")
243 ;; The compiler is distributed under qpl1.0 with a change to choice of
244 ;; law: the license is governed by the laws of France. The library is
245 ;; distributed under lgpl2.0.
246 (license (list license:qpl license:lgpl2.0))))
248 (define-public ocaml-4.09
255 "http://caml.inria.fr/pub/distrib/ocaml-"
256 (version-major+minor version)
257 "/ocaml-" version ".tar.xz"))
258 (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
261 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
264 (modify-phases %standard-phases
265 (add-after 'unpack 'patch-/bin/sh-references
266 (lambda* (#:key inputs #:allow-other-keys)
267 (let* ((sh (search-input-file inputs "/bin/sh"))
268 (quoted-sh (string-append "\"" sh "\"")))
269 (with-fluids ((%default-port-encoding #f))
275 (format (current-error-port) "\
276 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
279 (find-files "." "\\.ml$"))))))
282 (invoke "make" "-j" (number->string (parallel-job-count))
286 (with-directory-excursion "testsuite"
287 (invoke "make" "all")))))))))
289 ;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot,
290 ;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
291 ;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files
292 ;; that we otherwise remove for bootstrap purposes.
293 (define ocaml-4.07-boot
301 "http://caml.inria.fr/pub/distrib/ocaml-"
302 (version-major+minor version)
303 "/ocaml-" version ".tar.xz"))
306 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
307 (patches (search-patches "ocaml-multiple-definitions.patch"))
308 (modules '((guix build utils)))
311 ;; Remove bootstrap binaries and pre-generated source files,
312 ;; to ensure we actually bootstrap properly.
313 (for-each delete-file (find-files "." "^.depend$"))
314 (delete-file "boot/ocamlc")
315 (delete-file "boot/ocamllex")))))
319 (modify-phases %standard-phases
320 (add-before 'configure 'copy-bootstrap
321 (lambda* (#:key inputs #:allow-other-keys)
322 (let ((camlboot (assoc-ref inputs "camlboot")))
323 (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex")
324 (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc")
325 (chmod "boot/ocamllex" #o755)
326 (chmod "boot/ocamlc" #o755))))
328 (lambda* (#:key outputs #:allow-other-keys)
329 (let* ((out (assoc-ref outputs "out"))
330 (mandir (string-append out "/share/man")))
331 (invoke "./configure"
333 "--mandir" mandir))))
335 (lambda* (#:key parallel-build? #:allow-other-keys)
336 (define* (make . args)
338 (append (if parallel-build?
339 `("-j" ,(number->string (parallel-job-count)))
342 ;; create empty .depend files because they are included by various
343 ;; Makefiles, and they have no rule to generate them.
344 (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend"
345 "tools/.depend" "lex/.depend" "asmrun/.depend"
346 "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend"
347 "ocamldoc/stdlib_non_prefixed/.depend"
348 "otherlibs/bigarray/.depend" "otherlibs/graph/.depend"
349 "otherlibs/raw_spacetime_lib/.depend" "otherlibs/str/.depend"
350 "otherlibs/systhreads/.depend" "otherlibs/threads/.depend"
351 "otherlibs/unix/.depend" "otherlibs/win32unix/.depend")
352 ;; We cannot build ocamldep until we have created all the .depend
353 ;; files, so replace it with ocamlc -depend.
354 (substitute* "tools/Makefile"
355 (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend"))
356 (substitute* '("otherlibs/graph/Makefile"
357 "otherlibs/systhreads/Makefile"
358 "otherlibs/threads/Makefile"
359 "otherlibs/unix/Makefile")
360 (("\\$\\(CAMLRUN\\) ../../tools/ocamldep")
361 "../../boot/ocamlc -depend"))
362 (substitute* '("otherlibs/bigarray/Makefile"
363 "otherlibs/raw_spacetime_lib/Makefile"
364 "otherlibs/str/Makefile"
365 "otherlibs/win32unix/Makefile")
366 (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep")
367 "../../boot/ocamlc -depend"))
368 ;; Ensure we copy needed file, so we can generate a proper .depend
369 (substitute* "ocamldoc/Makefile"
370 (("include Makefile.unprefix")
371 "include Makefile.unprefix
372 depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
373 ;; Generate required tools for `alldepend'
374 (make "-C" "byterun" "depend")
375 (make "-C" "byterun" "all")
376 (copy-file "byterun/ocamlrun" "boot/ocamlrun")
378 (copy-file "yacc/ocamlyacc" "boot/ocamlyacc")
379 (make "-C" "stdlib" "sys.ml")
380 (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend")
381 ;; Build and copy files later used by `tools'
382 (make "-C" "stdlib" "COMPILER="
383 "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives"
387 (copy-file file (string-append "boot/" (basename file))))
388 (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader"
389 (find-files "stdlib" ".*.cmi$")))
390 (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a")
391 ;; required for ocamldoc/stdlib_non_prefixed
392 (make "parsing/parser.mli")
393 ;; required for dependencies
395 "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .."
396 "make_opcodes" "cvt_emit")
397 ;; generate all remaining .depend files
399 (string-append "ocamllex=" (getcwd) "/boot/ocamlrun "
400 (getcwd) "/boot/ocamllex")
401 (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend")
402 (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend")
403 (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend"))
405 (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives"
409 "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives"
412 (lambda* (#:key outputs #:allow-other-keys)
413 (let* ((out (assoc-ref outputs "out"))
414 (bin (string-append out "/bin"))
415 (depends (string-append out "/share/depends")))
418 (install-file "ocamlc" bin)
419 (install-file "lex/ocamllex" bin)
422 (let ((dir (string-append depends "/" (dirname file))))
424 (install-file file dir)))
425 (find-files "." "^\\.depend$"))))))))
427 `(("camlboot" ,camlboot)
429 ("pkg-config" ,pkg-config)))))
431 (define-public ocaml-4.07
433 (inherit ocaml-4.07-boot)
436 (substitute-keyword-arguments (package-arguments ocaml-4.09)
438 `(modify-phases ,phases
439 (add-before 'configure 'copy-bootstrap
440 (lambda* (#:key inputs #:allow-other-keys)
441 (let ((ocaml (assoc-ref inputs "ocaml")))
442 (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex")
443 (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc")
444 (chmod "boot/ocamllex" #o755)
445 (chmod "boot/ocamlc" #o755)
446 (let ((rootdir (getcwd)))
447 (with-directory-excursion (string-append ocaml "/share/depends")
450 (copy-file file (string-append rootdir "/" file)))
451 (find-files "." ".")))))))
453 (lambda* (#:key outputs #:allow-other-keys)
454 (let* ((out (assoc-ref outputs "out"))
455 (mandir (string-append out "/share/man")))
456 ;; Custom configure script doesn't recognize
457 ;; --prefix=<PREFIX> syntax (with equals sign).
458 (invoke "./configure"
460 "--mandir" mandir))))))))
462 `(("ocaml" ,ocaml-4.07-boot)
464 ("pkg-config" ,pkg-config)))))
466 (define-public ocaml ocaml-4.14)
468 (define-public ocamlbuild
476 (url "https://github.com/ocaml/ocamlbuild")
478 (file-name (git-file-name name version))
480 (base32 "16q8s22msyfq66i1sbz99wj04a9x9ad95x458ixxacxsv0qqh2j0"))))
481 (build-system ocaml-build-system)
484 ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
485 (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
486 (string-append "OCAMLBUILD_LIBDIR=" #$output
487 "/lib/ocaml/site-lib")
488 (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
490 (modify-phases %standard-phases
492 ; some failures because of changes in OCaml's error message formating
494 (home-page "https://github.com/ocaml/ocamlbuild")
495 (synopsis "OCaml build tool")
496 (description "OCamlbuild is a generic build tool, that has built-in rules
497 for building OCaml library and programs.")
498 (license license:lgpl2.1+)))
500 (define-public camlidl
508 (url "https://github.com/xavierleroy/camlidl")
509 (commit "camlidl109")))
511 (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))
512 (file-name (git-file-name name version))))
513 (build-system gnu-build-system)
515 `(#:tests? #f ;; No test suite
519 "BINDIR=" (assoc-ref %outputs "out") "/bin")
521 "OCAMLLIB=" (assoc-ref %outputs "out") "/lib/ocaml/site-lib/camlidl"))
523 (modify-phases %standard-phases
527 (copy-file "config/Makefile.unix" "config/Makefile")
528 ;; Note: do not pass '-jN' as this appears to not be
529 ;; parallel-safe (race condition related to libcamlidl.a).
530 (invoke "make" "all")
532 (add-before 'install 'create-target-directories
533 (lambda* (#:key outputs #:allow-other-keys)
534 (let ((out (string-append (assoc-ref outputs "out"))))
536 (string-append out "/bin"))
538 (string-append out "/lib/ocaml/site-lib/camlidl/stublibs"))
540 (string-append out "/lib/ocaml/site-lib/camlidl/caml")))
542 (add-after 'install 'install-meta
543 (lambda* (#:key outputs #:allow-other-keys)
544 (let ((out (assoc-ref outputs "out")))
546 (string-append out "/lib/ocaml/site-lib/camlidl/META")
550 "description = \"Stub code generator for OCaml/C interface\"
551 version = \"" ,version "\"
553 archive(byte) = \"com.cma\"
554 archive(native) = \"com.cmxa\"")))))
558 (home-page "https://github.com/xavierleroy/camlidl")
559 (synopsis "Stub code generator for OCaml/C interface")
561 "Camlidl is a stub code generator for Objective Caml. It generates stub
562 code for interfacing Caml with C from an IDL description of the C functions.")
563 (license license:lgpl2.1)))
565 (define-public ocaml-extlib
567 (name "ocaml-extlib")
571 (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
572 "extlib-" version ".tar.gz"))
575 "1jydzw2n84cfiz9y6lk4gih4wbr8jybanmiryfs01svd07g4vpjq"))))
576 (build-system ocaml-build-system)
579 (modify-phases %standard-phases
580 (delete 'configure))))
583 (home-page "https://github.com/ygrek/ocaml-extlib")
584 (synopsis "Complete and small extension for OCaml standard library")
585 (description "This library adds new functions to OCaml standard library
586 modules, modifies some functions in order to get better performances or
587 safety (tail-recursive) and also provides new modules which should be useful
588 for day to day programming.")
589 ;; With static-linking exception
590 (license license:lgpl2.1+)))
592 (define-public ocaml-cudf
599 (url "https://gitlab.com/irill/cudf")
600 (commit (string-append "v" version))))
601 (file-name (git-file-name name version))
604 "1lvrmpscbk1kjv5ag5bzlzv520xk5zw2haf6q7chvz98gcm9g0hk"))))
605 (build-system dune-build-system)
607 '(#:test-target "."))
608 (propagated-inputs (list ocaml-extlib))
609 (native-inputs (list ocaml-ounit2))
610 (home-page "https://www.mancoosi.org/cudf/")
611 (synopsis "CUDF library (part of the Mancoosi tools)")
613 "@acronym{CUDF, Common Upgradeability Description Format} is a format for
614 describing upgrade scenarios in package-based software distributions.")
615 ;; With static-linking exception
616 (license license:lgpl2.1+)))
618 (define-public ocaml-mccs
625 (url "https://github.com/AltGr/ocaml-mccs")
627 (file-name (git-file-name name version))
630 "17bvm0jhhs8h3p5sbb65asj53a8sxl634cc0kvcivpams74837zq"))))
631 (build-system dune-build-system)
632 (propagated-inputs (list ocaml-cudf))
633 (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
634 (synopsis "Upgrade path problem solver")
635 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
636 Mccs take as input a CUDF problem and computes the best solution according to
637 a set of criteria. It relies on a Integer Programming solver or a
638 Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
639 underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
643 ;; With static-linking exception
646 (define-public ocaml-dose3
653 (url "https://gitlab.com/irill/dose3")
655 (file-name (git-file-name name version))
658 "0dxkw37gj8z45kd0dnrlfgpj8yycq0dphs8kjm9kvq9xc8rikxp3"))
661 "ocaml-dose3-add-unix-dependency.patch"
662 "ocaml-dose3-Fix-for-ocaml-4.06.patch"
663 "ocaml-dose3-dont-make-printconf.patch"
664 "ocaml-dose3-Install-mli-cmx-etc.patch"))))
665 (build-system ocaml-build-system)
667 `(#:tests? #f ;the test suite requires python 2
669 ,#~(list (string-append "SHELL="
670 #+(file-append (canonical-package bash-minimal)
673 ,#~(list (string-append "LIBDIR=" #$output "/lib/ocaml/site-lib"))))
675 (list ocaml-graph ocaml-cudf ocaml-extlib ocaml-re))
681 (home-page "https://www.mancoosi.org/software/")
682 (synopsis "Package distribution management framework")
683 (description "Dose3 is a framework made of several OCaml libraries for
684 managing distribution packages and their dependencies. Though not tied to
685 any particular distribution, dose3 constitutes a pool of libraries which
686 enable analyzing packages coming from various distributions. Besides basic
687 functionalities for querying and setting package properties, dose3 also
688 implements algorithms for solving more complex problems such as monitoring
689 package evolutions, correct and complete dependency resolution and
690 repository-wide uninstallability checks.")
691 ;; with static-linking exception
692 (license license:lgpl2.1+)))
694 (define-public ocaml-down
701 (uri (string-append "https://erratique.ch/software/down/releases/down-"
705 "1q467y6qz96ndiybpmggdcnrcip49kxw2i93pb54j1xjzkv1vnl1"))))
706 (build-system ocaml-build-system)
708 `(#:tests? #f ;no tests
710 (modify-phases %standard-phases
713 ,#~(list "build" "--lib-dir"
714 (string-append #$output "/lib/ocaml/site-lib"))))
716 (list ocaml-findlib ocamlbuild ocaml-topkg opam))
717 (home-page "https://erratique.ch/software/down")
718 (synopsis "OCaml toplevel (REPL) upgrade")
719 (description "Down is an unintrusive user experience upgrade for the
720 @command{ocaml} toplevel (REPL).
722 Simply load the zero dependency @code{down} library in the @command{ocaml}
723 toplevel and you get line edition, history, session support and identifier
724 completion and documentation with @command{ocp-index}.
726 Add this to your @file{~/.ocamlinit}:
732 You may also need to add this to your @file{~/.ocamlinit} and declare
733 the environment variable @code{OCAML_TOPLEVEL_PATH}:
737 try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
744 let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
745 |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
746 |> List.map (fun x -> x ^ \"/toplevel\")
747 (* remove the line below if you don't want to see the text
748 every time you start the toplevel *)
749 |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
750 |> List.iter Topdirs.dir_directory;;
752 (license license:isc)))
754 (define-public ocaml-opam-file-format
756 (name "ocaml-opam-file-format")
761 (url "https://github.com/ocaml/opam-file-format")
763 (file-name (git-file-name name version))
766 "0dmnb1mqdy4913f9ma446hi5m99q7hfibj6j0m8x2wsfnfy2fw62"))))
767 (build-system ocaml-build-system)
769 `(#:tests? #f; No tests
770 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
771 "/lib/ocaml/site-lib"))
773 (modify-phases %standard-phases
774 (delete 'configure))))
775 (home-page "https://opam.ocaml.org")
776 (synopsis "Parser and printer for the opam file syntax")
777 (description "This package contains a parser and a pretty-printer for
778 the opam file format.")
779 ;; With static-linking exception
780 (license license:lgpl2.1+)))
789 (url "https://github.com/ocaml/opam")
791 (file-name (git-file-name name version))
794 "1mw535zsw7xlvpgwnk1dan76z3f7lh5imlg0s6kdyhfg0iqisjd7"))))
795 (build-system dune-build-system)
799 (modify-phases %standard-phases
800 (add-before 'build 'pre-build
801 (lambda* (#:key inputs make-flags #:allow-other-keys)
802 (let ((bash (assoc-ref inputs "bash"))
803 (bwrap (search-input-file inputs "/bin/bwrap")))
804 (substitute* "src/core/opamSystem.ml"
806 (string-append "\"" bash "/bin/sh\""))
809 ;; Use bwrap from the store directly.
810 (substitute* "src/state/shellscripts/bwrap.sh"
811 (("-v bwrap") (string-append "-v " bwrap))
812 (("exec bwrap") (string-append "exec " bwrap))
813 ;; Mount /gnu and /run/current-system in the
814 ;; isolated environment when building with opam.
815 ;; This is necessary for packages to find external
816 ;; dependencies, such as a C compiler, make, etc...
817 (("^add_sys_mounts /usr")
818 (string-append "add_sys_mounts "
820 " /run/current-system /usr")))
821 (substitute* "src/client/opamInitDefaults.ml"
822 (("\"bwrap\"") (string-append "\"" bwrap "\""))))))
823 (add-before 'check 'prepare-checks
824 (lambda* (#:key inputs #:allow-other-keys)
825 ;; Opam tests need to run an isolated environment from a writable
827 (mkdir-p "test-home")
828 (setenv "HOME" (string-append (getcwd) "/test-home"))
829 (with-output-to-file (string-append (getcwd) "/test-home/.gitconfig")
832 email = guix@localhost.none
833 name = Guix Builder")
836 ;; Opam tests require data from opam-repository. Instead of
837 ;; downloading them with wget from the guix environment, copy the
838 ;; content to the expected directory.
839 (substitute* "tests/reftests/dune.inc"
840 (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
841 (string-append "rmdir %{targets}) (run cp -r "
842 (assoc-ref inputs (string-append "opam-repo-" commit))
843 "/ %{targets}) (run chmod +w -R %{targets}"))
844 (("wget[^)]*") "touch %{targets}")
845 ;; Disable a failing test because it tries to clone a git
846 ;; repository from inside bwrap
847 (("diff upgrade-format.test upgrade-format.out") "run true")
848 ;; Disable a failing test because it tries to figure out which
849 ;; distro this is, and it doesn't know Guix
850 (("diff pin.unix.test pin.unix.out") "run true")
851 ;; Disable a failing test because of a failed expansion
852 (("diff opamroot-versions.test opamroot-versions.out") "run true")
853 ;; Disable a failing test, probably because the repository we
854 ;; replaced is not as expected
855 (("diff opamrt-big-upgrade.test opamrt-big-upgrade.out") "run true"))
856 (substitute* "tests/reftests/dune"
857 ;; Because of our changes to the previous file, we cannot check
858 ;; it can be regenerated
859 (("diff dune.inc dune.inc.gen") "run true"))
860 ;; Ensure we can run the generated build.sh (no /bin/sh)
861 (substitute* '("tests/reftests/legacy-local.test"
862 "tests/reftests/legacy-git.test")
865 (search-input-file inputs "/bin/sh"))))
866 (substitute* "tests/reftests/testing-env"
868 (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
869 (assoc-ref inputs "libc") "/lib"))))))))
871 (let ((opam-repo (lambda (commit hash)
875 (url "https://github.com/ocaml/opam-repository")
877 (file-name (git-file-name "opam-repo" commit))
878 (sha256 (base32 hash))))))
880 ("ocaml-cppo" ,ocaml-cppo)
885 ("python" ,python-wrapper)
891 ("opam-repo-009e00fa" ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2"
892 "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
893 ("opam-repo-7090735c" ,(opam-repo "7090735c9d1dd2dc481c4128c5ef4d3667238f15"
894 "1bccsgjhlp64lmvfjfn6viywf3x73ji75myg9ssf1ij1fkmabn0z"))
895 ("opam-repo-a5d7cdc0" ,(opam-repo "a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd"
896 "0z7kawqisy07088p5xjxwpvmvzlbj1d9cgdipsj90yx7nc5qh369"))
897 ("opam-repo-ad4dd344" ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
898 "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
899 ("opam-repo-c1d23f0e" ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0"
900 "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii"))
901 ("opam-repo-f372039d" ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701"
902 "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
904 (list ocaml ncurses curl bubblewrap))
906 (list ocaml-cmdliner ocaml-dose3 ocaml-mccs ocaml-opam-file-format
908 (home-page "http://opam.ocamlpro.com/")
909 (synopsis "Package manager for OCaml")
911 "OPAM is a tool to manage OCaml packages. It supports multiple
912 simultaneous compiler installations, flexible package constraints, and a
913 Git-friendly development workflow.")
915 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
916 (license license:lgpl3)))
918 (define-public ocaml-camlp-streams
920 (name "ocaml-camlp-streams")
926 (url "https://github.com/ocaml/camlp-streams")
927 (commit (string-append "v" version))))
928 (file-name (git-file-name name version))
930 (base32 "0r3wvffkzyyk4als78akirxanzbib5hvc3kvwxpk36mlmc38aywh"))))
931 (build-system dune-build-system)
935 (home-page "https://github.com/ocaml/camlp-streams")
936 (synopsis "Stream and Genlex libraries for use with Camlp4 and Camlp5")
938 "This package provides two library modules:
941 @item Stream: imperative streams, with in-place update and memoization of
942 the latest element produced.
943 @item Genlex: a small parameterized lexical analyzer producing streams of
944 tokens from streams of characters.
947 The two modules are designed for use with Camlp4 and Camlp5: The stream
948 patterns and stream expressions of Camlp4/Camlp5 consume and produce data of
949 type 'a Stream.t. The Genlex tokenizer can be used as a simple lexical
950 analyzer for Camlp4/Camlp5-generated parsers.
952 The Stream module can also be used by hand-written recursive-descent parsers,
953 but is not very convenient for this purpose.
955 The Stream and Genlex modules have been part of the OCaml standard library for a
956 long time, and have been distributed as part of the core OCaml system. They
957 will be removed from the OCaml standard library at some future point, but will
958 be maintained and distributed separately in the camlpstreams package.")
959 (license license:lgpl2.1)))
961 (define-public camlp5
969 (url "https://github.com/camlp5/camlp5")
970 (commit (string-append "rel" version))))
971 (file-name (git-file-name name version))
973 (base32 "1fnvmaw9cland09pjx5h6w3f6fz9s23l4nbl4m9fcaa2i4dpraz6"))))
974 (build-system gnu-build-system)
976 `(#:tests? #f ; XXX TODO figure out how to run the tests
978 (modify-phases %standard-phases
980 (lambda* (#:key outputs #:allow-other-keys)
981 (let* ((out (assoc-ref outputs "out"))
982 (mandir (string-append out "/share/man")))
983 ;; Custom configure script doesn't recognize
984 ;; --prefix=<PREFIX> syntax (with equals sign).
985 (invoke "./configure"
987 "--mandir" mandir))))
988 (add-before 'build 'fix-/bin-references
990 (substitute* "config/Makefile"
995 (invoke "make" "-j" (number->string
996 (parallel-job-count))
998 ;; Required for findlib to find camlp5's libraries
999 (add-after 'install 'install-meta
1000 (lambda* (#:key outputs #:allow-other-keys)
1001 (install-file "etc/META" (string-append (assoc-ref outputs "out")
1002 "/lib/ocaml/camlp5/"))
1005 (list ocaml ocaml-camlp-streams))
1007 (list perl ocaml-findlib))
1008 (home-page "https://camlp5.github.io/")
1009 (synopsis "Pre-processor Pretty Printer for OCaml")
1011 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
1012 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
1013 concrete syntax of the language (Quotations, Syntax Extensions).")
1014 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
1015 (license (list license:bsd-3 license:qpl))))
1017 (define-public hevea
1023 (uri (string-append "http://hevea.inria.fr/old/"
1024 "hevea-" version ".tar.gz"))
1027 "1jwydkb9ldb1sx815c364dxgr569f2rbbzgxbn2kanrybpdbm2gi"))))
1028 (build-system gnu-build-system)
1034 `(#:tests? #f ; no test suite
1035 #:make-flags (list (string-append "PREFIX=" %output))
1036 #:phases (modify-phases %standard-phases
1038 (add-before 'build 'patch-/bin/sh
1040 (substitute* "_tags"
1041 (("/bin/sh") (which "sh")))
1043 (home-page "http://hevea.inria.fr/")
1044 (synopsis "LaTeX to HTML translator")
1046 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
1047 written in Objective Caml.")
1048 (license license:qpl)))
1050 (define-public ocaml-num
1058 (url "https://github.com/ocaml/num")
1059 (commit (string-append "v" version))))
1060 (file-name (git-file-name name version))
1062 (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
1063 (build-system dune-build-system)
1066 (modify-phases %standard-phases
1067 (add-after 'unpack 'fix-race
1069 ;; There's a race between bng.o and bng_generic.c. Both depend on
1070 ;; the architecture specific bng.c, but only the latter declares
1072 (mkdir-p "_build/default/src")
1075 (copy-file f (string-append "_build/default/" f)))
1076 (find-files "src" "bng_.*\\.c")))))))
1077 (home-page "https://github.com/ocaml/num")
1078 (synopsis "Arbitrary-precision integer and rational arithmetic")
1079 (description "OCaml-Num contains the legacy Num library for
1080 arbitrary-precision integer and rational arithmetic that used to be part of
1081 the OCaml core distribution.")
1082 (license license:lgpl2.1+))); with linking exception
1084 (define-public emacs-tuareg
1086 (name "emacs-tuareg")
1092 (url "https://github.com/ocaml/tuareg")
1094 (file-name (git-file-name name version))
1096 (base32 "1p3xpk78i8ywgdmc59w05wjjy9dg6gm5gicm08szmrlnx08v2ihm"))))
1097 (build-system gnu-build-system)
1100 #:imported-modules `(,@%gnu-build-system-modules
1101 (guix build emacs-build-system)
1102 (guix build emacs-utils))
1103 #:modules '((guix build gnu-build-system)
1104 ((guix build emacs-build-system) #:prefix emacs:)
1105 (guix build emacs-utils)
1108 #~(modify-phases %standard-phases
1109 (add-after 'unpack 'make-git-checkout-writable
1111 (for-each make-file-writable (find-files "."))))
1113 (add-before 'install 'fix-install-path
1115 (substitute* "Makefile"
1116 (("/emacs/site-lisp")
1117 (emacs:elpa-directory #$output)))))
1118 (add-after 'install 'post-install
1120 (symlink "tuareg.el"
1121 (string-append (emacs:elpa-directory #$output)
1122 "/tuareg-autoloads.el")))))))
1124 (list emacs-minimal opam))
1125 (home-page "https://github.com/ocaml/tuareg")
1126 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
1127 (description "Tuareg helps editing OCaml code, to highlight important
1128 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
1130 (license license:gpl2+)))
1132 (define-public ocaml-menhir
1134 (name "ocaml-menhir")
1135 (version "20220210")
1140 (url "https://gitlab.inria.fr/fpottier/menhir.git")
1142 (file-name (git-file-name name version))
1144 (base32 "0f31isr3cyiishflz6qr4xc3gp9xwf32r3vxdvm5wnr2my1fnn1n"))))
1145 (build-system dune-build-system)
1149 `(#:tests? #f)) ; No check target
1150 (properties `((ocaml4.07-variant . ,(delay (strip-ocaml4.07-variant ocaml-menhir)))))
1151 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
1152 (synopsis "Parser generator")
1153 (description "Menhir is a parser generator. It turns high-level grammar
1154 specifications, decorated with semantic actions expressed in the OCaml
1155 programming language into parsers, again expressed in OCaml. It is based on
1156 Knuth’s LR(1) parser construction technique.")
1157 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
1158 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
1159 ;; are QPL licensed.
1160 (license (list license:gpl2+ license:qpl))))
1162 (define-public ocaml-bigarray-compat
1164 (name "ocaml-bigarray-compat")
1169 (url "https://github.com/mirage/bigarray-compat")
1170 (commit (string-append "v" version))))
1171 (file-name (git-file-name name version))
1174 "0hif5baiwswdblymyfbxh9066pfqynlz5vj3b2brpn0a12k6i5fq"))))
1175 (build-system dune-build-system)
1177 `(#:tests? #f)); no tests
1178 (home-page "https://github.com/mirage/bigarray-compat")
1179 (synopsis "OCaml compatibility library")
1180 (description "This package contains a compatibility library for
1181 @code{Stdlib.Bigarray} in OCaml.")
1182 (license license:isc)))
1184 (define-public lablgtk
1191 (url "https://github.com/garrigue/lablgtk")
1193 (file-name (git-file-name name version))
1196 "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
1197 (build-system gnu-build-system)
1200 ("findlib" ,ocaml-findlib)
1201 ("pkg-config" ,pkg-config)))
1202 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
1203 ;; and gtk+-quartz-2.0 once available.
1212 `(#:tests? #f ; no check target
1214 ;; opt: also install cmxa files
1215 #:make-flags (list "all" "opt"
1216 (string-append "FINDLIBDIR="
1217 (assoc-ref %outputs "out")
1219 ;; Occasionally we would get "Error: Unbound module GtkThread" when
1220 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
1221 #:parallel-build? #f
1224 (modify-phases %standard-phases
1225 (add-before 'install 'prepare-install
1226 (lambda* (#:key inputs outputs #:allow-other-keys)
1227 (let ((out (assoc-ref outputs "out"))
1228 (ocaml (assoc-ref inputs "ocaml")))
1229 ;; Install into the output and not the ocaml directory.
1230 (mkdir-p (string-append out "/lib/ocaml"))
1231 (substitute* "config.make"
1234 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lablgtk))))
1235 (home-page "http://lablgtk.forge.ocamlcore.org/")
1236 (synopsis "GTK+ bindings for OCaml")
1238 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
1239 a strongly-typed object-oriented interface that is compatible with the
1240 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
1241 also provides bindings to
1242 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
1243 gnomeui, gtksourceview, gtkspell,
1244 libglade (and it an generate OCaml code from .glade files),
1245 libpanel, librsvg and quartz.")
1246 (license license:lgpl2.1)))
1248 (define-public ocaml4.07-lablgtk
1251 (name "ocaml4.07-lablgtk")
1253 `(("ocaml" ,ocaml-4.07)
1254 ("findlib" ,ocaml4.07-findlib)
1255 ("pkg-config" ,pkg-config)))
1258 (define-public unison
1265 (url "https://github.com/bcpierce00/unison")
1266 (commit (string-append "v" version))))
1267 (file-name (git-file-name name version))
1270 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))
1271 (patches (search-patches "unison-fix-ocaml-4.08.patch"))))
1272 (build-system gnu-build-system)
1274 "doc")) ; 1.9 MiB of documentation
1276 `(("ocaml" ,ocaml-4.09)
1277 ;; For documentation
1278 ("ghostscript" ,ghostscript)
1279 ("texlive" ,(texlive-updmap.cfg
1280 (list texlive-fonts-ec texlive-dvips-l3backend)))
1285 `(#:parallel-build? #f
1286 #:parallel-tests? #f
1287 #:test-target "selftest"
1288 #:tests? #f ; Tests require writing to $HOME.
1289 ; If some $HOME is provided, they fail with the message
1290 ; "Fatal error: Skipping some tests -- remove me!"
1292 (modify-phases %standard-phases
1294 (add-before 'install 'prepare-install
1295 (lambda* (#:key outputs #:allow-other-keys)
1296 (let* ((out (assoc-ref outputs "out"))
1297 (bin (string-append out "/bin")))
1299 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
1301 (add-after 'install 'install-fsmonitor
1302 (lambda* (#:key outputs #:allow-other-keys)
1303 (let* ((out (assoc-ref outputs "out"))
1304 (bin (string-append out "/bin")))
1305 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
1306 (install-file "src/unison-fsmonitor" bin)
1308 (add-after 'install 'install-doc
1309 (lambda* (#:key outputs #:allow-other-keys)
1310 (let ((doc (string-append (assoc-ref outputs "doc")
1311 "/share/doc/unison")))
1313 ;; Remove an '\n' that prevents the doc to be generated
1314 ;; correctly with newer hevea.
1315 (substitute* "doc/local.tex"
1316 (("----SNIP----.*") "----SNIP----"))
1317 ;; This file needs write-permissions, because it's
1318 ;; overwritten by 'docs' during documentation generation.
1319 (chmod "src/strings.ml" #o600)
1320 (invoke "make" "docs"
1321 "TEXDIRECTIVES=\\\\draftfalse")
1322 (for-each (lambda (f)
1323 (install-file f doc))
1325 (string-append "doc/unison-manual." ext))
1326 ;; Install only html documentation,
1327 ;; since the build is currently
1328 ;; non-reproducible with the ps, pdf,
1330 '(;; "ps" "pdf" "dvi"
1333 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
1334 (synopsis "File synchronizer")
1336 "Unison is a file-synchronization tool. It allows two replicas of
1337 a collection of files and directories to be stored on different hosts
1338 (or different disks on the same host), modified separately, and then
1339 brought up to date by propagating the changes in each replica
1341 (license license:gpl3+)))
1343 (define-public ocaml-findlib
1345 (name "ocaml-findlib")
1349 (uri (string-append "http://download.camlcity.org/download/"
1350 "findlib" "-" version ".tar.gz"))
1353 "0hfcwamcvinmww59b5i4yxbf0kxyzkp5qv3d1c7ybn9q52vgq463"))))
1354 (build-system gnu-build-system)
1358 `(#:tests? #f ; no test suite
1359 #:parallel-build? #f
1360 #:make-flags (list "all" "opt")
1361 #:phases (modify-phases %standard-phases
1364 (lambda* (#:key inputs outputs #:allow-other-keys)
1365 (let ((out (assoc-ref outputs "out")))
1368 "-bindir" (string-append out "/bin")
1369 "-config" (string-append out "/etc/ocamfind.conf")
1370 "-mandir" (string-append out "/share/man")
1371 "-sitelib" (string-append out "/lib/ocaml/site-lib")
1374 (lambda* (#:key outputs #:allow-other-keys)
1375 (let ((out (assoc-ref outputs "out")))
1376 (invoke "make" "install"
1377 (string-append "OCAML_CORE_STDLIB="
1378 out "/lib/ocaml/site-lib"))))))))
1379 (home-page "http://projects.camlcity.org/projects/findlib.html")
1380 (synopsis "Management tool for OCaml libraries")
1382 "The \"findlib\" library provides a scheme to manage reusable software
1383 components (packages), and includes tools that support this scheme. Packages
1384 are collections of OCaml modules for which metainformation can be stored. The
1385 packages are kept in the file system hierarchy, but with strict directory
1386 structure. The library contains functions to look the directory up that
1387 stores a package, to query metainformation about a package, and to retrieve
1388 dependency information about multiple packages. There is also a tool that
1389 allows the user to enter queries on the command-line. In order to simplify
1390 compilation and linkage, there are new frontends of the various OCaml
1391 compilers that can directly deal with packages.")
1392 (license license:x11)))
1394 (define-public ocaml4.07-findlib
1396 (inherit ocaml-findlib)
1397 (name "ocaml4.07-findlib")
1399 (list m4 ocaml-4.07))))
1401 (define-public ocaml4.09-findlib
1403 (inherit ocaml-findlib)
1404 (name "ocaml4.09-findlib")
1406 (list m4 ocaml-4.09))))
1408 (define-public ocaml-ounit2
1410 (name "ocaml-ounit2")
1415 (url "https://github.com/gildor478/ounit.git")
1416 (commit (string-append "v" version))))
1417 (file-name (git-file-name name version))
1420 "04c841hpk2yij370w30w3pis8nibnr28v74mpq2qz7z5gb8l07p1"))))
1421 (build-system dune-build-system)
1423 (list ocaml-lwt ocaml-stdlib-shims))
1424 (home-page "https://github.com/gildor478/ounit")
1425 (synopsis "Unit testing framework for OCaml")
1426 (description "OUnit2 is a unit testing framework for OCaml. It is similar
1427 to JUnit and other XUnit testing frameworks.")
1428 (license license:expat)))
1430 ;; note that some tests may hang for no obvious reason.
1431 (define-public ocaml-ounit
1433 (inherit ocaml-ounit2)
1434 (name "ocaml-ounit")
1437 (modify-phases %standard-phases
1440 (invoke "make" "install-ounit" ,(string-append "version="
1441 (package-version ocaml-ounit2))))))))
1443 (list ocaml-ounit2))
1444 (home-page "http://ounit.forge.ocamlcore.org")
1445 (synopsis "Unit testing framework for OCaml")
1446 (description "Unit testing framework for OCaml. It is similar to JUnit and
1447 other XUnit testing frameworks.")
1448 (license license:expat)))
1450 (define-public camlzip
1457 (url "https://github.com/xavierleroy/camlzip")
1458 (commit (string-append
1460 (string-join (string-split version #\.) "")))))
1461 (file-name (git-file-name name version))
1464 "16jnn3czxnvyjngnz167x5kw097k7izdqvkix8qvgvhdmgvqm89b"))))
1465 (build-system ocaml-build-system)
1470 (modify-phases %standard-phases
1471 (delete 'configure))
1472 #:install-target "install-findlib"
1474 ,#~(list "all" "allopt"
1475 (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
1476 (home-page "https://github.com/xavierleroy/camlzip")
1477 (synopsis "Provides easy access to compressed files")
1478 (description "Provides easy access to compressed files in ZIP, GZIP and
1479 JAR format. It provides functions for reading from and writing to compressed
1480 files in these formats.")
1481 (license license:lgpl2.1+)))
1483 (define-public ocamlmod
1489 (uri (ocaml-forge-uri name version 1702))
1492 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
1493 (build-system ocaml-build-system)
1495 `(("ounit" ,ocaml-ounit)
1496 ("ocamlbuild" ,ocamlbuild)))
1499 (modify-phases %standard-phases
1500 ;; Tests are done during build.
1502 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1503 (synopsis "Generate modules from OCaml source files")
1504 (description "Generate modules from OCaml source files.")
1505 (license license:lgpl2.1+))) ; with an exception
1507 (define-public ocaml-zarith
1509 (name "ocaml-zarith")
1514 (url "https://github.com/ocaml/Zarith")
1515 (commit (string-append "release-" version))))
1516 (file-name (git-file-name name version))
1519 "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"))))
1520 (build-system ocaml-build-system)
1526 `(#:tests? #f ; no test target
1528 (modify-phases %standard-phases
1530 (lambda _ (invoke "./configure")))
1531 (add-after 'install 'move-sublibs
1532 (lambda* (#:key outputs #:allow-other-keys)
1533 (let* ((out (assoc-ref outputs "out"))
1534 (lib (string-append out "/lib/ocaml/site-lib")))
1535 (mkdir-p (string-append lib "/stublibs"))
1536 (rename-file (string-append lib "/zarith/dllzarith.so")
1537 (string-append lib "/stublibs/dllzarith.so"))))))))
1538 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1539 (synopsis "Implements arbitrary-precision integers")
1540 (description "Implements arithmetic and logical operations over
1541 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1542 over big integers. Small integers are represented as Caml unboxed integers,
1543 for speed and space economy.")
1544 (license license:lgpl2.1+))) ; with an exception
1546 (define-public ocaml-frontc
1548 (name "ocaml-frontc")
1553 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1554 (commit (string-append "v" version))))
1555 (file-name (git-file-name name version))
1558 "1mi1vh4qgscnb470qwidccaqd068j1bqlz6pf6wddk21paliwnqb"))))
1559 (build-system dune-build-system)
1561 `(#:test-target "test.t"
1563 (modify-phases %standard-phases
1564 (add-after 'unpack 'make-writable
1566 (for-each make-file-writable (find-files "." ".")))))))
1568 (list ocaml-menhir ocaml-odoc))
1569 (properties `((upstream-name . "FrontC")
1570 (ocaml4.07-variant . ,(delay ocaml4.07-frontc))))
1571 (home-page "https://www.irit.fr/FrontC")
1572 (synopsis "C parser and lexer library")
1573 (description "FrontC is an OCAML library providing a C parser and lexer.
1574 The result is a syntactic tree easy to process with usual OCAML tree management.
1575 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1576 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1577 (license license:lgpl2.1)))
1579 (define-public ocaml4.07-frontc
1580 (package-with-ocaml4.07
1582 (inherit ocaml-frontc)
1587 (url "https://github.com/mirage/ocaml-base64")
1588 (commit (string-append
1589 "V_" (string-join (string-split version #\.) "_")))))
1590 (file-name (git-file-name "ocaml-frontc" version))
1593 "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
1594 (build-system ocaml-build-system)
1597 (modify-phases %standard-phases
1599 (add-after 'install 'install-meta
1600 (lambda* (#:key outputs #:allow-other-keys)
1601 (let ((out (assoc-ref outputs "out")))
1602 (with-output-to-file
1603 (string-append out "/lib/ocaml/frontc/META")
1607 "description = \"Parser for the C language\"
1608 version = \"" ,version "\"
1610 archive(byte) = \"frontc.cma\"
1611 archive(native) = \"frontc.cmxa\""))))
1612 (symlink (string-append out "/lib/ocaml/frontc")
1613 (string-append out "/lib/ocaml/FrontC"))))))
1614 #:make-flags ,#~(list (string-append "PREFIX=" #$output)
1615 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1618 (define-public ocaml-qcheck
1620 (name "ocaml-qcheck")
1626 (url "https://github.com/c-cube/qcheck")
1627 (commit (string-append "v" version))))
1628 (file-name (git-file-name name version))
1630 (base32 "0g3r8lrw6fsdphgpnp08saxyxk1vd3chpmb564ir2qnsp716vz6z"))))
1631 (build-system dune-build-system)
1633 `(#:test-target "."))
1635 (list ocaml-alcotest ocaml-ounit))
1638 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-qcheck))))
1639 (home-page "https://github.com/c-cube/qcheck")
1640 (synopsis "QuickCheck inspired property-based testing for OCaml")
1641 (description "QuickCheck inspired property-based testing for OCaml. This
1642 module checks invariants (properties of some types) over randomly
1643 generated instances of the type. It provides combinators for generating
1644 instances and printing them.")
1645 (license license:lgpl3+)))
1647 (define-public ocaml4.07-qcheck
1648 (package-with-ocaml4.07
1650 (inherit ocaml-qcheck)
1655 (url "https://github.com/c-cube/qcheck")
1657 (file-name (git-file-name "ocaml-qcheck" version))
1660 "1llnfynhlndwyjig7wrayjnds2b3mggp5lw20dwxhn2i2lkkb22m"))))
1663 (define-public ocaml-qtest
1665 (name "ocaml-qtest")
1670 (url "https://github.com/vincent-hugot/qtest/")
1671 (commit (string-append "v" version))))
1672 (file-name (git-file-name name version))
1675 "04ghjshh6104xyglm0db9kv90m62qla5f4bfrlndv6dsvgw3rdjl"))))
1676 (build-system dune-build-system)
1678 `(#:test-target "tests"))
1680 `(("ounit" ,ocaml-ounit)
1681 ("qcheck" ,ocaml-qcheck)))
1682 (home-page "https://github.com/vincent-hugot/qtest")
1683 (synopsis "Inline (Unit) Tests for OCaml")
1684 (description "Qtest extracts inline unit tests written using a special
1685 syntax in comments. Those tests are then run using the oUnit framework and the
1686 qcheck library. The possibilities range from trivial tests -- extremely simple
1687 to use -- to sophisticated random generation of test cases.")
1688 (license license:lgpl3+)))
1690 (define-public ocaml-stringext
1692 (name "ocaml-stringext")
1697 (url "https://github.com/rgrinberg/stringext")
1699 (file-name (git-file-name name version))
1702 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
1703 (build-system dune-build-system)
1705 `(#:test-target "."))
1707 `(("ocamlbuild" ,ocamlbuild)
1708 ("qtest" ,ocaml-qtest)))
1709 (home-page "https://github.com/rgrinberg/stringext")
1710 (synopsis "Extra string functions for OCaml")
1711 (description "Provides a single module named Stringext that provides a grab
1712 bag of often used but missing string functions from the stdlib. E.g, split,
1713 full_split, cut, rcut, etc..")
1714 ;; the only mention of a license in this project is in its `opam' file
1715 ;; where it says `mit'.
1716 (license license:expat)))
1718 (define dune-bootstrap
1725 (url "https://github.com/ocaml/dune")
1727 (file-name (git-file-name name version))
1730 "02zn79l7y7rvy7b6bimlf5qymrvzc43w8q7l4jx3k8wzn2g5326z"))))
1731 (build-system ocaml-build-system)
1733 `(#:tests? #f; require odoc
1734 #:make-flags ,#~(list "release"
1735 (string-append "PREFIX=" #$output)
1736 (string-append "LIBDIR=" #$output
1737 "/lib/ocaml/site-lib"))
1739 (modify-phases %standard-phases
1741 (lambda* (#:key outputs #:allow-other-keys)
1742 (mkdir-p "src/dune")
1743 (invoke "./configure")
1745 (home-page "https://github.com/ocaml/dune")
1746 (synopsis "OCaml build system")
1747 (description "Dune is a build system that was designed to simplify the
1748 release of Jane Street packages. It reads metadata from @file{dune} files
1749 following a very simple s-expression syntax.")
1750 (license license:expat)))
1752 (define ocaml4.09-dune-bootstrap
1753 (package-with-ocaml4.09 dune-bootstrap))
1755 (define-public dune-configurator
1757 (inherit dune-bootstrap)
1758 (name "dune-configurator")
1759 (build-system dune-build-system)
1761 `(#:package "dune-configurator"
1762 #:dune ,dune-bootstrap
1763 ; require ppx_expect
1766 (modify-phases %standard-phases
1767 ;; When building dune, these directories are normally removed after
1769 (add-before 'build 'remove-vendor
1771 (delete-file-recursively "vendor/csexp")
1772 (delete-file-recursively "vendor/pp"))))))
1775 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
1776 (synopsis "Dune helper library for gathering system configuration")
1777 (description "Dune-configurator is a small library that helps writing
1778 OCaml scripts that test features available on the system, in order to generate
1779 config.h files for instance. Among other things, dune-configurator allows one to:
1782 @item test if a C program compiles
1783 @item query pkg-config
1784 @item import #define from OCaml header files
1785 @item generate config.h file
1788 (define-public ocaml4.09-dune-configurator
1790 (inherit dune-configurator)
1791 (name "ocaml4.09-dune-configurator")
1793 `(,@(package-arguments dune-configurator)
1794 #:dune ,ocaml4.09-dune-bootstrap
1796 #:findlib ,ocaml4.09-findlib))
1798 `(("ocaml-csexp" ,ocaml4.09-csexp)))))
1802 (inherit dune-bootstrap)
1804 (list dune-configurator))
1805 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
1806 (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
1808 (define-public ocaml4.09-dune
1810 (inherit ocaml4.09-dune-bootstrap)
1812 (list dune-configurator))))
1814 (define-public ocaml4.07-dune
1816 (inherit (package-with-ocaml4.07 dune-bootstrap))
1821 (url "https://github.com/ocaml/dune")
1823 (file-name (git-file-name "dune" version))
1826 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
1828 (define-public ocaml-csexp
1830 (name "ocaml-csexp")
1835 (url "https://github.com/ocaml-dune/csexp")
1837 (file-name (git-file-name name version))
1840 "1v5y4x1a21193h8q536c0s0d8hv3hyyky4pgzm2dw9807v36s2x4"))))
1841 (build-system dune-build-system)
1843 `(#:tests? #f; FIXME: needs ppx_expect, but which version?
1844 #:dune ,dune-bootstrap
1846 (modify-phases %standard-phases
1847 (add-before 'build 'chmod
1849 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
1852 (list ocaml-result))
1853 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
1854 (home-page "https://github.com/ocaml-dune/csexp")
1855 (synopsis "Parsing and printing of S-expressions in Canonical form")
1856 (description "This library provides minimal support for Canonical
1857 S-expressions. Canonical S-expressions are a binary encoding of
1858 S-expressions that is super simple and well suited for communication
1861 This library only provides a few helpers for simple applications. If
1862 you need more advanced support, such as parsing from more fancy input
1863 sources, you should consider copying the code of this library given
1864 how simple parsing S-expressions in canonical form is.
1866 To avoid a dependency on a particular S-expression library, the only
1867 module of this library is parameterised by the type of S-expressions.")
1868 (license license:expat)))
1870 (define-public ocaml4.09-csexp
1872 (inherit ocaml-csexp)
1873 (name "ocaml4.09-csexp")
1875 `(#:ocaml ,ocaml-4.09
1876 #:findlib ,ocaml4.09-findlib
1877 ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
1878 ((#:dune _) ocaml4.09-dune-bootstrap))))
1880 `(("ocaml-result" ,ocaml4.09-result)))))
1882 (define-public ocaml-migrate-parsetree
1884 (name "ocaml-migrate-parsetree")
1886 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1893 (file-name (git-file-name name version))
1896 "0a1qy0ik36j8hpqxvh3fxf4aibjqax989mihj73jncchv8qv4ynq"))))
1897 (build-system dune-build-system)
1898 (arguments `(#:tests? #f))
1900 (list ocaml-ppx-derivers ocamlbuild ocaml-result))
1901 (properties `((upstream-name . "ocaml-migrate-parsetree")
1902 (ocaml4.07-variant . ,(delay ocaml4.07-migrate-parsetree))))
1903 (synopsis "OCaml parsetree converter")
1904 (description "This library converts between parsetrees of different OCaml
1905 versions. For each version, there is a snapshot of the parsetree and conversion
1906 functions to the next and/or previous version.")
1907 (license license:lgpl2.1+)))
1909 ;; OCaml 4.07 packages require version 1.*
1910 (define-public ocaml4.07-migrate-parsetree
1911 (package-with-ocaml4.07
1913 (inherit ocaml-migrate-parsetree)
1914 (name "ocaml-migrate-parsetree")
1916 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1922 (commit (string-append "v" version))))
1923 (file-name (git-file-name name version))
1926 "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
1927 (properties '((upstream-name . "ocaml-migrate-parsetree"))))))
1929 (define-public ocaml4.07-ppx-tools-versioned
1930 (package-with-ocaml4.07
1932 (name "ocaml-ppx-tools-versioned")
1937 (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
1939 (file-name (git-file-name name version))
1942 "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
1943 (build-system dune-build-system)
1946 #:package "ppx_tools_versioned"))
1948 (list ocaml-migrate-parsetree))
1949 (properties `((upstream-name . "ppx_tools_versioned")))
1950 (home-page "https://github.com/let-def/ppx_tools_versioned")
1951 (synopsis "Variant of ppx_tools")
1952 (description "This package is a variant of ppx_tools based on
1953 ocaml-migrate-parsetree")
1954 (license license:expat))))
1956 (define-public ocaml-linenoise
1958 (name "ocaml-linenoise")
1963 (url "https://github.com/ocaml-community/ocaml-linenoise")
1964 (commit (string-append "v" version))))
1965 (file-name (git-file-name name version))
1968 "1gk11pflal08kg2dz1b5zrlpnhbxpg2rwf8cknw3vzmq6gsmk2kc"))))
1969 (build-system dune-build-system)
1973 (propagated-inputs (list ocaml-result ocaml-odoc))
1974 (home-page "https://github.com/ocaml-community/ocaml-linenoise")
1975 (synopsis "Lightweight readline alternative")
1976 (description "This package is a line-reading library for OCaml that aims
1977 to replace readline.")
1978 (license license:bsd-2)))
1980 (define-public ocaml-bitstring
1982 (name "ocaml-bitstring")
1987 (url "https://github.com/xguerin/bitstring")
1988 (commit (string-append "v" version))))
1989 (file-name (git-file-name name version))
1992 "0mghsl8b2zd2676mh1r9142hymhvzy9cw8kgkjmirxkn56wbf56b"))))
1993 (build-system dune-build-system)
1995 (list time autoconf automake))
1997 (list ocaml-stdlib-shims))
1999 `(#:package "bitstring"
2000 #:tests? #f; Tests fail to build
2002 (modify-phases %standard-phases
2003 (add-before 'build 'upgrade
2005 (invoke "dune" "upgrade")
2007 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-bitstring))))
2008 (home-page "https://github.com/xguerin/bitstring")
2009 (synopsis "Bitstrings and bitstring matching for OCaml")
2010 (description "Adds Erlang-style bitstrings and matching over bitstrings as
2011 a syntax extension and library for OCaml. You can use this module to both parse
2012 and generate binary formats, files and protocols. Bitstring handling is added
2013 as primitives to the language, making it exceptionally simple to use and very
2015 (license license:isc)))
2017 (define-public ocaml4.07-bitstring
2018 (package-with-ocaml4.07
2020 (inherit ocaml-bitstring)
2024 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
2025 "get/v" version ".tar.gz"))
2026 (file-name (string-append "ocaml-bitsring-" version ".tar.gz"))
2029 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
2031 `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)))
2034 (define-public ocaml-ppx-bitstring
2036 (inherit ocaml-bitstring)
2037 (name "ocaml-ppx-bitstring")
2039 `(#:package "ppx_bitstring"
2042 (propagated-inputs (list ocaml-bitstring ocaml-ppxlib))
2043 (native-inputs (list ocaml-ounit))
2044 (properties `((upstream-name . "ppx_bitstring")))
2045 (synopsis "PPX extension for bitstrings and bitstring matching")
2047 "This package provides a way to write bitstrings and matching over
2048 bitsrings in Erlang style as primitives to the language.")))
2050 (define-public ocaml-result
2052 (name "ocaml-result")
2057 (url "https://github.com/janestreet/result")
2059 (file-name (git-file-name name version))
2062 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
2063 (build-system dune-build-system)
2066 #:dune ,dune-bootstrap))
2067 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
2068 (home-page "https://github.com/janestreet/result")
2069 (synopsis "Compatibility Result module")
2070 (description "Uses the new result type defined in OCaml >= 4.03 while
2071 staying compatible with older version of OCaml should use the Result module
2072 defined in this library.")
2073 (license license:bsd-3)))
2075 (define-public ocaml4.09-result
2077 (inherit ocaml-result)
2078 (name "ocaml4.09-result")
2081 #:dune ,ocaml4.09-dune-bootstrap
2083 #:findlib ,ocaml4.09-findlib))))
2085 (define-public ocaml-topkg
2087 (name "ocaml-topkg")
2091 (uri (string-append "http://erratique.ch/software/topkg/releases/"
2092 "topkg-" version ".tbz"))
2095 "1iyinmcfqpprk7k4cc51nqgypayprbj4larwcfqw86k5dri84825"))))
2096 (build-system ocaml-build-system)
2098 (list opam ocamlbuild))
2100 `(("result" ,ocaml-result)))
2103 #:build-flags '("build")
2105 (modify-phases %standard-phases
2106 (delete 'configure))))
2107 (home-page "https://erratique.ch/software/topkg")
2108 (synopsis "Transitory OCaml software packager")
2109 (description "Topkg is a packager for distributing OCaml software. It
2110 provides an API to describe the files a package installs in a given build
2111 configuration and to specify information about the package's distribution,
2112 creation and publication procedures.")
2113 (license license:isc)))
2115 (define-public ocaml-rresult
2117 (name "ocaml-rresult")
2121 (uri (string-append "http://erratique.ch/software/rresult/releases/"
2122 "rresult-" version ".tbz"))
2125 "0h2mjyzhay1p4k7n0mzaa7hlc7875kiy6m1i3r1n03j6hddpzahi"))))
2126 (build-system ocaml-build-system)
2128 (list opam ocamlbuild))
2130 `(("topkg" ,ocaml-topkg)))
2133 #:build-flags '("build")
2135 (modify-phases %standard-phases
2136 (delete 'configure))))
2137 (home-page "https://erratique.ch/software/rresult")
2138 (synopsis "Result value combinators for OCaml")
2139 (description "Handle computation results and errors in an explicit and
2140 declarative manner, without resorting to exceptions. It defines combinators
2141 to operate on the result type available from OCaml 4.03 in the standard
2143 (license license:isc)))
2145 (define-public ocaml-sqlite3
2147 (name "ocaml-sqlite3")
2153 (url "https://github.com/mmottl/sqlite3-ocaml")
2155 (file-name (git-file-name name version))
2158 "1ksm0a490315sf0yy8lmva5f3bgr0jnllffanyq89431grpj6x15"))))
2159 (build-system dune-build-system)
2160 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sqlite3))))
2162 (list dune-configurator ocaml-odoc))
2164 (list ocaml-ppx-inline-test pkg-config sqlite))
2165 (home-page "https://mmottl.github.io/sqlite3-ocaml")
2166 (synopsis "SQLite3 Bindings for OCaml")
2168 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
2169 API. Sqlite3 is a self-contained, serverless, zero-configuration,
2170 transactional SQL database engine with outstanding performance for many use
2171 cases. These bindings are written in a way that enables a friendly
2172 coexistence with the old (version 2) SQLite and its OCaml wrapper
2173 @code{ocaml-sqlite}.")
2174 (license license:expat)))
2176 (define-public ocaml4.07-sqlite3
2177 (package-with-ocaml4.07
2179 (inherit ocaml-sqlite3)
2185 (url "https://github.com/mmottl/sqlite3-ocaml")
2187 (file-name (git-file-name "ocaml-sqlite3" version))
2190 "15mmq7ak5facpfawfrc6hjz211gli7jab52iqdsihfvh790xm55f"))))
2193 (modify-phases %standard-phases
2194 (add-before 'build 'chmod
2196 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2199 `(("ocaml-odoc" ,ocaml-odoc)))
2202 (define-public ocaml-csv
2210 (url "https://github.com/Chris00/ocaml-csv")
2212 (file-name (git-file-name name version))
2215 "0y2hlqlmqs7r4y5mfzc5qdv7gdp3wxbwpz458vf7fj4593vg94cf"))))
2216 (build-system dune-build-system)
2220 (home-page "https://github.com/Chris00/ocaml-csv")
2221 (synopsis "Pure OCaml functions to read and write CSV")
2223 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
2224 by all major spreadsheets. This library implements pure OCaml functions to
2225 read and write files in this format as well as some convenience functions to
2226 manipulate such data.")
2227 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
2228 ;; against the library to be released under any terms.
2229 (license license:lgpl2.1)))
2231 (define-public ocaml-mtime
2233 (name "ocaml-mtime")
2237 (uri (string-append "http://erratique.ch/software/mtime/releases/"
2238 "mtime-" version ".tbz"))
2241 "1xy6lg52n2zynp4p164ym9j0f1b95j5n4bi5y4mbdrry9w99h32m"))))
2242 (build-system ocaml-build-system)
2244 (list ocamlbuild opam))
2246 `(("topkg" ,ocaml-topkg)))
2249 #:build-flags (list "build")
2251 (modify-phases %standard-phases
2252 (delete 'configure))))
2253 (home-page "https://erratique.ch/software/mtime")
2254 (synopsis "Monotonic wall-clock time for OCaml")
2255 (description "Access monotonic wall-clock time. It measures time
2256 spans without being subject to operating system calendar time adjustments.")
2257 (license license:isc)))
2259 (define-public ocaml-calendar
2261 ;; Commit from 2019-02-03.
2262 (let ((commit "a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da")
2265 (name "ocaml-calendar")
2266 ;; Makefile.in says 2.04.
2267 (version (git-version "2.04" revision commit))
2272 (url "https://github.com/ocaml-community/calendar")
2274 (file-name (git-file-name name version))
2277 "09d9gyqm3zkf3z2m9fx87clqihx6brf8rnzm4yq7c8kf1p572hmc"))))
2278 (build-system gnu-build-system)
2280 '(#:test-target "tests"
2282 (modify-phases %standard-phases
2283 (add-after 'unpack 'make-deterministic
2285 (substitute* "Makefile.in"
2286 (("`date`") "no date for reproducibility"))))
2287 (add-before 'install 'set-environment-variables
2288 (lambda* (#:key outputs #:allow-other-keys)
2289 (let ((out (assoc-ref outputs "out")))
2290 (setenv "OCAMLFIND_DESTDIR"
2291 (string-append out "/lib/ocaml/site-lib"))
2292 (setenv "OCAMLFIND_LDCONF" "ignore")
2293 (mkdir-p (string-append
2294 out "/lib/ocaml/site-lib/calendar"))))))))
2296 (list autoconf automake))
2299 ("ocamlfind" ,ocaml-findlib)))
2300 (home-page "https://github.com/ocaml-community/calendar")
2301 (synopsis "OCaml library for handling dates and times")
2302 (description "This package provides types and operations over
2304 ;; With linking exception.
2305 (license license:lgpl2.1+))))
2307 (define-public ocaml-cmdliner
2309 (name "ocaml-cmdliner")
2313 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2314 "cmdliner-" version ".tbz"))
2317 "1yxm4x34cbi06bfld601ds9drlbnyx0797ym3n6yyh4rlz1qgbm1"))))
2318 (build-system ocaml-build-system)
2320 (list ocaml-result))
2325 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
2326 "/lib/ocaml/site-lib/cmdliner"))
2328 (modify-phases %standard-phases
2330 (add-before 'build 'fix-source-file-order
2332 (substitute* "build.ml"
2333 (("Sys.readdir dir")
2334 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
2336 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-cmdliner))))
2337 (home-page "https://erratique.ch/software/cmdliner")
2338 (synopsis "Declarative definition of command line interfaces for OCaml")
2339 (description "Cmdliner is a module for the declarative definition of command
2340 line interfaces. It provides a simple and compositional mechanism to convert
2341 command line arguments to OCaml values and pass them to your functions. The
2342 module automatically handles syntax errors, help messages and UNIX man page
2343 generation. It supports programs with single or multiple commands and respects
2344 most of the POSIX and GNU conventions.")
2345 (license license:bsd-3)))
2347 (define-public ocaml4.07-cmdliner
2348 (package-with-ocaml4.07
2350 (inherit ocaml-cmdliner)
2354 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2355 "cmdliner-" version ".tbz"))
2358 "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw"))))
2361 (define-public ocaml-fmt
2368 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2371 "0q8j2in2473xh7k4hfgnppv9qy77f2ih89yp6yhpbp92ba021yzi"))))
2372 (build-system ocaml-build-system)
2374 `(("ocamlbuild" ,ocamlbuild)
2376 ("topkg" ,ocaml-topkg)))
2378 `(("cmdliner" ,ocaml-cmdliner)
2379 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
2380 ("ocaml-uchar" ,ocaml-uchar)))
2381 (arguments `(#:tests? #f
2382 #:build-flags (list "build" "--with-base-unix" "true"
2383 "--with-cmdliner" "true")
2385 (modify-phases %standard-phases
2386 (delete 'configure))))
2387 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-fmt))))
2388 (home-page "https://erratique.ch/software/fmt")
2389 (synopsis "OCaml Format pretty-printer combinators")
2390 (description "Fmt exposes combinators to devise Format pretty-printing
2392 (license license:isc)))
2394 (define-public ocaml4.07-fmt
2395 (package-with-ocaml4.07
2401 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2405 "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
2408 (define-public ocaml-astring
2410 (name "ocaml-astring")
2415 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
2418 "1ykhg9gd3iy7zsgyiy2p9b1wkpqg9irw5pvcqs3sphq71iir4ml6"))))
2419 (build-system ocaml-build-system)
2421 `(("ocamlbuild" ,ocamlbuild)
2423 ("topkg" ,ocaml-topkg)))
2426 #:build-flags (list "build")
2428 (modify-phases %standard-phases
2429 (delete 'configure))))
2430 (home-page "https://erratique.ch/software/astring")
2431 (synopsis "Alternative String module for OCaml")
2432 (description "Astring exposes an alternative String module for OCaml. This
2433 module balances minimality and expressiveness for basic, index-free, string
2434 processing and provides types and functions for substrings, string sets and
2435 string maps. The String module exposed by Astring has exception safe functions,
2436 removes deprecated and rarely used functions, alters some signatures and names,
2437 adds a few missing functions and fully exploits OCaml's newfound string
2439 (license license:isc)))
2441 (define-public ocaml-alcotest
2443 (name "ocaml-alcotest")
2448 (url "https://github.com/mirage/alcotest")
2450 (file-name (git-file-name name version))
2453 "195612n7p8y5ba6n19glql7qffl8n3aqkl9nrlln5lb9739gpv4w"))))
2454 (build-system dune-build-system)
2456 `(#:package "alcotest"
2459 (modify-phases %standard-phases
2460 (add-after 'unpack 'fix-test-format
2462 ;; cmdliner changed the format and the tests fail
2463 (substitute* "test/e2e/alcotest/failing/unknown_option.expected"
2465 (("\\.\\.\\.") "…")))))))
2476 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-alcotest))))
2477 (home-page "https://github.com/mirage/alcotest")
2478 (synopsis "Lightweight OCaml test framework")
2479 (description "Alcotest exposes simple interface to perform unit tests. It
2480 exposes a simple TESTABLE module type, a check function to assert test
2481 predicates and a run function to perform a list of unit -> unit test callbacks.
2482 Alcotest provides a quiet and colorful output where only faulty runs are fully
2483 displayed at the end of the run (with the full logs ready to inspect), with a
2484 simple (yet expressive) query language to select the tests to run.")
2485 (license license:isc)))
2487 (define-public ocaml4.07-alcotest
2488 (package-with-ocaml4.07
2490 (inherit ocaml-alcotest)
2495 (url "https://github.com/mirage/alcotest")
2497 (file-name (git-file-name "ocaml-alcotest" version))
2500 "1frwi185z4aadmaf0vp8xk5227nyg7nmh28ijj5l7ncjr5slvhz8"))))
2502 `(#:package "alcotest"
2506 (define-public ocaml-ppx-tools
2508 (name "ocaml-ppx-tools")
2514 (url "https://github.com/alainfrisch/ppx_tools")
2516 (file-name (git-file-name name version))
2519 "1ms2i063cwsm8wcw7jixz3qx2f2prrmf0k44gbksvsgqvm1rl6s2"))))
2520 (build-system dune-build-system)
2526 (properties `((upstream-name . "ppx_tools")))
2527 (home-page "https://github.com/alainfrisch/ppx_tools")
2528 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
2530 "Ppx_tools provides tools for authors of ppx rewriters and other
2532 (license license:expat)))
2534 (define-public ocaml-react
2536 (name "ocaml-react")
2541 (uri (string-append "http://erratique.ch/software/react/releases/react-"
2544 "16cg4byj8lfbbw96dhh8sks5y9n1c3fshz7f2p8m7wgisqax7bf4"))))
2545 (build-system ocaml-build-system)
2547 (list ocamlbuild opam ocaml-topkg))
2550 #:build-flags (list "build")
2552 (modify-phases %standard-phases
2553 (delete 'configure))))
2554 (home-page "https://erratique.ch/software/react")
2555 (synopsis "Declarative events and signals for OCaml")
2556 (description "React is an OCaml module for functional reactive programming
2557 (FRP). It provides support to program with time varying values: declarative
2558 events and signals. React doesn't define any primitive event or signal, it
2559 lets the client choose the concrete timeline.")
2560 (license license:bsd-3)))
2562 (define-public ocaml-ssl
2570 (url "https://github.com/savonet/ocaml-ssl")
2572 (file-name (git-file-name name version))
2574 "1dr7yghbv0wncvggd2105bj097msgrdzxd9wjkw1xxf2vvp0j1bi"))))
2575 (build-system dune-build-system)
2577 `(#:test-target "."))
2579 (list autoconf automake ocaml-alcotest which))
2580 (propagated-inputs (list openssl))
2581 (home-page "https://github.com/savonet/ocaml-ssl/")
2582 (synopsis "OCaml bindings for OpenSSL")
2584 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
2585 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
2586 (license license:lgpl2.1)))
2588 (define-public ocaml-mmap
2595 (url "https://github.com/mirage/mmap")
2596 (commit (string-append "v" version))))
2597 (file-name (git-file-name name version))
2600 "1a7w7l682cbksn2zlmz24gb519x7wb65ivr5vndm9x5pi9fw5pfb"))))
2601 (build-system dune-build-system)
2602 (propagated-inputs (list ocaml-bigarray-compat))
2603 (home-page "https://github.com/mirage/mmap")
2604 (synopsis "File mapping for OCaml")
2605 (description "This project provides a @command{Mmap.map_file} function
2606 for mapping files in memory. This function is the same as the
2607 @command{Unix.map_file} function added in OCaml >= 4.06.")
2608 (license (list license:qpl license:lgpl2.0))))
2610 (define-public ocaml-lwt
2618 (url "https://github.com/ocsigen/lwt")
2620 (file-name (git-file-name name version))
2622 "0cfmhw4nsnwba49p06l9fbnbcq75w9fd3kvrr615ihjc9frlmjsy"))))
2623 (build-system dune-build-system)
2627 (list ocaml-cppo pkg-config))
2631 (list ocaml-mmap ocaml-ocplib-endian ocaml-result ocaml-seq libev))
2632 (home-page "https://github.com/ocsigen/lwt")
2633 (synopsis "Cooperative threads and I/O in monadic style")
2634 (description "Lwt provides typed, composable cooperative threads. These
2635 make it easy to run normally-blocking I/O operations concurrently in a single
2636 process. Also, in many cases, Lwt threads can interact without the need for
2637 locks or other synchronization primitives.")
2638 (license license:lgpl2.1)))
2640 (define-public ocaml-luv
2646 (uri (string-append "https://github.com/aantron/luv/releases/download/"
2647 version "/luv-" version ".tar.gz"))
2650 "0hrsi8n2l31bcwgj847df4chjgqb9lmwkaky8fvvi15k25rz9v6c"))
2651 (modules '((guix build utils)))
2654 ;; Remove bundled configure and libuv.
2655 (delete-file-recursively "src/c/vendor")
2657 (build-system dune-build-system)
2660 #~(modify-phases %standard-phases
2661 (add-before 'build 'use-system-libuv
2663 (setenv "LUV_USE_SYSTEM_LIBUV" "yes")))
2665 (lambda* (#:key tests? #:allow-other-keys)
2667 (invoke "dune" "runtest" "--no-buffer" "--force")))))))
2668 (inputs (list libuv))
2669 (propagated-inputs (list ocaml-ctypes ocaml-result ocaml-odoc))
2670 (native-inputs (list ocaml-base ocaml-alcotest))
2671 (home-page "https://github.com/aantron/luv")
2672 (synopsis "Binding to libuv: cross-platform asynchronous I/O")
2674 "Luv is a binding to libuv, the cross-platform C library that does
2675 asynchronous I/O in Node.js and runs its main loop. Besides asynchronous I/O,
2676 libuv also supports multiprocessing and multithreading. Multiple event loops
2677 can be run in different threads. libuv also exposes a lot of other
2678 functionality, amounting to a full OS API, and an alternative to the standard
2680 (license license:expat)))
2682 (define-public ocaml-lwt-react
2685 (name "ocaml-lwt-react")
2690 (url "https://github.com/ocsigen/lwt")
2691 ;; Version from opam
2693 (file-name (git-file-name name version))
2696 "12sglfwdx4anfslj437g7gxchklgzfvba6i4p478kmqr56j2xd0c"))))
2698 `(#:package "lwt_react"))
2699 (properties `((upstream-name . "lwt_react")))
2701 (list ocaml-lwt ocaml-react))))
2703 (define-public ocaml-lwt-log
2705 (name "ocaml-lwt-log")
2710 (url "https://github.com/aantron/lwt_log")
2712 (file-name (git-file-name name version))
2715 "0mbv5l9gj09jd1c4lr2axcl4v043ipmhjd9xrk27l4hylzfc6d1q"))))
2716 (build-system dune-build-system)
2718 `(#:tests? #f)); require lwt_ppx
2720 `(("lwt" ,ocaml-lwt)))
2721 (properties `((upstream-name . "lwt_log")))
2722 (home-page "https://github.com/aantron/lwt_log")
2723 (synopsis "Logging library")
2724 (description "This package provides a deprecated logging component for
2726 (license license:lgpl2.1)))
2728 (define-public ocaml-logs
2734 (uri (string-append "http://erratique.ch/software/logs/releases/"
2735 "logs-" version ".tbz"))
2738 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
2739 (build-system ocaml-build-system)
2742 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2744 (modify-phases %standard-phases
2745 (delete 'configure))))
2747 (list ocamlbuild opam))
2749 `(("fmt" ,ocaml-fmt)
2751 ("mtime" ,ocaml-mtime)
2752 ("result" ,ocaml-result)
2753 ("cmdliner" ,ocaml-cmdliner)
2754 ("topkg" ,ocaml-topkg)))
2755 (home-page "https://erratique.ch/software/logs")
2756 (synopsis "Logging infrastructure for OCaml")
2757 (description "Logs provides a logging infrastructure for OCaml. Logging is
2758 performed on sources whose reporting level can be set independently. Log
2759 message report is decoupled from logging and is handled by a reporter.")
2760 (license license:isc)))
2762 (define-public ocaml-fpath
2764 (name "ocaml-fpath")
2768 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2769 "fpath-" version ".tbz"))
2772 "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"))))
2773 (build-system ocaml-build-system)
2776 #:build-flags (list "build")
2778 (modify-phases %standard-phases
2779 (delete 'configure))))
2781 (list ocamlbuild opam))
2783 `(("topkg" ,ocaml-topkg)
2784 ("astring" ,ocaml-astring)))
2785 (home-page "https://erratique.ch/software/fpath")
2786 (synopsis "File system paths for OCaml")
2787 (description "Fpath is an OCaml module for handling file system paths with
2788 POSIX or Windows conventions. Fpath processes paths without accessing the
2789 file system and is independent from any system library.")
2790 (license license:isc)))
2792 (define-public ocaml-bos
2798 (uri (string-append "http://erratique.ch/software/bos/releases/"
2799 "bos-" version ".tbz"))
2802 "0dwg7lpaq30rvwc5z1gij36fn9xavvpah1bj8ph9gmhhddw2xmnq"))))
2803 (build-system ocaml-build-system)
2806 #:build-flags (list "build")
2808 (modify-phases %standard-phases
2809 (delete 'configure))))
2811 (list ocamlbuild opam))
2813 `(("topkg" ,ocaml-topkg)
2814 ("astring" ,ocaml-astring)
2816 ("fpath" ,ocaml-fpath)
2817 ("logs" ,ocaml-logs)
2818 ("rresult" ,ocaml-rresult)))
2819 (home-page "https://erratique.ch/software/bos")
2820 (synopsis "Basic OS interaction for OCaml")
2821 (description "Bos provides support for basic and robust interaction with
2822 the operating system in OCaml. It has functions to access the process
2823 environment, parse command line arguments, interact with the file system and
2824 run command line programs.")
2825 (license license:isc)))
2827 (define-public ocaml-xml-light
2829 (name "ocaml-xml-light")
2834 (url "https://github.com/ncannasse/xml-light")
2836 (file-name (git-file-name name version))
2839 "089ywjz84y4p5iln94y54vh03b5fm2zrl2dld1398dyrby96dp6s"))))
2840 (build-system ocaml-build-system)
2842 (list #:tests? #f ; There are no tests.
2844 #~(modify-phases %standard-phases
2845 (add-after 'unpack 'prefix
2847 (substitute* "Makefile"
2848 (("`\\$\\(OCAMLC\\) -where`")
2849 (string-append #$output "/lib/ocaml/site-lib/xml-light")))))
2850 (delete 'configure) ; no configure
2851 (add-before 'install 'mkdir
2853 (mkdir-p (string-append #$output "/lib/ocaml/site-lib/xml-light"))))
2856 (invoke "make" "install_ocamlfind"))))))
2857 (home-page "https://github.com/ncannasse/xml-light")
2858 (synopsis "Minimal XML parser & printer for OCaml")
2860 "Xml-Light provides functions to parse an XML document into an OCaml data
2861 structure, work with it, and print it back to an XML document. It also
2862 supports DTD parsing and checking, and is entirely written in OCaml, hence it
2863 does not require additional C libraries.")
2864 (license license:lgpl2.1+))) ; with linking exception
2866 (define-public ocaml-xmlm
2872 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2873 "xmlm-" version ".tbz"))
2876 "1ynrjba3wm3axscvggrfijfgsznmphhxnkffqch67l9xiqjm44h9"))))
2877 (build-system ocaml-build-system)
2880 #:build-flags (list "build")
2882 (modify-phases %standard-phases
2883 (delete 'configure))))
2885 (list ocamlbuild ocaml-topkg opam))
2886 (home-page "https://erratique.ch/software/xmlm")
2887 (synopsis "Streaming XML codec for OCaml")
2888 (description "Xmlm is a streaming codec to decode and encode the XML data
2889 format. It can process XML documents without a complete in-memory
2890 representation of the data.")
2891 (license license:isc)))
2893 (define-public ocaml-gen
2900 (url "https://github.com/c-cube/gen")
2901 (commit (string-append "v" version))))
2902 (file-name (git-file-name name version))
2905 "1z5nw5wljvcqp8q07h336bbvf9paynia0jsdh4486hlkbmr1ask1"))))
2906 (build-system dune-build-system)
2911 (list ocaml-odoc ocaml-seq))
2913 (list ocaml-qtest ocaml-qcheck))
2914 (home-page "https://github.com/c-cube/gen/")
2915 (synopsis "Iterators for OCaml, both restartable and consumable")
2916 (description "Gen implements iterators of OCaml, that are both restartable
2918 (license license:bsd-2)))
2920 (define-public ocaml-sedlex
2922 (name "ocaml-sedlex")
2927 (url "https://github.com/ocaml-community/sedlex")
2928 (commit (string-append "v" version))))
2929 (file-name (git-file-name name version))
2932 "062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"))))
2933 (build-system dune-build-system)
2935 `(#:tests? #f ; no tests
2938 (modify-phases %standard-phases
2939 (add-before 'build 'copy-resources
2940 (lambda* (#:key inputs #:allow-other-keys)
2941 (with-directory-excursion "src/generator/data"
2942 ;; Newer versions of dune emit an error if files it wants to
2943 ;; build already exist. Delete the dune file so dune doesn't
2945 (delete-file "dune")
2948 (copy-file (assoc-ref inputs file) file))
2949 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
2952 (add-before 'build 'chmod
2954 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2957 (list ocaml-gen ocaml-ppxlib ocaml-uchar))
2958 ;; These three files are needed by src/generator/data/dune, but would be
2959 ;; downloaded using curl at build time.
2961 `(("DerivedCoreProperties.txt"
2964 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
2967 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
2968 ("DerivedGeneralCategory.txt"
2971 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
2974 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
2978 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2981 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
2982 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sedlex))))
2983 (home-page "https://www.cduce.org/download.html#side")
2984 (synopsis "Lexer generator for Unicode and OCaml")
2985 (description "Lexer generator for Unicode and OCaml.")
2986 (license license:expat)))
2988 (define-public ocaml4.07-sedlex
2989 (package-with-ocaml4.07
2991 (inherit ocaml-sedlex)
2992 (name "ocaml-sedlex")
2997 (url "https://github.com/ocaml-community/sedlex")
2998 (commit (string-append "v" version))))
2999 (file-name (git-file-name name version))
3002 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
3004 `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
3005 ,@(package-propagated-inputs ocaml-sedlex)))
3008 (define-public ocaml-uchar
3010 (name "ocaml-uchar")
3015 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
3016 version "/uchar-" version ".tbz"))
3018 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
3019 (build-system ocaml-build-system)
3022 #:build-flags (list "native=true" "native-dynlink=true")
3024 (modify-phases %standard-phases
3025 (delete 'configure))))
3027 (list ocamlbuild opam))
3028 (home-page "https://github.com/ocaml/uchar")
3029 (synopsis "Compatibility library for OCaml's Uchar module")
3030 (description "The uchar package provides a compatibility library for the
3031 `Uchar` module introduced in OCaml 4.03.")
3032 (license license:lgpl2.1)))
3034 (define-public ocaml-uutf
3040 (uri (string-append "http://erratique.ch/software/uutf/releases/"
3041 "uutf-" version ".tbz"))
3044 "0s05r8ggp1g97zq4rnvbxzj22pv8ld0k5wsdw662jw0y7mhsawl7"))))
3045 (build-system ocaml-build-system)
3048 #:build-flags (list "build")
3050 (modify-phases %standard-phases
3051 (delete 'configure))))
3053 `(("ocamlbuild" ,ocamlbuild)
3055 ("topkg" ,ocaml-topkg)))
3057 `(("uchar" ,ocaml-uchar)
3058 ("cmdliner" ,ocaml-cmdliner)))
3059 (home-page "https://erratique.ch/software/uutf")
3060 (synopsis "Non-blocking streaming Unicode codec for OCaml")
3061 (description "Uutf is a non-blocking streaming codec to decode and encode
3062 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
3063 work character by character without blocking on IO. Decoders perform character
3064 position tracking and support newline normalization.
3066 Functions are also provided to fold over the characters of UTF encoded OCaml
3067 string values and to directly encode characters in OCaml Buffer.t values.")
3068 (license license:isc)))
3070 (define-public ocaml-uunf
3077 (uri (string-append "https://erratique.ch/software/uunf/releases/uunf-"
3081 "1s5svvdqfbzw16rf1h0zm9n92xfdr0qciprd7lcjza8z1hy6pyh7"))))
3082 (build-system ocaml-build-system)
3084 `(#:build-flags (list "build" "--tests" "true")
3086 (modify-phases %standard-phases
3088 ;; reported and fixed upstream, will be available in next version.
3089 (add-before 'build 'fix-test
3091 (substitute* "test/test.ml"
3092 (("test/NormalizationTest.txt") "-"))))
3093 (add-before 'check 'check-data
3094 (lambda* (#:key inputs #:allow-other-keys)
3095 (copy-file (assoc-ref inputs "NormalizationTest.txt")
3096 "test/NormalizationTest.txt")
3099 `(("ocamlbuild" ,ocamlbuild)
3101 ("topkg" ,ocaml-topkg)
3102 ;; Test data is otherwise downloaded with curl
3103 ("NormalizationTest.txt"
3106 (uri (string-append "https://www.unicode.org/Public/"
3108 "/ucd/NormalizationTest.txt"))
3109 (file-name (string-append "NormalizationTest-" version ".txt"))
3111 (base32 "09pkawfqpgy2xnv2nkkgmxv53rx4anprg65crbbcm02a2p6ci6pv"))))))
3112 (propagated-inputs (list ocaml-uutf))
3113 (home-page "https://erratique.ch/software/uunf")
3114 (synopsis "Unicode text normalization for OCaml")
3116 "Uunf is an OCaml library for normalizing Unicode text. It supports all
3117 Unicode normalization forms. The library is independent from any
3118 IO mechanism or Unicode text data structure and it can process text
3119 without a complete in-memory representation.")
3120 (license license:isc)))
3122 (define-public ocaml-jsonm
3124 (name "ocaml-jsonm")
3128 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
3129 "jsonm-" version ".tbz"))
3132 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
3133 (build-system ocaml-build-system)
3136 #:build-flags (list "build")
3138 (modify-phases %standard-phases
3139 (delete 'configure))))
3141 `(("ocamlbuild" ,ocamlbuild)
3143 ("topkg" ,ocaml-topkg)))
3145 `(("uutf" ,ocaml-uutf)
3146 ("cmdliner" ,ocaml-cmdliner)))
3147 (home-page "https://erratique.ch/software/jsonm")
3148 (synopsis "Non-blocking streaming JSON codec for OCaml")
3149 (description "Jsonm is a non-blocking streaming codec to decode and encode
3150 the JSON data format. It can process JSON text without blocking on IO and
3151 without a complete in-memory representation of the data.")
3152 (license license:isc)))
3154 (define-public ocaml-ocp-indent
3156 (name "ocaml-ocp-indent")
3162 (url "https://github.com/OCamlPro/ocp-indent")
3164 (file-name (git-file-name name version))
3167 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
3168 (build-system dune-build-system)
3170 `(#:test-target "tests"))
3172 (list ocaml-cmdliner))
3173 (home-page "https://www.typerex.org/ocp-indent.html")
3174 (synopsis "Tool to indent OCaml programs")
3176 "Ocp-indent is based on an approximate, tolerant OCaml parser
3177 and a simple stack machine. Presets and configuration options are available,
3178 with the possibility to set them project-wide. It supports the most common
3179 syntax extensions, and it is extensible for others.
3181 This package includes:
3184 @item An indentor program, callable from the command-line or from within editors,
3185 @item Bindings for popular editors,
3186 @item A library that can be directly used by editor writers, or just for
3187 fault-tolerant and approximate parsing.
3189 (license license:lgpl2.1)))
3191 (define-public ocaml-ocp-index
3193 (name "ocaml-ocp-index")
3199 (url "https://github.com/OCamlPro/ocp-index")
3201 (file-name (git-file-name name version))
3204 "1gbigw5s2cafkr82n9vkxbb892qfkykj0adj0hrdkrkw8j6rfl0j"))))
3205 (build-system dune-build-system)
3207 `(#:package "ocp-index"))
3209 (list ocaml-ocp-indent ocaml-re ocaml-cmdliner))
3212 (home-page "https://www.typerex.org/ocp-index.html")
3213 (synopsis "Lightweight completion and documentation browsing for OCaml libraries")
3214 (description "This package includes only the @code{ocp-index} library
3215 and command-line tool.")
3216 ;; All files in libs/ are GNU lgpl2.1
3217 ;; For static linking, clause 6 of LGPL is lifted
3218 ;; All other files under GNU gpl3
3219 (license (list license:gpl3+
3220 license:lgpl2.1+))))
3222 (define-public ocaml-ocurl
3224 (name "ocaml-ocurl")
3228 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
3232 "0qvpsqbq4qbd397n0nlv9cwlqfyjw7gfb5mmq1awvnklr0c9fdg0"))))
3233 (build-system ocaml-build-system)
3236 (modify-phases %standard-phases
3237 (add-before 'configure 'fix-/bin/sh
3238 (lambda* (#:key inputs #:allow-other-keys)
3239 (substitute* "configure"
3240 (("-/bin/sh") (string-append "-" (which "bash")))))))))
3243 (inputs (list curl))
3244 (home-page "http://ocurl.forge.ocamlcore.org/")
3245 (synopsis "OCaml bindings for libcurl")
3246 (description "Client-side URL transfer library, supporting HTTP and a
3247 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
3248 (license license:isc)))
3250 (define-public ocaml-base64
3252 (name "ocaml-base64")
3257 (url "https://github.com/mirage/ocaml-base64")
3258 (commit (string-append "v" version))))
3259 (file-name (git-file-name name version))
3262 "068hwdbpl7vx9jjpxdc6a10zqd8xa55j3xx7ga6fnwrlfsbs2pjj"))))
3263 (build-system dune-build-system)
3265 (list ocaml-alcotest ocaml-bos ocaml-rresult))
3266 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base64))))
3267 (home-page "https://github.com/mirage/ocaml-base64")
3268 (synopsis "Base64 encoding for OCaml")
3269 (description "Base64 is a group of similar binary-to-text encoding schemes
3270 that represent binary data in an ASCII string format by translating it into a
3271 radix-64 representation. It is specified in RFC 4648.")
3272 (license license:isc)))
3274 (define-public ocaml4.07-base64
3275 (package-with-ocaml4.07
3277 (inherit ocaml-base64)
3282 (url "https://github.com/mirage/ocaml-base64")
3283 (commit (string-append "v" version))))
3284 (file-name (git-file-name "ocaml-base64" version))
3287 "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy"))))
3289 ;; Tests are likely incompatible with our recent alcotest
3293 (define-public ocamlify
3300 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
3301 version "/ocamlify-" version ".tar.gz"))
3303 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
3304 (build-system ocaml-build-system)
3306 `(#:tests? #f; no tests
3308 (modify-phases %standard-phases
3311 ;; This package uses pre-generated setup.ml by oasis, but is
3312 ;; a dependency of oasis. the pre-generated setup.ml is broken
3313 ;; with recent versions of OCaml, so we perform a bootstrap instead.
3315 (substitute* "src/OCamlifyConfig.ml.ab"
3316 (("$pkg_version") ,version))
3317 (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
3318 (with-directory-excursion "src"
3319 (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
3323 (lambda* (#:key outputs #:allow-other-keys)
3324 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
3326 (install-file "src/ocamlify" bin)
3328 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
3329 (synopsis "Include files in OCaml code")
3330 (description "OCamlify creates OCaml source code by including
3331 whole files into OCaml string or string list. The code generated can be
3332 compiled as a standard OCaml file. It allows embedding external resources as
3334 (license license:lgpl2.1+))); with the OCaml static compilation exception
3336 (define-public omake
3342 (uri (string-append "http://download.camlcity.org/download/"
3343 "omake-" version ".tar.gz"))
3346 "1i7pcv53kqplrbdx9mllrhbv4j57zf87xwq18r16cvn1lbc6mqal"))
3347 (patches (search-patches "omake-fix-non-determinism.patch"))))
3348 (build-system ocaml-build-system)
3351 ,#~(list (string-append "PREFIX=" #$output))
3352 #:tests? #f ; no test target
3354 (modify-phases %standard-phases
3355 (add-before 'configure 'fix-makefile
3356 (lambda* (#:key outputs #:allow-other-keys)
3357 (substitute* "mk/osconfig_unix.mk"
3358 (("CC = cc") "CC = gcc")))))))
3359 (native-inputs (list hevea))
3360 (home-page "http://projects.camlcity.org/projects/omake.html")
3361 (synopsis "Build system designed for scalability and portability")
3362 (description "Similar to make utilities you may have used, but it features
3363 many additional enhancements, including:
3366 @item Support for projects spanning several directories or directory hierarchies.
3367 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
3368 with full support for incremental builds.
3369 @item Dependency analysis takes the command lines into account — whenever the
3370 command line used to build a target changes, the target is considered
3372 @item Fully scriptable, includes a library that providing support for standard
3373 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
3375 (license (list license:lgpl2.1 ; libmojave
3376 license:expat ; OMake scripts
3377 license:gpl2)))) ; OMake itself, with ocaml linking exception
3380 (define-public ocaml-benchmark
3382 (name "ocaml-benchmark")
3388 (url "https://github.com/Chris00/ocaml-benchmark")
3390 (file-name (git-file-name name version))
3392 (base32 "0d0vdfjgjzf1y6wkd714d8b0piv1z9qav5ahsapynqzk4b4ahhnp"))))
3393 (build-system dune-build-system)
3394 (arguments `(#:test-target "tests"))
3395 (home-page "https://github.com/Chris00/ocaml-benchmark")
3396 (synopsis "Benchmark running times of code")
3398 "This module provides a set of tools to measure the running times of
3399 your functions and to easily compare the results. A statistical test
3400 is used to determine whether the results truly differ.")
3401 (license license:lgpl3+)))
3403 (define-public ocaml-batteries
3405 (name "ocaml-batteries")
3410 (url "https://github.com/ocaml-batteries-team/batteries-included")
3411 (commit (string-append "v" version))))
3412 (file-name (git-file-name name version))
3415 "07387jp93civ9p1q2ixmq8qkzzyssp94ssxd4w2ndvkg1nr6kfcl"))))
3416 (build-system ocaml-build-system)
3417 (propagated-inputs (list ocaml-num))
3419 (list ocamlbuild ocaml-benchmark ocaml-qcheck ocaml-qtest))
3422 (modify-phases %standard-phases
3423 (add-after 'unpack 'make-writable
3425 (for-each make-file-writable (find-files "." "."))))
3426 (add-before 'build 'fix-nondeterminism
3428 (substitute* "setup.ml"
3429 (("Sys.readdir dirname")
3430 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
3432 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-batteries))))
3433 (home-page "http://batteries.forge.ocamlcore.org/")
3434 (synopsis "Development platform for the OCaml programming language")
3435 (description "Define a standard set of libraries which may be expected on
3436 every compliant installation of OCaml and organize these libraries into a
3437 hierarchy of modules.")
3438 (license license:lgpl2.1+)))
3440 (define-public ocaml4.07-batteries
3441 (package-with-ocaml4.07
3443 (inherit ocaml-batteries)
3448 (url "https://github.com/ocaml-batteries-team/batteries-included")
3449 (commit (string-append "v" version))))
3450 (file-name (git-file-name "ocaml-batteries" version))
3453 "02fxa1nkp7rpiwfp04n0sagdp9lad4dh9bvljp95xfshm1cx7y4q"))))
3456 (modify-phases %standard-phases
3457 (delete 'check) ; tests are run by the build phase
3458 (add-before 'build 'fix-nondeterminism
3460 (substitute* "setup.ml"
3461 (("Sys.readdir dirname")
3462 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
3465 (lambda* (#:key inputs outputs #:allow-other-keys)
3468 (substring str 0 (- (string-length str) 1)))
3470 (find-files "src" ".*.mliv")
3471 (find-files "src" ".*.mlv")
3472 (find-files "src" ".*.mlp")))))
3473 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
3474 "-lflag" "-dllpath-all" files)
3475 (for-each (lambda (file)
3476 (copy-file (string-append "_build/" file) file))
3478 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
3479 "-lflag" "-dllpath-all" "build/mkconf.byte")
3480 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
3481 (invoke "make" "all")
3484 `(("ocamlbuild" ,ocamlbuild)
3485 ("qtest" ,ocaml-qtest)))
3488 (define-public ocaml-pcre
3496 (url "https://github.com/mmottl/pcre-ocaml")
3498 (file-name (git-file-name name version))
3501 "048k1rl17fcml000yh8fnghk1a06h14lbyrnk9nbigxsymrz6cq2"))))
3502 (build-system dune-build-system)
3507 (list dune-configurator pcre))
3509 `(("pcre:bin" ,pcre "bin")))
3510 (home-page "https://mmottl.github.io/pcre-ocaml")
3512 "Bindings to the Perl Compatibility Regular Expressions library")
3513 (description "Pcre-ocaml offers library functions for string
3514 pattern matching and substitution, similar to the functionality
3515 offered by the Perl language.")
3516 ;; With static linking exception
3517 (license license:lgpl2.1+)))
3519 (define-public ocaml-expect
3521 (name "ocaml-expect")
3525 (uri (ocaml-forge-uri name version 1736))
3528 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
3531 (build-system ocaml-build-system)
3533 `(("ocamlbuild" ,ocamlbuild)
3534 ("ocaml-num" ,ocaml-num)
3535 ("ocaml-pcre" ,ocaml-pcre)
3536 ("ounit" ,ocaml-ounit)))
3538 `(("batteries" ,ocaml-batteries)))
3539 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
3540 (synopsis "Simple implementation of expect")
3541 (description "This package provides utilities for building unitary testing
3542 of interactive program. You can match the question using a regular expression
3544 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
3546 (define-public ocaml-stdlib-shims
3548 (name "ocaml-stdlib-shims")
3553 (url "https://github.com/ocaml/stdlib-shims")
3555 (file-name (git-file-name name version))
3558 "0gmg8w67j3ww17llk7hl4dx0vq7p50rn5s4ib9sy984k543rz59h"))))
3559 (build-system dune-build-system)
3560 (home-page "https://github.com/ocaml/stdlib-shims")
3561 (synopsis "OCaml stdlib features backport to older OCaml compilers")
3562 (description "This package backports some of the new stdlib features to
3563 older compilers, such as the Stdlib module. This allows projects that require
3564 compatibility with older compiler to use these new features in their code.")
3565 ;; with ocaml-linking exception
3566 (license license:lgpl2.1+)))
3568 (define-public ocaml-fileutils
3570 (name "ocaml-fileutils")
3575 (url "https://github.com/gildor478/ocaml-fileutils")
3576 (commit (string-append "v" version))))
3577 (file-name (git-file-name name version))
3580 "0aa7p5qymi8p7iqym42yk2akjd1ff81fvaks82nhjc533zl01pnf"))))
3581 (build-system dune-build-system)
3583 (list ocaml-stdlib-shims))
3586 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
3587 (synopsis "Pure OCaml functions to manipulate real file and filename")
3588 (description "Library to provide pure OCaml functions to manipulate real
3589 file (POSIX like) and filename.")
3590 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
3592 (define-public ocaml-oasis
3594 (name "ocaml-oasis")
3598 (uri (ocaml-forge-uri name version 1757))
3601 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
3602 (modules '((guix build utils)))
3605 (substitute* "test/test-main/Test.ml"
3606 ;; most of these tests fail because ld cannot find crti.o, but according
3607 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
3608 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
3609 (("TestBaseCompat.tests;") "")
3610 (("TestExamples.tests;") "")
3611 (("TestFull.tests;") "")
3612 (("TestPluginDevFiles.tests;") "")
3613 (("TestPluginInternal.tests;") "")
3614 (("TestPluginOCamlbuild.tests;") "")
3615 (("TestPluginOMake.tests;") ""))
3617 (build-system ocaml-build-system)
3621 (list ocamlbuild ocamlify ocamlmod))
3622 (home-page "https://oasis.forge.ocamlcore.org")
3623 (synopsis "Integrates a configure, build, install system in OCaml projects")
3624 (description "OASIS is a tool to integrate a configure, build and install
3625 system in your OCaml projects. It helps to create standard entry points in your
3626 build system and allows external tools to analyse your project easily.")
3627 (license license:lgpl2.1+))) ; with ocaml static compilation exception
3629 (define-public ocaml-cppo
3637 (url "https://github.com/mjambon/cppo")
3638 (commit (string-append "v" version))))
3639 (file-name (git-file-name name version))
3641 "1c8jlr2s0allw1h6czz5q24vn5jsnrrh44j7hjyilzaifm17dlrm"))))
3642 (build-system dune-build-system)
3647 (home-page "https://github.com/mjambon/cppo")
3648 (synopsis "Equivalent of the C preprocessor for OCaml programs")
3649 (description "Cppo is an equivalent of the C preprocessor for OCaml
3650 programs. It allows the definition of simple macros and file inclusion. Cppo is:
3652 @item more OCaml-friendly than @command{cpp}
3653 @item easy to learn without consulting a manual
3654 @item reasonably fast
3655 @item simple to install and to maintain.
3657 (license license:bsd-3)))
3659 (define-public ocaml-seq
3667 (url "https://github.com/c-cube/seq")
3669 (file-name (git-file-name name version))
3671 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
3672 (build-system ocaml-build-system)
3676 (modify-phases %standard-phases
3680 (lambda* (#:key outputs #:allow-other-keys)
3681 (let ((install-dir (string-append (assoc-ref outputs "out")
3682 "/lib/ocaml/site-lib/seq")))
3683 (mkdir-p install-dir)
3684 (with-output-to-file (string-append install-dir "/META")
3686 (display "name=\"seq\"
3687 version=\"[distributed with ocaml]\"
3688 description=\"dummy package for compatibility\"
3691 (home-page "https://github.com/c-cube/seq")
3692 (synopsis "OCaml's standard iterator type")
3693 (description "This package is a compatibility package for OCaml's
3694 standard iterator type starting from 4.07.")
3695 (license license:lgpl2.1+)))
3697 (define-public ocaml-re
3705 (url "https://github.com/ocaml/ocaml-re")
3707 (file-name (git-file-name name version))
3709 (base32 "1g0vmpx6ylv8m0w77zarn215pgb4czc6gcpb2fi5da1s307zwr0w"))))
3710 (build-system dune-build-system)
3712 `(#:test-target "."))
3716 `(("ounit" ,ocaml-ounit)))
3717 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-re))))
3718 (home-page "https://github.com/ocaml/ocaml-re/")
3719 (synopsis "Regular expression library for OCaml")
3720 (description "Pure OCaml regular expressions with:
3722 @item Perl-style regular expressions (module Re_perl)
3723 @item Posix extended regular expressions (module Re_posix)
3724 @item Emacs-style regular expressions (module Re_emacs)
3725 @item Shell-style file globbing (module Re_glob)
3726 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
3728 (license license:expat)))
3730 (define-public ocaml4.07-re
3731 (package-with-ocaml4.07
3737 (modify-phases %standard-phases
3738 (add-after 'unpack 'fix-dune-version
3740 (delete-file "dune-project"))))))
3743 (define-public ocaml-ocplib-endian
3745 (name "ocaml-ocplib-endian")
3750 (url "https://github.com/OCamlPro/ocplib-endian/")
3754 "1klj4g451s7m5r8bxmwc1rpvngpqdm40csnx9smgc06pwy2fax2c"))
3755 (file-name (git-file-name name version))))
3756 (build-system dune-build-system)
3758 `(#:test-target "tests"))
3760 `(("cppo" ,ocaml-cppo)))
3761 (home-page "https://github.com/OCamlPro/ocplib-endian")
3762 (synopsis "Optimised functions to read and write int16/32/64 from strings
3764 (description "Optimised functions to read and write int16/32/64 from strings
3765 and bigarrays, based on new primitives added in version 4.01. It works on
3766 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
3767 big- and little-endian, with their unsafe counter-parts.")
3768 (license license:lgpl2.1)))
3770 (define-public ocaml-cstruct
3772 (name "ocaml-cstruct")
3777 (url "https://github.com/mirage/ocaml-cstruct")
3778 (commit (string-append "v" version))))
3779 (file-name (git-file-name name version))
3782 "0dpbirs6lzp0bclr3wcw407jjspll7iy66z18zks3mjccvlxd21w"))))
3783 (build-system dune-build-system)
3785 `(#:package "cstruct"
3788 (list ocaml-bigarray-compat))
3790 (list ocaml-alcotest))
3791 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-cstruct))))
3792 (home-page "https://github.com/mirage/ocaml-cstruct")
3793 (synopsis "Access C structures via a camlp4 extension")
3794 (description "Cstruct is a library and syntax extension to make it easier
3795 to access C-like structures directly from OCaml. It supports both reading and
3796 writing to these structures, and they are accessed via the Bigarray module.")
3797 (license license:isc)))
3799 (define-public ocaml4.07-cstruct
3800 (package-with-ocaml4.07
3802 (inherit ocaml-cstruct)
3807 (url "https://github.com/mirage/ocaml-cstruct")
3808 (commit (string-append "v" version))))
3809 (file-name (git-file-name "ocaml-cstruct" version))
3812 "0jj3whs8r3jc524i9bb67rffh7y7r157hjgvws0bkxijxpjzwkbk"))))
3815 (define-public ocaml-hex
3822 (url "https://github.com/mirage/ocaml-hex")
3823 (commit (string-append "v" version))))
3824 (file-name (git-file-name name version))
3827 "0xnl5wxd2qrba7phm3mdrjwd2kk26kb17dv94ciwp49ljcj28qc1"))))
3828 (build-system dune-build-system)
3830 `(#:test-target "."))
3832 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
3833 ("cstruct" ,ocaml-cstruct)))
3834 (home-page "https://github.com/mirage/ocaml-hex/")
3835 (synopsis "Minimal library providing hexadecimal converters")
3836 (description "Hex is a minimal library providing hexadecimal converters.")
3837 (license license:isc)))
3839 (define-public ocaml-ezjsonm
3841 (name "ocaml-ezjsonm")
3847 (url "https://github.com/mirage/ezjsonm")
3848 (commit (string-append "v" version))))
3849 (file-name (git-file-name name version))
3851 (base32 "004knljxqxn9zq0rnq7q7wxl4nwlzydm8p9f5cqkl8il5yl5zkjm"))))
3852 (build-system dune-build-system)
3854 `(#:package "ezjsonm"
3856 (native-inputs (list ocaml-alcotest js-of-ocaml node))
3857 (propagated-inputs (list ocaml-jsonm ocaml-uutf ocaml-sexplib0 ocaml-hex))
3858 (home-page "https://github.com/mirage/ezjsonm/")
3859 (synopsis "Read and write JSON data")
3860 (description "Ezjsonm provides more convenient (but far less flexible) input
3861 and output functions that go to and from [string] values than jsonm. This avoids
3862 the need to write signal code, which is useful for quick scripts that manipulate
3864 (license license:isc)))
3866 (define-public ocaml-uri
3870 (home-page "https://github.com/mirage/ocaml-uri")
3876 (commit (string-append "v" version))))
3877 (file-name (git-file-name name version))
3880 "1bgkc66cq00mgnkz3i535srwzwc4cpdsv0mly5dzvvq33451xwf0"))))
3881 (build-system dune-build-system)
3882 (arguments '(#:package "uri"
3885 (list ocaml-stringext ocaml-angstrom))
3887 (list ocaml-ounit ocaml-ppx-sexp-conv))
3888 (properties `((upstream-name . "uri")
3889 (ocaml4.07-variant ,(delay ocaml4.07-uri))))
3890 (synopsis "RFC3986 URI/URL parsing library")
3891 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3892 (license license:isc)))
3894 (define-public ocaml4.07-uri
3896 (name "ocaml4.07-uri")
3902 (url "https://github.com/mirage/ocaml-uri")
3903 (commit (string-append "v" version))))
3904 (file-name (git-file-name name version))
3906 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
3907 (build-system dune-build-system)
3911 (modify-phases %standard-phases
3912 (add-before 'build 'update-deprecated
3914 (substitute* "lib/uri.ml"
3915 (("Re.get") "Re.Group.get")))))
3917 #:findlib ,ocaml4.07-findlib
3918 #:dune ,ocaml4.07-dune))
3920 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
3921 ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))))
3923 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
3924 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
3925 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3926 (properties `((upstream-name . "uri")))
3927 (home-page "https://github.com/mirage/ocaml-uri")
3928 (synopsis "RFC3986 URI/URL parsing library")
3929 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3930 (license license:isc)))
3932 (define-public ocaml-easy-format
3934 (name "ocaml-easy-format")
3939 (url "https://github.com/mjambon/easy-format")
3941 (file-name (git-file-name name version))
3944 "0xap6az4yyb60vb1jfs640wl3cf4njv78p538x9ihhf9f6ij3nh8"))))
3945 (build-system dune-build-system)
3947 `(#:package "easy-format"
3949 (modify-phases %standard-phases
3950 (add-before 'build 'make-writable
3955 (find-files "." "."))
3957 (home-page "https://github.com/mjambon/easy-format")
3958 (synopsis "Interface to the Format module")
3959 (description "Easy-format is a high-level and functional interface to the
3960 Format module of the OCaml standard library.")
3961 (license license:bsd-3)))
3963 (define-public ocaml-piqilib
3965 (name "ocaml-piqilib")
3971 (url "https://github.com/alavrik/piqi")
3972 (commit (string-append "v" version))))
3973 (file-name (git-file-name name version))
3975 (base32 "0mbhfrfrik3jlzx9zz680g0qdvv0b7cbjz28cgdlryp7nk4v4kx8"))))
3976 (build-system ocaml-build-system)
3979 (modify-phases %standard-phases
3980 (add-before 'configure 'fix-ocamlpath
3982 (substitute* '("Makefile" "make/Makefile.ocaml")
3983 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))))
3985 (lambda* (#:key outputs #:allow-other-keys)
3986 (let ((out (assoc-ref outputs "out")))
3987 (substitute* "make/OCamlMakefile"
3988 (("/bin/sh") (which "bash")))
3989 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3990 (string-append out "/lib/ocaml/site-lib")))))
3991 (add-after 'build 'build-ocaml
3992 (lambda* (#:key outputs #:allow-other-keys)
3993 (invoke "make" "ocaml")))
3994 (add-after 'install 'install-ocaml
3995 (lambda* (#:key outputs #:allow-other-keys)
3996 (invoke "make" "ocaml-install")))
3997 (add-after 'install-ocaml 'link-stubs
3998 (lambda* (#:key outputs #:allow-other-keys)
3999 (let* ((out (assoc-ref outputs "out"))
4000 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
4001 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
4003 (symlink (string-append lib "/dllpiqilib_stubs.so")
4004 (string-append stubs "/dllpiqilib_stubs.so"))))))))
4008 `(("ocaml-xmlm" ,ocaml-xmlm)
4009 ("ocaml-sedlex" ,ocaml-sedlex)
4010 ("ocaml-easy-format" ,ocaml-easy-format)
4011 ("ocaml-base64" ,ocaml-base64)))
4012 (home-page "http://piqi.org")
4013 (synopsis "Data serialization and conversion library")
4014 (description "Piqilib is the common library used by the piqi command-line
4015 tool and piqi-ocaml.")
4016 (license license:asl2.0)))
4018 (define-public ocaml-uuidm
4020 (name "ocaml-uuidm")
4024 (uri (string-append "http://erratique.ch/software/uuidm/"
4025 "releases/uuidm-" version ".tbz"))
4028 "1cr6xlzla9fmd587lfhzac0icifspjnqi9f4cdafshj3jn85nrpw"))))
4029 (build-system ocaml-build-system)
4032 (list "build" "--tests" "true" "--with-cmdliner" "true")
4034 (modify-phases %standard-phases
4035 (delete 'configure))))
4037 (list ocamlbuild opam))
4039 `(("cmdliner" ,ocaml-cmdliner)
4040 ("topkg" ,ocaml-topkg)))
4041 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-uuidm))))
4042 (home-page "https://erratique.ch/software/uuidm")
4043 (synopsis "Universally unique identifiers for OCaml")
4044 (description "Uuidm is an OCaml module implementing 128 bits universally
4045 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
4046 and 4 (random based) according to RFC 4122.")
4047 (license license:isc)))
4049 (define-public ocaml4.07-uuidm
4050 (package-with-ocaml4.07
4052 (inherit ocaml-uuidm)
4056 (uri (string-append "http://erratique.ch/software/uuidm/"
4057 "releases/uuidm-" version ".tbz"))
4060 "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"))))
4063 (define-public ocaml-graph
4065 (name "ocaml-graph")
4069 (uri (string-append "http://ocamlgraph.lri.fr/download/"
4070 "ocamlgraph-" version ".tar.gz"))
4073 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
4074 (build-system ocaml-build-system)
4076 `(#:install-target "install-findlib"
4079 (modify-phases %standard-phases
4080 (add-before 'configure 'set-shell
4081 (lambda* (#:key inputs #:allow-other-keys)
4082 (setenv "CONFIG_SHELL"
4083 (search-input-file inputs "/bin/sh")))))))
4084 (inputs (list lablgtk))
4085 (properties `((upstream-name . "ocamlgraph")))
4086 (home-page "http://ocamlgraph.lri.fr/")
4087 (synopsis "Graph library for OCaml")
4088 (description "OCamlgraph is a generic graph library for OCaml.")
4089 (license license:lgpl2.1)))
4091 (define-public ocaml-piqi
4098 (url "https://github.com/alavrik/piqi-ocaml")
4099 (commit (string-append "v" version))))
4100 (file-name (git-file-name name version))
4103 "12m9vxir0cs2155nxs0a3m3npf3w79kyxf9a5lmf18qvvgismfz8"))))
4104 (build-system ocaml-build-system)
4107 ,#~(list (string-append "DESTDIR=" #$output)
4108 (string-append "SHELL="
4109 #+(file-append (canonical-package bash-minimal)
4112 (modify-phases %standard-phases
4113 (add-after 'unpack 'make-files-writable
4115 (for-each make-file-writable (find-files "."))
4117 (delete 'configure))))
4119 (list which protobuf)) ; for tests
4121 `(("ocaml-num" ,ocaml-num)
4122 ("ocaml-piqilib" ,ocaml-piqilib)
4123 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
4124 (home-page "https://github.com/alavrik/piqi-ocaml")
4125 (synopsis "Protocol serialization system for OCaml")
4126 (description "Piqi is a multi-format data serialization system for OCaml.
4127 It provides a uniform interface for serializing OCaml data structures to JSON,
4128 XML and Protocol Buffers formats.")
4129 (license license:asl2.0)))
4131 (define-public ocaml-ppx-bap
4133 (name "ocaml-ppx-bap")
4138 (url "https://github.com/BinaryAnalysisPlatform/ppx_bap")
4139 (commit (string-append "v" (version-major+minor version)))))
4140 (file-name (git-file-name name version))
4143 "1c6rcdp8bicdiwqc2mb59cl9l2vxlp3y8hmnr9x924fq7acly248"))))
4144 (build-system dune-build-system)
4148 (propagated-inputs (list ocaml-base-quickcheck
4155 ocaml-ppx-fields-conv
4160 ocaml-ppx-sexp-value
4161 ocaml-ppx-variants-conv
4163 (properties `((upstream-name . "ppx_bap")))
4164 (home-page "https://github.com/BinaryAnalysisPlatform/ppx_bap")
4165 (synopsis "The set of ppx rewriters for BAP")
4167 "@code{ppx_bap} is the set of blessed ppx rewriters used in BAP projects.
4168 It fills the same role as @code{ppx_base} or @code{ppx_jane} (from which it is
4169 derived), but doesn't impose any style requirements and has only the minimal
4170 necessary set of rewriters.")
4171 (license license:expat)))
4176 (version "2.5.0-alpha")
4177 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
4182 (commit (string-append "v" version))))
4183 (file-name (git-file-name name version))
4186 "1fw9pp0xnssc08qqfkcafffap4f46hw7zmk80gif5yc4nazga8w5"))))
4187 (build-system ocaml-build-system)
4192 #~(modify-phases %standard-phases
4193 (add-before 'configure 'fix-ncurses
4195 (substitute* "oasis/llvm"
4196 (("-lcurses") "-lncurses"))
4199 (lambda* (#:key outputs inputs #:allow-other-keys)
4200 (for-each make-file-writable (find-files "." "."))
4201 ;; Package name changed
4202 (substitute* "oasis/elf-loader"
4203 (("bitstring.ppx") "ppx_bitstring"))
4204 ;; We don't have a monolithic llvm
4205 (substitute* "oasis/llvm.setup.ml.in"
4206 (("llvm_static = \"true\"") "true"))
4207 (invoke "./configure" "--prefix"
4208 (assoc-ref outputs "out")
4211 (assoc-ref outputs "out")
4212 "/lib/ocaml/site-lib")
4213 (string-append "--with-llvm-version=" #$(package-version llvm))
4214 "--with-llvm-config=llvm-config"
4216 "--disable-llvm-static"
4218 "--enable-everything"))))))
4219 (native-inputs (list clang ocaml-oasis ocaml-ounit))
4243 (list gmp llvm ncurses))
4244 (synopsis "Binary Analysis Platform")
4245 (description "Binary Analysis Platform is a framework for writing program
4246 analysis tools, that target binary files. The framework consists of a plethora
4247 of libraries, plugins, and frontends. The libraries provide code reusability,
4248 the plugins facilitate extensibility, and the frontends serve as entry points.")
4249 (license license:expat)))
4251 (define-public ocaml-camomile
4253 (name "ocaml-camomile")
4255 (home-page "https://github.com/yoriyuki/Camomile")
4258 (uri (string-append home-page "/releases/download/" version
4259 "/camomile-" version ".tbz"))
4262 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
4263 (build-system dune-build-system)
4265 `(#:test-target "camomile-test"
4266 #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
4268 (modify-phases %standard-phases
4269 (add-before 'build 'fix-usr-share
4270 (lambda* (#:key outputs #:allow-other-keys)
4271 (substitute* '("Camomile/dune" "configure.ml")
4272 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
4274 (synopsis "Comprehensive Unicode library")
4275 (description "Camomile is a Unicode library for OCaml. Camomile provides
4276 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
4277 200 encodings, collation and locale-sensitive case mappings, and more. The
4278 library is currently designed for Unicode Standard 3.2.")
4279 ;; with an exception for linked libraries to use a different license
4280 (license license:lgpl2.0+)))
4282 (define-public ocaml-charinfo-width
4283 ;; Add LICENSE file and Dune tests
4284 (let ((commit "20aaaa6dca8f1e0b1ace55b6f2a8ba5e5910b620"))
4286 (name "ocaml-charinfo-width")
4287 (version (git-version "1.1.0" "1" commit))
4288 (home-page "https://github.com/kandu/charinfo_width/")
4294 (file-name (git-file-name name version))
4297 "04gil5hxm2jax9paw3i24d8zyzhyl5cphzfyryvy2lcrm3c485q0"))))
4298 (build-system dune-build-system)
4300 (list ocaml-result ocaml-camomile))
4302 (list ocaml-ppx-expect))
4304 `((upstream-name . "charInfo_width")))
4305 (synopsis "Determine column width for a character")
4306 (description "This module implements purely in OCaml a character width
4307 function that follows the prototype of POSIX's wcwidth.")
4308 (license license:expat))))
4310 (define-public ocaml-zed
4314 (home-page "https://github.com/ocaml-community/zed")
4321 (file-name (git-file-name name version))
4323 (base32 "1g171kk5wxnk66d4vwz2crh5i19vhqghp78iybl5am17gl9qf8pb"))))
4324 (build-system dune-build-system)
4334 `(#:test-target "."))
4335 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-zed))))
4336 (synopsis "Abstract engine for text edition in OCaml")
4338 "This module provides an abstract engine for text edition. It can be
4339 used to write text editors, edition widgets, readlines, and more. The module
4340 Zed uses Camomile to fully support the Unicode specification, and implements
4341 an UTF-8 encoded string type with validation, and a rope datastructure to
4342 achieve efficient operations on large Unicode buffers. Zed also features a
4343 regular expression search on ropes. To support efficient text edition
4344 capabilities, Zed provides macro recording and cursor management facilities.")
4345 (license license:bsd-3)))
4347 (define-public ocaml4.07-zed
4348 (package-with-ocaml4.07
4355 (url "https://github.com/ocaml-community/zed")
4357 (file-name (git-file-name "ocaml4.07-zed" version))
4360 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
4362 `(("ocaml-charInfo-width" ,ocaml-charinfo-width)
4363 ("ocaml-camomile" ,ocaml-camomile)
4364 ("ocaml-react" ,ocaml-react)))
4367 (define-public ocaml-lambda-term
4369 (name "ocaml-lambda-term")
4371 (home-page "https://github.com/ocaml-community/lambda-term")
4377 (file-name (git-file-name name version))
4380 "1pkamblc6h0rsbk901cqn3xr9gqa3g8wrwyx5zryaqvb2xpbhp8b"))))
4381 (build-system dune-build-system)
4383 `(#:test-target "."))
4392 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lambda-term))))
4393 (synopsis "Terminal manipulation library for OCaml")
4394 (description "Lambda-Term is a cross-platform library for manipulating the
4395 terminal. It provides an abstraction for keys, mouse events, colors, as well as
4396 a set of widgets to write curses-like applications. The main objective of
4397 Lambda-Term is to provide a higher level functional interface to terminal
4398 manipulation than, for example, ncurses, by providing a native OCaml interface
4399 instead of bindings to a C library.")
4400 (license license:bsd-3)))
4402 (define-public ocaml4.07-lambda-term
4403 (package-with-ocaml4.07
4405 (inherit ocaml-lambda-term)
4411 (url "https://github.com/ocaml-community/lambda-term")
4413 (file-name (git-file-name "ocaml4.07-lambda-term" version))
4415 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
4417 `(("ocaml-lwt" ,ocaml-lwt)
4418 ("ocaml-lwt-log" ,ocaml-lwt-log)
4419 ("ocaml-lwt-react" ,ocaml-lwt-react)
4420 ("ocaml-zed" ,ocaml-zed)))
4423 (define-public ocaml-utop
4431 (url "https://github.com/ocaml-community/utop")
4433 (file-name (git-file-name name version))
4435 (base32 "1pcix3h9f7is06581iax4i08zkd6sv8y5hy1vvxhqhcsd9z0qfl3"))))
4436 (build-system dune-build-system)
4438 `(#:test-target "."))
4442 (list ocaml-lambda-term
4448 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-utop))))
4449 (home-page "https://github.com/ocaml-community/utop")
4450 (synopsis "Improved interface to the OCaml toplevel")
4451 (description "UTop is an improved toplevel for OCaml. It can run in a
4452 terminal or in Emacs. It supports line editing, history, real-time and context
4453 sensitive completion, colors, and more.")
4454 (license license:bsd-3)))
4456 (define-public ocaml4.07-utop
4457 (package-with-ocaml4.07
4459 (inherit ocaml-utop)
4465 (url "https://github.com/ocaml-community/utop")
4467 (file-name (git-file-name "ocaml4.07-utop" version))
4469 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
4471 `(("ocaml-lambda-term" ,ocaml-lambda-term)
4472 ("ocaml-lwt" ,ocaml-lwt)
4473 ("ocaml-react" ,ocaml-react)
4474 ("ocaml-camomile" ,ocaml-camomile)
4475 ("ocaml-zed" ,ocaml-zed)))
4478 (define-public ocaml-ansiterminal
4480 (name "ocaml-ansiterminal")
4485 (url "https://github.com/Chris00/ANSITerminal")
4488 (file-name (git-file-name name version))
4491 "052qnc23vmxp90yympjz9q6lhqw98gs1yvb3r15kcbi1j678l51h"))))
4492 (build-system dune-build-system)
4494 `(#:test-target "tests"))
4495 (properties `((upstream-name . "ANSITerminal")))
4496 (home-page "https://github.com/Chris00/ANSITerminal")
4498 "Basic control of ANSI compliant terminals and the windows shell")
4500 "ANSITerminal is a module allowing to use the colors and cursor
4501 movements on ANSI terminals.")
4502 ;; Variant of the LGPL3+ which permits
4503 ;; static and dynamic linking when producing binary files.
4504 ;; In other words, it allows one to link to the library
4505 ;; when compiling nonfree software.
4506 (license (license:non-copyleft "LICENSE.md"))))
4508 (define-public ocaml-ptmap
4510 (name "ocaml-ptmap")
4515 (string-append "https://github.com/backtracking/ptmap/releases/download/"
4516 version "/ptmap-" version ".tbz"))
4519 "1apk61fc1y1g7x3m3c91fnskvxp6i0vk5nxwvipj56k7x2pzilgb"))))
4520 (build-system dune-build-system)
4523 #~(modify-phases %standard-phases
4525 (lambda* (#:key tests? #:allow-other-keys)
4527 (invoke "dune" "runtest")))))))
4528 (propagated-inputs (list ocaml-stdlib-shims ocaml-seq))
4529 (home-page "https://github.com/backtracking/ptmap")
4530 (synopsis "Maps of integers implemented as Patricia trees")
4532 "An implementation inspired by Okasaki & Gill's paper 'Fast Mergeable
4534 (license license:lgpl2.1))) ; with linking exception
4536 (define-public ocaml-integers
4538 (name "ocaml-integers")
4540 (home-page "https://github.com/ocamllabs/ocaml-integers")
4546 (file-name (git-file-name name version))
4549 "0c0bmy53ag6504kih0cvnp4yf7mbcimb18m1mgs592ffb0zj1rff"))))
4550 (build-system dune-build-system)
4552 `(#:tests? #f)) ; no tests
4554 (list ocaml-stdlib-shims))
4555 (synopsis "Various signed and unsigned integer types for OCaml")
4556 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
4557 and 64-bit signed and unsigned integer types, together with aliases such as
4558 long and size_t whose sizes depend on the host platform.")
4559 (license license:expat)))
4561 (define-public ocaml-ctypes
4563 (name "ocaml-ctypes")
4565 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
4571 (file-name (git-file-name name version))
4574 "0ilzq9qzvwv9rc08cc9wchsx636zp870i7qvqmbigaa2qb812m0z"))))
4575 (build-system ocaml-build-system)
4578 (modify-phases %standard-phases
4579 (add-after 'unpack 'make-writable
4581 (for-each make-file-writable
4583 (delete 'configure))))
4585 `(("pkg-config" ,pkg-config)
4586 ("ounit" ,ocaml-ounit)
4587 ("lwt" ,ocaml-lwt)))
4589 `(("bigarray-compat" ,ocaml-bigarray-compat)
4590 ("integers" ,ocaml-integers)))
4593 (synopsis "Library for binding to C libraries using pure OCaml")
4594 (description "Ctypes is a library for binding to C libraries using pure
4595 OCaml. The primary aim is to make writing C extensions as straightforward as
4596 possible. The core of ctypes is a set of combinators for describing the
4597 structure of C types -- numeric types, arrays, pointers, structs, unions and
4598 functions. You can use these combinators to describe the types of the
4599 functions that you want to call, then bind directly to those functions -- all
4600 without writing or generating any C!")
4601 (license license:expat)))
4603 (define-public ocaml-ocb-stubblr
4605 (name "ocaml-ocb-stubblr")
4607 (home-page "https://github.com/pqwy/ocb-stubblr")
4611 home-page "/releases/download/v0.1.1/ocb-stubblr-"
4613 (file-name (string-append name "-" version ".tbz"))
4616 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
4617 (build-system ocaml-build-system)
4619 `(#:build-flags (list "build" "--tests" "true")
4621 (modify-phases %standard-phases
4623 (add-before 'build 'fix-for-guix
4625 (substitute* "src/ocb_stubblr.ml"
4626 ;; Do not fail when opam is not present or initialized
4627 (("error_msgf \"error running opam\"") "\"\"")
4628 ;; Guix doesn't have cc, but it has gcc
4629 (("\"cc\"") "\"gcc\""))
4632 `(("topkg" ,ocaml-topkg)
4635 `(("astring" ,ocaml-astring)
4636 ("ocamlbuild" ,ocamlbuild)))
4637 (synopsis "OCamlbuild plugin for C stubs")
4638 (description "Ocb-stubblr is about ten lines of code that you need to
4639 repeat over, over, over and over again if you are using ocamlbuild to build
4640 OCaml projects that contain C stubs.")
4641 (license license:isc)))
4643 (define-public ocaml-tsdl
4647 (home-page "https://erratique.ch/software/tsdl")
4650 (uri (string-append home-page "/releases/tsdl-"
4652 (file-name (string-append name "-" version ".tar.gz"))
4655 "1m565jgfanijjzp64c1rylahkpmrrb03ywj202j49n06nvwp788s"))))
4656 (build-system ocaml-build-system)
4658 `(#:build-flags '("build")
4659 #:tests? #f; tests require a display device
4661 (modify-phases %standard-phases
4662 (delete 'configure))))
4664 (list ocamlbuild ocaml-astring opam pkg-config))
4666 `(("topkg" ,ocaml-topkg)
4668 ("integers" ,ocaml-integers)
4669 ("ctypes" ,ocaml-ctypes)))
4670 (synopsis "Thin bindings to SDL for OCaml")
4671 (description "Tsdl is an OCaml library providing thin bindings to the
4672 cross-platform SDL C library.")
4673 (license license:isc)))
4675 (define-public dedukti
4679 (home-page "https://deducteam.github.io/")
4684 (url "https://github.com/deducteam/dedukti")
4685 (commit (string-append "v" version))))
4686 (file-name (git-file-name name version))
4689 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
4691 `(("menhir" ,ocaml-menhir)))
4694 (build-system ocaml-build-system)
4697 ,#~(modify-phases %standard-phases
4704 (invoke "make" "tests")))
4705 (add-before 'install 'set-binpath
4706 ;; Change binary path in the makefile
4708 (substitute* "GNUmakefile"
4710 (string-append "BINDIR = " #$output "/bin")))))
4713 (invoke "make" "install"))))))
4714 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4716 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4717 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4718 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4719 λΠ-calculus where the context contains variable declaration as well as rewrite
4720 rules. This system is not designed to develop proofs, but to check proofs
4721 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4722 (license license:cecill-c)))
4724 (define-public emacs-dedukti-mode
4725 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
4727 (name "emacs-dedukti-mode")
4728 (version (git-version "0" "0" commit))
4729 (home-page "https://github.com/rafoo/dedukti-mode")
4737 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
4738 (file-name (git-file-name name version))))
4741 (build-system emacs-build-system)
4744 (modify-phases %standard-phases
4745 (add-before 'install 'patch-dkpath
4747 (let ((dkcheck-path (which "dkcheck")))
4748 (substitute* "dedukti-mode.el"
4749 (("dedukti-path \"(.*)\"")
4750 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
4751 (synopsis "Emacs major mode for Dedukti files")
4752 (description "This package provides an Emacs major mode for editing
4754 (license license:cecill-b))))
4756 (define-public emacs-flycheck-dedukti
4757 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
4759 (name "emacs-flycheck-dedukti")
4760 (version (git-version "0" "0" commit))
4761 (home-page "https://github.com/rafoo/flycheck-dedukti")
4769 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
4770 (file-name (git-file-name name version))))
4771 (build-system emacs-build-system)
4773 (list emacs-dedukti-mode emacs-flycheck))
4774 (synopsis "Flycheck integration for the dedukti language")
4775 (description "This package provides a frontend for Flycheck to perform
4776 syntax checking on dedukti files.")
4777 (license license:cecill-b))))
4779 (define-public ocaml-jst-config
4781 (name "ocaml-jst-config")
4787 (url "https://github.com/janestreet/jst-config")
4788 (commit (string-append "v" version))))
4789 (file-name (git-file-name name version))
4792 "1yp5p63clvaxmkf7vlasgyapxc31x29c154pyq63n0fvi2fpf4y3"))))
4793 (build-system dune-build-system)
4794 (arguments '(#:tests? #f)) ; no tests
4796 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
4797 (home-page "https://github.com/janestreet/jst-config")
4798 (synopsis "Compile-time configuration for Jane Street libraries")
4799 (description "Defines compile-time constants used in Jane Street libraries
4800 such as Base, Core, and Async. This package has an unstable interface; it is
4801 intended only to share configuration between different packages from Jane
4802 Street. Future updates may not be backward-compatible, and we do not
4803 recommend using this package directly.")
4804 (license license:expat)))
4806 (define-public ocaml-jane-street-headers
4808 (name "ocaml-jane-street-headers")
4812 "jane-street-headers" version
4813 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
4814 (build-system dune-build-system)
4815 (arguments '(#:tests? #f)) ; no tests
4816 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-jane-street-headers))))
4817 (home-page "https://github.com/janestreet/jane-street-headers")
4818 (synopsis "Jane Street C header files")
4819 (description "C header files shared between the various Jane Street
4821 (license license:expat)))
4823 (define-public ocaml-time-now
4825 (name "ocaml-time-now")
4830 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
4831 (build-system dune-build-system)
4832 (arguments '(#:tests? #f)) ; no tests
4834 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
4835 ocaml-ppx-base ocaml-ppx-optcomp))
4836 (properties `((upstream-name . "time_now")))
4838 "https://github.com/janestreet/time_now")
4839 (synopsis "Reports the current time")
4841 "Provides a single function to report the current time in nanoseconds
4842 since the start of the Unix epoch.")
4843 (license license:expat)))
4845 (define-public ocaml-ppx-inline-test
4847 (name "ocaml-ppx-inline-test")
4849 (home-page "https://github.com/janestreet/ppx_inline_test")
4854 (url (string-append home-page ".git"))
4855 (commit (string-append "v" version))))
4856 (file-name (git-file-name name version))
4859 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
4860 (build-system dune-build-system)
4862 `(#:tests? #f)) ;see home page README for further information
4865 ocaml-migrate-parsetree
4871 (properties `((upstream-name . "ppx_inline_test")
4872 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
4873 (synopsis "Syntax extension for writing in-line tests in ocaml code")
4874 (description "This package contains a syntax extension for writing
4875 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
4877 (license license:expat)))
4879 (define-public ocaml4.07-ppx-inline-test
4880 (package-with-ocaml4.07
4882 (inherit ocaml-ppx-inline-test)
4883 (name "ocaml-ppx-inline-test")
4885 (home-page "https://github.com/janestreet/ppx_inline_test")
4890 (url (string-append home-page ".git"))
4891 (commit (string-append "v" version))))
4892 (file-name (git-file-name name version))
4895 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
4897 `(("ocaml-base" ,ocaml-base)
4898 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4899 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
4900 ("ocaml-sexplib0" ,ocaml-sexplib0)
4901 ("ocaml-stdio" ,ocaml-stdio)
4902 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4903 (properties `((upstream-name . "ppx_inline_test"))))))
4905 (define-public ocaml-bindlib
4907 (name "ocaml-bindlib")
4913 (url "https://github.com/rlepigre/ocaml-bindlib")
4915 (file-name (git-file-name name version))
4918 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
4919 (build-system dune-build-system)
4921 `(#:test-target "."))
4923 (list ocamlbuild ocaml-findlib))
4924 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
4925 (synopsis "OCaml Bindlib library for bound variables")
4926 (description "Bindlib is a library allowing the manipulation of data
4927 structures with bound variables. It is particularly useful when writing ASTs
4928 for programming languages, but also for manipulating terms of the λ-calculus
4929 or quantified formulas.")
4930 (license license:gpl3+)))
4932 (define-public ocaml-earley
4934 (name "ocaml-earley")
4936 (home-page "https://github.com/rlepigre/ocaml-earley")
4941 (url (string-append home-page ".git"))
4943 (file-name (git-file-name name version))
4946 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
4947 (build-system dune-build-system)
4949 `(#:test-target "."))
4951 (list ocaml-stdlib-shims))
4952 (synopsis "Parsing library based on Earley Algorithm")
4953 (description "Earley is a parser combinator library base on Earley's
4954 algorithm. It is intended to be used in conjunction with an OCaml syntax
4955 extension which allows the definition of parsers inside the language. There
4956 is also support for writing OCaml syntax extensions in a camlp4 style.")
4957 (license license:cecill-b)))
4959 (define-public ocaml-timed
4961 (name "ocaml-timed")
4963 (home-page "https://github.com/rlepigre/ocaml-timed")
4967 (url (string-append home-page ".git"))
4971 "1aqmkpjv5jk95lc2m3qyyrhw8ra7n9wj8pv3bfc83l737zv0hjn1"))
4972 (file-name (git-file-name name version))))
4973 (build-system dune-build-system)
4975 '(#:test-target "."))
4976 (synopsis "Timed references for imperative state")
4977 (description "Timed references for imperative state. This module provides
4978 an alternative type for references (or mutable cells) supporting undo/redo
4979 operations. In particular, an abstract notion of time is used to capture the
4980 state of the references at any given point, so that it can be restored. Note
4981 that usual reference operations only have a constant time / memory overhead
4982 (compared to those of the standard library).
4984 Moreover, we provide an alternative implementation based on the references
4985 of the standard library (Pervasives module). However, it is less efficient
4986 than the first one.")
4987 (license license:expat)))
4989 (define-public ocaml-biniou
4991 (name "ocaml-biniou")
4993 (home-page "https://github.com/mjambon/biniou")
4998 (url (string-append home-page ".git"))
5000 (file-name (git-file-name name version))
5003 "1gd4nqffm9h7dzxyvpfpww24l61fqgazyh3p5f7k9jvgyv9y4vcn"))))
5004 (build-system dune-build-system)
5007 (modify-phases %standard-phases
5008 (add-before 'build 'make-writable
5009 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
5011 (list ocaml-easy-format ocaml-camlp-streams))
5014 (synopsis "Data format designed for speed, safety, ease of use and backward
5016 (description "Biniou (pronounced \"be new\" is a binary data format
5017 designed for speed, safety, ease of use and backward compatibility as
5018 protocols evolve. Biniou is vastly equivalent to JSON in terms of
5019 functionality but allows implementations several times faster (4 times faster
5020 than yojson), with 25-35% space savings.")
5021 (license license:bsd-3)))
5023 (define-public ocaml-yojson
5025 (name "ocaml-yojson")
5027 (home-page "https://github.com/ocaml-community/yojson")
5032 (url (string-append home-page ".git"))
5034 (file-name (git-file-name name version))
5037 "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
5038 (build-system dune-build-system)
5041 #:package "yojson"))
5042 (propagated-inputs (list ocaml-seq))
5043 (native-inputs (list ocaml-alcotest ocaml-cppo))
5044 (synopsis "Low-level JSON library for OCaml")
5045 (description "Yojson is an optimized parsing and printing library for the
5046 JSON format. It addresses a few shortcomings of json-wheel including 2x
5047 speedup, polymorphic variants and optional syntax for tuples and variants.
5048 @code{ydump} is a pretty printing command-line program provided with the
5049 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
5050 serializers and deserializers from type definitions.")
5051 (license license:bsd-3)))
5053 (define-public ocaml-merlin-lib
5055 (name "ocaml-merlin-lib")
5061 (url "https://github.com/ocaml/merlin")
5062 (commit (string-append "v" version))))
5063 (file-name (git-file-name name version))
5066 "1cpa9x45w54l4mqqmc8z3s5gscggw37gb6z9i7wwss86fj1wgclh"))))
5067 (build-system dune-build-system)
5068 (arguments '(#:package "merlin-lib"
5069 #:tests? #f)) ; no tests
5070 (propagated-inputs (list ocaml-csexp ocaml-menhir))
5071 (home-page "https://ocaml.github.io/merlin/")
5072 (synopsis "Merlin libraries")
5073 (description "These libraries provides access to low-level compiler
5074 interfaces and the standard higher-level merlin protocol.")
5075 (license license:expat)))
5077 (define-public ocaml-dot-merlin-reader
5079 (inherit ocaml-merlin-lib)
5080 (name "ocaml-dot-merlin-reader")
5081 (arguments '(#:package "dot-merlin-reader"
5082 #:tests? #f)) ; no tests
5083 (propagated-inputs (list ocaml-merlin-lib))
5084 (synopsis "Reads config files for @code{ocaml-merlin}")
5085 (description "@code{ocaml-dot-merlin-reader} is an external reader for
5086 @code{ocaml-merlin} configurations.")))
5088 (define-public ocaml-merlin
5090 (inherit ocaml-dot-merlin-reader)
5091 (name "ocaml-merlin")
5093 '(#:package "merlin"
5095 (modify-phases %standard-phases
5097 (lambda* (#:key tests? #:allow-other-keys)
5099 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
5100 (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
5102 (list ocaml-dot-merlin-reader ; required for tests
5104 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
5105 (description "Merlin is an editor service that provides modern IDE
5106 features for OCaml. Emacs and Vim support is provided out-of-the-box.
5107 External contributors added support for Visual Studio Code, Sublime Text and
5109 (license license:expat)))
5111 (define-public ocaml-gsl
5120 "https://github.com/mmottl/gsl-ocaml/releases/download/"
5121 version "/gsl-" version ".tbz"))
5124 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
5125 (build-system dune-build-system)
5129 (modify-phases %standard-phases
5130 (add-after 'unpack 'fix-gsl-directory
5131 (lambda* (#:key inputs #:allow-other-keys)
5132 (substitute* "src/config/discover.ml"
5133 (("/usr") (assoc-ref inputs "gsl"))))))))
5137 (list ocaml-base ocaml-stdio))
5138 (home-page "https://mmottl.github.io/gsl-ocaml")
5139 (synopsis "Bindings to the GNU Scientific Library")
5141 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
5142 the OCaml language.")
5143 (license license:gpl3+)))
5145 (define-public ocaml4.07-gsl-1
5146 (package-with-ocaml4.07
5152 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
5153 "/releases/download/v"
5154 version "/gsl-ocaml-" version ".tar.gz"))
5157 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
5158 (build-system ocaml-build-system)
5160 `(("gsl" ,gsl-static)))
5162 `(("ocamlbuild" ,ocamlbuild)))
5164 (propagated-inputs '()))))
5166 (define-public cubicle
5172 (uri (string-append "http://cubicle.lri.fr/cubicle-"
5176 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
5177 (build-system gnu-build-system)
5179 (list automake ocaml
5180 (@@ (gnu packages base) which)))
5182 (list ocaml-num z3))
5184 `(#:configure-flags (list "--with-z3")
5185 #:make-flags (list "QUIET=")
5188 (modify-phases %standard-phases
5189 (add-before 'configure 'make-deterministic
5191 (substitute* "Makefile.in"
5192 (("`date`") "no date for reproducibility"))))
5193 (add-before 'configure 'configure-for-release
5195 (substitute* "Makefile.in"
5196 (("SVNREV=") "#SVNREV="))
5198 (add-before 'configure 'fix-/bin/sh
5200 (substitute* "configure"
5201 (("-/bin/sh") (string-append "-" (which "sh"))))
5203 (add-before 'configure 'fix-smt-z3wrapper.ml
5205 (substitute* "Makefile.in"
5208 (add-before 'configure 'fix-ocaml-num
5209 (lambda* (#:key inputs #:allow-other-keys)
5210 (substitute* "Makefile.in"
5211 (("nums.cma") "num.cma num_core.cma")
5212 (("= \\$\\(FUNCTORYLIB\\)")
5213 (string-append "= -I "
5214 (assoc-ref inputs "ocaml-num")
5215 "/lib/ocaml/site-lib/num/core -I "
5216 (assoc-ref inputs "ocaml-num")
5217 "/lib/ocaml/site-lib/num"
5218 " $(FUNCTORYLIB)")))
5220 (home-page "http://cubicle.lri.fr/")
5221 (synopsis "Model checker for array-based systems")
5222 (description "Cubicle is a model checker for verifying safety properties
5223 of array-based systems. This is a syntactically restricted class of
5224 parametrized transition systems with states represented as arrays indexed by
5225 an arbitrary number of processes. Cache coherence protocols and mutual
5226 exclusion algorithms are typical examples of such systems.")
5227 (license license:asl2.0)))
5229 (define-public ocaml-sexplib0
5231 (name "ocaml-sexplib0")
5233 (home-page "https://github.com/janestreet/sexplib0")
5238 (commit (string-append "v" version))))
5239 (file-name (git-file-name name version))
5242 "05m93g4m4jhj1v8pazg3s2ydcfymr3h4476yjhdca5fm4sn35bg8"))))
5243 (build-system dune-build-system)
5244 (arguments `(#:tests? #f)) ;no tests
5245 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
5246 (synopsis "Library containing the definition of S-expressions and some
5248 (description "Part of Jane Street's Core library The Core suite of
5249 libraries is an industrial strength alternative to OCaml's standard library
5250 that was developed by Jane Street, the largest industrial user of OCaml.")
5251 (license license:expat)))
5253 (define-public ocaml4.07-sexplib0
5254 (package-with-ocaml4.07
5256 (inherit ocaml-sexplib0)
5257 (name "ocaml-sexplib0")
5260 (janestreet-origin "sexplib0" version
5261 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
5262 (arguments `(#:tests? #f)) ; no tests
5265 (define-public ocaml-parsexp
5267 (name "ocaml-parsexp")
5269 (home-page "https://github.com/janestreet/parsexp")
5274 (commit (string-append "v" version))))
5275 (file-name (git-file-name name version))
5278 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
5279 (build-system dune-build-system)
5281 (list ocaml-sexplib0 ocaml-base))
5282 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
5283 (synopsis "S-expression parsing library")
5285 "This library provides generic parsers for parsing S-expressions from
5286 strings or other medium.
5288 The library is focused on performances but still provide full generic
5289 parsers that can be used with strings, bigstrings, lexing buffers,
5290 character streams or any other sources effortlessly.
5292 It provides three different class of parsers:
5295 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
5297 the parsers with positions, building compact position sequences so
5298 that one can recover original positions in order to report properly
5299 located errors at little cost
5301 the Concrete Syntax Tree parsers, produce values of type
5302 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
5303 syntax, including comments
5306 This library is portable and doesn't provide IO functions. To read
5307 s-expressions from files or other external sources, you should use
5309 (license license:expat)))
5311 (define-public ocaml4.07-parsexp
5312 (package-with-ocaml4.07
5314 (inherit ocaml-parsexp)
5315 (name "ocaml-parsexp")
5318 (janestreet-origin "parsexp" version
5319 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
5322 (define-public ocaml-sexplib
5324 (name "ocaml-sexplib")
5326 (home-page "https://github.com/janestreet/sexplib")
5331 (commit (string-append "v" version))))
5332 (file-name (git-file-name name version))
5335 "1gcvcc0jw6pb69wwfjnaqz1jk5simap2kdb7g43v7v7mksg8sh9f"))))
5336 (build-system dune-build-system)
5338 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
5339 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
5341 "Library for serializing OCaml values to and from S-expressions")
5343 "This package is part of Jane Street's Core library. Sexplib contains
5344 functionality for parsing and pretty-printing s-expressions.")
5345 (license license:expat)))
5347 (define-public ocaml4.07-sexplib
5348 (package-with-ocaml4.07
5350 (inherit ocaml-sexplib)
5353 (janestreet-origin "sexplib" version
5354 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
5357 (define-public ocaml-base
5361 (home-page "https://github.com/janestreet/base")
5366 (url "https://github.com/janestreet/base")
5367 (commit (string-append "v" version))))
5368 (file-name (git-file-name name version))
5371 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
5372 (build-system dune-build-system)
5374 (list ocaml-sexplib0))
5375 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
5377 "Full standard library replacement for OCaml")
5379 "Base is a complete and portable alternative to the OCaml standard
5380 library. It provides all standard functionalities one would expect
5381 from a language standard library. It uses consistent conventions
5382 across all of its module.
5384 Base aims to be usable in any context. As a result system dependent
5385 features such as I/O are not offered by Base. They are instead
5386 provided by companion libraries such as
5387 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5388 (license license:expat)))
5390 (define-public ocaml4.07-base
5391 (package-with-ocaml4.07
5393 (inherit ocaml-base)
5398 ;; version 0.11.1 is not released on ocaml.janestreet.org.
5401 (url "https://github.com/janestreet/base.git")
5402 (commit (string-append "v" version))))
5403 (file-name (git-file-name name version))
5406 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5409 (define-public ocaml-compiler-libs
5411 (name "ocaml-compiler-libs")
5413 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5419 (commit (string-append "v" version))))
5420 (file-name (git-file-name name version))
5423 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
5424 (build-system dune-build-system)
5425 (arguments `(#:tests? #f)) ;no tests
5426 (properties `((upstream-name . "ocaml-compiler-libs")
5427 (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
5428 (synopsis "Compiler libraries repackaged")
5429 (description "This package simply repackages the OCaml compiler libraries
5430 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5431 is now @code{Ocaml_common.Ast_helper}.")
5432 (license license:expat)))
5434 (define-public ocaml4.07-compiler-libs
5435 (package-with-ocaml4.07
5437 (inherit ocaml-compiler-libs)
5438 (name "ocaml-compiler-libs")
5440 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5446 (commit (string-append "v" version))))
5447 (file-name (git-file-name name version))
5450 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5451 (properties `((upstream-name . "ocaml-compiler-libs"))))))
5453 (define-public ocaml-stdio
5455 (name "ocaml-stdio")
5457 (home-page "https://github.com/janestreet/stdio")
5459 (janestreet-origin "stdio" version
5460 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
5461 (build-system dune-build-system)
5463 (list ocaml-base ocaml-sexplib0))
5464 (arguments `(#:tests? #f)) ;no tests
5465 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
5466 (synopsis "Standard IO library for OCaml")
5468 "Stdio implements simple input/output functionalities for OCaml. It
5469 re-exports the input/output functions of the OCaml standard libraries using
5470 a more consistent API.")
5471 (license license:expat)))
5473 (define-public ocaml4.07-stdio
5474 (package-with-ocaml4.07
5476 (inherit ocaml-stdio)
5479 (janestreet-origin "stdio" version
5480 "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
5483 (define-public ocaml-ppx-deriving
5485 (name "ocaml-ppx-deriving")
5491 (url "https://github.com/ocaml-ppx/ppx_deriving")
5492 (commit (string-append "v" version))))
5493 (file-name (git-file-name name version))
5496 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
5497 (build-system dune-build-system)
5499 `(#:test-target "."))
5501 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
5503 (list ocaml-cppo ocaml-ounit2))
5504 (properties `((upstream-name . "ppx_deriving")))
5505 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
5506 (synopsis "Type-driven code generation for OCaml")
5508 "Ppx_deriving provides common infrastructure for generating code based
5509 on type definitions, and a set of useful plugins for common tasks.")
5510 (license license:expat)))
5512 (define-public ocaml-ppx-derivers
5514 (name "ocaml-ppx-derivers")
5517 "https://github.com/ocaml-ppx/ppx_derivers")
5522 (url (string-append home-page ".git"))
5524 (file-name (git-file-name name version))
5527 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
5528 (build-system dune-build-system)
5530 '(#:tests? #f)) ;no tests
5531 (properties `((upstream-name . "ppx_derivers")))
5532 (synopsis "Shared @code{@@deriving} plugin registry")
5534 "Ppx_derivers is a tiny package whose sole purpose is to allow
5535 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5536 as part of the same ocaml-migrate-parsetree driver.")
5537 (license license:bsd-3)))
5539 (define-public ocaml-ppxlib
5541 (name "ocaml-ppxlib")
5543 (home-page "https://github.com/ocaml-ppx/ppxlib")
5550 (file-name (git-file-name name version))
5553 "0wlqvyqy9ccp7z981blv42aqwq7zfq93cakbahjyy48hiiir6vp2"))))
5554 (build-system dune-build-system)
5557 (modify-phases %standard-phases
5558 (add-after 'unpack 'fix-test-format
5560 ;; Since sexplib >= 0.15, error formating has changed
5561 (substitute* "test/driver/exception_handling/run.t"
5562 (("\\(Failure ") "Failure("))
5563 (substitute* "test/base/test.ml"
5564 (("Invalid_argument \\((.*)\\)." _ m)
5565 (string-append "Invalid_argument " m "."))
5566 (("\\(Invalid_argument (.*)\\)" _ m)
5567 (string-append "Invalid_argument " m ".")))
5568 (substitute* "test/ppx_import_support/test.ml"
5569 (("\\(Failure") "Failure")
5570 ((" \"(Some ppx-es.*)\")" _ m)
5571 (string-append " \"" m "\"."))))))))
5575 ocaml-migrate-parsetree
5581 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
5583 "Base library and tools for ppx rewriters")
5585 "A comprehensive toolbox for ppx development. It features:
5587 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5588 independent of the version of OCaml;
5589 @item a library for library for ppx rewriters in general, and type-driven code
5590 generators in particular;
5592 a feature-full driver for OCaml AST transformers;
5593 @item a quotation mechanism allowing to write values representing the
5594 OCaml AST in the OCaml syntax;
5595 @item a generator of open recursion classes from type definitions.
5597 (license license:expat)))
5599 (define-public ocaml4.07-ppxlib
5600 (package-with-ocaml4.07
5602 (inherit ocaml-ppxlib)
5603 (name "ocaml-ppxlib")
5605 (home-page "https://github.com/ocaml-ppx/ppxlib")
5612 (file-name (git-file-name name version))
5615 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
5616 (build-system dune-build-system)
5619 (modify-phases %standard-phases
5620 (add-before 'check 'set-topfind
5621 (lambda* (#:key inputs #:allow-other-keys)
5622 ;; add the line #directory ".." at the top of each file
5623 ;; using #use "topfind";; to be able to find topfind
5624 (let* ((findlib-path (assoc-ref inputs "findlib"))
5626 (string-append findlib-path "/lib/ocaml/site-lib")))
5627 (substitute* '("test/base/test.ml"
5628 "test/code_path/test.ml"
5629 "test/deriving/test.ml"
5630 "test/driver/attributes/test.ml"
5631 "test/driver/non-compressible-suffix/test.ml"
5632 "test/driver/transformations/test.ml")
5633 (("#use \"topfind\";;" all)
5634 (string-append "#directory \"" findlib-libdir "\"\n"
5639 (define-public ocaml-ppx-compare
5641 (name "ocaml-ppx-compare")
5644 (janestreet-origin "ppx_compare" version
5645 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
5646 (build-system dune-build-system)
5648 ;; Tests are currenlty failing
5649 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
5652 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5653 (properties `((upstream-name . "ppx_compare")
5654 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
5655 (home-page "https://github.com/janestreet/ppx_compare")
5656 (synopsis "Generation of comparison functions from types")
5657 (description "Generation of fast comparison functions from type expressions
5658 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
5659 from type representations. The scaffolded functions are usually much faster
5660 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
5661 flexibility by allowing you to override them for a specific type and more safety
5662 by making sure that you only compare comparable values.")
5663 (license license:asl2.0)))
5665 (define-public ocaml4.07-ppx-compare
5666 (package-with-ocaml4.07
5668 (inherit ocaml-ppx-compare)
5669 (name "ocaml-ppx-compare")
5671 (home-page "https://github.com/janestreet/ppx_compare")
5676 (commit (string-append "v" version))))
5677 (file-name (git-file-name name version))
5680 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
5681 (properties `((upstream-name . "ppx_compare"))))))
5683 (define-public ocaml-fieldslib
5685 (name "ocaml-fieldslib")
5687 (source (janestreet-origin
5689 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
5690 (build-system dune-build-system)
5691 (arguments `(#:tests? #f)) ; No tests
5693 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5694 (properties `((upstream-name . "fieldslib")
5695 (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
5696 (home-page "https://github.com/janestreet/fieldslib")
5697 (synopsis "Syntax extension to record fields")
5698 (description "Syntax extension to define first class values representing
5699 record fields, to get and set record fields, iterate and fold over all fields
5700 of a record and create new record values.")
5701 (license license:asl2.0)))
5703 (define-public ocaml4.07-fieldslib
5704 (package-with-ocaml4.07
5706 (inherit ocaml-fieldslib)
5708 (source (janestreet-origin
5710 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
5711 (properties `((upstream-name . "fieldslib"))))))
5713 (define-public ocaml-variantslib
5715 (name "ocaml-variantslib")
5718 (janestreet-origin "variantslib" version
5719 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
5720 (build-system dune-build-system)
5725 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5726 (properties `((upstream-name . "variantslib")
5727 (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
5728 (home-page "https://github.com/janestreet/variantslib")
5729 (synopsis "OCaml variants as first class values")
5730 (description "The Core suite of libraries is an alternative to OCaml's
5732 (license license:asl2.0)))
5734 (define-public ocaml4.07-variantslib
5735 (package-with-ocaml4.07
5737 (inherit ocaml-variantslib)
5738 (name "ocaml-variantslib")
5742 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5743 (version-major+minor version)
5744 "/files/variantslib-v" version ".tar.gz"))
5747 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
5748 (properties `((upstream-name . "variantslib"))))))
5750 (define-public ocaml-ppx-fields-conv
5752 (name "ocaml-ppx-fields-conv")
5754 (home-page "https://github.com/janestreet/ppx_fields_conv")
5760 (commit (string-append "v" version))))
5761 (file-name (git-file-name name version))
5764 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
5765 (build-system dune-build-system)
5767 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
5769 (properties `((upstream-name . "ppx_fields_conv")
5770 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
5771 (synopsis "Generation of accessor and iteration functions for ocaml records")
5772 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
5773 first class values representing record fields, and additional routines, to get
5774 and set record fields, iterate and fold over all fields of a record and create
5775 new record values.")
5776 (license license:asl2.0)))
5778 (define-public ocaml4.07-ppx-fields-conv
5779 (package-with-ocaml4.07
5781 (inherit ocaml-ppx-fields-conv)
5783 (source (janestreet-origin
5784 "ppx_fields_conv" version
5785 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
5786 (properties `((upstream-name . "ppx_fields_conv"))))))
5788 (define-public ocaml-ppx-sexp-conv
5790 (name "ocaml-ppx-sexp-conv")
5792 (home-page "https://github.com/janestreet/ppx_sexp_conv")
5798 (commit (string-append "v" version))))
5799 (file-name (git-file-name name version))
5802 "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"))))
5803 (build-system dune-build-system)
5805 (list ocaml-base ocaml-ppxlib))
5806 (properties `((upstream-name . "ppx_sexp_conv")
5807 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
5808 (synopsis "Generation of S-expression conversion functions from type definitions")
5809 (description "This package generates S-expression conversion functions from type
5811 (license license:asl2.0)))
5813 (define-public ocaml4.07-ppx-sexp-conv
5814 (package-with-ocaml4.07
5816 (inherit ocaml-ppx-sexp-conv)
5817 (name "ocaml-ppx-sexp-conv")
5822 (url "https://github.com/janestreet/ppx_sexp_conv")
5823 (commit (string-append "v" version))))
5824 (file-name (git-file-name name version))
5827 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
5828 (properties `((upstream-name . "ppx_sexp_conv"))))))
5830 (define-public ocaml-ppx-variants-conv
5832 (name "ocaml-ppx-variants-conv")
5838 (url "https://github.com/janestreet/ppx_variants_conv")
5839 (commit (string-append "v" version))))
5840 (file-name (git-file-name name version))
5843 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
5844 (build-system dune-build-system)
5846 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
5849 `((upstream-name . "ppx_variants_conv")
5850 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
5852 "https://github.com/janestreet/ppx_variants_conv")
5853 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
5855 "This package generates accessors and iteration functions for OCaml
5857 (license license:asl2.0)))
5859 (define-public ocaml4.07-ppx-variants-conv
5860 (package-with-ocaml4.07
5862 (inherit ocaml-ppx-variants-conv)
5863 (name "ocaml-ppx-variants-conv")
5869 (url "https://github.com/janestreet/ppx_variants_conv")
5870 (commit (string-append "v" version))))
5871 (file-name (git-file-name name version))
5874 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
5875 (properties `((upstream-name . "ppx_variants_conv"))))))
5877 (define-public ocaml-ppx-custom-printf
5879 (name "ocaml-ppx-custom-printf")
5881 (home-page "https://github.com/janestreet/ppx_custom_printf")
5887 (commit (string-append "v" version))))
5888 (file-name (git-file-name name version))
5891 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
5892 (build-system dune-build-system)
5894 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
5896 (properties `((upstream-name . "ppx_custom_printf")
5897 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
5898 (synopsis "Printf-style format-strings for user-defined string conversion")
5899 (description "Extensions to printf-style format-strings for user-defined
5900 string conversion.")
5901 (license license:asl2.0)))
5903 (define-public ocaml4.07-ppx-custom-printf
5904 (package-with-ocaml4.07
5906 (inherit ocaml-ppx-custom-printf)
5910 "ppx_custom_printf" version
5911 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
5912 (properties `((upstream-name . "ppx_custom_printf"))))))
5914 (define-public ocaml-bin-prot
5916 (name "ocaml-bin-prot")
5922 (url "https://github.com/janestreet/bin_prot")
5923 (commit (string-append "v" version))))
5924 (file-name (git-file-name name version))
5926 (base32 "1qfqglscc25wwnjx7byqmjcnjww1msnr8940gyg8h93wdq43fjnh"))))
5927 (build-system dune-build-system)
5931 ocaml-ppx-custom-printf
5932 ocaml-ppx-fields-conv
5935 ocaml-ppx-variants-conv))
5936 (properties `((upstream-name . "bin_prot")
5937 (ocaml4.07-variant . ,(delay ocaml4.07-bin-prot))))
5938 (home-page "https://github.com/janestreet/bin_prot")
5939 (synopsis "Binary protocol generator")
5940 (description "This library contains functionality for reading and writing
5941 OCaml-values in a type-safe binary protocol. It is extremely efficient,
5942 typically supporting type-safe marshalling and unmarshalling of even highly
5943 structured values at speeds sufficient to saturate a gigabit connection. The
5944 protocol is also heavily optimized for size, making it ideal for long-term
5945 storage of large amounts of data.")
5946 (license license:expat)))
5948 (define-public ocaml4.07-bin-prot
5949 (package-with-ocaml4.07
5951 (inherit ocaml-bin-prot)
5955 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5956 (version-major+minor version)
5957 "/files/bin_prot-v" version ".tar.gz"))
5960 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
5961 (propagated-inputs (list ocaml-base
5963 ocaml-ppx-custom-printf
5964 ocaml-ppx-fields-conv
5965 ocaml-ppx-variants-conv
5966 ocaml-migrate-parsetree))
5972 (define-public ocaml-octavius
5974 (name "ocaml-octavius")
5979 (url "https://github.com/ocaml-doc/octavius")
5980 (commit (string-append "v" version))))
5981 (file-name (git-file-name name version))
5984 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
5985 (build-system dune-build-system)
5988 (modify-phases %standard-phases
5989 (add-before 'build 'make-writable
5991 (for-each (lambda (file)
5993 (find-files "." "."))
5995 (properties `((upstream-name . "octavius")))
5996 (home-page "https://github.com/ocaml-doc/octavius")
5997 (synopsis "Ocamldoc comment syntax parser")
5998 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
5999 (license license:isc)))
6001 (define-public ocaml-sha
6007 (uri (string-append "https://github.com/djs55/ocaml-sha/releases/download/"
6008 version "/sha-" version ".tbz"))
6011 "1dzzhchknnbrpp5s81iqbvmqp4s0l75yrq8snj70ch3wkarmgg9z"))))
6012 (build-system dune-build-system)
6013 (propagated-inputs (list ocaml-stdlib-shims ocaml-odoc))
6014 (native-inputs (list ocaml-ounit2))
6015 (home-page "https://github.com/djs55/ocaml-sha")
6016 (synopsis "OCaml binding to the SHA cryptographic functions")
6018 "This is the binding for SHA interface code in OCaml, offering the same
6019 interface as the MD5 digest included in the OCaml standard library. It
6020 currently provides SHA1, SHA256 and SHA512 hash functions.")
6021 (license license:isc)))
6023 (define-public ocaml-ppx-hash
6025 (name "ocaml-ppx-hash")
6028 (janestreet-origin "ppx_hash" version
6029 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
6030 (build-system dune-build-system)
6032 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
6033 ocaml-migrate-parsetree ocaml-ppxlib))
6034 (properties `((upstream-name . "ppx_hash")
6035 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
6036 (home-page "https://github.com/janestreet/ppx_hash")
6037 (synopsis "Generation of hash functions from type expressions and definitions")
6038 (description "This package is a collection of ppx rewriters that generate
6039 hash functions from type exrpessions and definitions.")
6040 (license license:asl2.0)))
6042 (define-public ocaml4.07-ppx-hash
6043 (package-with-ocaml4.07
6045 (inherit ocaml-ppx-hash)
6046 (name "ocaml-ppx-hash")
6047 (home-page "https://github.com/janestreet/ppx_hash")
6053 (commit (string-append "v" version))))
6054 (file-name (git-file-name name version))
6057 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
6058 (properties `((upstream-name . "ppx_hash"))))))
6060 (define-public ocaml-ppx-enumerate
6062 (name "ocaml-ppx-enumerate")
6066 "ppx_enumerate" version
6067 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
6068 (build-system dune-build-system)
6070 `(#:tests? #f)) ; no test suite
6072 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6073 (properties `((upstream-name . "ppx_enumerate")
6074 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
6075 (home-page "https://github.com/janestreet/ppx_enumerate")
6076 (synopsis "Generate a list containing all values of a finite type")
6077 (description "Ppx_enumerate is a ppx rewriter which generates a definition
6078 for the list of all values of a type (for a type which only has finitely
6080 (license license:asl2.0)))
6082 (define-public ocaml4.07-ppx-enumerate
6083 (package-with-ocaml4.07
6085 (inherit ocaml-ppx-enumerate)
6086 (name "ocaml-ppx-enumerate")
6088 (home-page "https://github.com/janestreet/ppx_enumerate")
6093 (commit (string-append "v" version))))
6094 (file-name (git-file-name name version))
6097 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
6098 (properties `((upstream-name . "ppx_enumerate"))))))
6100 (define-public ocaml-ppx-bench
6102 (name "ocaml-ppx-bench")
6108 (url "https://github.com/janestreet/ppx_bench")
6109 (commit (string-append "v" version))))
6110 (file-name (git-file-name name version))
6112 (base32 "0bc0gbm922417wqisafxh35jslcp7xy1s0h0a1q32rhx0ivxx3g6"))))
6113 (build-system dune-build-system)
6117 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
6118 (properties `((upstream-name . "ppx_bench")
6119 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bench))))
6120 (home-page "https://github.com/janestreet/ppx_bench")
6121 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
6122 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
6123 (license license:expat)))
6125 (define-public ocaml4.07-ppx-bench
6126 (package-with-ocaml4.07
6128 (inherit ocaml-ppx-bench)
6132 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6133 (version-major+minor version)
6134 "/files/ppx_bench-v" version ".tar.gz"))
6137 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
6139 (list ocaml-ppx-inline-test ocaml-migrate-parsetree ocaml-ppxlib))
6141 (license license:asl2.0))))
6143 (define-public ocaml-ppx-here
6145 (name "ocaml-ppx-here")
6148 (janestreet-origin "ppx_here" version
6149 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
6150 (build-system dune-build-system)
6155 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6156 (properties `((upstream-name . "ppx_here")
6157 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
6158 (home-page "https://github.com/janestreet/ppx_here")
6159 (synopsis "Expands [%here] into its location")
6161 "Part of the Jane Street's PPX rewriters collection.")
6162 (license license:asl2.0)))
6164 (define-public ocaml4.07-ppx-here
6165 (package-with-ocaml4.07
6167 (inherit ocaml-ppx-here)
6170 (janestreet-origin "ppx_here" version
6171 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
6172 (properties `((upstream-name . "ppx_here"))))))
6174 (define-public ocaml-typerep
6176 (name "ocaml-typerep")
6182 (url "https://github.com/janestreet/typerep")
6183 (commit (string-append "v" version))))
6184 (file-name (git-file-name name version))
6186 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
6187 (build-system dune-build-system)
6188 (arguments `(#:tests? #f)); no tests
6189 (propagated-inputs (list ocaml-base))
6190 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-typerep))))
6191 (home-page "https://github.com/janestreet/typerep")
6192 (synopsis "Typerep is a library for runtime types")
6193 (description "Typerep is a library for runtime types.")
6194 (license license:expat)))
6196 (define-public ocaml4.07-typerep
6197 (package-with-ocaml4.07
6199 (inherit ocaml-typerep)
6203 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6204 (version-major+minor version)
6205 "/files/typerep-v" version ".tar.gz"))
6208 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
6210 (license license:asl2.0))))
6212 (define-public ocaml-ppx-sexp-value
6214 (name "ocaml-ppx-sexp-value")
6220 (url "https://github.com/janestreet/ppx_sexp_value")
6221 (commit (string-append "v" version))))
6222 (file-name (git-file-name name version))
6224 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
6225 (build-system dune-build-system)
6227 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6228 (properties `((upstream-name . "ppx_sexp_value")
6229 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-value))))
6230 (home-page "https://github.com/janestreet/ppx_sexp_value")
6231 (synopsis "Simplify building s-expressions from ocaml values")
6232 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
6233 building s-expressions from ocaml values.")
6234 (license license:expat)))
6236 (define-public ocaml4.07-ppx-sexp-value
6237 (package-with-ocaml4.07
6239 (inherit ocaml-ppx-sexp-value)
6243 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6244 (version-major+minor version)
6245 "/files/ppx_sexp_value-v" version ".tar.gz"))
6248 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
6253 ocaml-migrate-parsetree
6256 (license license:asl2.0))))
6258 (define-public ocaml-ppx-sexp-message
6260 (name "ocaml-ppx-sexp-message")
6266 (url "https://github.com/janestreet/ppx_sexp_message")
6267 (commit (string-append "v" version))))
6268 (file-name (git-file-name name version))
6270 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
6271 (build-system dune-build-system)
6273 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6274 (properties `((upstream-name . "ppx_sexp_message")
6275 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-message))))
6276 (home-page "https://github.com/janestreet/ppx_sexp_message")
6277 (synopsis "Ppx rewriter for easy construction of s-expressions")
6278 (description "Ppx_sexp_message aims to ease the creation of s-expressions
6279 in OCaml. This is mainly motivated by writing error and debugging messages,
6280 where one needs to construct a s-expression based on various element of the
6281 context such as function arguments.")
6282 (license license:expat)))
6284 (define-public ocaml4.07-ppx-sexp-message
6285 (package-with-ocaml4.07
6287 (inherit ocaml-ppx-sexp-message)
6291 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6292 (version-major+minor version)
6293 "/files/ppx_sexp_message-v" version ".tar.gz"))
6296 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
6301 ocaml-migrate-parsetree
6304 (license license:asl2.0))))
6306 (define-public ocaml-ppx-pipebang
6308 (name "ocaml-ppx-pipebang")
6314 (url "https://github.com/janestreet/ppx_pipebang")
6315 (commit (string-append "v" version))))
6316 (file-name (git-file-name name version))
6318 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
6319 (build-system dune-build-system)
6320 (arguments `(#:tests? #f)); no tests
6321 (propagated-inputs (list ocaml-ppxlib))
6322 (properties `((upstream-name . "ppx_pipebang")
6323 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-pipebang))))
6324 (home-page "https://github.com/janestreet/ppx_pipebang")
6325 (synopsis "Inline reverse application operators `|>` and `|!`")
6326 (description "A ppx rewriter that inlines reverse application operators
6327 @code{|>} and @code{|!}.")
6328 (license license:expat)))
6330 (define-public ocaml4.07-ppx-pipebang
6331 (package-with-ocaml4.07
6333 (inherit ocaml-ppx-pipebang)
6337 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6338 (version-major+minor version)
6339 "/files/ppx_pipebang-v" version ".tar.gz"))
6342 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
6343 (propagated-inputs (list ocaml-migrate-parsetree ocaml-ppxlib))
6345 (license license:asl2.0))))
6347 (define-public ocaml-ppx-module-timer
6349 (name "ocaml-ppx-module-timer")
6355 (url "https://github.com/janestreet/ppx_module_timer")
6356 (commit (string-append "v" version))))
6357 (file-name (git-file-name name version))
6359 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
6360 (build-system dune-build-system)
6362 `(#:tests? #f)); no tests
6364 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
6365 (properties `((upstream-name . "ppx_module_timer")))
6366 (home-page "https://github.com/janestreet/ppx_module_timer")
6367 (synopsis "Ppx rewriter that records top-level module startup times")
6368 (description "Modules using @samp{ppx_module_timer} have instrumentation
6369 to record their startup time.")
6370 (license license:expat)))
6372 (define-public ocaml-ppx-fixed-literal
6374 (name "ocaml-ppx-fixed-literal")
6380 (url "https://github.com/janestreet/ppx_fixed_literal")
6381 (commit (string-append "v" version))))
6382 (file-name (git-file-name name version))
6384 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
6385 (build-system dune-build-system)
6387 `(#:tests? #f)); no tests
6388 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6389 (properties `((upstream-name . "ppx_fixed_literal")))
6390 (home-page "https://github.com/janestreet/ppx_fixed_literal")
6391 (synopsis "Simpler notation for fixed point literals")
6393 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
6394 literal of the form 1.0v to conversion functions currently in scope.")
6395 (license license:expat)))
6397 (define-public ocaml-ppx-optional
6399 (name "ocaml-ppx-optional")
6403 "ppx_optional" version
6404 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
6405 (build-system dune-build-system)
6406 (arguments `(#:tests? #f)) ; No tests
6408 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6409 (properties `((upstream-name . "ppx_optional")
6410 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
6411 (home-page "https://github.com/janestreet/ppx_optional")
6412 (synopsis "Pattern matching on flat options")
6414 "A ppx rewriter that rewrites simple match statements with an if then
6416 (license license:asl2.0)))
6418 (define-public ocaml4.07-ppx-optional
6419 (package-with-ocaml4.07
6421 (inherit ocaml-ppx-optional)
6425 "ppx_optional" version
6426 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
6427 (properties `((upstream-name . "ppx_optional"))))))
6429 (define-public ocaml-ppx-optcomp
6431 (name "ocaml-ppx-optcomp")
6433 (home-page "https://github.com/janestreet/ppx_optcomp")
6439 (commit (string-append "v" version))))
6440 (file-name (git-file-name name version))
6443 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
6444 (build-system dune-build-system)
6446 (list ocaml-base ocaml-stdio ocaml-ppxlib))
6447 (properties `((upstream-name . "ppx_optcomp")
6448 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
6449 (synopsis "Optional compilation for OCaml")
6450 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
6451 used to handle optional compilations of pieces of code depending of the word
6452 size, the version of the compiler, ...")
6453 (license license:asl2.0)))
6455 (define-public ocaml4.07-ppx-optcomp
6456 (package-with-ocaml4.07
6458 (inherit ocaml-ppx-optcomp)
6462 "ppx_optcomp" version
6463 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
6464 (properties `((upstream-name . "ppx_optcomp"))))))
6466 (define-public ocaml-ppx-let
6468 (name "ocaml-ppx-let")
6471 (janestreet-origin "ppx_let" version
6472 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
6473 (build-system dune-build-system)
6475 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
6476 (properties `((upstream-name . "ppx_let")
6477 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
6478 (home-page "https://github.com/janestreet/ppx_let")
6479 (synopsis "Monadic let-bindings")
6480 (description "A ppx rewriter for monadic and applicative let bindings,
6481 match expressions, and if expressions.")
6482 (license license:asl2.0)))
6484 (define-public ocaml4.07-ppx-let
6485 (package-with-ocaml4.07
6487 (inherit ocaml-ppx-let)
6490 (janestreet-origin "ppx_let" version
6491 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
6493 (properties `((upstream-name . "ppx_let"))))))
6495 (define-public ocaml-ppx-fail
6497 (name "ocaml-ppx-fail")
6503 (url "https://github.com/janestreet/ppx_fail")
6504 (commit (string-append "v" version))))
6505 (file-name (git-file-name name version))
6507 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
6508 (build-system dune-build-system)
6509 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
6510 (properties `((upstream-name . "ppx_fail")
6511 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fail))))
6512 (home-page "https://github.com/janestreet/ppx_fail")
6513 (synopsis "Add location to calls to failwiths")
6514 (description "Syntax extension that makes [failwiths] always include a
6516 (license license:expat)))
6518 (define-public ocaml4.07-ppx-fail
6519 (package-with-ocaml4.07
6521 (inherit ocaml-ppx-fail)
6525 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6526 (version-major+minor version)
6527 "/files/ppx_fail-v" version ".tar.gz"))
6530 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
6532 (list ocaml-base ocaml-ppx-here ocaml-migrate-parsetree ocaml-ppxlib))
6534 (license license:asl2.0))))
6536 (define-public ocaml-ppx-cold
6538 (name "ocaml-ppx-cold")
6540 (home-page "https://github.com/janestreet/ppx_cold")
6542 (janestreet-origin "ppx_cold" version
6543 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
6544 (build-system dune-build-system)
6545 (arguments `(#:test-target "tests"))
6547 (list ocaml-base ocaml-ppxlib))
6548 (properties `((upstream-name . "ppx_cold")))
6549 (synopsis "Syntax extension for indicating cold path")
6551 "This package contains an syntax extension to indicate that the code is
6552 on the cold path and should be kept out of the way to avoid polluting the
6553 instruction cache on the hot path. See also
6554 https://github.com/ocaml/ocaml/issues/8563.")
6555 (license license:expat)))
6557 (define-public ocaml-ppx-assert
6559 (name "ocaml-ppx-assert")
6562 (janestreet-origin "ppx_assert" version
6563 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
6564 (build-system dune-build-system)
6571 ocaml-migrate-parsetree
6573 (properties `((upstream-name . "ppx_assert")
6574 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
6575 (home-page "https://github.com/janestreet/ppx_assert")
6576 (synopsis "Assert-like extension nodes that raise useful errors on failure")
6577 (description "This package contains assert-like extension nodes that raise
6578 useful errors on failure.")
6579 (license license:asl2.0)))
6581 (define-public ocaml4.07-ppx-assert
6582 (package-with-ocaml4.07
6584 (inherit ocaml-ppx-assert)
6587 (janestreet-origin "ppx_assert" version
6588 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
6590 `(("ocaml-base" ,ocaml-base)
6591 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6592 ("ocaml-ppx-here" ,ocaml-ppx-here)
6593 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6594 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6595 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6596 (properties `((upstream-name . "ppx_assert"))))))
6598 (define-public ocaml-ppx-expect
6600 (name "ocaml-ppx-expect")
6606 (url "https://github.com/janestreet/ppx_expect")
6607 (commit (string-append "v" version))))
6608 (file-name (git-file-name name version))
6611 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
6612 (build-system dune-build-system)
6616 ocaml-ppx-inline-test
6619 ocaml-migrate-parsetree
6621 (properties `((upstream-name . "ppx_expect")
6622 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
6623 (home-page "https://github.com/janestreet/ppx_expect")
6624 (synopsis "Cram like framework for OCaml")
6625 (description "Expect-test is a framework for writing tests in OCaml, similar
6626 to Cram. Expect-tests mimics the existing inline tests framework with the
6627 @code{let%expect_test} construct. The body of an expect-test can contain
6628 output-generating code, interleaved with @code{%expect} extension expressions
6629 to denote the expected output.")
6630 (license license:asl2.0)))
6632 (define-public ocaml4.07-ppx-expect
6633 (package-with-ocaml4.07
6635 (inherit ocaml-ppx-expect)
6638 (janestreet-origin "ppx_expect" version
6639 "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
6641 `(("ocaml-base" ,ocaml-base)
6642 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
6643 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6644 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
6645 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
6646 ("ocaml-ppx-here" ,ocaml-ppx-here)
6647 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
6648 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6649 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
6650 ("ocaml-stdio" ,ocaml-stdio)
6651 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6652 ("ocaml-ppxlib" ,ocaml-ppxlib)
6653 ("ocaml-re" ,ocaml-re)))
6654 (properties `((upstream-name . "ppx_expect"))))))
6656 (define-public ocaml-ppx-js-style
6658 (name "ocaml-ppx-js-style")
6664 (url "https://github.com/janestreet/ppx_js_style")
6665 (commit (string-append "v" version))))
6666 (file-name (git-file-name name version))
6669 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
6670 (build-system dune-build-system)
6671 (arguments `(#:tests? #f)) ; No tests
6673 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
6674 (properties `((upstream-name . "ppx_js_style")
6675 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
6676 (home-page "https://github.com/janestreet/ppx_js_style")
6677 (synopsis "Code style checker for Jane Street Packages")
6678 (description "This package is a no-op ppx rewriter. It is used as a
6679 @code{lint} tool to enforce some coding conventions across all Jane Street
6681 (license license:asl2.0)))
6683 (define-public ocaml4.07-ppx-js-style
6684 (package-with-ocaml4.07
6686 (inherit ocaml-ppx-js-style)
6689 (janestreet-origin "ppx_js_style" version
6690 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
6691 (properties `((upstream-name . "ppx_js_style"))))))
6693 (define-public ocaml-ppx-typerep-conv
6695 (name "ocaml-ppx-typerep-conv")
6701 (url "https://github.com/janestreet/ppx_typerep_conv/")
6702 (commit (string-append "v" version))))
6703 (file-name (git-file-name name version))
6705 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
6706 (build-system dune-build-system)
6708 `(#:test-target "."))
6709 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
6710 (properties `((upstream-name . "ppx_typerep_conv")
6711 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
6712 (home-page "https://github.com/janestreet/ppx_typerep_conv")
6713 (synopsis "Generation of runtime types from type declarations")
6714 (description "This package can automatically generate runtime types
6715 from type definitions.")
6716 (license license:expat)))
6718 (define-public ocaml4.07-ppx-typerep-conv
6719 (package-with-ocaml4.07
6721 (inherit ocaml-ppx-typerep-conv)
6726 (url "https://github.com/janestreet/ppx_typerep_conv")
6727 (commit (string-append "v" version))))
6728 (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
6731 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
6734 (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
6735 (license license:asl2.0))))
6737 (define-public ocaml-ppx-string
6739 (name "ocaml-ppx-string")
6745 (url "https://github.com/janestreet/ppx_string")
6746 (commit (string-append "v" version))))
6747 (file-name (git-file-name name version))
6749 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
6750 (build-system dune-build-system)
6751 (arguments `(#:tests? #f)); no tests
6753 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
6754 (properties `((upstream-name . "ppx_string")))
6755 (home-page "https://github.com/janestreet/ppx_string")
6756 (synopsis "Ppx extension for string interpolation")
6757 (description "This extension provides a syntax for string interpolation.")
6758 (license license:expat)))
6760 (define-public ocaml-ppx-stable
6762 (name "ocaml-ppx-stable")
6768 (url "https://github.com/janestreet/ppx_stable")
6769 (commit (string-append "v" version))))
6770 (file-name (git-file-name name version))
6772 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
6773 (build-system dune-build-system)
6775 `(#:test-target "tests"))
6776 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6777 (properties `((upstream-name . "ppx_stable")))
6778 (home-page "https://github.com/janestreet/ppx_stable")
6779 (synopsis "Stable types conversions generator")
6780 (description "This package is a ppx extension for easier implementation of
6781 conversion functions between almost identical types.")
6782 (license license:expat)))
6784 (define-public ocaml-ppx-base
6786 (name "ocaml-ppx-base")
6791 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
6792 (build-system dune-build-system)
6794 `(#:test-target "."))
6796 (list ocaml-ppx-compare
6802 ocaml-migrate-parsetree
6804 (properties `((upstream-name . "ppx_base")
6805 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
6806 (home-page "https://github.com/janestreet/ppx_base")
6807 (synopsis "Base set of ppx rewriters")
6808 (description "Ppx_base is the set of ppx rewriters used for Base.
6810 Note that Base doesn't need ppx to build, it is only used as a
6811 verification tool.")
6812 (license license:asl2.0)))
6814 (define-public ocaml4.07-ppx-base
6815 (package-with-ocaml4.07
6817 (inherit ocaml-ppx-base)
6822 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
6824 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
6825 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
6826 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
6827 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
6828 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6829 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6830 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6831 (properties `((upstream-name . "ppx_base"))))))
6833 (define-public ocaml-ppx-bin-prot
6835 (name "ocaml-ppx-bin-prot")
6841 (url "https://github.com/janestreet/ppx_bin_prot")
6842 (commit (string-append "v" version))))
6843 (file-name (git-file-name name version))
6845 (base32 "1280wsls061fmvmdysjqn3lv4mnkyg400jnjf4jyfr14s33h1ad5"))))
6846 (build-system dune-build-system)
6848 ;; Cyclic dependency with ocaml-ppx-jane
6851 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
6852 (properties `((upstream-name . "ppx_bin_prot")
6853 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bin-prot))))
6854 (home-page "https://github.com/janestreet/ppx_bin_prot")
6855 (synopsis "Generation of bin_prot readers and writers from types")
6856 (description "Generation of binary serialization and deserialization
6857 functions from type definitions.")
6858 (license license:expat)))
6860 (define-public ocaml4.07-ppx-bin-prot
6861 (package-with-ocaml4.07
6863 (inherit ocaml-ppx-bin-prot)
6868 (url "https://github.com/janestreet/ppx_bin_prot")
6869 (commit (string-append "v" version))))
6870 (file-name (git-file-name "ocaml4.07-ppx-bin-prot" version))
6873 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
6878 ocaml-migrate-parsetree
6881 (license license:asl2.0))))
6883 (define-public ocaml-ppx-ignore-instrumentation
6885 (name "ocaml-ppx-ignore-instrumentation")
6891 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
6892 (commit (string-append "v" version))))
6893 (file-name (git-file-name name version))
6895 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
6896 (build-system dune-build-system)
6898 `(#:tests? #f)) ;no tests
6899 (propagated-inputs (list ocaml-ppxlib))
6900 (properties `((upstream-name . "ppx_ignore_instrumentation")))
6901 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
6902 (synopsis "Ignore Jane Street specific instrumentation extensions")
6904 "Ignore Jane Street specific instrumentation extensions from internal
6905 PPXs or compiler features not yet upstreamed.")
6906 (license license:expat)))
6908 (define-public ocaml-ppx-log
6910 (name "ocaml-ppx-log")
6916 (url "https://github.com/janestreet/ppx_log")
6917 (commit (string-append "v" version))))
6918 (file-name (git-file-name name version))
6920 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
6921 (build-system dune-build-system)
6926 ocaml-ppx-sexp-message
6929 (properties `((upstream-name . "ppx_log")))
6930 (home-page "https://github.com/janestreet/ppx_log")
6931 (synopsis "Extension nodes for lazily rendering log messages")
6932 (description "This package provides ppx_sexp_message-like extension
6933 nodes for lazily rendering log messages.")
6934 (license license:expat)))
6936 (define-public ocaml-ppx-disable-unused-warnings
6938 (name "ocaml-ppx-disable-unused-warnings")
6944 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
6945 (commit (string-append "v" version))))
6946 (file-name (git-file-name name version))
6948 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
6949 (build-system dune-build-system)
6951 `(#:test-target "tests"))
6952 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6953 (properties `((upstream-name . "ppx_disable_unused_warnings")))
6954 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
6955 (synopsis "Simple ppx extension for commonly unused warnings")
6956 (description "This package expands @code{@@disable_unused_warnings} into
6957 @code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
6958 (license license:expat)))
6960 (define-public ocaml-ppx-jane
6962 (name "ocaml-ppx-jane")
6968 (url "https://github.com/janestreet/ppx_jane")
6969 (commit (string-append "v" version))))
6970 (file-name (git-file-name name version))
6972 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
6973 (build-system dune-build-system)
6975 `(#:test-target "."))
6977 (list ocaml-base-quickcheck
6982 ocaml-ppx-custom-printf
6983 ocaml-ppx-disable-unused-warnings
6985 ocaml-ppx-fields-conv
6986 ocaml-ppx-fixed-literal
6988 ocaml-ppx-ignore-instrumentation
6989 ocaml-ppx-inline-test
6992 ocaml-ppx-module-timer
6996 ocaml-ppx-sexp-message
6997 ocaml-ppx-sexp-value
7000 ocaml-ppx-typerep-conv
7001 ocaml-ppx-variants-conv
7003 (properties `((upstream-name . "ppx_jane")
7004 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-jane))))
7005 (home-page "https://github.com/janestreet/ppx_jane")
7006 (synopsis "Standard Jane Street ppx rewriters")
7007 (description "This package installs a ppx-jane executable, which is a ppx
7008 driver including all standard Jane Street ppx rewriters.")
7009 (license license:expat)))
7011 (define-public ocaml4.07-ppx-jane
7012 (package-with-ocaml4.07
7014 (inherit ocaml-ppx-jane)
7018 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7019 (version-major+minor version)
7020 "/files/ppx_jane-v" version ".tar.gz"))
7023 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
7025 (list ocaml-ppx-assert
7029 ocaml-ppx-custom-printf
7032 ocaml-ppx-fields-conv
7034 ocaml-ppx-inline-test
7039 ocaml-ppx-sexp-message
7040 ocaml-ppx-sexp-value
7041 ocaml-ppx-typerep-conv
7042 ocaml-ppx-variants-conv
7043 ocaml-migrate-parsetree
7046 (license license:asl2.0))))
7048 (define-public ocaml-base-bigstring
7050 (name "ocaml-base-bigstring")
7056 (url "https://github.com/janestreet/base_bigstring")
7057 (commit (string-append "v" version))))
7058 (file-name (git-file-name name version))
7060 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
7061 (build-system dune-build-system)
7062 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
7063 (properties `((upstream-name . "base_bigstring")))
7064 (home-page "https://github.com/janestreet/base_bigstring")
7065 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
7066 (description "This package provides string type based on [Bigarray], for
7067 use in I/O and C-bindings.")
7068 (license license:expat)))
7070 (define-public ocaml-splittable-random
7072 (name "ocaml-splittable-random")
7078 (url "https://github.com/janestreet/splittable_random")
7079 (commit (string-append "v" version))))
7080 (file-name (git-file-name name version))
7082 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
7083 (build-system dune-build-system)
7088 ocaml-ppx-inline-test
7089 ocaml-ppx-sexp-message))
7090 (properties `((upstream-name . "splittable_random")
7091 (ocaml-4.07-variant . ,(delay ocaml4.07-splittable-random))))
7092 (home-page "https://github.com/janestreet/splittable_random")
7093 (synopsis "PRNG that can be split into independent streams")
7094 (description "This package provides a splittable
7095 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
7096 be used as a stream of random values; it can also be split to produce a
7097 second, independent stream of random values.
7099 This library implements a splittable pseudo-random number generator that sacrifices
7100 cryptographic-quality randomness in favor of performance.")
7101 (license license:expat)))
7103 (define-public ocaml4.07-splittable-random
7104 (package-with-ocaml4.07
7106 (inherit ocaml-splittable-random)
7110 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7111 (version-major+minor version)
7112 "/files/splittable_random-v" version ".tar.gz"))
7115 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
7117 (list ocaml-base ocaml-ppx-jane ocaml-migrate-parsetree))
7119 (license license:asl2.0))))
7121 (define-public ocaml-base-quickcheck
7123 (name "ocaml-base-quickcheck")
7129 (url "https://github.com/janestreet/base_quickcheck")
7130 (commit (string-append "v" version))))
7131 (file-name (git-file-name name version))
7133 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
7134 (build-system dune-build-system)
7138 ocaml-ppx-fields-conv
7140 ocaml-ppx-sexp-message
7141 ocaml-ppx-sexp-value
7142 ocaml-splittable-random
7144 (properties `((upstream-name . "base_quickcheck")))
7145 (home-page "https://github.com/janestreet/base_quickcheck")
7147 "Randomized testing framework, designed for compatibility with Base")
7149 "@samp{base-quickcheck} provides randomized testing in the style of
7150 Haskell's Quickcheck library, with support for built-in types as well as
7151 types provided by Base.")
7152 (license license:expat)))
7154 (define-public ocaml4.07-jane-street-headers
7156 (name "ocaml4.07-jane-street-headers")
7160 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7161 (version-major+minor version)
7162 "/files/jane-street-headers-v" version ".tar.gz"))
7165 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
7166 (build-system dune-build-system)
7170 #:findlib ,ocaml4.07-findlib
7171 #:dune ,ocaml4.07-dune))
7172 (home-page "https://github.com/janestreet/jane-street-headers")
7173 (synopsis "Jane Street C header files")
7174 (description "This package provides C header files shared between the
7175 various Jane Street packages.")
7176 (license license:asl2.0)))
7178 (define-public ocaml4.07-configurator
7180 (name "ocaml4.07-configurator")
7184 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7185 (version-major+minor version)
7186 "/files/configurator-v" version ".tar.gz"))
7189 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
7190 (build-system dune-build-system)
7195 #:findlib ,ocaml4.07-findlib
7196 #:dune ,ocaml4.07-dune))
7198 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
7199 ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
7200 (home-page "https://github.com/janestreet/configurator")
7201 (synopsis "Helper library for gathering system configuration")
7202 (description "Configurator is a small library that helps writing OCaml
7203 scripts that test features available on the system, in order to generate config.h
7206 Configurator allows one to:
7208 @item test if a C program compiles
7209 @item query pkg-config
7210 @item import #define from OCaml header files
7211 @item generate config.h file
7213 (license license:asl2.0)))
7215 (define-public ocaml-spawn
7217 (name "ocaml-spawn")
7222 (url "https://github.com/janestreet/spawn")
7223 (commit (string-append "v" version))))
7224 (file-name (git-file-name name version))
7227 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
7228 (build-system dune-build-system)
7229 (propagated-inputs (list ocaml-odoc))
7230 (native-inputs (list ocaml-ppx-expect))
7232 `((ocaml4.07-variant . ,(delay ocaml4.07-spawn))))
7233 (home-page "https://github.com/janestreet/spawn")
7234 (synopsis "Spawning sub-processes")
7236 "Spawn is a small library exposing only one functionality: spawning sub-process.
7238 It has three main goals:
7241 @item provide missing features of Unix.create_process such as providing a
7243 @item provide better errors when a system call fails in the
7244 sub-process. For instance if a command is not found, you get a proper
7245 @code{Unix.Unix_error} exception,
7246 @item improve performances by using vfork when available. It is often
7247 claimed that nowadays fork is as fast as vfork, however in practice
7248 fork takes time proportional to the process memory while vfork is
7249 constant time. In application using a lot of memory, vfork can be
7250 thousands of times faster than fork.
7252 (license license:asl2.0)))
7254 (define-public ocaml4.07-spawn
7255 (package-with-ocaml4.07
7257 (inherit ocaml-spawn)
7262 (url "https://github.com/janestreet/spawn")
7263 (commit (string-append "v" version))))
7264 (file-name (git-file-name "ocaml4.07-spawn" version))
7267 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
7270 (modify-phases %standard-phases
7271 (add-before 'check 'fix-tests
7273 (substitute* "test/tests.ml"
7274 (("/bin/pwd") (which "pwd"))
7275 (("/bin/echo") (which "echo")))
7278 #:findlib ,ocaml4.07-findlib
7279 #:dune ,ocaml4.07-dune))
7280 (propagated-inputs '())
7283 (define-public ocaml-core
7291 (url "https://github.com/janestreet/core")
7292 (commit (string-append "v" version))))
7293 (file-name (git-file-name name version))
7295 (base32 "17vc2i5qb53dr0civ8pkrnnsn2nkydlq44ash7fhh93yb4sffy28"))))
7296 (build-system dune-build-system)
7299 #:tests? #f)); Require a cyclic dependency: core_extended
7302 ocaml-base-bigstring
7303 ocaml-base-quickcheck
7306 ocaml-jane-street-headers
7311 ocaml-ppx-inline-test
7314 ocaml-ppx-sexp-message
7316 ocaml-splittable-random
7321 (home-page "https://github.com/janestreet/core")
7322 (synopsis "Alternative to OCaml's standard library")
7323 (description "The Core suite of libraries is an alternative to OCaml's
7324 standard library that was developed by Jane Street.")
7325 ;; Also contains parts of OCaml, relicensed to expat, as permitted
7326 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7327 (license license:expat)))
7329 (define-public ocaml4.07-core
7330 (package-with-ocaml4.07
7332 (inherit ocaml-core)
7337 (url "https://github.com/janestreet/core")
7338 (commit (string-append "v" version))))
7339 (file-name (git-file-name "ocaml4.07-core" version))
7342 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
7345 ocaml4.07-configurator
7352 ocaml-migrate-parsetree
7354 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
7355 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7356 (license license:asl2.0))))
7358 (define-public ocaml-int-repr
7360 (name "ocaml-int-repr")
7366 (url "https://github.com/janestreet/int_repr")
7367 (commit (string-append "v" version))))
7368 (file-name (git-file-name name version))
7370 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
7371 (build-system dune-build-system)
7373 `(#:tests? #f)) ;no tests
7374 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
7375 (properties `((upstream-name . "int_repr")))
7376 (home-page "https://github.com/janestreet/int_repr")
7377 (synopsis "Integers of various widths")
7378 (description "Integers of various widths.")
7379 (license license:expat)))
7381 (define-public ocaml-core-kernel
7383 (name "ocaml-core-kernel")
7389 (url "https://github.com/janestreet/core_kernel")
7390 (commit (string-append "v" version))))
7391 (file-name (git-file-name name version))
7393 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
7394 (build-system dune-build-system)
7396 ;; Cyclic dependency with ocaml-core
7399 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
7400 (properties `((upstream-name . "core_kernel")
7401 (ocaml4.07-variant . ,(delay ocaml4.07-core-kernel))))
7402 (home-page "https://github.com/janestreet/core_kernel")
7403 (synopsis "Portable standard library for OCaml")
7404 (description "Core is an alternative to the OCaml standard library.
7406 Core_kernel is the system-independent part of Core. It is aimed for cases when
7407 the full Core is not available, such as in Javascript.")
7408 (license license:expat)))
7410 (define-public ocaml4.07-core-kernel
7411 (package-with-ocaml4.07
7413 (inherit ocaml-core-kernel)
7418 (url "https://github.com/janestreet/core_kernel")
7419 (commit (string-append "v" version))))
7420 (file-name (git-file-name "ocaml4.07-core-kernel" version))
7423 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
7427 ocaml4.07-configurator
7429 ocaml-jane-street-headers
7433 ocaml-ppx-inline-test
7436 ocaml-ppx-sexp-message
7438 ocaml-splittable-random
7442 ocaml-migrate-parsetree))
7445 ;; this package and parts of OCaml, relicensed by janestreet
7450 (define-public ocaml-timezone
7452 (name "ocaml-timezone")
7458 (url "https://github.com/janestreet/timezone")
7459 (commit (string-append "v" version))))
7460 (file-name (git-file-name name version))
7462 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
7463 (build-system dune-build-system)
7464 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7465 (home-page "https://github.com/janestreet/timezone")
7466 (synopsis "Time-zone handling")
7468 "Timezone handles parsing timezone data and create @code{Timezone.t}
7469 that can later be used to manipulate time in core_kernel or core.")
7470 (license license:expat)))
7472 (define-public ocaml-markup
7474 (name "ocaml-markup")
7476 (home-page "https://github.com/aantron/markup.ml")
7481 (url (string-append home-page ".git"))
7483 (file-name (git-file-name name version))
7486 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
7487 (build-system dune-build-system)
7489 `(#:package "markup"))
7491 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
7493 (list ocaml-ounit2 pkg-config))
7495 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
7496 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
7497 (description "Markup.ml provides an HTML parser and an XML parser. The
7498 parsers are wrapped in a simple interface: they are functions that transform
7499 byte streams to parsing signal streams. Streams can be manipulated in various
7500 ways, such as processing by fold, filter, and map, assembly into DOM tree
7501 structures, or serialization back to HTML or XML.
7503 Both parsers are based on their respective standards. The HTML parser, in
7504 particular, is based on the state machines defined in HTML5.
7506 The parsers are error-recovering by default, and accept fragments. This makes
7507 it very easy to get a best-effort parse of some input. The parsers can,
7508 however, be easily configured to be strict, and to accept only full documents.
7510 Apart from this, the parsers are streaming (do not build up a document in
7511 memory), non-blocking (can be used with threading libraries), lazy (do not
7512 consume input unless the signal stream is being read), and process the input in
7513 a single pass. They automatically detect the character encoding of the input
7514 stream, and convert everything to UTF-8.")
7515 (license license:bsd-3)))
7517 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
7518 ;; package-with-ocaml4.07
7519 (define-public ocaml-markup0.8.0
7521 (inherit ocaml-markup)
7522 (name "ocaml-markup")
7524 (home-page "https://github.com/aantron/markup.ml")
7529 (url (string-append home-page ".git"))
7531 (file-name (git-file-name name version))
7534 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
7536 (list ocaml-ounit pkg-config))
7539 (define-public ocaml-tyxml
7541 (name "ocaml-tyxml")
7547 (url "https://github.com/ocsigen/tyxml")
7549 (file-name (git-file-name name version))
7552 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
7553 (build-system dune-build-system)
7555 (list ocaml-re ocaml-seq ocaml-uutf))
7557 (list ocaml-alcotest))
7558 (arguments `(#:package "tyxml"))
7559 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-tyxml))))
7560 (home-page "https://github.com/ocsigen/tyxml/")
7561 (synopsis "TyXML is a library for building correct HTML and SVG documents")
7562 (description "TyXML provides a set of convenient combinators that uses the
7563 OCaml type system to ensure the validity of the generated documents. TyXML can
7564 be used with any representation of HTML and SVG: the textual one, provided
7565 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
7566 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
7567 also create your own representation and use it to instantiate a new set of
7569 (license license:lgpl2.1)))
7571 (define-public ocaml4.07-tyxml
7572 (package-with-ocaml4.07
7574 (inherit ocaml-tyxml)
7579 (url "https://github.com/ocsigen/tyxml")
7581 (file-name (git-file-name "ocaml-tyxml" version))
7584 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
7587 (define-public ocaml-bisect-ppx
7589 (name "ocaml-bisect-ppx")
7595 (url "https://github.com/aantron/bisect_ppx")
7597 (file-name (git-file-name name version))
7600 "0562rwwnhqlf5alxl1wd1n0xs0k4aamxafrh8bbmh5yl3i5rxrx4"))))
7601 (build-system dune-build-system)
7603 (list ocaml-ppxlib ocaml-cmdliner))
7605 ;; Tests require ocamlformat which would lead to circular dependencies
7607 (properties `((upstream-name . "bisect_ppx")
7608 (ocaml4.07-variant . ,(delay ocaml4.07-bisect-ppx))))
7609 (home-page "https://github.com/aantron/bisect_ppx")
7610 (synopsis "Code coverage for OCaml")
7611 (description "Bisect_ppx helps you test thoroughly. It is a small
7612 preprocessor that inserts instrumentation at places in your code, such as
7613 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
7614 nice HTML report showing which places were visited and which were missed.
7616 Usage is simple - add package bisect_ppx when building tests, run your tests,
7617 then run the Bisect_ppx report tool on the generated visitation files.")
7618 (license license:mpl2.0)))
7620 (define-public ocaml4.07-bisect-ppx
7621 (package-with-ocaml4.07
7623 (inherit ocaml-bisect-ppx)
7629 (url "https://github.com/aantron/bisect_ppx")
7631 (file-name (git-file-name "ocaml-bisect-ppx" version))
7634 "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
7636 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
7637 ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
7638 ,@(package-propagated-inputs ocaml-bisect-ppx)))
7640 `(("ocaml-ounit2" ,ocaml-ounit2)))
7643 ;; tests require git and network
7645 (properties '((upstream-name . "bisect_ppx"))))))
7647 (define-public ocaml-odoc
7650 ;; 2.2.0-alpha contains fixes for Dune 3.0 compatibility
7651 ;; (https://github.com/ocaml/odoc/commit/6ac97f3148f7791ec7451785ef4dbd9ca0daf2d1)
7652 (version "2.2.0-alpha")
7657 (url "https://github.com/ocaml/odoc")
7659 (file-name (git-file-name name version))
7661 (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
7662 (build-system dune-build-system)
7664 `(#:tests? #f; not compatible with current version of ocaml-yojson
7666 (modify-phases %standard-phases
7667 (add-after 'unpack 'fix-test
7669 ;; test results expects #!/bin/sh but gets a store path instead
7670 (substitute* "test/xref2/with.t/run.t"
7671 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
7679 ocaml-migrate-parsetree
7685 (list ocaml-alcotest
7695 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
7696 (home-page "https://github.com/ocaml/odoc")
7697 (synopsis "OCaml documentation generator")
7698 (description "Odoc is a documentation generator for OCaml. It reads
7699 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
7702 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
7703 advantage over ocamldoc is an accurate cross-referencer, which handles the
7704 complexity of the OCaml module system.")
7705 (license license:isc)))
7707 (define-public ocaml-odoc-parser
7709 (name "ocaml-odoc-parser")
7715 (url "https://github.com/ocaml-doc/odoc-parser")
7717 (file-name (git-file-name name version))
7720 "1x48kf051xs98rd6cri591bk1ccp9hyp93n1rlf6qnxic55jw683"))))
7721 (build-system dune-build-system)
7723 (list ocaml-astring ocaml-camlp-streams ocaml-result))
7725 (list ocaml-ppx-expect))
7726 (home-page "https://github.com/ocaml-doc/odoc-parser")
7727 (synopsis "Parser for ocaml documentation comments")
7729 "This package provides a library for parsing the contents of OCaml
7730 documentation comments, formatted using Odoc syntax, an extension of the
7731 language understood by ocamldoc.")
7732 (license license:isc)))
7734 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
7735 ;; with old version of dune used in package-with-ocaml4.07
7736 (define-public ocaml4.07-odoc
7737 (package-with-ocaml4.07
7739 (inherit ocaml-odoc)
7746 (url "https://github.com/ocaml/odoc")
7748 (file-name (git-file-name name version))
7750 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
7753 `(("ocaml-alcotest" ,ocaml-alcotest)
7754 ("ocaml-markup" ,ocaml-markup)
7755 ("ocaml-sexplib" ,ocaml-sexplib)
7756 ("ocaml-re" ,ocaml-re)
7757 ("ocaml-uutf" ,ocaml-uutf)))
7759 `(("ocaml-astring" ,ocaml-astring)
7760 ("ocaml-cmdliner" ,ocaml-cmdliner)
7761 ("ocaml-cppo" ,ocaml-cppo)
7762 ("ocaml-fpath" ,ocaml-fpath)
7763 ("ocaml-result" ,ocaml-result)
7764 ("ocaml-tyxml" ,ocaml-tyxml)
7765 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
7766 ("tidy-html" ,tidy-html)))
7769 (define-public ocaml-fftw3
7771 (name "ocaml-fftw3")
7777 (url "https://github.com/Chris00/fftw-ocaml")
7779 (file-name (git-file-name name version))
7782 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
7783 (build-system dune-build-system)
7785 `(#:test-target "tests"))
7789 (list ocaml-cppo ocaml-lacaml))
7791 "https://github.com/Chris00/fftw-ocaml")
7793 "Bindings to FFTW3")
7795 "Bindings providing OCaml support for the seminal Fast Fourier Transform
7797 (license license:lgpl2.1))) ; with static linking exception.
7799 (define-public ocaml-lacaml
7801 (name "ocaml-lacaml")
7807 (url "https://github.com/mmottl/lacaml")
7809 (file-name (git-file-name name version))
7812 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
7813 (modules '((guix build utils)))
7814 (snippet '(substitute* '("src/dune" "src/config/dune")
7815 (("-march=native") "")))))
7816 (properties '((tunable? . #t)))
7817 (build-system dune-build-system)
7819 `(#:tests? #f)) ; No test target.
7821 (list openblas lapack ocaml-base ocaml-stdio))
7822 (home-page "https://mmottl.github.io/lacaml/")
7824 "OCaml-bindings to BLAS and LAPACK")
7826 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
7827 LAPACK-library (Linear Algebra routines). It also contains many additional
7828 convenience functions for vectors and matrices.")
7829 (license license:lgpl2.1)))
7831 (define-public ocaml-cairo2
7833 (name "ocaml-cairo2")
7838 (url "https://github.com/Chris00/ocaml-cairo")
7840 (file-name (git-file-name name version))
7843 "06ag9b88ihhr7yd3s9l0ac7ysig02fmlmsswybbsvz71ni0mb105"))))
7844 (build-system dune-build-system)
7846 `(#:test-target "tests"))
7850 ("lablgtk" ,lablgtk)))
7853 (home-page "https://github.com/Chris00/ocaml-cairo")
7854 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
7855 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
7856 with support for multiple output devices. Currently supported output targets
7857 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
7858 and SVG file output.")
7859 (license license:lgpl3+)))
7861 (define-public ocaml-version
7863 (name "ocaml-version")
7869 (url "https://github.com/ocurrent/ocaml-version")
7870 (commit (string-append "v" version))))
7871 (file-name (git-file-name name version))
7874 "1pnw2ym021j48zknhbi1kdiyfv9si8p2l04rdzbv4g51fclsqs92"))))
7875 (build-system dune-build-system)
7876 (arguments `(#:tests? #f)) ; no tests
7877 (properties '((upstream-name . "ocaml-version")))
7879 "https://github.com/ocurrent/ocaml-version")
7881 "Manipulate, parse and generate OCaml compiler version strings")
7883 "This library provides facilities to parse version numbers of the OCaml
7884 compiler, and enumerates the various official OCaml releases and configuration
7886 (license license:isc)))
7888 (define-public ocaml-mdx
7895 (url "https://github.com/realworldocaml/mdx")
7897 (file-name (git-file-name name version))
7900 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
7901 (build-system dune-build-system)
7904 (modify-phases %standard-phases
7905 (add-after 'unpack 'fix-test-format
7907 ;; cmdliner changed the format and the tests fail
7908 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
7909 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
7911 (("COMMAND") "[COMMAND]")
7912 (("\\.\\.\\.") "…")))))))
7924 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
7926 "https://github.com/realworldocaml/mdx")
7928 "Executable code blocks inside markdown files")
7930 "@code{ocaml-mdx} executes code blocks inside markdown files.
7931 There are (currently) two sub-commands, corresponding
7932 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
7933 and tests (@code{ocaml-mdx test}]).
7935 The pre-processor mode allows mixing documentation and code,
7936 and to practice @dfn{literate programming} using markdown and OCaml.
7938 The test mode ensures that shell scripts and OCaml fragments
7939 in the documentation always stays up-to-date.
7941 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
7942 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
7944 (license license:isc)))
7946 (define-public ocaml-mparser
7948 (name "ocaml-mparser")
7954 (url "https://github.com/murmour/mparser")
7956 (file-name (git-file-name name version))
7959 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
7960 (build-system dune-build-system)
7963 '(#:package "mparser"
7965 (home-page "https://github.com/murmour/mparser")
7966 (synopsis "Simple monadic parser combinator library")
7968 "This library implements a rather complete and efficient monadic parser
7969 combinator library similar to the Parsec library for Haskell by Daan Leijen and
7970 the FParsec library for FSharp by Stephan Tolksdorf.")
7971 ;; With static linking exception.
7972 (license license:lgpl2.1+)))
7974 (define-public ocaml-mparser-re
7976 (inherit ocaml-mparser)
7977 (name "ocaml-mparser-re")
7980 '(#:package "mparser-re"
7983 (list ocaml-mparser ocaml-re))
7984 (synopsis "MParser plugin for RE-based regular expressions")
7985 (description "This package provides RE-based regular expressions
7986 support for Mparser.")))
7988 (define-public ocaml-mparser-pcre
7990 (inherit ocaml-mparser)
7991 (name "ocaml-mparser-pcre")
7994 '(#:package "mparser-pcre"
7997 (list ocaml-mparser ocaml-pcre))
7998 (synopsis "MParser plugin for PCRE-based regular expressions")
7999 (description "This package provides PCRE-based regular expressions
8000 support for Mparser.")))
8002 (define-public lablgtk3
8009 (url "https://github.com/garrigue/lablgtk")
8011 (file-name (git-file-name name version))
8014 "0rhdr89w7yj8pkga5xc7iqmqvrs28034wb7sm7vx7faaxczwjifn"))))
8015 (build-system dune-build-system)
8017 `(#:package "lablgtk3"
8020 (list ocaml-cairo2 ocaml-camlp-streams))
8025 (home-page "https://github.com/garrigue/lablgtk")
8026 (synopsis "OCaml interface to GTK+3")
8027 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
8028 provides a strongly-typed object-oriented interface that is compatible with the
8029 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
8030 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
8031 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
8032 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
8033 ;; Version 2 only, with linking exception.
8034 (license license:lgpl2.0)))
8036 (define-public ocaml-lablgtk3-sourceview3
8039 (name "ocaml-lablgtk3-sourceview3")
8040 (propagated-inputs (list lablgtk3))
8041 (native-inputs (list gtksourceview-3 pkg-config))
8043 `(#:package "lablgtk3-sourceview3"
8045 (synopsis "OCaml interface to GTK+ gtksourceview library")
8046 (description "This package provides the lablgtk interface to the
8047 GTK+ gtksourceview library.")))
8049 (define-public ocaml-reactivedata
8051 (name "ocaml-reactivedata")
8056 (url "https://github.com/ocsigen/reactiveData")
8058 (file-name (git-file-name name version))
8061 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
8063 `(#:tests? #f)) ;no tests
8064 (build-system dune-build-system)
8065 (properties `((upstream-name . "reactiveData")))
8068 (home-page "https://github.com/ocsigen/reactiveData")
8069 (synopsis "Declarative events and signals for OCaml")
8071 "React is an OCaml module for functional reactive programming (FRP). It
8072 provides support to program with time varying values: declarative events and
8073 signals. React doesn't define any primitive event or signal, it lets the
8074 client chooses the concrete timeline.")
8075 (license license:lgpl2.1+)))
8077 (define-public ocaml-uucd
8084 (uri (string-append "https://erratique.ch/software/uucd/releases/"
8085 "uucd-" version ".tbz"))
8088 "1g26237yqmxr7sd1n9fg65qm5mxz66ybk7hr336zfyyzl25h6jqf"))))
8089 (build-system ocaml-build-system)
8091 '(#:build-flags '("build" "--tests" "true")
8093 (modify-phases %standard-phases
8094 (delete 'configure))))
8098 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8099 (home-page "https://erratique.ch/software/uucd")
8100 (synopsis "Unicode character database decoder for OCaml")
8101 (description "Uucd is an OCaml module to decode the data of the Unicode
8102 character database from its XML representation. It provides high-level (but
8103 not necessarily efficient) access to the data so that efficient
8104 representations can be extracted.")
8105 (license license:isc)))
8107 (define-public ocaml-uucp
8114 (uri (string-append "https://erratique.ch/software/uucp/releases/"
8115 "uucp-" version ".tbz"))
8118 "0c2k9gkg442l7hnc8rn1vqzn6qh68w9fx7h3nj03n2x90ps98ixc"))))
8119 (build-system ocaml-build-system)
8121 '(#:build-flags '("build" "--tests" "true")
8123 (modify-phases %standard-phases
8124 (delete 'configure))))
8133 (home-page "https://erratique.ch/software/uucp")
8134 (synopsis "Unicode character properties for OCaml")
8135 (description "Uucp is an OCaml library providing efficient access to a
8136 selection of character properties of the Unicode character database.")
8137 (license license:isc)))
8139 (define-public ocaml-uuseg
8141 (name "ocaml-uuseg")
8146 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
8147 "uuseg-" version ".tbz"))
8150 "1qz130wlmnvb6j7kpvgjlqmdm2jqid4wb1dmrsls4hdm4rp7gk5b"))))
8151 (build-system ocaml-build-system)
8153 '(#:build-flags '("build" "--tests" "true")
8155 (modify-phases %standard-phases
8156 (delete 'configure))))
8158 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
8160 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8161 (home-page "https://erratique.ch/software/uuseg")
8162 (synopsis "Unicode text segmentation for OCaml")
8163 (description "Uuseg is an OCaml library for segmenting Unicode text. It
8164 implements the locale independent Unicode text segmentation algorithms to
8165 detect grapheme cluster, word and sentence boundaries and the Unicode line
8166 breaking algorithm to detect line break opportunities.
8168 The library is independent from any IO mechanism or Unicode text data
8169 structure and it can process text without a complete in-memory
8171 (license license:isc)))
8173 (define-public ocaml-fix
8176 (version "20220121")
8181 (url "https://gitlab.inria.fr/fpottier/fix")
8183 (file-name (git-file-name name version))
8186 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
8187 (build-system dune-build-system)
8191 (home-page "https://gitlab.inria.fr/fpottier/fix")
8192 (synopsis "Facilities for memoization and fixed points")
8193 (description "This package provides helpers with various constructions
8194 that involve memoization and recursion.")
8195 (license license:lgpl2.0)))
8197 (define-public ocaml-dune-build-info
8200 (name "ocaml-dune-build-info")
8201 (build-system dune-build-system)
8203 '(#:package "dune-build-info"
8204 ;; No separate test suite from dune.
8208 (synopsis "Embed build information inside an executable")
8209 (description "This package allows one to access information about how the
8210 executable was built, such as the version of the project at which it was built
8211 or the list of statically linked libraries with their versions. It supports
8212 reporting the version from the version control system during development to
8213 get an precise reference of when the executable was built.")))
8215 (define-public ocaml-either
8217 (name "ocaml-either")
8223 (url "https://github.com/mirage/either")
8225 (file-name (git-file-name name version))
8227 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
8228 (build-system dune-build-system)
8232 (home-page "https://github.com/mirage/either")
8233 (synopsis "Compatibility Either module")
8234 (description "This library is a compatibility module for the Either module
8235 defined in OCaml 4.12.0.")
8236 (license license:expat)))
8238 (define-public ocamlformat
8240 (name "ocamlformat")
8246 (url "https://github.com/ocaml-ppx/ocamlformat")
8248 (file-name (git-file-name name version))
8251 "0y1j5mwwrliy6a78cmpi6j8gw425shghqg9ylyl3qw5fx4b088pp"))))
8252 (build-system dune-build-system)
8254 '(#:package "ocamlformat"
8256 (modify-phases %standard-phases
8257 ;; Tests related to other packages
8258 (add-after 'unpack 'remove-unrelated-tests
8260 (delete-file-recursively "test/rpc")))
8261 (add-after 'unpack 'fix-test-format
8263 (substitute* "test/cli/repl_file_errors.t/run.t"
8264 ((" ;;") ";;")))))))
8269 ocaml-dune-build-info
8282 (list git-minimal ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
8283 (home-page "https://github.com/ocaml-ppx/ocamlformat")
8284 (synopsis "Auto-formatter for OCaml code")
8285 (description "OCamlFormat is a tool to automatically format OCaml code in
8287 (license license:expat)))
8289 (define-public ocaml-bigstringaf
8291 (name "ocaml-bigstringaf")
8293 (home-page "https://github.com/inhabitedtype/bigstringaf")
8300 (file-name (git-file-name name version))
8303 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
8304 (build-system dune-build-system)
8306 '(#:test-target "."))
8308 (list ocaml-bigarray-compat))
8310 (list ocaml-alcotest pkg-config))
8312 "Bigstring intrinsics and fast blits based on memcpy/memmove")
8314 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
8315 not widely-known, sometimes misused, and so programs that use Bigstrings are
8316 slower than they have to be. And even if a library got that part right and
8317 exposed the intrinsics properly, the compiler doesn't have any fast blits
8318 between Bigstrings and other string-like types. @code{bigstringaf} provides
8319 these missing pieces.")
8320 (license license:bsd-3)))
8322 (define-public ocaml-trie
8326 (home-page "https://github.com/kandu/trie/")
8333 (file-name (git-file-name name version))
8335 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
8336 (build-system dune-build-system)
8338 '(#:tests? #f)) ;no tests
8339 (synopsis "Strict impure trie tree")
8341 "This module implements strict impure trie tree data structure for
8343 (license license:expat)))
8345 (define-public ocaml-mew
8349 (home-page "https://github.com/kandu/mew")
8356 (file-name (git-file-name name version))
8358 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
8359 (build-system dune-build-system)
8361 (list ocaml-result ocaml-trie))
8363 (list ocaml-ppx-expect))
8364 (synopsis "General modal editing engine generator")
8366 "This package provides the core modules of Modal Editing Witch, a general
8367 modal editing engine generator.")
8368 (license license:expat)))
8370 (define-public ocaml-mew-vi
8372 (name "ocaml-mew-vi")
8374 (home-page "https://github.com/kandu/mew_vi")
8381 (file-name (git-file-name name version))
8383 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
8384 (build-system dune-build-system)
8386 (list ocaml-mew ocaml-react))
8388 (list ocaml-ppx-expect))
8389 (properties `((upstream-name . "mew_vi")))
8390 (synopsis "Modal editing VI-like editing engine generator")
8391 (description "This module provides a vi-like modal editing engine
8393 (license license:expat)))
8395 (define-public ocaml-syntax-shims
8397 (name "ocaml-syntax-shims")
8399 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
8406 (file-name (git-file-name name version))
8409 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
8410 (build-system dune-build-system)
8412 `((upstream-name . "ocaml-syntax-shims")))
8414 "Backport new syntax to older OCaml versions")
8416 "This package backports new language features such as @code{let+} to older
8418 (license license:expat)))
8420 (define-public ocaml-angstrom
8422 (name "ocaml-angstrom")
8424 (home-page "https://github.com/inhabitedtype/angstrom")
8431 (file-name (git-file-name name version))
8434 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
8435 (build-system dune-build-system)
8437 ;; Only build the base angstrom package.
8438 '(#:package "angstrom"
8441 (list ocaml-bigstringaf))
8443 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
8444 (synopsis "Parser combinators built for speed and memory-efficiency")
8446 "Angstrom is a parser-combinator library that makes it easy to write
8447 efficient, expressive, and reusable parsers suitable for high-performance
8448 applications. It exposes monadic and applicative interfaces for composition,
8449 and supports incremental input through buffered and unbuffered interfaces.
8450 Both interfaces give the user total control over the blocking behavior of
8451 their application, with the unbuffered interface enabling zero-copy IO.
8452 Parsers are backtracking by default and support unbounded lookahead.")
8453 (license license:bsd-3)))
8455 (define-public ocaml-graphics
8457 (name "ocaml-graphics")
8459 (home-page "https://github.com/ocaml/graphics")
8466 (file-name (git-file-name name version))
8469 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
8470 (build-system dune-build-system)
8473 (synopsis "The OCaml graphics library")
8475 "The graphics library provides a set of portable drawing primitives.
8476 Drawing takes place in a separate window that is created when
8477 Graphics.open_graph is called. This library used to be distributed with OCaml
8479 (license license:lgpl2.1+)))
8481 (define-public ocaml-uri-sexp
8484 (name "ocaml-uri-sexp")
8486 '(#:package "uri-sexp"
8489 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
8490 (native-inputs (list ocaml-ounit))
8491 (synopsis "RFC3986 URI/URL parsing library")
8492 (description "This package adds S-exp support to @code{ocaml-uri}.")))
8494 (define-public ocaml-cohttp
8496 (name "ocaml-cohttp")
8502 (url "https://github.com/mirage/ocaml-cohttp")
8503 (commit (string-append "v" version))))
8504 (file-name (git-file-name name version))
8507 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
8508 (build-system dune-build-system)
8510 '(#:package "cohttp"
8511 #:test-target "cohttp_test/src"))
8521 (list ocaml-fmt ocaml-jsonm ocaml-alcotest))
8522 (home-page "https://github.com/mirage/ocaml-cohttp")
8523 (synopsis "OCaml library for HTTP clients and servers")
8525 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
8526 HTTP parser, and implementations using various asynchronous programming
8528 (license license:isc)))
8530 (define-public js-of-ocaml
8532 (name "js-of-ocaml")
8538 (url "https://github.com/ocsigen/js_of_ocaml")
8540 (file-name (git-file-name name version))
8542 (base32 "0iyhl9z57j53j2jvyqcwmxhbvy23l6g80aa0abmlgwam14yskspf"))))
8543 (build-system dune-build-system)
8545 `(#:tests? #f ;tests assume ocaml 4.13
8561 (list node ocaml-ppx-expect ocaml-num))
8562 (properties `((upstream-name . "js_of_ocaml")))
8563 (home-page "https://ocsigen.org/js_of_ocaml/")
8564 (synopsis "Compiler from OCaml bytecode to Javascript")
8565 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
8566 It makes it possible to run pure OCaml programs in JavaScript environment like
8567 browsers and Node.js.")
8568 (license license:lgpl2.1+)))
8570 (define-public ocaml-afl-persistent
8572 (name "ocaml-afl-persistent")
8578 (url "https://github.com/stedolan/ocaml-afl-persistent")
8579 (commit (string-append "v" version))))
8580 (file-name (git-file-name name version))
8583 "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
8584 (build-system ocaml-build-system)
8587 (modify-phases %standard-phases
8591 (invoke "./build.sh")))
8592 ;; XXX: The tests are already run in the build.sh script.
8596 (home-page "https://github.com/stedolan/ocaml-afl-persistent")
8597 (synopsis "Use afl-fuzz in persistent mode")
8599 "afl-fuzz normally works by repeatedly forking the program being tested.
8600 Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
8601 repeated forking and is much faster.")
8602 (license license:expat)))
8604 (define-public ocaml-pprint
8606 (name "ocaml-pprint")
8607 (version "20220103")
8608 (home-page "https://github.com/fpottier/pprint")
8615 (file-name (git-file-name name version))
8618 "09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"))))
8619 (build-system dune-build-system)
8620 (synopsis "OCaml pretty-printing combinator library and rendering
8622 (description "This OCaml library offers a set of combinators for building
8623 so-called documents as well as an efficient engine for converting documents to
8624 a textual, fixed-width format. The engine takes care of indentation and line
8625 breaks, while respecting the constraints imposed by the structure of the
8626 document and by the text width.")
8627 (license license:lgpl2.0)))
8629 (define-public ocaml-crowbar
8631 (name "ocaml-crowbar")
8633 (home-page "https://github.com/stedolan/crowbar")
8639 (commit (string-append "v" version))))
8640 (file-name (git-file-name name version))
8643 "11f3kiw58g8njx15akx16xcplzvzdw9y6c4jpyfxylkxws4g0f6j"))))
8644 (build-system dune-build-system)
8646 `(#:test-target "."))
8648 (list ocaml-ocplib-endian
8650 ocaml-afl-persistent))
8652 (list ocaml-calendar
8658 (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
8659 (description "Crowbar is a library for testing code, combining
8660 QuickCheck-style property-based testing and the magical bug-finding powers of
8661 @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
8662 (license license:expat)))
8664 (define-public ocaml-eqaf
8668 (home-page "https://github.com/mirage/eqaf")
8674 (commit (string-append "v" version))))
8675 (file-name (git-file-name name version))
8678 "16ics56wiqyng70dy2hqikicm8ag1mv5w1h7hkiwvydw1x2j2rsl"))))
8679 (build-system dune-build-system)
8680 (propagated-inputs (list ocaml-cstruct))
8681 (native-inputs (list ocaml-alcotest ocaml-crowbar))
8682 (synopsis "OCaml library for constant-time equal function on string")
8683 (description "This OCaml library provides an equal function on string in
8684 constant-time to avoid timing-attack with crypto stuff.")
8685 (license license:expat)))
8687 (define-public ocaml-digestif
8689 (name "ocaml-digestif")
8691 (home-page "https://github.com/mirage/digestif")
8697 (commit (string-append "v" version))))
8698 (file-name (git-file-name name version))
8701 "0mc233d63y04jznsn3bxncgv7fkvyngbv6hcka412iq0y3x4qsmq"))))
8702 (build-system dune-build-system)
8703 (propagated-inputs (list ocaml-eqaf))
8713 (synopsis "Simple hash algorithms in OCaml")
8715 "Digestif is an OCaml library that provides implementations of hash
8716 algorithms. Implemented hash algorithms include MD5, SHA1, SHA224, SHA256,
8717 SHA384, SHA512, Blake2b, Blake2s and RIPEMD160.")
8718 (license license:expat)))
8720 (define-public ocaml-bibtex2html
8722 (name "ocaml-bibtex2html")
8727 (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
8728 (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
8729 (build-system ocaml-build-system)
8732 (modify-phases %standard-phases
8733 (add-after 'unpack 'patch-/bin/sh
8735 (substitute* "configure" (("/bin/sh") (which "bash")))
8736 (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
8740 ("texlive" ,(texlive-updmap.cfg
8741 (list texlive-fonts-ec texlive-preprint
8742 texlive-hyperref texlive-bibtex)))))
8745 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
8746 (synopsis "BibTeX to HTML translator")
8747 (description "This package allows you to produce, from a set of
8748 bibliography files in BibTeX format, a bibliography in HTML format.")
8749 (license license:gpl2)))
8751 (define-public ocaml-guile
8753 (name "ocaml-guile")
8755 (home-page "https://github.com/gopiandcode/guile-ocaml")
8762 (file-name (git-file-name name version))
8765 "0yxdkrhrrbwvay5sn0p26rh3f11876k6kdharmpi4afxknml74ql"))))
8766 (build-system dune-build-system)
8768 `(#:tests? #f)) ; no tests
8774 (inputs (list guile-3.0 libffi))
8778 (synopsis "Bindings to GNU Guile Scheme for OCaml")
8780 "The OCaml guile library provides high-level OCaml bindings to GNU Guile
8781 3.0, supporting easy interop between OCaml and GNU Guile Scheme.")
8782 (license license:gpl3+)))
8785 ;;; Avoid adding new packages to the end of this file. To reduce the chances
8786 ;;; of a merge conflict, place them above by existing packages with similar
8787 ;;; functionality or similar names.