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 "0gv851wxbv5ln20429nj7p92spzxgw8vngg9z94q39aawn6q8lx6"))))
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 "11ycfk0prqvifm9jca2308gw8a6cjb1hqlgfslbji2cqpan09kpq"))))
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 "1bg5vagklq6yfxsvcnj2i76xis8hb59088hkic82smyrxdjd1kjs"))))
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 "031b3s8ppqkpw1n6h87h6jzjkmny6yig9wfimmgwnljafcc83d3b"))))
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 "1s2az5lv52r0fig4624652zn3jj5dy30d1xlw6gzd0s086i4bvjh"))))
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 "1dsr3s88kgmcg3najhc29cwfvsxa2plvjws1127fz75kmn15np28"))))
4690 (build-system dune-build-system)
4692 `(#:test-target "tests"))
4693 (inputs (list gmp ocaml-cmdliner ocaml-z3 z3))
4694 (native-inputs (list ocaml-menhir))
4695 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4697 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4698 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4699 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4700 λΠ-calculus where the context contains variable declaration as well as rewrite
4701 rules. This system is not designed to develop proofs, but to check proofs
4702 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4703 (license license:cecill-c)))
4705 (define-public ocaml-jst-config
4707 (name "ocaml-jst-config")
4713 (url "https://github.com/janestreet/jst-config")
4714 (commit (string-append "v" version))))
4715 (file-name (git-file-name name version))
4718 "1yp5p63clvaxmkf7vlasgyapxc31x29c154pyq63n0fvi2fpf4y3"))))
4719 (build-system dune-build-system)
4720 (arguments '(#:tests? #f)) ; no tests
4722 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
4723 (home-page "https://github.com/janestreet/jst-config")
4724 (synopsis "Compile-time configuration for Jane Street libraries")
4725 (description "Defines compile-time constants used in Jane Street libraries
4726 such as Base, Core, and Async. This package has an unstable interface; it is
4727 intended only to share configuration between different packages from Jane
4728 Street. Future updates may not be backward-compatible, and we do not
4729 recommend using this package directly.")
4730 (license license:expat)))
4732 (define-public ocaml-jane-street-headers
4734 (name "ocaml-jane-street-headers")
4738 "jane-street-headers" version
4739 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
4740 (build-system dune-build-system)
4741 (arguments '(#:tests? #f)) ; no tests
4742 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-jane-street-headers))))
4743 (home-page "https://github.com/janestreet/jane-street-headers")
4744 (synopsis "Jane Street C header files")
4745 (description "C header files shared between the various Jane Street
4747 (license license:expat)))
4749 (define-public ocaml-time-now
4751 (name "ocaml-time-now")
4756 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
4757 (build-system dune-build-system)
4758 (arguments '(#:tests? #f)) ; no tests
4760 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
4761 ocaml-ppx-base ocaml-ppx-optcomp))
4762 (properties `((upstream-name . "time_now")))
4764 "https://github.com/janestreet/time_now")
4765 (synopsis "Reports the current time")
4767 "Provides a single function to report the current time in nanoseconds
4768 since the start of the Unix epoch.")
4769 (license license:expat)))
4771 (define-public ocaml-ppx-inline-test
4773 (name "ocaml-ppx-inline-test")
4775 (home-page "https://github.com/janestreet/ppx_inline_test")
4780 (url (string-append home-page ".git"))
4781 (commit (string-append "v" version))))
4782 (file-name (git-file-name name version))
4785 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
4786 (build-system dune-build-system)
4788 `(#:tests? #f)) ;see home page README for further information
4791 ocaml-migrate-parsetree
4797 (properties `((upstream-name . "ppx_inline_test")
4798 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
4799 (synopsis "Syntax extension for writing in-line tests in ocaml code")
4800 (description "This package contains a syntax extension for writing
4801 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
4803 (license license:expat)))
4805 (define-public ocaml4.07-ppx-inline-test
4806 (package-with-ocaml4.07
4808 (inherit ocaml-ppx-inline-test)
4809 (name "ocaml-ppx-inline-test")
4811 (home-page "https://github.com/janestreet/ppx_inline_test")
4816 (url (string-append home-page ".git"))
4817 (commit (string-append "v" version))))
4818 (file-name (git-file-name name version))
4821 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
4823 `(("ocaml-base" ,ocaml-base)
4824 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4825 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
4826 ("ocaml-sexplib0" ,ocaml-sexplib0)
4827 ("ocaml-stdio" ,ocaml-stdio)
4828 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4829 (properties `((upstream-name . "ppx_inline_test"))))))
4831 (define-public ocaml-bindlib
4833 (name "ocaml-bindlib")
4839 (url "https://github.com/rlepigre/ocaml-bindlib")
4841 (file-name (git-file-name name version))
4844 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
4845 (build-system dune-build-system)
4847 `(#:test-target "."))
4849 (list ocamlbuild ocaml-findlib))
4850 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
4851 (synopsis "OCaml Bindlib library for bound variables")
4852 (description "Bindlib is a library allowing the manipulation of data
4853 structures with bound variables. It is particularly useful when writing ASTs
4854 for programming languages, but also for manipulating terms of the λ-calculus
4855 or quantified formulas.")
4856 (license license:gpl3+)))
4858 (define-public ocaml-earley
4860 (name "ocaml-earley")
4862 (home-page "https://github.com/rlepigre/ocaml-earley")
4867 (url (string-append home-page ".git"))
4869 (file-name (git-file-name name version))
4872 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
4873 (build-system dune-build-system)
4875 `(#:test-target "."))
4877 (list ocaml-stdlib-shims))
4878 (synopsis "Parsing library based on Earley Algorithm")
4879 (description "Earley is a parser combinator library base on Earley's
4880 algorithm. It is intended to be used in conjunction with an OCaml syntax
4881 extension which allows the definition of parsers inside the language. There
4882 is also support for writing OCaml syntax extensions in a camlp4 style.")
4883 (license license:cecill-b)))
4885 (define-public ocaml-timed
4887 (name "ocaml-timed")
4889 (home-page "https://github.com/rlepigre/ocaml-timed")
4893 (url (string-append home-page ".git"))
4897 "1aqmkpjv5jk95lc2m3qyyrhw8ra7n9wj8pv3bfc83l737zv0hjn1"))
4898 (file-name (git-file-name name version))))
4899 (build-system dune-build-system)
4901 '(#:test-target "."))
4902 (synopsis "Timed references for imperative state")
4903 (description "Timed references for imperative state. This module provides
4904 an alternative type for references (or mutable cells) supporting undo/redo
4905 operations. In particular, an abstract notion of time is used to capture the
4906 state of the references at any given point, so that it can be restored. Note
4907 that usual reference operations only have a constant time / memory overhead
4908 (compared to those of the standard library).
4910 Moreover, we provide an alternative implementation based on the references
4911 of the standard library (Pervasives module). However, it is less efficient
4912 than the first one.")
4913 (license license:expat)))
4915 (define-public ocaml-biniou
4917 (name "ocaml-biniou")
4919 (home-page "https://github.com/mjambon/biniou")
4924 (url (string-append home-page ".git"))
4926 (file-name (git-file-name name version))
4929 "1gd4nqffm9h7dzxyvpfpww24l61fqgazyh3p5f7k9jvgyv9y4vcn"))))
4930 (build-system dune-build-system)
4933 (modify-phases %standard-phases
4934 (add-before 'build 'make-writable
4935 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
4937 (list ocaml-easy-format ocaml-camlp-streams))
4940 (synopsis "Data format designed for speed, safety, ease of use and backward
4942 (description "Biniou (pronounced \"be new\" is a binary data format
4943 designed for speed, safety, ease of use and backward compatibility as
4944 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4945 functionality but allows implementations several times faster (4 times faster
4946 than yojson), with 25-35% space savings.")
4947 (license license:bsd-3)))
4949 (define-public ocaml-yojson
4951 (name "ocaml-yojson")
4953 (home-page "https://github.com/ocaml-community/yojson")
4958 (url (string-append home-page ".git"))
4960 (file-name (git-file-name name version))
4963 "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
4964 (build-system dune-build-system)
4967 #:package "yojson"))
4968 (propagated-inputs (list ocaml-seq))
4969 (native-inputs (list ocaml-alcotest ocaml-cppo))
4970 (synopsis "Low-level JSON library for OCaml")
4971 (description "Yojson is an optimized parsing and printing library for the
4972 JSON format. It addresses a few shortcomings of json-wheel including 2x
4973 speedup, polymorphic variants and optional syntax for tuples and variants.
4974 @code{ydump} is a pretty printing command-line program provided with the
4975 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4976 serializers and deserializers from type definitions.")
4977 (license license:bsd-3)))
4979 (define-public ocaml-merlin-lib
4981 (name "ocaml-merlin-lib")
4987 (url "https://github.com/ocaml/merlin")
4988 (commit (string-append "v" version))))
4989 (file-name (git-file-name name version))
4992 "1cpa9x45w54l4mqqmc8z3s5gscggw37gb6z9i7wwss86fj1wgclh"))))
4993 (build-system dune-build-system)
4994 (arguments '(#:package "merlin-lib"
4995 #:tests? #f)) ; no tests
4996 (propagated-inputs (list ocaml-csexp ocaml-menhir))
4997 (home-page "https://ocaml.github.io/merlin/")
4998 (synopsis "Merlin libraries")
4999 (description "These libraries provides access to low-level compiler
5000 interfaces and the standard higher-level merlin protocol.")
5001 (license license:expat)))
5003 (define-public ocaml-dot-merlin-reader
5005 (inherit ocaml-merlin-lib)
5006 (name "ocaml-dot-merlin-reader")
5007 (arguments '(#:package "dot-merlin-reader"
5008 #:tests? #f)) ; no tests
5009 (propagated-inputs (list ocaml-merlin-lib))
5010 (synopsis "Reads config files for @code{ocaml-merlin}")
5011 (description "@code{ocaml-dot-merlin-reader} is an external reader for
5012 @code{ocaml-merlin} configurations.")))
5014 (define-public ocaml-merlin
5016 (inherit ocaml-dot-merlin-reader)
5017 (name "ocaml-merlin")
5019 '(#:package "merlin"
5021 (modify-phases %standard-phases
5023 (lambda* (#:key tests? #:allow-other-keys)
5025 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
5026 (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
5028 (list ocaml-dot-merlin-reader ; required for tests
5030 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
5031 (description "Merlin is an editor service that provides modern IDE
5032 features for OCaml. Emacs and Vim support is provided out-of-the-box.
5033 External contributors added support for Visual Studio Code, Sublime Text and
5035 (license license:expat)))
5037 (define-public ocaml-gsl
5046 "https://github.com/mmottl/gsl-ocaml/releases/download/"
5047 version "/gsl-" version ".tbz"))
5050 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
5051 (build-system dune-build-system)
5055 (modify-phases %standard-phases
5056 (add-after 'unpack 'fix-gsl-directory
5057 (lambda* (#:key inputs #:allow-other-keys)
5058 (substitute* "src/config/discover.ml"
5059 (("/usr") (assoc-ref inputs "gsl"))))))))
5063 (list ocaml-base ocaml-stdio))
5064 (home-page "https://mmottl.github.io/gsl-ocaml")
5065 (synopsis "Bindings to the GNU Scientific Library")
5067 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
5068 the OCaml language.")
5069 (license license:gpl3+)))
5071 (define-public ocaml4.07-gsl-1
5072 (package-with-ocaml4.07
5078 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
5079 "/releases/download/v"
5080 version "/gsl-ocaml-" version ".tar.gz"))
5083 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
5084 (build-system ocaml-build-system)
5086 `(("gsl" ,gsl-static)))
5088 `(("ocamlbuild" ,ocamlbuild)))
5090 (propagated-inputs '()))))
5092 (define-public cubicle
5098 (uri (string-append "http://cubicle.lri.fr/cubicle-"
5102 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
5103 (build-system gnu-build-system)
5105 (list automake ocaml
5106 (@@ (gnu packages base) which)))
5108 (list ocaml-num z3))
5110 `(#:configure-flags (list "--with-z3")
5111 #:make-flags (list "QUIET=")
5114 (modify-phases %standard-phases
5115 (add-before 'configure 'make-deterministic
5117 (substitute* "Makefile.in"
5118 (("`date`") "no date for reproducibility"))))
5119 (add-before 'configure 'configure-for-release
5121 (substitute* "Makefile.in"
5122 (("SVNREV=") "#SVNREV="))
5124 (add-before 'configure 'fix-/bin/sh
5126 (substitute* "configure"
5127 (("-/bin/sh") (string-append "-" (which "sh"))))
5129 (add-before 'configure 'fix-smt-z3wrapper.ml
5131 (substitute* "Makefile.in"
5134 (add-before 'configure 'fix-ocaml-num
5135 (lambda* (#:key inputs #:allow-other-keys)
5136 (substitute* "Makefile.in"
5137 (("nums.cma") "num.cma num_core.cma")
5138 (("= \\$\\(FUNCTORYLIB\\)")
5139 (string-append "= -I "
5140 (assoc-ref inputs "ocaml-num")
5141 "/lib/ocaml/site-lib/num/core -I "
5142 (assoc-ref inputs "ocaml-num")
5143 "/lib/ocaml/site-lib/num"
5144 " $(FUNCTORYLIB)")))
5146 (home-page "http://cubicle.lri.fr/")
5147 (synopsis "Model checker for array-based systems")
5148 (description "Cubicle is a model checker for verifying safety properties
5149 of array-based systems. This is a syntactically restricted class of
5150 parametrized transition systems with states represented as arrays indexed by
5151 an arbitrary number of processes. Cache coherence protocols and mutual
5152 exclusion algorithms are typical examples of such systems.")
5153 (license license:asl2.0)))
5155 (define-public ocaml-sexplib0
5157 (name "ocaml-sexplib0")
5159 (home-page "https://github.com/janestreet/sexplib0")
5164 (commit (string-append "v" version))))
5165 (file-name (git-file-name name version))
5168 "05m93g4m4jhj1v8pazg3s2ydcfymr3h4476yjhdca5fm4sn35bg8"))))
5169 (build-system dune-build-system)
5170 (arguments `(#:tests? #f)) ;no tests
5171 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
5172 (synopsis "Library containing the definition of S-expressions and some
5174 (description "Part of Jane Street's Core library The Core suite of
5175 libraries is an industrial strength alternative to OCaml's standard library
5176 that was developed by Jane Street, the largest industrial user of OCaml.")
5177 (license license:expat)))
5179 (define-public ocaml4.07-sexplib0
5180 (package-with-ocaml4.07
5182 (inherit ocaml-sexplib0)
5183 (name "ocaml-sexplib0")
5186 (janestreet-origin "sexplib0" version
5187 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
5188 (arguments `(#:tests? #f)) ; no tests
5191 (define-public ocaml-parsexp
5193 (name "ocaml-parsexp")
5195 (home-page "https://github.com/janestreet/parsexp")
5200 (commit (string-append "v" version))))
5201 (file-name (git-file-name name version))
5204 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
5205 (build-system dune-build-system)
5207 (list ocaml-sexplib0 ocaml-base))
5208 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
5209 (synopsis "S-expression parsing library")
5211 "This library provides generic parsers for parsing S-expressions from
5212 strings or other medium.
5214 The library is focused on performances but still provide full generic
5215 parsers that can be used with strings, bigstrings, lexing buffers,
5216 character streams or any other sources effortlessly.
5218 It provides three different class of parsers:
5221 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
5223 the parsers with positions, building compact position sequences so
5224 that one can recover original positions in order to report properly
5225 located errors at little cost
5227 the Concrete Syntax Tree parsers, produce values of type
5228 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
5229 syntax, including comments
5232 This library is portable and doesn't provide IO functions. To read
5233 s-expressions from files or other external sources, you should use
5235 (license license:expat)))
5237 (define-public ocaml4.07-parsexp
5238 (package-with-ocaml4.07
5240 (inherit ocaml-parsexp)
5241 (name "ocaml-parsexp")
5244 (janestreet-origin "parsexp" version
5245 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
5248 (define-public ocaml-sexplib
5250 (name "ocaml-sexplib")
5252 (home-page "https://github.com/janestreet/sexplib")
5257 (commit (string-append "v" version))))
5258 (file-name (git-file-name name version))
5261 "1gcvcc0jw6pb69wwfjnaqz1jk5simap2kdb7g43v7v7mksg8sh9f"))))
5262 (build-system dune-build-system)
5264 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
5265 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
5267 "Library for serializing OCaml values to and from S-expressions")
5269 "This package is part of Jane Street's Core library. Sexplib contains
5270 functionality for parsing and pretty-printing s-expressions.")
5271 (license license:expat)))
5273 (define-public ocaml4.07-sexplib
5274 (package-with-ocaml4.07
5276 (inherit ocaml-sexplib)
5279 (janestreet-origin "sexplib" version
5280 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
5283 (define-public ocaml-base
5287 (home-page "https://github.com/janestreet/base")
5292 (url "https://github.com/janestreet/base")
5293 (commit (string-append "v" version))))
5294 (file-name (git-file-name name version))
5297 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
5298 (build-system dune-build-system)
5300 (list ocaml-sexplib0))
5301 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
5303 "Full standard library replacement for OCaml")
5305 "Base is a complete and portable alternative to the OCaml standard
5306 library. It provides all standard functionalities one would expect
5307 from a language standard library. It uses consistent conventions
5308 across all of its module.
5310 Base aims to be usable in any context. As a result system dependent
5311 features such as I/O are not offered by Base. They are instead
5312 provided by companion libraries such as
5313 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5314 (license license:expat)))
5316 (define-public ocaml4.07-base
5317 (package-with-ocaml4.07
5319 (inherit ocaml-base)
5324 ;; version 0.11.1 is not released on ocaml.janestreet.org.
5327 (url "https://github.com/janestreet/base.git")
5328 (commit (string-append "v" version))))
5329 (file-name (git-file-name name version))
5332 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5335 (define-public ocaml-compiler-libs
5337 (name "ocaml-compiler-libs")
5339 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5345 (commit (string-append "v" version))))
5346 (file-name (git-file-name name version))
5349 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
5350 (build-system dune-build-system)
5351 (arguments `(#:tests? #f)) ;no tests
5352 (properties `((upstream-name . "ocaml-compiler-libs")
5353 (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
5354 (synopsis "Compiler libraries repackaged")
5355 (description "This package simply repackages the OCaml compiler libraries
5356 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5357 is now @code{Ocaml_common.Ast_helper}.")
5358 (license license:expat)))
5360 (define-public ocaml4.07-compiler-libs
5361 (package-with-ocaml4.07
5363 (inherit ocaml-compiler-libs)
5364 (name "ocaml-compiler-libs")
5366 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5372 (commit (string-append "v" version))))
5373 (file-name (git-file-name name version))
5376 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5377 (properties `((upstream-name . "ocaml-compiler-libs"))))))
5379 (define-public ocaml-stdio
5381 (name "ocaml-stdio")
5383 (home-page "https://github.com/janestreet/stdio")
5385 (janestreet-origin "stdio" version
5386 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
5387 (build-system dune-build-system)
5389 (list ocaml-base ocaml-sexplib0))
5390 (arguments `(#:tests? #f)) ;no tests
5391 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
5392 (synopsis "Standard IO library for OCaml")
5394 "Stdio implements simple input/output functionalities for OCaml. It
5395 re-exports the input/output functions of the OCaml standard libraries using
5396 a more consistent API.")
5397 (license license:expat)))
5399 (define-public ocaml4.07-stdio
5400 (package-with-ocaml4.07
5402 (inherit ocaml-stdio)
5405 (janestreet-origin "stdio" version
5406 "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
5409 (define-public ocaml-ppx-deriving
5411 (name "ocaml-ppx-deriving")
5417 (url "https://github.com/ocaml-ppx/ppx_deriving")
5418 (commit (string-append "v" version))))
5419 (file-name (git-file-name name version))
5422 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
5423 (build-system dune-build-system)
5425 `(#:test-target "."))
5427 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
5429 (list ocaml-cppo ocaml-ounit2))
5430 (properties `((upstream-name . "ppx_deriving")))
5431 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
5432 (synopsis "Type-driven code generation for OCaml")
5434 "Ppx_deriving provides common infrastructure for generating code based
5435 on type definitions, and a set of useful plugins for common tasks.")
5436 (license license:expat)))
5438 (define-public ocaml-ppx-derivers
5440 (name "ocaml-ppx-derivers")
5443 "https://github.com/ocaml-ppx/ppx_derivers")
5448 (url (string-append home-page ".git"))
5450 (file-name (git-file-name name version))
5453 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
5454 (build-system dune-build-system)
5456 '(#:tests? #f)) ;no tests
5457 (properties `((upstream-name . "ppx_derivers")))
5458 (synopsis "Shared @code{@@deriving} plugin registry")
5460 "Ppx_derivers is a tiny package whose sole purpose is to allow
5461 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5462 as part of the same ocaml-migrate-parsetree driver.")
5463 (license license:bsd-3)))
5465 (define-public ocaml-ppxlib
5467 (name "ocaml-ppxlib")
5469 (home-page "https://github.com/ocaml-ppx/ppxlib")
5476 (file-name (git-file-name name version))
5479 "0wlqvyqy9ccp7z981blv42aqwq7zfq93cakbahjyy48hiiir6vp2"))))
5480 (build-system dune-build-system)
5483 (modify-phases %standard-phases
5484 (add-after 'unpack 'fix-test-format
5486 ;; Since sexplib >= 0.15, error formating has changed
5487 (substitute* "test/driver/exception_handling/run.t"
5488 (("\\(Failure ") "Failure("))
5489 (substitute* "test/base/test.ml"
5490 (("Invalid_argument \\((.*)\\)." _ m)
5491 (string-append "Invalid_argument " m "."))
5492 (("\\(Invalid_argument (.*)\\)" _ m)
5493 (string-append "Invalid_argument " m ".")))
5494 (substitute* "test/ppx_import_support/test.ml"
5495 (("\\(Failure") "Failure")
5496 ((" \"(Some ppx-es.*)\")" _ m)
5497 (string-append " \"" m "\"."))))))))
5501 ocaml-migrate-parsetree
5507 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
5509 "Base library and tools for ppx rewriters")
5511 "A comprehensive toolbox for ppx development. It features:
5513 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5514 independent of the version of OCaml;
5515 @item a library for library for ppx rewriters in general, and type-driven code
5516 generators in particular;
5518 a feature-full driver for OCaml AST transformers;
5519 @item a quotation mechanism allowing to write values representing the
5520 OCaml AST in the OCaml syntax;
5521 @item a generator of open recursion classes from type definitions.
5523 (license license:expat)))
5525 (define-public ocaml4.07-ppxlib
5526 (package-with-ocaml4.07
5528 (inherit ocaml-ppxlib)
5529 (name "ocaml-ppxlib")
5531 (home-page "https://github.com/ocaml-ppx/ppxlib")
5538 (file-name (git-file-name name version))
5541 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
5542 (build-system dune-build-system)
5545 (modify-phases %standard-phases
5546 (add-before 'check 'set-topfind
5547 (lambda* (#:key inputs #:allow-other-keys)
5548 ;; add the line #directory ".." at the top of each file
5549 ;; using #use "topfind";; to be able to find topfind
5550 (let* ((findlib-path (assoc-ref inputs "findlib"))
5552 (string-append findlib-path "/lib/ocaml/site-lib")))
5553 (substitute* '("test/base/test.ml"
5554 "test/code_path/test.ml"
5555 "test/deriving/test.ml"
5556 "test/driver/attributes/test.ml"
5557 "test/driver/non-compressible-suffix/test.ml"
5558 "test/driver/transformations/test.ml")
5559 (("#use \"topfind\";;" all)
5560 (string-append "#directory \"" findlib-libdir "\"\n"
5565 (define-public ocaml-ppx-compare
5567 (name "ocaml-ppx-compare")
5570 (janestreet-origin "ppx_compare" version
5571 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
5572 (build-system dune-build-system)
5574 ;; Tests are currenlty failing
5575 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
5578 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5579 (properties `((upstream-name . "ppx_compare")
5580 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
5581 (home-page "https://github.com/janestreet/ppx_compare")
5582 (synopsis "Generation of comparison functions from types")
5583 (description "Generation of fast comparison functions from type expressions
5584 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
5585 from type representations. The scaffolded functions are usually much faster
5586 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
5587 flexibility by allowing you to override them for a specific type and more safety
5588 by making sure that you only compare comparable values.")
5589 (license license:asl2.0)))
5591 (define-public ocaml4.07-ppx-compare
5592 (package-with-ocaml4.07
5594 (inherit ocaml-ppx-compare)
5595 (name "ocaml-ppx-compare")
5597 (home-page "https://github.com/janestreet/ppx_compare")
5602 (commit (string-append "v" version))))
5603 (file-name (git-file-name name version))
5606 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
5607 (properties `((upstream-name . "ppx_compare"))))))
5609 (define-public ocaml-fieldslib
5611 (name "ocaml-fieldslib")
5613 (source (janestreet-origin
5615 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
5616 (build-system dune-build-system)
5617 (arguments `(#:tests? #f)) ; No tests
5619 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5620 (properties `((upstream-name . "fieldslib")
5621 (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
5622 (home-page "https://github.com/janestreet/fieldslib")
5623 (synopsis "Syntax extension to record fields")
5624 (description "Syntax extension to define first class values representing
5625 record fields, to get and set record fields, iterate and fold over all fields
5626 of a record and create new record values.")
5627 (license license:asl2.0)))
5629 (define-public ocaml4.07-fieldslib
5630 (package-with-ocaml4.07
5632 (inherit ocaml-fieldslib)
5634 (source (janestreet-origin
5636 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
5637 (properties `((upstream-name . "fieldslib"))))))
5639 (define-public ocaml-variantslib
5641 (name "ocaml-variantslib")
5644 (janestreet-origin "variantslib" version
5645 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
5646 (build-system dune-build-system)
5651 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5652 (properties `((upstream-name . "variantslib")
5653 (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
5654 (home-page "https://github.com/janestreet/variantslib")
5655 (synopsis "OCaml variants as first class values")
5656 (description "The Core suite of libraries is an alternative to OCaml's
5658 (license license:asl2.0)))
5660 (define-public ocaml4.07-variantslib
5661 (package-with-ocaml4.07
5663 (inherit ocaml-variantslib)
5664 (name "ocaml-variantslib")
5668 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5669 (version-major+minor version)
5670 "/files/variantslib-v" version ".tar.gz"))
5673 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
5674 (properties `((upstream-name . "variantslib"))))))
5676 (define-public ocaml-ppx-fields-conv
5678 (name "ocaml-ppx-fields-conv")
5680 (home-page "https://github.com/janestreet/ppx_fields_conv")
5686 (commit (string-append "v" version))))
5687 (file-name (git-file-name name version))
5690 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
5691 (build-system dune-build-system)
5693 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
5695 (properties `((upstream-name . "ppx_fields_conv")
5696 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
5697 (synopsis "Generation of accessor and iteration functions for ocaml records")
5698 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
5699 first class values representing record fields, and additional routines, to get
5700 and set record fields, iterate and fold over all fields of a record and create
5701 new record values.")
5702 (license license:asl2.0)))
5704 (define-public ocaml4.07-ppx-fields-conv
5705 (package-with-ocaml4.07
5707 (inherit ocaml-ppx-fields-conv)
5709 (source (janestreet-origin
5710 "ppx_fields_conv" version
5711 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
5712 (properties `((upstream-name . "ppx_fields_conv"))))))
5714 (define-public ocaml-ppx-sexp-conv
5716 (name "ocaml-ppx-sexp-conv")
5718 (home-page "https://github.com/janestreet/ppx_sexp_conv")
5724 (commit (string-append "v" version))))
5725 (file-name (git-file-name name version))
5728 "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"))))
5729 (build-system dune-build-system)
5731 (list ocaml-base ocaml-ppxlib))
5732 (properties `((upstream-name . "ppx_sexp_conv")
5733 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
5734 (synopsis "Generation of S-expression conversion functions from type definitions")
5735 (description "This package generates S-expression conversion functions from type
5737 (license license:asl2.0)))
5739 (define-public ocaml4.07-ppx-sexp-conv
5740 (package-with-ocaml4.07
5742 (inherit ocaml-ppx-sexp-conv)
5743 (name "ocaml-ppx-sexp-conv")
5748 (url "https://github.com/janestreet/ppx_sexp_conv")
5749 (commit (string-append "v" version))))
5750 (file-name (git-file-name name version))
5753 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
5754 (properties `((upstream-name . "ppx_sexp_conv"))))))
5756 (define-public ocaml-ppx-variants-conv
5758 (name "ocaml-ppx-variants-conv")
5764 (url "https://github.com/janestreet/ppx_variants_conv")
5765 (commit (string-append "v" version))))
5766 (file-name (git-file-name name version))
5769 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
5770 (build-system dune-build-system)
5772 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
5775 `((upstream-name . "ppx_variants_conv")
5776 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
5778 "https://github.com/janestreet/ppx_variants_conv")
5779 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
5781 "This package generates accessors and iteration functions for OCaml
5783 (license license:asl2.0)))
5785 (define-public ocaml4.07-ppx-variants-conv
5786 (package-with-ocaml4.07
5788 (inherit ocaml-ppx-variants-conv)
5789 (name "ocaml-ppx-variants-conv")
5795 (url "https://github.com/janestreet/ppx_variants_conv")
5796 (commit (string-append "v" version))))
5797 (file-name (git-file-name name version))
5800 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
5801 (properties `((upstream-name . "ppx_variants_conv"))))))
5803 (define-public ocaml-ppx-custom-printf
5805 (name "ocaml-ppx-custom-printf")
5807 (home-page "https://github.com/janestreet/ppx_custom_printf")
5813 (commit (string-append "v" version))))
5814 (file-name (git-file-name name version))
5817 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
5818 (build-system dune-build-system)
5820 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
5822 (properties `((upstream-name . "ppx_custom_printf")
5823 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
5824 (synopsis "Printf-style format-strings for user-defined string conversion")
5825 (description "Extensions to printf-style format-strings for user-defined
5826 string conversion.")
5827 (license license:asl2.0)))
5829 (define-public ocaml4.07-ppx-custom-printf
5830 (package-with-ocaml4.07
5832 (inherit ocaml-ppx-custom-printf)
5836 "ppx_custom_printf" version
5837 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
5838 (properties `((upstream-name . "ppx_custom_printf"))))))
5840 (define-public ocaml-bin-prot
5842 (name "ocaml-bin-prot")
5848 (url "https://github.com/janestreet/bin_prot")
5849 (commit (string-append "v" version))))
5850 (file-name (git-file-name name version))
5852 (base32 "1qfqglscc25wwnjx7byqmjcnjww1msnr8940gyg8h93wdq43fjnh"))))
5853 (build-system dune-build-system)
5857 ocaml-ppx-custom-printf
5858 ocaml-ppx-fields-conv
5861 ocaml-ppx-variants-conv))
5862 (properties `((upstream-name . "bin_prot")
5863 (ocaml4.07-variant . ,(delay ocaml4.07-bin-prot))))
5864 (home-page "https://github.com/janestreet/bin_prot")
5865 (synopsis "Binary protocol generator")
5866 (description "This library contains functionality for reading and writing
5867 OCaml-values in a type-safe binary protocol. It is extremely efficient,
5868 typically supporting type-safe marshalling and unmarshalling of even highly
5869 structured values at speeds sufficient to saturate a gigabit connection. The
5870 protocol is also heavily optimized for size, making it ideal for long-term
5871 storage of large amounts of data.")
5872 (license license:expat)))
5874 (define-public ocaml4.07-bin-prot
5875 (package-with-ocaml4.07
5877 (inherit ocaml-bin-prot)
5881 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5882 (version-major+minor version)
5883 "/files/bin_prot-v" version ".tar.gz"))
5886 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
5887 (propagated-inputs (list ocaml-base
5889 ocaml-ppx-custom-printf
5890 ocaml-ppx-fields-conv
5891 ocaml-ppx-variants-conv
5892 ocaml-migrate-parsetree))
5898 (define-public ocaml-octavius
5900 (name "ocaml-octavius")
5905 (url "https://github.com/ocaml-doc/octavius")
5906 (commit (string-append "v" version))))
5907 (file-name (git-file-name name version))
5910 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
5911 (build-system dune-build-system)
5914 (modify-phases %standard-phases
5915 (add-before 'build 'make-writable
5917 (for-each (lambda (file)
5919 (find-files "." "."))
5921 (properties `((upstream-name . "octavius")))
5922 (home-page "https://github.com/ocaml-doc/octavius")
5923 (synopsis "Ocamldoc comment syntax parser")
5924 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
5925 (license license:isc)))
5927 (define-public ocaml-sha
5933 (uri (string-append "https://github.com/djs55/ocaml-sha/releases/download/"
5934 version "/sha-" version ".tbz"))
5937 "1dzzhchknnbrpp5s81iqbvmqp4s0l75yrq8snj70ch3wkarmgg9z"))))
5938 (build-system dune-build-system)
5939 (propagated-inputs (list ocaml-stdlib-shims ocaml-odoc))
5940 (native-inputs (list ocaml-ounit2))
5941 (home-page "https://github.com/djs55/ocaml-sha")
5942 (synopsis "OCaml binding to the SHA cryptographic functions")
5944 "This is the binding for SHA interface code in OCaml, offering the same
5945 interface as the MD5 digest included in the OCaml standard library. It
5946 currently provides SHA1, SHA256 and SHA512 hash functions.")
5947 (license license:isc)))
5949 (define-public ocaml-ppx-hash
5951 (name "ocaml-ppx-hash")
5954 (janestreet-origin "ppx_hash" version
5955 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
5956 (build-system dune-build-system)
5958 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
5959 ocaml-migrate-parsetree ocaml-ppxlib))
5960 (properties `((upstream-name . "ppx_hash")
5961 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
5962 (home-page "https://github.com/janestreet/ppx_hash")
5963 (synopsis "Generation of hash functions from type expressions and definitions")
5964 (description "This package is a collection of ppx rewriters that generate
5965 hash functions from type exrpessions and definitions.")
5966 (license license:asl2.0)))
5968 (define-public ocaml4.07-ppx-hash
5969 (package-with-ocaml4.07
5971 (inherit ocaml-ppx-hash)
5972 (name "ocaml-ppx-hash")
5973 (home-page "https://github.com/janestreet/ppx_hash")
5979 (commit (string-append "v" version))))
5980 (file-name (git-file-name name version))
5983 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
5984 (properties `((upstream-name . "ppx_hash"))))))
5986 (define-public ocaml-ppx-enumerate
5988 (name "ocaml-ppx-enumerate")
5992 "ppx_enumerate" version
5993 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
5994 (build-system dune-build-system)
5996 `(#:tests? #f)) ; no test suite
5998 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5999 (properties `((upstream-name . "ppx_enumerate")
6000 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
6001 (home-page "https://github.com/janestreet/ppx_enumerate")
6002 (synopsis "Generate a list containing all values of a finite type")
6003 (description "Ppx_enumerate is a ppx rewriter which generates a definition
6004 for the list of all values of a type (for a type which only has finitely
6006 (license license:asl2.0)))
6008 (define-public ocaml4.07-ppx-enumerate
6009 (package-with-ocaml4.07
6011 (inherit ocaml-ppx-enumerate)
6012 (name "ocaml-ppx-enumerate")
6014 (home-page "https://github.com/janestreet/ppx_enumerate")
6019 (commit (string-append "v" version))))
6020 (file-name (git-file-name name version))
6023 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
6024 (properties `((upstream-name . "ppx_enumerate"))))))
6026 (define-public ocaml-ppx-bench
6028 (name "ocaml-ppx-bench")
6034 (url "https://github.com/janestreet/ppx_bench")
6035 (commit (string-append "v" version))))
6036 (file-name (git-file-name name version))
6038 (base32 "0bc0gbm922417wqisafxh35jslcp7xy1s0h0a1q32rhx0ivxx3g6"))))
6039 (build-system dune-build-system)
6043 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
6044 (properties `((upstream-name . "ppx_bench")
6045 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bench))))
6046 (home-page "https://github.com/janestreet/ppx_bench")
6047 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
6048 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
6049 (license license:expat)))
6051 (define-public ocaml4.07-ppx-bench
6052 (package-with-ocaml4.07
6054 (inherit ocaml-ppx-bench)
6058 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6059 (version-major+minor version)
6060 "/files/ppx_bench-v" version ".tar.gz"))
6063 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
6065 (list ocaml-ppx-inline-test ocaml-migrate-parsetree ocaml-ppxlib))
6067 (license license:asl2.0))))
6069 (define-public ocaml-ppx-here
6071 (name "ocaml-ppx-here")
6074 (janestreet-origin "ppx_here" version
6075 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
6076 (build-system dune-build-system)
6081 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6082 (properties `((upstream-name . "ppx_here")
6083 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
6084 (home-page "https://github.com/janestreet/ppx_here")
6085 (synopsis "Expands [%here] into its location")
6087 "Part of the Jane Street's PPX rewriters collection.")
6088 (license license:asl2.0)))
6090 (define-public ocaml4.07-ppx-here
6091 (package-with-ocaml4.07
6093 (inherit ocaml-ppx-here)
6096 (janestreet-origin "ppx_here" version
6097 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
6098 (properties `((upstream-name . "ppx_here"))))))
6100 (define-public ocaml-typerep
6102 (name "ocaml-typerep")
6108 (url "https://github.com/janestreet/typerep")
6109 (commit (string-append "v" version))))
6110 (file-name (git-file-name name version))
6112 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
6113 (build-system dune-build-system)
6114 (arguments `(#:tests? #f)); no tests
6115 (propagated-inputs (list ocaml-base))
6116 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-typerep))))
6117 (home-page "https://github.com/janestreet/typerep")
6118 (synopsis "Typerep is a library for runtime types")
6119 (description "Typerep is a library for runtime types.")
6120 (license license:expat)))
6122 (define-public ocaml4.07-typerep
6123 (package-with-ocaml4.07
6125 (inherit ocaml-typerep)
6129 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6130 (version-major+minor version)
6131 "/files/typerep-v" version ".tar.gz"))
6134 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
6136 (license license:asl2.0))))
6138 (define-public ocaml-ppx-sexp-value
6140 (name "ocaml-ppx-sexp-value")
6146 (url "https://github.com/janestreet/ppx_sexp_value")
6147 (commit (string-append "v" version))))
6148 (file-name (git-file-name name version))
6150 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
6151 (build-system dune-build-system)
6153 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6154 (properties `((upstream-name . "ppx_sexp_value")
6155 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-value))))
6156 (home-page "https://github.com/janestreet/ppx_sexp_value")
6157 (synopsis "Simplify building s-expressions from ocaml values")
6158 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
6159 building s-expressions from ocaml values.")
6160 (license license:expat)))
6162 (define-public ocaml4.07-ppx-sexp-value
6163 (package-with-ocaml4.07
6165 (inherit ocaml-ppx-sexp-value)
6169 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6170 (version-major+minor version)
6171 "/files/ppx_sexp_value-v" version ".tar.gz"))
6174 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
6179 ocaml-migrate-parsetree
6182 (license license:asl2.0))))
6184 (define-public ocaml-ppx-sexp-message
6186 (name "ocaml-ppx-sexp-message")
6192 (url "https://github.com/janestreet/ppx_sexp_message")
6193 (commit (string-append "v" version))))
6194 (file-name (git-file-name name version))
6196 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
6197 (build-system dune-build-system)
6199 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6200 (properties `((upstream-name . "ppx_sexp_message")
6201 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-message))))
6202 (home-page "https://github.com/janestreet/ppx_sexp_message")
6203 (synopsis "Ppx rewriter for easy construction of s-expressions")
6204 (description "Ppx_sexp_message aims to ease the creation of s-expressions
6205 in OCaml. This is mainly motivated by writing error and debugging messages,
6206 where one needs to construct a s-expression based on various element of the
6207 context such as function arguments.")
6208 (license license:expat)))
6210 (define-public ocaml4.07-ppx-sexp-message
6211 (package-with-ocaml4.07
6213 (inherit ocaml-ppx-sexp-message)
6217 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6218 (version-major+minor version)
6219 "/files/ppx_sexp_message-v" version ".tar.gz"))
6222 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
6227 ocaml-migrate-parsetree
6230 (license license:asl2.0))))
6232 (define-public ocaml-ppx-pipebang
6234 (name "ocaml-ppx-pipebang")
6240 (url "https://github.com/janestreet/ppx_pipebang")
6241 (commit (string-append "v" version))))
6242 (file-name (git-file-name name version))
6244 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
6245 (build-system dune-build-system)
6246 (arguments `(#:tests? #f)); no tests
6247 (propagated-inputs (list ocaml-ppxlib))
6248 (properties `((upstream-name . "ppx_pipebang")
6249 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-pipebang))))
6250 (home-page "https://github.com/janestreet/ppx_pipebang")
6251 (synopsis "Inline reverse application operators `|>` and `|!`")
6252 (description "A ppx rewriter that inlines reverse application operators
6253 @code{|>} and @code{|!}.")
6254 (license license:expat)))
6256 (define-public ocaml4.07-ppx-pipebang
6257 (package-with-ocaml4.07
6259 (inherit ocaml-ppx-pipebang)
6263 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6264 (version-major+minor version)
6265 "/files/ppx_pipebang-v" version ".tar.gz"))
6268 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
6269 (propagated-inputs (list ocaml-migrate-parsetree ocaml-ppxlib))
6271 (license license:asl2.0))))
6273 (define-public ocaml-ppx-module-timer
6275 (name "ocaml-ppx-module-timer")
6281 (url "https://github.com/janestreet/ppx_module_timer")
6282 (commit (string-append "v" version))))
6283 (file-name (git-file-name name version))
6285 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
6286 (build-system dune-build-system)
6288 `(#:tests? #f)); no tests
6290 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
6291 (properties `((upstream-name . "ppx_module_timer")))
6292 (home-page "https://github.com/janestreet/ppx_module_timer")
6293 (synopsis "Ppx rewriter that records top-level module startup times")
6294 (description "Modules using @samp{ppx_module_timer} have instrumentation
6295 to record their startup time.")
6296 (license license:expat)))
6298 (define-public ocaml-ppx-fixed-literal
6300 (name "ocaml-ppx-fixed-literal")
6306 (url "https://github.com/janestreet/ppx_fixed_literal")
6307 (commit (string-append "v" version))))
6308 (file-name (git-file-name name version))
6310 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
6311 (build-system dune-build-system)
6313 `(#:tests? #f)); no tests
6314 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6315 (properties `((upstream-name . "ppx_fixed_literal")))
6316 (home-page "https://github.com/janestreet/ppx_fixed_literal")
6317 (synopsis "Simpler notation for fixed point literals")
6319 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
6320 literal of the form 1.0v to conversion functions currently in scope.")
6321 (license license:expat)))
6323 (define-public ocaml-ppx-optional
6325 (name "ocaml-ppx-optional")
6329 "ppx_optional" version
6330 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
6331 (build-system dune-build-system)
6332 (arguments `(#:tests? #f)) ; No tests
6334 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6335 (properties `((upstream-name . "ppx_optional")
6336 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
6337 (home-page "https://github.com/janestreet/ppx_optional")
6338 (synopsis "Pattern matching on flat options")
6340 "A ppx rewriter that rewrites simple match statements with an if then
6342 (license license:asl2.0)))
6344 (define-public ocaml4.07-ppx-optional
6345 (package-with-ocaml4.07
6347 (inherit ocaml-ppx-optional)
6351 "ppx_optional" version
6352 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
6353 (properties `((upstream-name . "ppx_optional"))))))
6355 (define-public ocaml-ppx-optcomp
6357 (name "ocaml-ppx-optcomp")
6359 (home-page "https://github.com/janestreet/ppx_optcomp")
6365 (commit (string-append "v" version))))
6366 (file-name (git-file-name name version))
6369 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
6370 (build-system dune-build-system)
6372 (list ocaml-base ocaml-stdio ocaml-ppxlib))
6373 (properties `((upstream-name . "ppx_optcomp")
6374 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
6375 (synopsis "Optional compilation for OCaml")
6376 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
6377 used to handle optional compilations of pieces of code depending of the word
6378 size, the version of the compiler, ...")
6379 (license license:asl2.0)))
6381 (define-public ocaml4.07-ppx-optcomp
6382 (package-with-ocaml4.07
6384 (inherit ocaml-ppx-optcomp)
6388 "ppx_optcomp" version
6389 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
6390 (properties `((upstream-name . "ppx_optcomp"))))))
6392 (define-public ocaml-ppx-let
6394 (name "ocaml-ppx-let")
6397 (janestreet-origin "ppx_let" version
6398 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
6399 (build-system dune-build-system)
6401 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
6402 (properties `((upstream-name . "ppx_let")
6403 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
6404 (home-page "https://github.com/janestreet/ppx_let")
6405 (synopsis "Monadic let-bindings")
6406 (description "A ppx rewriter for monadic and applicative let bindings,
6407 match expressions, and if expressions.")
6408 (license license:asl2.0)))
6410 (define-public ocaml4.07-ppx-let
6411 (package-with-ocaml4.07
6413 (inherit ocaml-ppx-let)
6416 (janestreet-origin "ppx_let" version
6417 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
6419 (properties `((upstream-name . "ppx_let"))))))
6421 (define-public ocaml-ppx-fail
6423 (name "ocaml-ppx-fail")
6429 (url "https://github.com/janestreet/ppx_fail")
6430 (commit (string-append "v" version))))
6431 (file-name (git-file-name name version))
6433 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
6434 (build-system dune-build-system)
6435 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
6436 (properties `((upstream-name . "ppx_fail")
6437 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fail))))
6438 (home-page "https://github.com/janestreet/ppx_fail")
6439 (synopsis "Add location to calls to failwiths")
6440 (description "Syntax extension that makes [failwiths] always include a
6442 (license license:expat)))
6444 (define-public ocaml4.07-ppx-fail
6445 (package-with-ocaml4.07
6447 (inherit ocaml-ppx-fail)
6451 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6452 (version-major+minor version)
6453 "/files/ppx_fail-v" version ".tar.gz"))
6456 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
6458 (list ocaml-base ocaml-ppx-here ocaml-migrate-parsetree ocaml-ppxlib))
6460 (license license:asl2.0))))
6462 (define-public ocaml-ppx-cold
6464 (name "ocaml-ppx-cold")
6466 (home-page "https://github.com/janestreet/ppx_cold")
6468 (janestreet-origin "ppx_cold" version
6469 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
6470 (build-system dune-build-system)
6471 (arguments `(#:test-target "tests"))
6473 (list ocaml-base ocaml-ppxlib))
6474 (properties `((upstream-name . "ppx_cold")))
6475 (synopsis "Syntax extension for indicating cold path")
6477 "This package contains an syntax extension to indicate that the code is
6478 on the cold path and should be kept out of the way to avoid polluting the
6479 instruction cache on the hot path. See also
6480 https://github.com/ocaml/ocaml/issues/8563.")
6481 (license license:expat)))
6483 (define-public ocaml-ppx-assert
6485 (name "ocaml-ppx-assert")
6488 (janestreet-origin "ppx_assert" version
6489 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
6490 (build-system dune-build-system)
6497 ocaml-migrate-parsetree
6499 (properties `((upstream-name . "ppx_assert")
6500 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
6501 (home-page "https://github.com/janestreet/ppx_assert")
6502 (synopsis "Assert-like extension nodes that raise useful errors on failure")
6503 (description "This package contains assert-like extension nodes that raise
6504 useful errors on failure.")
6505 (license license:asl2.0)))
6507 (define-public ocaml4.07-ppx-assert
6508 (package-with-ocaml4.07
6510 (inherit ocaml-ppx-assert)
6513 (janestreet-origin "ppx_assert" version
6514 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
6516 `(("ocaml-base" ,ocaml-base)
6517 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6518 ("ocaml-ppx-here" ,ocaml-ppx-here)
6519 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6520 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6521 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6522 (properties `((upstream-name . "ppx_assert"))))))
6524 (define-public ocaml-ppx-expect
6526 (name "ocaml-ppx-expect")
6532 (url "https://github.com/janestreet/ppx_expect")
6533 (commit (string-append "v" version))))
6534 (file-name (git-file-name name version))
6537 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
6538 (build-system dune-build-system)
6542 ocaml-ppx-inline-test
6545 ocaml-migrate-parsetree
6547 (properties `((upstream-name . "ppx_expect")
6548 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
6549 (home-page "https://github.com/janestreet/ppx_expect")
6550 (synopsis "Cram like framework for OCaml")
6551 (description "Expect-test is a framework for writing tests in OCaml, similar
6552 to Cram. Expect-tests mimics the existing inline tests framework with the
6553 @code{let%expect_test} construct. The body of an expect-test can contain
6554 output-generating code, interleaved with @code{%expect} extension expressions
6555 to denote the expected output.")
6556 (license license:asl2.0)))
6558 (define-public ocaml4.07-ppx-expect
6559 (package-with-ocaml4.07
6561 (inherit ocaml-ppx-expect)
6564 (janestreet-origin "ppx_expect" version
6565 "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
6567 `(("ocaml-base" ,ocaml-base)
6568 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
6569 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6570 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
6571 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
6572 ("ocaml-ppx-here" ,ocaml-ppx-here)
6573 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
6574 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6575 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
6576 ("ocaml-stdio" ,ocaml-stdio)
6577 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6578 ("ocaml-ppxlib" ,ocaml-ppxlib)
6579 ("ocaml-re" ,ocaml-re)))
6580 (properties `((upstream-name . "ppx_expect"))))))
6582 (define-public ocaml-ppx-js-style
6584 (name "ocaml-ppx-js-style")
6590 (url "https://github.com/janestreet/ppx_js_style")
6591 (commit (string-append "v" version))))
6592 (file-name (git-file-name name version))
6595 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
6596 (build-system dune-build-system)
6597 (arguments `(#:tests? #f)) ; No tests
6599 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
6600 (properties `((upstream-name . "ppx_js_style")
6601 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
6602 (home-page "https://github.com/janestreet/ppx_js_style")
6603 (synopsis "Code style checker for Jane Street Packages")
6604 (description "This package is a no-op ppx rewriter. It is used as a
6605 @code{lint} tool to enforce some coding conventions across all Jane Street
6607 (license license:asl2.0)))
6609 (define-public ocaml4.07-ppx-js-style
6610 (package-with-ocaml4.07
6612 (inherit ocaml-ppx-js-style)
6615 (janestreet-origin "ppx_js_style" version
6616 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
6617 (properties `((upstream-name . "ppx_js_style"))))))
6619 (define-public ocaml-ppx-typerep-conv
6621 (name "ocaml-ppx-typerep-conv")
6627 (url "https://github.com/janestreet/ppx_typerep_conv/")
6628 (commit (string-append "v" version))))
6629 (file-name (git-file-name name version))
6631 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
6632 (build-system dune-build-system)
6634 `(#:test-target "."))
6635 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
6636 (properties `((upstream-name . "ppx_typerep_conv")
6637 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
6638 (home-page "https://github.com/janestreet/ppx_typerep_conv")
6639 (synopsis "Generation of runtime types from type declarations")
6640 (description "This package can automatically generate runtime types
6641 from type definitions.")
6642 (license license:expat)))
6644 (define-public ocaml4.07-ppx-typerep-conv
6645 (package-with-ocaml4.07
6647 (inherit ocaml-ppx-typerep-conv)
6652 (url "https://github.com/janestreet/ppx_typerep_conv")
6653 (commit (string-append "v" version))))
6654 (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
6657 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
6660 (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
6661 (license license:asl2.0))))
6663 (define-public ocaml-ppx-string
6665 (name "ocaml-ppx-string")
6671 (url "https://github.com/janestreet/ppx_string")
6672 (commit (string-append "v" version))))
6673 (file-name (git-file-name name version))
6675 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
6676 (build-system dune-build-system)
6677 (arguments `(#:tests? #f)); no tests
6679 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
6680 (properties `((upstream-name . "ppx_string")))
6681 (home-page "https://github.com/janestreet/ppx_string")
6682 (synopsis "Ppx extension for string interpolation")
6683 (description "This extension provides a syntax for string interpolation.")
6684 (license license:expat)))
6686 (define-public ocaml-ppx-stable
6688 (name "ocaml-ppx-stable")
6694 (url "https://github.com/janestreet/ppx_stable")
6695 (commit (string-append "v" version))))
6696 (file-name (git-file-name name version))
6698 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
6699 (build-system dune-build-system)
6701 `(#:test-target "tests"))
6702 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6703 (properties `((upstream-name . "ppx_stable")))
6704 (home-page "https://github.com/janestreet/ppx_stable")
6705 (synopsis "Stable types conversions generator")
6706 (description "This package is a ppx extension for easier implementation of
6707 conversion functions between almost identical types.")
6708 (license license:expat)))
6710 (define-public ocaml-ppx-base
6712 (name "ocaml-ppx-base")
6717 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
6718 (build-system dune-build-system)
6720 `(#:test-target "."))
6722 (list ocaml-ppx-compare
6728 ocaml-migrate-parsetree
6730 (properties `((upstream-name . "ppx_base")
6731 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
6732 (home-page "https://github.com/janestreet/ppx_base")
6733 (synopsis "Base set of ppx rewriters")
6734 (description "Ppx_base is the set of ppx rewriters used for Base.
6736 Note that Base doesn't need ppx to build, it is only used as a
6737 verification tool.")
6738 (license license:asl2.0)))
6740 (define-public ocaml4.07-ppx-base
6741 (package-with-ocaml4.07
6743 (inherit ocaml-ppx-base)
6748 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
6750 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
6751 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
6752 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
6753 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
6754 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6755 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6756 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6757 (properties `((upstream-name . "ppx_base"))))))
6759 (define-public ocaml-ppx-bin-prot
6761 (name "ocaml-ppx-bin-prot")
6767 (url "https://github.com/janestreet/ppx_bin_prot")
6768 (commit (string-append "v" version))))
6769 (file-name (git-file-name name version))
6771 (base32 "1280wsls061fmvmdysjqn3lv4mnkyg400jnjf4jyfr14s33h1ad5"))))
6772 (build-system dune-build-system)
6774 ;; Cyclic dependency with ocaml-ppx-jane
6777 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
6778 (properties `((upstream-name . "ppx_bin_prot")
6779 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bin-prot))))
6780 (home-page "https://github.com/janestreet/ppx_bin_prot")
6781 (synopsis "Generation of bin_prot readers and writers from types")
6782 (description "Generation of binary serialization and deserialization
6783 functions from type definitions.")
6784 (license license:expat)))
6786 (define-public ocaml4.07-ppx-bin-prot
6787 (package-with-ocaml4.07
6789 (inherit ocaml-ppx-bin-prot)
6794 (url "https://github.com/janestreet/ppx_bin_prot")
6795 (commit (string-append "v" version))))
6796 (file-name (git-file-name "ocaml4.07-ppx-bin-prot" version))
6799 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
6804 ocaml-migrate-parsetree
6807 (license license:asl2.0))))
6809 (define-public ocaml-ppx-ignore-instrumentation
6811 (name "ocaml-ppx-ignore-instrumentation")
6817 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
6818 (commit (string-append "v" version))))
6819 (file-name (git-file-name name version))
6821 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
6822 (build-system dune-build-system)
6824 `(#:tests? #f)) ;no tests
6825 (propagated-inputs (list ocaml-ppxlib))
6826 (properties `((upstream-name . "ppx_ignore_instrumentation")))
6827 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
6828 (synopsis "Ignore Jane Street specific instrumentation extensions")
6830 "Ignore Jane Street specific instrumentation extensions from internal
6831 PPXs or compiler features not yet upstreamed.")
6832 (license license:expat)))
6834 (define-public ocaml-ppx-log
6836 (name "ocaml-ppx-log")
6842 (url "https://github.com/janestreet/ppx_log")
6843 (commit (string-append "v" version))))
6844 (file-name (git-file-name name version))
6846 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
6847 (build-system dune-build-system)
6852 ocaml-ppx-sexp-message
6855 (properties `((upstream-name . "ppx_log")))
6856 (home-page "https://github.com/janestreet/ppx_log")
6857 (synopsis "Extension nodes for lazily rendering log messages")
6858 (description "This package provides ppx_sexp_message-like extension
6859 nodes for lazily rendering log messages.")
6860 (license license:expat)))
6862 (define-public ocaml-ppx-disable-unused-warnings
6864 (name "ocaml-ppx-disable-unused-warnings")
6870 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
6871 (commit (string-append "v" version))))
6872 (file-name (git-file-name name version))
6874 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
6875 (build-system dune-build-system)
6877 `(#:test-target "tests"))
6878 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6879 (properties `((upstream-name . "ppx_disable_unused_warnings")))
6880 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
6881 (synopsis "Simple ppx extension for commonly unused warnings")
6882 (description "This package expands @code{@@disable_unused_warnings} into
6883 @code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
6884 (license license:expat)))
6886 (define-public ocaml-ppx-jane
6888 (name "ocaml-ppx-jane")
6894 (url "https://github.com/janestreet/ppx_jane")
6895 (commit (string-append "v" version))))
6896 (file-name (git-file-name name version))
6898 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
6899 (build-system dune-build-system)
6901 `(#:test-target "."))
6903 (list ocaml-base-quickcheck
6908 ocaml-ppx-custom-printf
6909 ocaml-ppx-disable-unused-warnings
6911 ocaml-ppx-fields-conv
6912 ocaml-ppx-fixed-literal
6914 ocaml-ppx-ignore-instrumentation
6915 ocaml-ppx-inline-test
6918 ocaml-ppx-module-timer
6922 ocaml-ppx-sexp-message
6923 ocaml-ppx-sexp-value
6926 ocaml-ppx-typerep-conv
6927 ocaml-ppx-variants-conv
6929 (properties `((upstream-name . "ppx_jane")
6930 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-jane))))
6931 (home-page "https://github.com/janestreet/ppx_jane")
6932 (synopsis "Standard Jane Street ppx rewriters")
6933 (description "This package installs a ppx-jane executable, which is a ppx
6934 driver including all standard Jane Street ppx rewriters.")
6935 (license license:expat)))
6937 (define-public ocaml4.07-ppx-jane
6938 (package-with-ocaml4.07
6940 (inherit ocaml-ppx-jane)
6944 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6945 (version-major+minor version)
6946 "/files/ppx_jane-v" version ".tar.gz"))
6949 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
6951 (list ocaml-ppx-assert
6955 ocaml-ppx-custom-printf
6958 ocaml-ppx-fields-conv
6960 ocaml-ppx-inline-test
6965 ocaml-ppx-sexp-message
6966 ocaml-ppx-sexp-value
6967 ocaml-ppx-typerep-conv
6968 ocaml-ppx-variants-conv
6969 ocaml-migrate-parsetree
6972 (license license:asl2.0))))
6974 (define-public ocaml-base-bigstring
6976 (name "ocaml-base-bigstring")
6982 (url "https://github.com/janestreet/base_bigstring")
6983 (commit (string-append "v" version))))
6984 (file-name (git-file-name name version))
6986 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
6987 (build-system dune-build-system)
6988 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
6989 (properties `((upstream-name . "base_bigstring")))
6990 (home-page "https://github.com/janestreet/base_bigstring")
6991 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
6992 (description "This package provides string type based on [Bigarray], for
6993 use in I/O and C-bindings.")
6994 (license license:expat)))
6996 (define-public ocaml-splittable-random
6998 (name "ocaml-splittable-random")
7004 (url "https://github.com/janestreet/splittable_random")
7005 (commit (string-append "v" version))))
7006 (file-name (git-file-name name version))
7008 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
7009 (build-system dune-build-system)
7014 ocaml-ppx-inline-test
7015 ocaml-ppx-sexp-message))
7016 (properties `((upstream-name . "splittable_random")
7017 (ocaml-4.07-variant . ,(delay ocaml4.07-splittable-random))))
7018 (home-page "https://github.com/janestreet/splittable_random")
7019 (synopsis "PRNG that can be split into independent streams")
7020 (description "This package provides a splittable
7021 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
7022 be used as a stream of random values; it can also be split to produce a
7023 second, independent stream of random values.
7025 This library implements a splittable pseudo-random number generator that sacrifices
7026 cryptographic-quality randomness in favor of performance.")
7027 (license license:expat)))
7029 (define-public ocaml4.07-splittable-random
7030 (package-with-ocaml4.07
7032 (inherit ocaml-splittable-random)
7036 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7037 (version-major+minor version)
7038 "/files/splittable_random-v" version ".tar.gz"))
7041 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
7043 (list ocaml-base ocaml-ppx-jane ocaml-migrate-parsetree))
7045 (license license:asl2.0))))
7047 (define-public ocaml-base-quickcheck
7049 (name "ocaml-base-quickcheck")
7055 (url "https://github.com/janestreet/base_quickcheck")
7056 (commit (string-append "v" version))))
7057 (file-name (git-file-name name version))
7059 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
7060 (build-system dune-build-system)
7064 ocaml-ppx-fields-conv
7066 ocaml-ppx-sexp-message
7067 ocaml-ppx-sexp-value
7068 ocaml-splittable-random
7070 (properties `((upstream-name . "base_quickcheck")))
7071 (home-page "https://github.com/janestreet/base_quickcheck")
7073 "Randomized testing framework, designed for compatibility with Base")
7075 "@samp{base-quickcheck} provides randomized testing in the style of
7076 Haskell's Quickcheck library, with support for built-in types as well as
7077 types provided by Base.")
7078 (license license:expat)))
7080 (define-public ocaml4.07-jane-street-headers
7082 (name "ocaml4.07-jane-street-headers")
7086 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7087 (version-major+minor version)
7088 "/files/jane-street-headers-v" version ".tar.gz"))
7091 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
7092 (build-system dune-build-system)
7096 #:findlib ,ocaml4.07-findlib
7097 #:dune ,ocaml4.07-dune))
7098 (home-page "https://github.com/janestreet/jane-street-headers")
7099 (synopsis "Jane Street C header files")
7100 (description "This package provides C header files shared between the
7101 various Jane Street packages.")
7102 (license license:asl2.0)))
7104 (define-public ocaml4.07-configurator
7106 (name "ocaml4.07-configurator")
7110 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7111 (version-major+minor version)
7112 "/files/configurator-v" version ".tar.gz"))
7115 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
7116 (build-system dune-build-system)
7121 #:findlib ,ocaml4.07-findlib
7122 #:dune ,ocaml4.07-dune))
7124 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
7125 ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
7126 (home-page "https://github.com/janestreet/configurator")
7127 (synopsis "Helper library for gathering system configuration")
7128 (description "Configurator is a small library that helps writing OCaml
7129 scripts that test features available on the system, in order to generate config.h
7132 Configurator allows one to:
7134 @item test if a C program compiles
7135 @item query pkg-config
7136 @item import #define from OCaml header files
7137 @item generate config.h file
7139 (license license:asl2.0)))
7141 (define-public ocaml-spawn
7143 (name "ocaml-spawn")
7148 (url "https://github.com/janestreet/spawn")
7149 (commit (string-append "v" version))))
7150 (file-name (git-file-name name version))
7153 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
7154 (build-system dune-build-system)
7155 (propagated-inputs (list ocaml-odoc))
7156 (native-inputs (list ocaml-ppx-expect))
7158 `((ocaml4.07-variant . ,(delay ocaml4.07-spawn))))
7159 (home-page "https://github.com/janestreet/spawn")
7160 (synopsis "Spawning sub-processes")
7162 "Spawn is a small library exposing only one functionality: spawning sub-process.
7164 It has three main goals:
7167 @item provide missing features of Unix.create_process such as providing a
7169 @item provide better errors when a system call fails in the
7170 sub-process. For instance if a command is not found, you get a proper
7171 @code{Unix.Unix_error} exception,
7172 @item improve performances by using vfork when available. It is often
7173 claimed that nowadays fork is as fast as vfork, however in practice
7174 fork takes time proportional to the process memory while vfork is
7175 constant time. In application using a lot of memory, vfork can be
7176 thousands of times faster than fork.
7178 (license license:asl2.0)))
7180 (define-public ocaml4.07-spawn
7181 (package-with-ocaml4.07
7183 (inherit ocaml-spawn)
7188 (url "https://github.com/janestreet/spawn")
7189 (commit (string-append "v" version))))
7190 (file-name (git-file-name "ocaml4.07-spawn" version))
7193 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
7196 (modify-phases %standard-phases
7197 (add-before 'check 'fix-tests
7199 (substitute* "test/tests.ml"
7200 (("/bin/pwd") (which "pwd"))
7201 (("/bin/echo") (which "echo")))
7204 #:findlib ,ocaml4.07-findlib
7205 #:dune ,ocaml4.07-dune))
7206 (propagated-inputs '())
7209 (define-public ocaml-core
7217 (url "https://github.com/janestreet/core")
7218 (commit (string-append "v" version))))
7219 (file-name (git-file-name name version))
7221 (base32 "17vc2i5qb53dr0civ8pkrnnsn2nkydlq44ash7fhh93yb4sffy28"))))
7222 (build-system dune-build-system)
7225 #:tests? #f)); Require a cyclic dependency: core_extended
7228 ocaml-base-bigstring
7229 ocaml-base-quickcheck
7232 ocaml-jane-street-headers
7237 ocaml-ppx-inline-test
7240 ocaml-ppx-sexp-message
7242 ocaml-splittable-random
7247 (home-page "https://github.com/janestreet/core")
7248 (synopsis "Alternative to OCaml's standard library")
7249 (description "The Core suite of libraries is an alternative to OCaml's
7250 standard library that was developed by Jane Street.")
7251 ;; Also contains parts of OCaml, relicensed to expat, as permitted
7252 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7253 (license license:expat)))
7255 (define-public ocaml4.07-core
7256 (package-with-ocaml4.07
7258 (inherit ocaml-core)
7263 (url "https://github.com/janestreet/core")
7264 (commit (string-append "v" version))))
7265 (file-name (git-file-name "ocaml4.07-core" version))
7268 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
7271 ocaml4.07-configurator
7278 ocaml-migrate-parsetree
7280 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
7281 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7282 (license license:asl2.0))))
7284 (define-public ocaml-int-repr
7286 (name "ocaml-int-repr")
7292 (url "https://github.com/janestreet/int_repr")
7293 (commit (string-append "v" version))))
7294 (file-name (git-file-name name version))
7296 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
7297 (build-system dune-build-system)
7299 `(#:tests? #f)) ;no tests
7300 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
7301 (properties `((upstream-name . "int_repr")))
7302 (home-page "https://github.com/janestreet/int_repr")
7303 (synopsis "Integers of various widths")
7304 (description "Integers of various widths.")
7305 (license license:expat)))
7307 (define-public ocaml-core-kernel
7309 (name "ocaml-core-kernel")
7315 (url "https://github.com/janestreet/core_kernel")
7316 (commit (string-append "v" version))))
7317 (file-name (git-file-name name version))
7319 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
7320 (build-system dune-build-system)
7322 ;; Cyclic dependency with ocaml-core
7325 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
7326 (properties `((upstream-name . "core_kernel")
7327 (ocaml4.07-variant . ,(delay ocaml4.07-core-kernel))))
7328 (home-page "https://github.com/janestreet/core_kernel")
7329 (synopsis "Portable standard library for OCaml")
7330 (description "Core is an alternative to the OCaml standard library.
7332 Core_kernel is the system-independent part of Core. It is aimed for cases when
7333 the full Core is not available, such as in Javascript.")
7334 (license license:expat)))
7336 (define-public ocaml4.07-core-kernel
7337 (package-with-ocaml4.07
7339 (inherit ocaml-core-kernel)
7344 (url "https://github.com/janestreet/core_kernel")
7345 (commit (string-append "v" version))))
7346 (file-name (git-file-name "ocaml4.07-core-kernel" version))
7349 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
7353 ocaml4.07-configurator
7355 ocaml-jane-street-headers
7359 ocaml-ppx-inline-test
7362 ocaml-ppx-sexp-message
7364 ocaml-splittable-random
7368 ocaml-migrate-parsetree))
7371 ;; this package and parts of OCaml, relicensed by janestreet
7376 (define-public ocaml-timezone
7378 (name "ocaml-timezone")
7384 (url "https://github.com/janestreet/timezone")
7385 (commit (string-append "v" version))))
7386 (file-name (git-file-name name version))
7388 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
7389 (build-system dune-build-system)
7390 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7391 (home-page "https://github.com/janestreet/timezone")
7392 (synopsis "Time-zone handling")
7394 "Timezone handles parsing timezone data and create @code{Timezone.t}
7395 that can later be used to manipulate time in core_kernel or core.")
7396 (license license:expat)))
7398 (define-public ocaml-markup
7400 (name "ocaml-markup")
7402 (home-page "https://github.com/aantron/markup.ml")
7407 (url (string-append home-page ".git"))
7409 (file-name (git-file-name name version))
7412 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
7413 (build-system dune-build-system)
7415 `(#:package "markup"))
7417 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
7419 (list ocaml-ounit2 pkg-config))
7421 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
7422 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
7423 (description "Markup.ml provides an HTML parser and an XML parser. The
7424 parsers are wrapped in a simple interface: they are functions that transform
7425 byte streams to parsing signal streams. Streams can be manipulated in various
7426 ways, such as processing by fold, filter, and map, assembly into DOM tree
7427 structures, or serialization back to HTML or XML.
7429 Both parsers are based on their respective standards. The HTML parser, in
7430 particular, is based on the state machines defined in HTML5.
7432 The parsers are error-recovering by default, and accept fragments. This makes
7433 it very easy to get a best-effort parse of some input. The parsers can,
7434 however, be easily configured to be strict, and to accept only full documents.
7436 Apart from this, the parsers are streaming (do not build up a document in
7437 memory), non-blocking (can be used with threading libraries), lazy (do not
7438 consume input unless the signal stream is being read), and process the input in
7439 a single pass. They automatically detect the character encoding of the input
7440 stream, and convert everything to UTF-8.")
7441 (license license:bsd-3)))
7443 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
7444 ;; package-with-ocaml4.07
7445 (define-public ocaml-markup0.8.0
7447 (inherit ocaml-markup)
7448 (name "ocaml-markup")
7450 (home-page "https://github.com/aantron/markup.ml")
7455 (url (string-append home-page ".git"))
7457 (file-name (git-file-name name version))
7460 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
7462 (list ocaml-ounit pkg-config))
7465 (define-public ocaml-tyxml
7467 (name "ocaml-tyxml")
7473 (url "https://github.com/ocsigen/tyxml")
7475 (file-name (git-file-name name version))
7478 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
7479 (build-system dune-build-system)
7481 (list ocaml-re ocaml-seq ocaml-uutf))
7483 (list ocaml-alcotest))
7484 (arguments `(#:package "tyxml"))
7485 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-tyxml))))
7486 (home-page "https://github.com/ocsigen/tyxml/")
7487 (synopsis "TyXML is a library for building correct HTML and SVG documents")
7488 (description "TyXML provides a set of convenient combinators that uses the
7489 OCaml type system to ensure the validity of the generated documents. TyXML can
7490 be used with any representation of HTML and SVG: the textual one, provided
7491 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
7492 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
7493 also create your own representation and use it to instantiate a new set of
7495 (license license:lgpl2.1)))
7497 (define-public ocaml4.07-tyxml
7498 (package-with-ocaml4.07
7500 (inherit ocaml-tyxml)
7505 (url "https://github.com/ocsigen/tyxml")
7507 (file-name (git-file-name "ocaml-tyxml" version))
7510 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
7513 (define-public ocaml-bisect-ppx
7515 (name "ocaml-bisect-ppx")
7521 (url "https://github.com/aantron/bisect_ppx")
7523 (file-name (git-file-name name version))
7526 "0562rwwnhqlf5alxl1wd1n0xs0k4aamxafrh8bbmh5yl3i5rxrx4"))))
7527 (build-system dune-build-system)
7529 (list ocaml-ppxlib ocaml-cmdliner))
7531 ;; Tests require ocamlformat which would lead to circular dependencies
7533 (properties `((upstream-name . "bisect_ppx")
7534 (ocaml4.07-variant . ,(delay ocaml4.07-bisect-ppx))))
7535 (home-page "https://github.com/aantron/bisect_ppx")
7536 (synopsis "Code coverage for OCaml")
7537 (description "Bisect_ppx helps you test thoroughly. It is a small
7538 preprocessor that inserts instrumentation at places in your code, such as
7539 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
7540 nice HTML report showing which places were visited and which were missed.
7542 Usage is simple - add package bisect_ppx when building tests, run your tests,
7543 then run the Bisect_ppx report tool on the generated visitation files.")
7544 (license license:mpl2.0)))
7546 (define-public ocaml4.07-bisect-ppx
7547 (package-with-ocaml4.07
7549 (inherit ocaml-bisect-ppx)
7555 (url "https://github.com/aantron/bisect_ppx")
7557 (file-name (git-file-name "ocaml-bisect-ppx" version))
7560 "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
7562 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
7563 ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
7564 ,@(package-propagated-inputs ocaml-bisect-ppx)))
7566 `(("ocaml-ounit2" ,ocaml-ounit2)))
7569 ;; tests require git and network
7571 (properties '((upstream-name . "bisect_ppx"))))))
7573 (define-public ocaml-odoc
7576 ;; 2.2.0-alpha contains fixes for Dune 3.0 compatibility
7577 ;; (https://github.com/ocaml/odoc/commit/6ac97f3148f7791ec7451785ef4dbd9ca0daf2d1)
7578 (version "2.2.0-alpha")
7583 (url "https://github.com/ocaml/odoc")
7585 (file-name (git-file-name name version))
7587 (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
7588 (build-system dune-build-system)
7590 `(#:tests? #f; not compatible with current version of ocaml-yojson
7592 (modify-phases %standard-phases
7593 (add-after 'unpack 'fix-test
7595 ;; test results expects #!/bin/sh but gets a store path instead
7596 (substitute* "test/xref2/with.t/run.t"
7597 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
7605 ocaml-migrate-parsetree
7611 (list ocaml-alcotest
7621 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
7622 (home-page "https://github.com/ocaml/odoc")
7623 (synopsis "OCaml documentation generator")
7624 (description "Odoc is a documentation generator for OCaml. It reads
7625 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
7628 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
7629 advantage over ocamldoc is an accurate cross-referencer, which handles the
7630 complexity of the OCaml module system.")
7631 (license license:isc)))
7633 (define-public ocaml-odoc-parser
7635 (name "ocaml-odoc-parser")
7641 (url "https://github.com/ocaml-doc/odoc-parser")
7643 (file-name (git-file-name name version))
7646 "1x48kf051xs98rd6cri591bk1ccp9hyp93n1rlf6qnxic55jw683"))))
7647 (build-system dune-build-system)
7649 (list ocaml-astring ocaml-camlp-streams ocaml-result))
7651 (list ocaml-ppx-expect))
7652 (home-page "https://github.com/ocaml-doc/odoc-parser")
7653 (synopsis "Parser for ocaml documentation comments")
7655 "This package provides a library for parsing the contents of OCaml
7656 documentation comments, formatted using Odoc syntax, an extension of the
7657 language understood by ocamldoc.")
7658 (license license:isc)))
7660 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
7661 ;; with old version of dune used in package-with-ocaml4.07
7662 (define-public ocaml4.07-odoc
7663 (package-with-ocaml4.07
7665 (inherit ocaml-odoc)
7672 (url "https://github.com/ocaml/odoc")
7674 (file-name (git-file-name name version))
7676 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
7679 `(("ocaml-alcotest" ,ocaml-alcotest)
7680 ("ocaml-markup" ,ocaml-markup)
7681 ("ocaml-sexplib" ,ocaml-sexplib)
7682 ("ocaml-re" ,ocaml-re)
7683 ("ocaml-uutf" ,ocaml-uutf)))
7685 `(("ocaml-astring" ,ocaml-astring)
7686 ("ocaml-cmdliner" ,ocaml-cmdliner)
7687 ("ocaml-cppo" ,ocaml-cppo)
7688 ("ocaml-fpath" ,ocaml-fpath)
7689 ("ocaml-result" ,ocaml-result)
7690 ("ocaml-tyxml" ,ocaml-tyxml)
7691 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
7692 ("tidy-html" ,tidy-html)))
7695 (define-public ocaml-fftw3
7697 (name "ocaml-fftw3")
7703 (url "https://github.com/Chris00/fftw-ocaml")
7705 (file-name (git-file-name name version))
7708 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
7709 (build-system dune-build-system)
7711 `(#:test-target "tests"))
7715 (list ocaml-cppo ocaml-lacaml))
7717 "https://github.com/Chris00/fftw-ocaml")
7719 "Bindings to FFTW3")
7721 "Bindings providing OCaml support for the seminal Fast Fourier Transform
7723 (license license:lgpl2.1))) ; with static linking exception.
7725 (define-public ocaml-lacaml
7727 (name "ocaml-lacaml")
7733 (url "https://github.com/mmottl/lacaml")
7735 (file-name (git-file-name name version))
7738 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
7739 (modules '((guix build utils)))
7740 (snippet '(substitute* '("src/dune" "src/config/dune")
7741 (("-march=native") "")))))
7742 (properties '((tunable? . #t)))
7743 (build-system dune-build-system)
7745 `(#:tests? #f)) ; No test target.
7747 (list openblas lapack ocaml-base ocaml-stdio))
7748 (home-page "https://mmottl.github.io/lacaml/")
7750 "OCaml-bindings to BLAS and LAPACK")
7752 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
7753 LAPACK-library (Linear Algebra routines). It also contains many additional
7754 convenience functions for vectors and matrices.")
7755 (license license:lgpl2.1)))
7757 (define-public ocaml-cairo2
7759 (name "ocaml-cairo2")
7764 (url "https://github.com/Chris00/ocaml-cairo")
7766 (file-name (git-file-name name version))
7769 "06ag9b88ihhr7yd3s9l0ac7ysig02fmlmsswybbsvz71ni0mb105"))))
7770 (build-system dune-build-system)
7772 `(#:test-target "tests"))
7776 ("lablgtk" ,lablgtk)))
7779 (home-page "https://github.com/Chris00/ocaml-cairo")
7780 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
7781 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
7782 with support for multiple output devices. Currently supported output targets
7783 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
7784 and SVG file output.")
7785 (license license:lgpl3+)))
7787 (define-public ocaml-version
7789 (name "ocaml-version")
7795 (url "https://github.com/ocurrent/ocaml-version")
7796 (commit (string-append "v" version))))
7797 (file-name (git-file-name name version))
7800 "1pnw2ym021j48zknhbi1kdiyfv9si8p2l04rdzbv4g51fclsqs92"))))
7801 (build-system dune-build-system)
7802 (arguments `(#:tests? #f)) ; no tests
7803 (properties '((upstream-name . "ocaml-version")))
7805 "https://github.com/ocurrent/ocaml-version")
7807 "Manipulate, parse and generate OCaml compiler version strings")
7809 "This library provides facilities to parse version numbers of the OCaml
7810 compiler, and enumerates the various official OCaml releases and configuration
7812 (license license:isc)))
7814 (define-public ocaml-mdx
7821 (url "https://github.com/realworldocaml/mdx")
7823 (file-name (git-file-name name version))
7826 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
7827 (build-system dune-build-system)
7830 (modify-phases %standard-phases
7831 (add-after 'unpack 'fix-test-format
7833 ;; cmdliner changed the format and the tests fail
7834 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
7835 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
7837 (("COMMAND") "[COMMAND]")
7838 (("\\.\\.\\.") "…")))))))
7850 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
7852 "https://github.com/realworldocaml/mdx")
7854 "Executable code blocks inside markdown files")
7856 "@code{ocaml-mdx} executes code blocks inside markdown files.
7857 There are (currently) two sub-commands, corresponding
7858 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
7859 and tests (@code{ocaml-mdx test}]).
7861 The pre-processor mode allows mixing documentation and code,
7862 and to practice @dfn{literate programming} using markdown and OCaml.
7864 The test mode ensures that shell scripts and OCaml fragments
7865 in the documentation always stays up-to-date.
7867 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
7868 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
7870 (license license:isc)))
7872 (define-public ocaml-mparser
7874 (name "ocaml-mparser")
7880 (url "https://github.com/murmour/mparser")
7882 (file-name (git-file-name name version))
7885 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
7886 (build-system dune-build-system)
7889 '(#:package "mparser"
7891 (home-page "https://github.com/murmour/mparser")
7892 (synopsis "Simple monadic parser combinator library")
7894 "This library implements a rather complete and efficient monadic parser
7895 combinator library similar to the Parsec library for Haskell by Daan Leijen and
7896 the FParsec library for FSharp by Stephan Tolksdorf.")
7897 ;; With static linking exception.
7898 (license license:lgpl2.1+)))
7900 (define-public ocaml-mparser-re
7902 (inherit ocaml-mparser)
7903 (name "ocaml-mparser-re")
7906 '(#:package "mparser-re"
7909 (list ocaml-mparser ocaml-re))
7910 (synopsis "MParser plugin for RE-based regular expressions")
7911 (description "This package provides RE-based regular expressions
7912 support for Mparser.")))
7914 (define-public ocaml-mparser-pcre
7916 (inherit ocaml-mparser)
7917 (name "ocaml-mparser-pcre")
7920 '(#:package "mparser-pcre"
7923 (list ocaml-mparser ocaml-pcre))
7924 (synopsis "MParser plugin for PCRE-based regular expressions")
7925 (description "This package provides PCRE-based regular expressions
7926 support for Mparser.")))
7928 (define-public lablgtk3
7935 (url "https://github.com/garrigue/lablgtk")
7937 (file-name (git-file-name name version))
7940 "0rhdr89w7yj8pkga5xc7iqmqvrs28034wb7sm7vx7faaxczwjifn"))))
7941 (build-system dune-build-system)
7943 `(#:package "lablgtk3"
7946 (list ocaml-cairo2 ocaml-camlp-streams))
7951 (home-page "https://github.com/garrigue/lablgtk")
7952 (synopsis "OCaml interface to GTK+3")
7953 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
7954 provides a strongly-typed object-oriented interface that is compatible with the
7955 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
7956 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
7957 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
7958 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
7959 ;; Version 2 only, with linking exception.
7960 (license license:lgpl2.0)))
7962 (define-public ocaml-lablgtk3-sourceview3
7965 (name "ocaml-lablgtk3-sourceview3")
7966 (propagated-inputs (list lablgtk3))
7967 (native-inputs (list gtksourceview-3 pkg-config))
7969 `(#:package "lablgtk3-sourceview3"
7971 (synopsis "OCaml interface to GTK+ gtksourceview library")
7972 (description "This package provides the lablgtk interface to the
7973 GTK+ gtksourceview library.")))
7975 (define-public ocaml-reactivedata
7977 (name "ocaml-reactivedata")
7982 (url "https://github.com/ocsigen/reactiveData")
7984 (file-name (git-file-name name version))
7987 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
7989 `(#:tests? #f)) ;no tests
7990 (build-system dune-build-system)
7991 (properties `((upstream-name . "reactiveData")))
7994 (home-page "https://github.com/ocsigen/reactiveData")
7995 (synopsis "Declarative events and signals for OCaml")
7997 "React is an OCaml module for functional reactive programming (FRP). It
7998 provides support to program with time varying values: declarative events and
7999 signals. React doesn't define any primitive event or signal, it lets the
8000 client chooses the concrete timeline.")
8001 (license license:lgpl2.1+)))
8003 (define-public ocaml-uucd
8010 (uri (string-append "https://erratique.ch/software/uucd/releases/"
8011 "uucd-" version ".tbz"))
8014 "1g26237yqmxr7sd1n9fg65qm5mxz66ybk7hr336zfyyzl25h6jqf"))))
8015 (build-system ocaml-build-system)
8017 '(#:build-flags '("build" "--tests" "true")
8019 (modify-phases %standard-phases
8020 (delete 'configure))))
8024 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8025 (home-page "https://erratique.ch/software/uucd")
8026 (synopsis "Unicode character database decoder for OCaml")
8027 (description "Uucd is an OCaml module to decode the data of the Unicode
8028 character database from its XML representation. It provides high-level (but
8029 not necessarily efficient) access to the data so that efficient
8030 representations can be extracted.")
8031 (license license:isc)))
8033 (define-public ocaml-uucp
8040 (uri (string-append "https://erratique.ch/software/uucp/releases/"
8041 "uucp-" version ".tbz"))
8044 "0c2k9gkg442l7hnc8rn1vqzn6qh68w9fx7h3nj03n2x90ps98ixc"))))
8045 (build-system ocaml-build-system)
8047 '(#:build-flags '("build" "--tests" "true")
8049 (modify-phases %standard-phases
8050 (delete 'configure))))
8059 (home-page "https://erratique.ch/software/uucp")
8060 (synopsis "Unicode character properties for OCaml")
8061 (description "Uucp is an OCaml library providing efficient access to a
8062 selection of character properties of the Unicode character database.")
8063 (license license:isc)))
8065 (define-public ocaml-uuseg
8067 (name "ocaml-uuseg")
8072 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
8073 "uuseg-" version ".tbz"))
8076 "1qz130wlmnvb6j7kpvgjlqmdm2jqid4wb1dmrsls4hdm4rp7gk5b"))))
8077 (build-system ocaml-build-system)
8079 '(#:build-flags '("build" "--tests" "true")
8081 (modify-phases %standard-phases
8082 (delete 'configure))))
8084 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
8086 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8087 (home-page "https://erratique.ch/software/uuseg")
8088 (synopsis "Unicode text segmentation for OCaml")
8089 (description "Uuseg is an OCaml library for segmenting Unicode text. It
8090 implements the locale independent Unicode text segmentation algorithms to
8091 detect grapheme cluster, word and sentence boundaries and the Unicode line
8092 breaking algorithm to detect line break opportunities.
8094 The library is independent from any IO mechanism or Unicode text data
8095 structure and it can process text without a complete in-memory
8097 (license license:isc)))
8099 (define-public ocaml-fix
8102 (version "20220121")
8107 (url "https://gitlab.inria.fr/fpottier/fix")
8109 (file-name (git-file-name name version))
8112 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
8113 (build-system dune-build-system)
8117 (home-page "https://gitlab.inria.fr/fpottier/fix")
8118 (synopsis "Facilities for memoization and fixed points")
8119 (description "This package provides helpers with various constructions
8120 that involve memoization and recursion.")
8121 (license license:lgpl2.0)))
8123 (define-public ocaml-dune-build-info
8126 (name "ocaml-dune-build-info")
8127 (build-system dune-build-system)
8129 '(#:package "dune-build-info"
8130 ;; No separate test suite from dune.
8134 (synopsis "Embed build information inside an executable")
8135 (description "This package allows one to access information about how the
8136 executable was built, such as the version of the project at which it was built
8137 or the list of statically linked libraries with their versions. It supports
8138 reporting the version from the version control system during development to
8139 get an precise reference of when the executable was built.")))
8141 (define-public ocaml-either
8143 (name "ocaml-either")
8149 (url "https://github.com/mirage/either")
8151 (file-name (git-file-name name version))
8153 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
8154 (build-system dune-build-system)
8158 (home-page "https://github.com/mirage/either")
8159 (synopsis "Compatibility Either module")
8160 (description "This library is a compatibility module for the Either module
8161 defined in OCaml 4.12.0.")
8162 (license license:expat)))
8164 (define-public ocamlformat
8166 (name "ocamlformat")
8172 (url "https://github.com/ocaml-ppx/ocamlformat")
8174 (file-name (git-file-name name version))
8177 "0y1j5mwwrliy6a78cmpi6j8gw425shghqg9ylyl3qw5fx4b088pp"))))
8178 (build-system dune-build-system)
8180 '(#:package "ocamlformat"
8182 (modify-phases %standard-phases
8183 ;; Tests related to other packages
8184 (add-after 'unpack 'remove-unrelated-tests
8186 (delete-file-recursively "test/rpc")))
8187 (add-after 'unpack 'fix-test-format
8189 (substitute* "test/cli/repl_file_errors.t/run.t"
8190 ((" ;;") ";;")))))))
8195 ocaml-dune-build-info
8208 (list git-minimal ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
8209 (home-page "https://github.com/ocaml-ppx/ocamlformat")
8210 (synopsis "Auto-formatter for OCaml code")
8211 (description "OCamlFormat is a tool to automatically format OCaml code in
8213 (license license:expat)))
8215 (define-public ocaml-bigstringaf
8217 (name "ocaml-bigstringaf")
8219 (home-page "https://github.com/inhabitedtype/bigstringaf")
8226 (file-name (git-file-name name version))
8229 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
8230 (build-system dune-build-system)
8232 '(#:test-target "."))
8234 (list ocaml-bigarray-compat))
8236 (list ocaml-alcotest pkg-config))
8238 "Bigstring intrinsics and fast blits based on memcpy/memmove")
8240 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
8241 not widely-known, sometimes misused, and so programs that use Bigstrings are
8242 slower than they have to be. And even if a library got that part right and
8243 exposed the intrinsics properly, the compiler doesn't have any fast blits
8244 between Bigstrings and other string-like types. @code{bigstringaf} provides
8245 these missing pieces.")
8246 (license license:bsd-3)))
8248 (define-public ocaml-trie
8252 (home-page "https://github.com/kandu/trie/")
8259 (file-name (git-file-name name version))
8261 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
8262 (build-system dune-build-system)
8264 '(#:tests? #f)) ;no tests
8265 (synopsis "Strict impure trie tree")
8267 "This module implements strict impure trie tree data structure for
8269 (license license:expat)))
8271 (define-public ocaml-mew
8275 (home-page "https://github.com/kandu/mew")
8282 (file-name (git-file-name name version))
8284 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
8285 (build-system dune-build-system)
8287 (list ocaml-result ocaml-trie))
8289 (list ocaml-ppx-expect))
8290 (synopsis "General modal editing engine generator")
8292 "This package provides the core modules of Modal Editing Witch, a general
8293 modal editing engine generator.")
8294 (license license:expat)))
8296 (define-public ocaml-mew-vi
8298 (name "ocaml-mew-vi")
8300 (home-page "https://github.com/kandu/mew_vi")
8307 (file-name (git-file-name name version))
8309 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
8310 (build-system dune-build-system)
8312 (list ocaml-mew ocaml-react))
8314 (list ocaml-ppx-expect))
8315 (properties `((upstream-name . "mew_vi")))
8316 (synopsis "Modal editing VI-like editing engine generator")
8317 (description "This module provides a vi-like modal editing engine
8319 (license license:expat)))
8321 (define-public ocaml-syntax-shims
8323 (name "ocaml-syntax-shims")
8325 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
8332 (file-name (git-file-name name version))
8335 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
8336 (build-system dune-build-system)
8338 `((upstream-name . "ocaml-syntax-shims")))
8340 "Backport new syntax to older OCaml versions")
8342 "This package backports new language features such as @code{let+} to older
8344 (license license:expat)))
8346 (define-public ocaml-angstrom
8348 (name "ocaml-angstrom")
8350 (home-page "https://github.com/inhabitedtype/angstrom")
8357 (file-name (git-file-name name version))
8360 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
8361 (build-system dune-build-system)
8363 ;; Only build the base angstrom package.
8364 '(#:package "angstrom"
8367 (list ocaml-bigstringaf))
8369 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
8370 (synopsis "Parser combinators built for speed and memory-efficiency")
8372 "Angstrom is a parser-combinator library that makes it easy to write
8373 efficient, expressive, and reusable parsers suitable for high-performance
8374 applications. It exposes monadic and applicative interfaces for composition,
8375 and supports incremental input through buffered and unbuffered interfaces.
8376 Both interfaces give the user total control over the blocking behavior of
8377 their application, with the unbuffered interface enabling zero-copy IO.
8378 Parsers are backtracking by default and support unbounded lookahead.")
8379 (license license:bsd-3)))
8381 (define-public ocaml-graphics
8383 (name "ocaml-graphics")
8385 (home-page "https://github.com/ocaml/graphics")
8392 (file-name (git-file-name name version))
8395 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
8396 (build-system dune-build-system)
8399 (synopsis "The OCaml graphics library")
8401 "The graphics library provides a set of portable drawing primitives.
8402 Drawing takes place in a separate window that is created when
8403 Graphics.open_graph is called. This library used to be distributed with OCaml
8405 (license license:lgpl2.1+)))
8407 (define-public ocaml-uri-sexp
8410 (name "ocaml-uri-sexp")
8412 '(#:package "uri-sexp"
8415 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
8416 (native-inputs (list ocaml-ounit))
8417 (synopsis "RFC3986 URI/URL parsing library")
8418 (description "This package adds S-exp support to @code{ocaml-uri}.")))
8420 (define-public ocaml-cohttp
8422 (name "ocaml-cohttp")
8428 (url "https://github.com/mirage/ocaml-cohttp")
8429 (commit (string-append "v" version))))
8430 (file-name (git-file-name name version))
8433 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
8434 (build-system dune-build-system)
8436 '(#:package "cohttp"
8437 #:test-target "cohttp_test/src"))
8447 (list ocaml-fmt ocaml-jsonm ocaml-alcotest))
8448 (home-page "https://github.com/mirage/ocaml-cohttp")
8449 (synopsis "OCaml library for HTTP clients and servers")
8451 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
8452 HTTP parser, and implementations using various asynchronous programming
8454 (license license:isc)))
8456 (define-public js-of-ocaml
8458 (name "js-of-ocaml")
8464 (url "https://github.com/ocsigen/js_of_ocaml")
8466 (file-name (git-file-name name version))
8468 (base32 "14ig69iyc9yzniclfsc6cz9g9zqp96bs66y6dy4rzrm78s81w6i1"))))
8469 (build-system dune-build-system)
8471 `(#:tests? #f ;tests assume ocaml 4.13
8487 (list node ocaml-ppx-expect ocaml-num))
8488 (properties `((upstream-name . "js_of_ocaml")))
8489 (home-page "https://ocsigen.org/js_of_ocaml/")
8490 (synopsis "Compiler from OCaml bytecode to Javascript")
8491 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
8492 It makes it possible to run pure OCaml programs in JavaScript environment like
8493 browsers and Node.js.")
8494 (license license:lgpl2.1+)))
8496 (define-public ocaml-afl-persistent
8498 (name "ocaml-afl-persistent")
8504 (url "https://github.com/stedolan/ocaml-afl-persistent")
8505 (commit (string-append "v" version))))
8506 (file-name (git-file-name name version))
8509 "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
8510 (build-system ocaml-build-system)
8513 (modify-phases %standard-phases
8517 (invoke "./build.sh")))
8518 ;; XXX: The tests are already run in the build.sh script.
8522 (home-page "https://github.com/stedolan/ocaml-afl-persistent")
8523 (synopsis "Use afl-fuzz in persistent mode")
8525 "afl-fuzz normally works by repeatedly forking the program being tested.
8526 Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
8527 repeated forking and is much faster.")
8528 (license license:expat)))
8530 (define-public ocaml-pprint
8532 (name "ocaml-pprint")
8533 (version "20220103")
8534 (home-page "https://github.com/fpottier/pprint")
8541 (file-name (git-file-name name version))
8544 "09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"))))
8545 (build-system dune-build-system)
8546 (synopsis "OCaml pretty-printing combinator library and rendering
8548 (description "This OCaml library offers a set of combinators for building
8549 so-called documents as well as an efficient engine for converting documents to
8550 a textual, fixed-width format. The engine takes care of indentation and line
8551 breaks, while respecting the constraints imposed by the structure of the
8552 document and by the text width.")
8553 (license license:lgpl2.0)))
8555 (define-public ocaml-crowbar
8557 (name "ocaml-crowbar")
8559 (home-page "https://github.com/stedolan/crowbar")
8565 (commit (string-append "v" version))))
8566 (file-name (git-file-name name version))
8569 "11f3kiw58g8njx15akx16xcplzvzdw9y6c4jpyfxylkxws4g0f6j"))))
8570 (build-system dune-build-system)
8572 `(#:test-target "."))
8574 (list ocaml-ocplib-endian
8576 ocaml-afl-persistent))
8578 (list ocaml-calendar
8584 (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
8585 (description "Crowbar is a library for testing code, combining
8586 QuickCheck-style property-based testing and the magical bug-finding powers of
8587 @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
8588 (license license:expat)))
8590 (define-public ocaml-eqaf
8594 (home-page "https://github.com/mirage/eqaf")
8600 (commit (string-append "v" version))))
8601 (file-name (git-file-name name version))
8604 "16ics56wiqyng70dy2hqikicm8ag1mv5w1h7hkiwvydw1x2j2rsl"))))
8605 (build-system dune-build-system)
8606 (propagated-inputs (list ocaml-cstruct))
8607 (native-inputs (list ocaml-alcotest ocaml-crowbar))
8608 (synopsis "OCaml library for constant-time equal function on string")
8609 (description "This OCaml library provides an equal function on string in
8610 constant-time to avoid timing-attack with crypto stuff.")
8611 (license license:expat)))
8613 (define-public ocaml-digestif
8615 (name "ocaml-digestif")
8617 (home-page "https://github.com/mirage/digestif")
8623 (commit (string-append "v" version))))
8624 (file-name (git-file-name name version))
8627 "0x5iskavqkclr5mk2q6jvh5h1v81krqi4v353rj4xsmdqb33s0f1"))))
8628 (build-system dune-build-system)
8629 (propagated-inputs (list ocaml-eqaf))
8639 (synopsis "Simple hash algorithms in OCaml")
8641 "Digestif is an OCaml library that provides implementations of hash
8642 algorithms. Implemented hash algorithms include MD5, SHA1, SHA224, SHA256,
8643 SHA384, SHA512, Blake2b, Blake2s and RIPEMD160.")
8644 (license license:expat)))
8646 (define-public ocaml-bibtex2html
8648 (name "ocaml-bibtex2html")
8653 (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
8654 (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
8655 (build-system ocaml-build-system)
8658 (modify-phases %standard-phases
8659 (add-after 'unpack 'patch-/bin/sh
8661 (substitute* "configure" (("/bin/sh") (which "bash")))
8662 (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
8666 ("texlive" ,(texlive-updmap.cfg
8667 (list texlive-fonts-ec texlive-preprint
8668 texlive-hyperref texlive-bibtex)))))
8671 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
8672 (synopsis "BibTeX to HTML translator")
8673 (description "This package allows you to produce, from a set of
8674 bibliography files in BibTeX format, a bibliography in HTML format.")
8675 (license license:gpl2)))
8677 (define-public ocaml-guile
8679 (name "ocaml-guile")
8681 (home-page "https://github.com/gopiandcode/guile-ocaml")
8688 (file-name (git-file-name name version))
8691 "0yxdkrhrrbwvay5sn0p26rh3f11876k6kdharmpi4afxknml74ql"))))
8692 (build-system dune-build-system)
8694 `(#:tests? #f)) ; no tests
8700 (inputs (list guile-3.0 libffi))
8704 (synopsis "Bindings to GNU Guile Scheme for OCaml")
8706 "The OCaml guile library provides high-level OCaml bindings to GNU Guile
8707 3.0, supporting easy interop between OCaml and GNU Guile Scheme.")
8708 (license license:gpl3+)))
8711 ;;; Avoid adding new packages to the end of this file. To reduce the chances
8712 ;;; of a merge conflict, place them above by existing packages with similar
8713 ;;; functionality or similar names.