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>
29 ;;; This file is part of GNU Guix.
31 ;;; GNU Guix is free software; you can redistribute it and/or modify it
32 ;;; under the terms of the GNU General Public License as published by
33 ;;; the Free Software Foundation; either version 3 of the License, or (at
34 ;;; your option) any later version.
36 ;;; GNU Guix is distributed in the hope that it will be useful, but
37 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 ;;; GNU General Public License for more details.
41 ;;; You should have received a copy of the GNU General Public License
42 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
44 (define-module (gnu packages ocaml)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages algebra)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages bison)
51 #:use-module (gnu packages boost)
52 #:use-module (gnu packages compression)
53 #:use-module (gnu packages curl)
54 #:use-module (gnu packages emacs)
55 #:use-module (gnu packages emacs-xyz)
56 #:use-module (gnu packages flex)
57 #:use-module (gnu packages gcc)
58 #:use-module (gnu packages ghostscript)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gtk)
62 #:use-module (gnu packages guile)
63 #:use-module (gnu packages libevent)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages llvm)
66 #:use-module (gnu packages m4)
67 #:use-module (gnu packages maths)
68 #:use-module (gnu packages multiprecision)
69 #:use-module (gnu packages ncurses)
70 #:use-module (gnu packages node)
71 #:use-module (gnu packages pcre)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages protobuf)
75 #:use-module (gnu packages python)
76 #:use-module (gnu packages python-xyz)
77 #:use-module (gnu packages rsync)
78 #:use-module (gnu packages sdl)
79 #:use-module (gnu packages sqlite)
80 #:use-module (gnu packages tex)
81 #:use-module (gnu packages texinfo)
82 #:use-module (gnu packages time)
83 #:use-module (gnu packages tls)
84 #:use-module (gnu packages version-control)
85 #:use-module (gnu packages virtualization)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages web-browsers)
88 #:use-module (gnu packages xml)
89 #:use-module (gnu packages xorg)
90 #:use-module (guix build-system dune)
91 #:use-module (guix build-system emacs)
92 #:use-module (guix build-system gnu)
93 #:use-module (guix build-system ocaml)
94 #:use-module (guix download)
95 #:use-module (guix gexp)
96 #:use-module (guix git-download)
97 #:use-module ((guix licenses) #:prefix license:)
98 #:use-module (guix packages)
99 #:use-module (guix svn-download)
100 #:use-module (guix utils)
101 #:use-module ((srfi srfi-1) #:hide (zip)))
103 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
104 ;; their number, not their name.
105 (define (ocaml-forge-uri name version file-number)
106 (string-append "https://forge.ocamlcore.org/frs/download.php/"
107 (number->string file-number) "/" name "-" version
110 (define (janestreet-origin name version hash)
111 (origin (method url-fetch)
112 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
113 (version-major+minor version) "/files/"
114 name "-v" (version-major+minor+point version)
116 (sha256 (base32 hash))))
118 (define-public camlboot
119 (let ((commit "45045d0afa82f7e9b7ea07314aab08be2d3cd64b")
123 (version (git-version "0.0.0" revision commit))
127 (url "https://github.com/Ekdohibs/camlboot")
130 (file-name (git-file-name name version))
133 "1f5gl3hzvixbgk0v3kmxiyn432znyy3jh5fa65cfzcaxzgfv1i1c"))
134 (modules '((guix build utils)))
137 ;; Remove bootstrap binaries and pre-generated source files,
138 ;; to ensure we actually bootstrap properly.
139 (for-each delete-file (find-files "ocaml-src" "^.depend$"))
140 (delete-file "ocaml-src/boot/ocamlc")
141 (delete-file "ocaml-src/boot/ocamllex")
145 (chmod file (logior (stat:mode (stat file)) #o200)))
146 (find-files "." "."))))))
147 (build-system gnu-build-system)
149 `(#:make-flags (list "_boot/ocamlc") ; build target
150 #:tests? #f ; no tests
152 (modify-phases %standard-phases
154 (add-before 'build 'no-autocompile
156 ;; prevent a guile warning
157 (setenv "GUILE_AUTO_COMPILE" "0")))
159 (lambda* (#:key outputs #:allow-other-keys)
160 (let* ((out (assoc-ref outputs "out"))
161 (bin (string-append out "/bin")))
163 (install-file "_boot/ocamlc" bin)
164 (rename-file "miniml/interp/lex.byte" "ocamllex")
165 (install-file "ocamllex" bin)))))))
169 ;; 10 hours, mostly for arm, more than 1 expected even on x86_64
170 `((max-silent-time . 36000)))
171 (home-page "https://github.com/Ekdohibs/camlboot")
172 (synopsis "OCaml source bootstrap")
173 (description "OCaml is written in OCaml. Its sources contain a pre-compiled
174 bytecode version of @command{ocamlc} and @command{ocamllex} that are used to
175 build the next version of the compiler. Camlboot implements a bootstrap for
176 the OCaml compiler and provides a bootstrapped equivalent to these files.
178 It contains a compiler for a small subset of OCaml written in Guile Scheme,
179 an interpreter for OCaml written in that subset and a manually-written lexer
180 for OCaml. These elements eliminate the need for the binary bootstrap in
181 OCaml and can effectively bootstrap OCaml 4.07.
183 This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
184 (license license:expat))))
186 (define-public ocaml-4.14
193 "http://caml.inria.fr/pub/distrib/ocaml-"
194 (version-major+minor version)
195 "/ocaml-" version ".tar.xz"))
198 "0axcc7c23pf4qinz4vxgkba6pwziwbp9i2ydwzar7x9zlp6diarn"))))
199 (build-system gnu-build-system)
201 (list (search-path-specification
202 (variable "OCAMLPATH")
203 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
204 (search-path-specification
205 (variable "CAML_LD_LIBRARY_PATH")
206 (files (list "lib/ocaml/site-lib/stubslibs"
207 "lib/ocaml/site-lib/stublibs")))))
209 (list perl pkg-config))
211 (list libx11 libiberty ;needed for objdump support
212 zlib)) ;also needed for objdump support
214 `(#:configure-flags '("--enable-ocamltest")
215 #:test-target "tests"
216 #:make-flags '("world.opt")
218 (modify-phases %standard-phases
219 (add-after 'unpack 'patch-/bin/sh-references
220 (lambda* (#:key inputs #:allow-other-keys)
221 (let* ((sh (search-input-file inputs "/bin/sh"))
222 (quoted-sh (string-append "\"" sh "\"")))
223 (with-fluids ((%default-port-encoding #f))
229 (format (current-error-port) "\
230 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
233 (find-files "." "\\.ml$")))))))))
234 (home-page "https://ocaml.org/")
235 (synopsis "The OCaml programming language")
237 "OCaml is a general purpose industrial-strength programming language with
238 an emphasis on expressiveness and safety. Developed for more than 20 years at
239 Inria it benefits from one of the most advanced type systems and supports
240 functional, imperative and object-oriented styles of programming.")
241 ;; The compiler is distributed under qpl1.0 with a change to choice of
242 ;; law: the license is governed by the laws of France. The library is
243 ;; distributed under lgpl2.0.
244 (license (list license:qpl license:lgpl2.0))))
246 (define-public ocaml-4.09
253 "http://caml.inria.fr/pub/distrib/ocaml-"
254 (version-major+minor version)
255 "/ocaml-" version ".tar.xz"))
256 (patches (search-patches "ocaml-4.09-multiple-definitions.patch"))
259 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
262 (modify-phases %standard-phases
263 (add-after 'unpack 'patch-/bin/sh-references
264 (lambda* (#:key inputs #:allow-other-keys)
265 (let* ((sh (search-input-file inputs "/bin/sh"))
266 (quoted-sh (string-append "\"" sh "\"")))
267 (with-fluids ((%default-port-encoding #f))
273 (format (current-error-port) "\
274 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
277 (find-files "." "\\.ml$"))))))
280 (invoke "make" "-j" (number->string (parallel-job-count))
284 (with-directory-excursion "testsuite"
285 (invoke "make" "all")))))))))
287 ;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot,
288 ;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
289 ;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files
290 ;; that we otherwise remove for bootstrap purposes.
291 (define ocaml-4.07-boot
299 "http://caml.inria.fr/pub/distrib/ocaml-"
300 (version-major+minor version)
301 "/ocaml-" version ".tar.xz"))
304 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
305 (patches (search-patches "ocaml-multiple-definitions.patch"))
306 (modules '((guix build utils)))
309 ;; Remove bootstrap binaries and pre-generated source files,
310 ;; to ensure we actually bootstrap properly.
311 (for-each delete-file (find-files "." "^.depend$"))
312 (delete-file "boot/ocamlc")
313 (delete-file "boot/ocamllex")))))
317 (modify-phases %standard-phases
318 (add-before 'configure 'copy-bootstrap
319 (lambda* (#:key inputs #:allow-other-keys)
320 (let ((camlboot (assoc-ref inputs "camlboot")))
321 (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex")
322 (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc")
323 (chmod "boot/ocamllex" #o755)
324 (chmod "boot/ocamlc" #o755))))
326 (lambda* (#:key outputs #:allow-other-keys)
327 (let* ((out (assoc-ref outputs "out"))
328 (mandir (string-append out "/share/man")))
329 (invoke "./configure"
331 "--mandir" mandir))))
333 (lambda* (#:key parallel-build? #:allow-other-keys)
334 (define* (make . args)
336 (append (if parallel-build?
337 `("-j" ,(number->string (parallel-job-count)))
340 ;; create empty .depend files because they are included by various
341 ;; Makefiles, and they have no rule to generate them.
342 (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend"
343 "tools/.depend" "lex/.depend" "asmrun/.depend"
344 "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend"
345 "ocamldoc/stdlib_non_prefixed/.depend"
346 "otherlibs/bigarray/.depend" "otherlibs/graph/.depend"
347 "otherlibs/raw_spacetime_lib/.depend" "otherlibs/str/.depend"
348 "otherlibs/systhreads/.depend" "otherlibs/threads/.depend"
349 "otherlibs/unix/.depend" "otherlibs/win32unix/.depend")
350 ;; We cannot build ocamldep until we have created all the .depend
351 ;; files, so replace it with ocamlc -depend.
352 (substitute* "tools/Makefile"
353 (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend"))
354 (substitute* '("otherlibs/graph/Makefile"
355 "otherlibs/systhreads/Makefile"
356 "otherlibs/threads/Makefile"
357 "otherlibs/unix/Makefile")
358 (("\\$\\(CAMLRUN\\) ../../tools/ocamldep")
359 "../../boot/ocamlc -depend"))
360 (substitute* '("otherlibs/bigarray/Makefile"
361 "otherlibs/raw_spacetime_lib/Makefile"
362 "otherlibs/str/Makefile"
363 "otherlibs/win32unix/Makefile")
364 (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep")
365 "../../boot/ocamlc -depend"))
366 ;; Ensure we copy needed file, so we can generate a proper .depend
367 (substitute* "ocamldoc/Makefile"
368 (("include Makefile.unprefix")
369 "include Makefile.unprefix
370 depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
371 ;; Generate required tools for `alldepend'
372 (make "-C" "byterun" "depend")
373 (make "-C" "byterun" "all")
374 (copy-file "byterun/ocamlrun" "boot/ocamlrun")
376 (copy-file "yacc/ocamlyacc" "boot/ocamlyacc")
377 (make "-C" "stdlib" "sys.ml")
378 (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend")
379 ;; Build and copy files later used by `tools'
380 (make "-C" "stdlib" "COMPILER="
381 "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives"
385 (copy-file file (string-append "boot/" (basename file))))
386 (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader"
387 (find-files "stdlib" ".*.cmi$")))
388 (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a")
389 ;; required for ocamldoc/stdlib_non_prefixed
390 (make "parsing/parser.mli")
391 ;; required for dependencies
393 "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .."
394 "make_opcodes" "cvt_emit")
395 ;; generate all remaining .depend files
397 (string-append "ocamllex=" (getcwd) "/boot/ocamlrun "
398 (getcwd) "/boot/ocamllex")
399 (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend")
400 (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend")
401 (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend"))
403 (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives"
407 "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives"
410 (lambda* (#:key outputs #:allow-other-keys)
411 (let* ((out (assoc-ref outputs "out"))
412 (bin (string-append out "/bin"))
413 (depends (string-append out "/share/depends")))
416 (install-file "ocamlc" bin)
417 (install-file "lex/ocamllex" bin)
420 (let ((dir (string-append depends "/" (dirname file))))
422 (install-file file dir)))
423 (find-files "." "^\\.depend$"))))))))
425 `(("camlboot" ,camlboot)
427 ("pkg-config" ,pkg-config)))))
429 (define-public ocaml-4.07
431 (inherit ocaml-4.07-boot)
434 (substitute-keyword-arguments (package-arguments ocaml-4.09)
436 `(modify-phases ,phases
437 (add-before 'configure 'copy-bootstrap
438 (lambda* (#:key inputs #:allow-other-keys)
439 (let ((ocaml (assoc-ref inputs "ocaml")))
440 (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex")
441 (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc")
442 (chmod "boot/ocamllex" #o755)
443 (chmod "boot/ocamlc" #o755)
444 (let ((rootdir (getcwd)))
445 (with-directory-excursion (string-append ocaml "/share/depends")
448 (copy-file file (string-append rootdir "/" file)))
449 (find-files "." ".")))))))
451 (lambda* (#:key outputs #:allow-other-keys)
452 (let* ((out (assoc-ref outputs "out"))
453 (mandir (string-append out "/share/man")))
454 ;; Custom configure script doesn't recognize
455 ;; --prefix=<PREFIX> syntax (with equals sign).
456 (invoke "./configure"
458 "--mandir" mandir))))))))
460 `(("ocaml" ,ocaml-4.07-boot)
462 ("pkg-config" ,pkg-config)))))
464 (define-public ocaml ocaml-4.14)
466 (define-public ocamlbuild
474 (url "https://github.com/ocaml/ocamlbuild")
476 (file-name (git-file-name name version))
478 (base32 "00ma0g6ajll9awp2bp303bawac8ync4k9w2a6vix0k4nw3003gb4"))))
479 (build-system ocaml-build-system)
482 ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
483 (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
484 (string-append "OCAMLBUILD_LIBDIR=" #$output
485 "/lib/ocaml/site-lib")
486 (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
488 (modify-phases %standard-phases
490 ; some failures because of changes in OCaml's error message formating
492 (home-page "https://github.com/ocaml/ocamlbuild")
493 (synopsis "OCaml build tool")
494 (description "OCamlbuild is a generic build tool, that has built-in rules
495 for building OCaml library and programs.")
496 (license license:lgpl2.1+)))
498 (define-public camlidl
506 (url "https://github.com/xavierleroy/camlidl")
507 (commit "camlidl109")))
509 (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))
510 (file-name (git-file-name name version))))
511 (build-system gnu-build-system)
513 `(#:tests? #f ;; No test suite
517 "BINDIR=" (assoc-ref %outputs "out") "/bin")
519 "OCAMLLIB=" (assoc-ref %outputs "out") "/lib/ocaml/site-lib/camlidl"))
521 (modify-phases %standard-phases
525 (copy-file "config/Makefile.unix" "config/Makefile")
526 ;; Note: do not pass '-jN' as this appears to not be
527 ;; parallel-safe (race condition related to libcamlidl.a).
528 (invoke "make" "all")
530 (add-before 'install 'create-target-directories
531 (lambda* (#:key outputs #:allow-other-keys)
532 (let ((out (string-append (assoc-ref outputs "out"))))
534 (string-append out "/bin"))
536 (string-append out "/lib/ocaml/site-lib/camlidl/stublibs"))
538 (string-append out "/lib/ocaml/site-lib/camlidl/caml")))
540 (add-after 'install 'install-meta
541 (lambda* (#:key outputs #:allow-other-keys)
542 (let ((out (assoc-ref outputs "out")))
544 (string-append out "/lib/ocaml/site-lib/camlidl/META")
548 "description = \"Stub code generator for OCaml/C interface\"
549 version = \"" ,version "\"
551 archive(byte) = \"com.cma\"
552 archive(native) = \"com.cmxa\"")))))
556 (home-page "https://github.com/xavierleroy/camlidl")
557 (synopsis "Stub code generator for OCaml/C interface")
559 "Camlidl is a stub code generator for Objective Caml. It generates stub
560 code for interfacing Caml with C from an IDL description of the C functions.")
561 (license license:lgpl2.1)))
563 (define-public ocaml-extlib
565 (name "ocaml-extlib")
569 (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
570 "extlib-" version ".tar.gz"))
573 "0npq4hq3zym8nmlyji7l5cqk6drx2rkcx73d60rxqh5g8dla8p4k"))))
574 (build-system ocaml-build-system)
577 (modify-phases %standard-phases
578 (delete 'configure))))
581 (home-page "https://github.com/ygrek/ocaml-extlib")
582 (synopsis "Complete and small extension for OCaml standard library")
583 (description "This library adds new functions to OCaml standard library
584 modules, modifies some functions in order to get better performances or
585 safety (tail-recursive) and also provides new modules which should be useful
586 for day to day programming.")
587 ;; With static-linking exception
588 (license license:lgpl2.1+)))
590 (define-public ocaml-cudf
597 (uri "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz")
600 "0771lwljqwwn3cryl0plny5a5dyyrj4z6bw66ha5n8yfbpcy8clr"))))
601 (build-system ocaml-build-system)
602 (propagated-inputs (list ocaml-extlib))
604 (list perl ocamlbuild ocaml-ounit))
609 (string-append "BINDIR=" #$output "/bin"))
611 (modify-phases %standard-phases
612 (delete 'configure))))
613 (home-page "https://www.mancoosi.org/cudf/")
614 (synopsis "CUDF library (part of the Mancoosi tools)")
615 (description "CUDF (for Common Upgradeability Description Format) is a
616 format for describing upgrade scenarios in package-based Free and Open Source
617 Software distribution.")
618 ;; With static-linking exception
619 (license license:lgpl2.1+)))
621 (define-public ocaml-mccs
628 (url "https://github.com/AltGr/ocaml-mccs")
630 (file-name (git-file-name name version))
633 "17bvm0jhhs8h3p5sbb65asj53a8sxl634cc0kvcivpams74837zq"))))
634 (build-system dune-build-system)
635 (propagated-inputs (list ocaml-cudf))
636 (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
637 (synopsis "Upgrade path problem solver")
638 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
639 Mccs take as input a CUDF problem and computes the best solution according to
640 a set of criteria. It relies on a Integer Programming solver or a
641 Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
642 underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
646 ;; With static-linking exception
649 (define-public ocaml-dose3
655 (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
658 "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
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 "0mdr32mg63yaw89p44zx8b9dxp1167ckmlxkp8svd6fwgb3z49yx"))))
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"))
830 ;; Opam tests require data from opam-repository. Instead of
831 ;; downloading them with wget from the guix environment, copy the
832 ;; content to the expected directory.
833 (substitute* "tests/reftests/dune.inc"
834 (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
835 (string-append "rmdir %{targets}) (run cp -r "
836 (assoc-ref inputs (string-append "opam-repo-" commit))
837 "/ %{targets}) (run chmod +w -R %{targets}"))
838 (("wget[^)]*") "touch %{targets}")
839 ;; Disable a failing test because of different line wrapping
840 (("diff cli-versioning.test cli-versioning.out") "run true")
841 ;; Disable a failing test because it tries to clone a git
842 ;; repository from inside bwrap
843 (("diff upgrade-format.test upgrade-format.out") "run true"))
844 (substitute* "tests/reftests/dune"
845 ;; Because of our changes to the previous file, we cannot check
846 ;; it can be regenerated
847 (("diff dune.inc dune.inc.gen") "run true"))
848 ;; Ensure we can run the generated build.sh (no /bin/sh)
849 (substitute* '("tests/reftests/legacy-local.test"
850 "tests/reftests/legacy-git.test")
853 (search-input-file inputs "/bin/sh"))))
854 (substitute* "tests/reftests/testing-env"
856 (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
857 (assoc-ref inputs "libc") "/lib"))))))))
859 (let ((opam-repo (lambda (commit hash)
863 (url "https://github.com/ocaml/opam-repository")
865 (file-name (git-file-name "opam-repo" commit))
866 (sha256 (base32 hash))))))
868 ("ocaml-cppo" ,ocaml-cppo)
873 ("python" ,python-wrapper)
879 ("opam-repo-009e00fa" ,(opam-repo "009e00fa86300d11c311309a2544e5c6c3eb8de2"
880 "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
881 ("opam-repo-ad4dd344" ,(opam-repo "ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
882 "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
883 ("opam-repo-c1d23f0e" ,(opam-repo "c1d23f0e17ec83a036ebfbad1c78311b898a2ca0"
884 "0j9abisx3ifzm66ci3p45mngmz4f0fx7yd9jjxrz3f8w5jffc9ii"))
885 ("opam-repo-f372039d" ,(opam-repo "f372039db86a970ef3e662adbfe0d4f5cd980701"
886 "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
888 (list ocaml ncurses curl bubblewrap))
890 (list ocaml-cmdliner ocaml-dose3 ocaml-mccs ocaml-opam-file-format
892 (home-page "http://opam.ocamlpro.com/")
893 (synopsis "Package manager for OCaml")
895 "OPAM is a tool to manage OCaml packages. It supports multiple
896 simultaneous compiler installations, flexible package constraints, and a
897 Git-friendly development workflow.")
899 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
900 (license license:lgpl3)))
902 (define-public ocaml-camlp-streams
904 (name "ocaml-camlp-streams")
910 (url "https://github.com/ocaml/camlp-streams")
911 (commit (string-append "v" version))))
912 (file-name (git-file-name name version))
914 (base32 "1wd5k0irzwi841b27pbx0n5fdybbgx97184zm8cjajizd2j8w0g5"))))
915 (build-system dune-build-system)
919 (home-page "https://github.com/ocaml/camlp-streams")
920 (synopsis "Stream and Genlex libraries for use with Camlp4 and Camlp5")
922 "This package provides two library modules:
925 @item Stream: imperative streams, with in-place update and memoization of
926 the latest element produced.
927 @item Genlex: a small parameterized lexical analyzer producing streams of
928 tokens from streams of characters.
931 The two modules are designed for use with Camlp4 and Camlp5: The stream
932 patterns and stream expressions of Camlp4/Camlp5 consume and produce data of
933 type 'a Stream.t. The Genlex tokenizer can be used as a simple lexical
934 analyzer for Camlp4/Camlp5-generated parsers.
936 The Stream module can also be used by hand-written recursive-descent parsers,
937 but is not very convenient for this purpose.
939 The Stream and Genlex modules have been part of the OCaml standard library for a
940 long time, and have been distributed as part of the core OCaml system. They
941 will be removed from the OCaml standard library at some future point, but will
942 be maintained and distributed separately in the camlpstreams package.")
943 (license license:lgpl2.1)))
945 (define-public camlp5
953 (url "https://github.com/camlp5/camlp5")
954 (commit (string-append "rel" version))))
955 (file-name (git-file-name name version))
957 (base32 "1fnvmaw9cland09pjx5h6w3f6fz9s23l4nbl4m9fcaa2i4dpraz6"))))
958 (build-system gnu-build-system)
960 `(#:tests? #f ; XXX TODO figure out how to run the tests
962 (modify-phases %standard-phases
964 (lambda* (#:key outputs #:allow-other-keys)
965 (let* ((out (assoc-ref outputs "out"))
966 (mandir (string-append out "/share/man")))
967 ;; Custom configure script doesn't recognize
968 ;; --prefix=<PREFIX> syntax (with equals sign).
969 (invoke "./configure"
971 "--mandir" mandir))))
972 (add-before 'build 'fix-/bin-references
974 (substitute* "config/Makefile"
979 (invoke "make" "-j" (number->string
980 (parallel-job-count))
982 ;; Required for findlib to find camlp5's libraries
983 (add-after 'install 'install-meta
984 (lambda* (#:key outputs #:allow-other-keys)
985 (install-file "etc/META" (string-append (assoc-ref outputs "out")
986 "/lib/ocaml/camlp5/"))
989 (list ocaml ocaml-camlp-streams))
991 (list perl ocaml-findlib))
992 (home-page "https://camlp5.github.io/")
993 (synopsis "Pre-processor Pretty Printer for OCaml")
995 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
996 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
997 concrete syntax of the language (Quotations, Syntax Extensions).")
998 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
999 (license (list license:bsd-3 license:qpl))))
1001 (define-public hevea
1007 (uri (string-append "http://hevea.inria.fr/old/"
1008 "hevea-" version ".tar.gz"))
1011 "1jwydkb9ldb1sx815c364dxgr569f2rbbzgxbn2kanrybpdbm2gi"))))
1012 (build-system gnu-build-system)
1018 `(#:tests? #f ; no test suite
1019 #:make-flags (list (string-append "PREFIX=" %output))
1020 #:phases (modify-phases %standard-phases
1022 (add-before 'build 'patch-/bin/sh
1024 (substitute* "_tags"
1025 (("/bin/sh") (which "sh")))
1027 (home-page "http://hevea.inria.fr/")
1028 (synopsis "LaTeX to HTML translator")
1030 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
1031 written in Objective Caml.")
1032 (license license:qpl)))
1034 (define-public ocaml-num
1042 (url "https://github.com/ocaml/num")
1043 (commit (string-append "v" version))))
1044 (file-name (git-file-name name version))
1046 (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
1047 (build-system dune-build-system)
1050 (modify-phases %standard-phases
1051 (add-after 'unpack 'fix-race
1053 ;; There's a race between bng.o and bng_generic.c. Both depend on
1054 ;; the architecture specific bng.c, but only the latter declares
1056 (mkdir-p "_build/default/src")
1059 (copy-file f (string-append "_build/default/" f)))
1060 (find-files "src" "bng_.*\\.c")))))))
1061 (home-page "https://github.com/ocaml/num")
1062 (synopsis "Arbitrary-precision integer and rational arithmetic")
1063 (description "OCaml-Num contains the legacy Num library for
1064 arbitrary-precision integer and rational arithmetic that used to be part of
1065 the OCaml core distribution.")
1066 (license license:lgpl2.1+))); with linking exception
1068 (define-public emacs-tuareg
1069 ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
1070 ;; deprecated" or 'lexical-binding' and others had been fixed.
1071 (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545")
1074 (name "emacs-tuareg")
1075 (version (git-version "2.2.0" revision commit))
1080 (url "https://github.com/ocaml/tuareg")
1082 (file-name (git-file-name name version))
1084 (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
1085 (build-system gnu-build-system)
1087 `(("emacs" ,emacs-minimal)
1091 (modify-phases %standard-phases
1092 (add-after 'unpack 'make-git-checkout-writable
1094 (for-each make-file-writable (find-files "."))
1097 (add-before 'install 'fix-install-path
1098 (lambda* (#:key outputs #:allow-other-keys)
1099 (substitute* "Makefile"
1100 (("/emacs/site-lisp")
1101 (string-append (assoc-ref %outputs "out")
1102 "/share/emacs/site-lisp/")))
1104 (add-after 'install 'post-install
1105 (lambda* (#:key outputs #:allow-other-keys)
1106 (symlink "tuareg.el"
1107 (string-append (assoc-ref outputs "out")
1108 "/share/emacs/site-lisp/"
1109 "tuareg-autoloads.el"))
1111 (home-page "https://github.com/ocaml/tuareg")
1112 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
1113 (description "Tuareg helps editing OCaml code, to highlight important
1114 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
1116 (license license:gpl2+))))
1118 (define-public ocaml-menhir
1120 (name "ocaml-menhir")
1121 (version "20220210")
1126 (url "https://gitlab.inria.fr/fpottier/menhir.git")
1128 (file-name (git-file-name name version))
1130 (base32 "0f31isr3cyiishflz6qr4xc3gp9xwf32r3vxdvm5wnr2my1fnn1n"))))
1131 (build-system dune-build-system)
1135 `(#:tests? #f)) ; No check target
1136 (properties `((ocaml4.07-variant . ,(delay (strip-ocaml4.07-variant ocaml-menhir)))))
1137 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
1138 (synopsis "Parser generator")
1139 (description "Menhir is a parser generator. It turns high-level grammar
1140 specifications, decorated with semantic actions expressed in the OCaml
1141 programming language into parsers, again expressed in OCaml. It is based on
1142 Knuth’s LR(1) parser construction technique.")
1143 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
1144 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
1145 ;; are QPL licensed.
1146 (license (list license:gpl2+ license:qpl))))
1148 (define-public ocaml-bigarray-compat
1150 (name "ocaml-bigarray-compat")
1155 (url "https://github.com/mirage/bigarray-compat")
1156 (commit (string-append "v" version))))
1157 (file-name (git-file-name name version))
1160 "0hif5baiwswdblymyfbxh9066pfqynlz5vj3b2brpn0a12k6i5fq"))))
1161 (build-system dune-build-system)
1163 `(#:tests? #f)); no tests
1164 (home-page "https://github.com/mirage/bigarray-compat")
1165 (synopsis "OCaml compatibility library")
1166 (description "This package contains a compatibility library for
1167 @code{Stdlib.Bigarray} in OCaml.")
1168 (license license:isc)))
1170 (define-public lablgtk
1177 (url "https://github.com/garrigue/lablgtk")
1179 (file-name (git-file-name name version))
1182 "179ipx0c6bpxm4gz0syxgqy09dp5p4x9qsdil7s9jlx8ffg1mm0w"))))
1183 (build-system gnu-build-system)
1186 ("findlib" ,ocaml-findlib)
1187 ("pkg-config" ,pkg-config)))
1188 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
1189 ;; and gtk+-quartz-2.0 once available.
1198 `(#:tests? #f ; no check target
1200 ;; opt: also install cmxa files
1201 #:make-flags (list "all" "opt"
1202 (string-append "FINDLIBDIR="
1203 (assoc-ref %outputs "out")
1205 ;; Occasionally we would get "Error: Unbound module GtkThread" when
1206 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
1207 #:parallel-build? #f
1210 (modify-phases %standard-phases
1211 (add-before 'install 'prepare-install
1212 (lambda* (#:key inputs outputs #:allow-other-keys)
1213 (let ((out (assoc-ref outputs "out"))
1214 (ocaml (assoc-ref inputs "ocaml")))
1215 ;; Install into the output and not the ocaml directory.
1216 (mkdir-p (string-append out "/lib/ocaml"))
1217 (substitute* "config.make"
1220 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lablgtk))))
1221 (home-page "http://lablgtk.forge.ocamlcore.org/")
1222 (synopsis "GTK+ bindings for OCaml")
1224 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
1225 a strongly-typed object-oriented interface that is compatible with the
1226 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
1227 also provides bindings to
1228 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
1229 gnomeui, gtksourceview, gtkspell,
1230 libglade (and it an generate OCaml code from .glade files),
1231 libpanel, librsvg and quartz.")
1232 (license license:lgpl2.1)))
1234 (define-public ocaml4.07-lablgtk
1237 (name "ocaml4.07-lablgtk")
1239 `(("ocaml" ,ocaml-4.07)
1240 ("findlib" ,ocaml4.07-findlib)
1241 ("pkg-config" ,pkg-config)))
1244 (define-public unison
1251 (url "https://github.com/bcpierce00/unison")
1252 (commit (string-append "v" version))))
1253 (file-name (git-file-name name version))
1256 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))
1257 (patches (search-patches "unison-fix-ocaml-4.08.patch"))))
1258 (build-system gnu-build-system)
1260 "doc")) ; 1.9 MiB of documentation
1262 `(("ocaml" ,ocaml-4.09)
1263 ;; For documentation
1264 ("ghostscript" ,ghostscript)
1265 ("texlive" ,(texlive-updmap.cfg
1266 (list texlive-fonts-ec texlive-dvips-l3backend)))
1271 `(#:parallel-build? #f
1272 #:parallel-tests? #f
1273 #:test-target "selftest"
1274 #:tests? #f ; Tests require writing to $HOME.
1275 ; If some $HOME is provided, they fail with the message
1276 ; "Fatal error: Skipping some tests -- remove me!"
1278 (modify-phases %standard-phases
1280 (add-before 'install 'prepare-install
1281 (lambda* (#:key outputs #:allow-other-keys)
1282 (let* ((out (assoc-ref outputs "out"))
1283 (bin (string-append out "/bin")))
1285 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
1287 (add-after 'install 'install-fsmonitor
1288 (lambda* (#:key outputs #:allow-other-keys)
1289 (let* ((out (assoc-ref outputs "out"))
1290 (bin (string-append out "/bin")))
1291 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
1292 (install-file "src/unison-fsmonitor" bin)
1294 (add-after 'install 'install-doc
1295 (lambda* (#:key outputs #:allow-other-keys)
1296 (let ((doc (string-append (assoc-ref outputs "doc")
1297 "/share/doc/unison")))
1299 ;; Remove an '\n' that prevents the doc to be generated
1300 ;; correctly with newer hevea.
1301 (substitute* "doc/local.tex"
1302 (("----SNIP----.*") "----SNIP----"))
1303 ;; This file needs write-permissions, because it's
1304 ;; overwritten by 'docs' during documentation generation.
1305 (chmod "src/strings.ml" #o600)
1306 (invoke "make" "docs"
1307 "TEXDIRECTIVES=\\\\draftfalse")
1308 (for-each (lambda (f)
1309 (install-file f doc))
1311 (string-append "doc/unison-manual." ext))
1312 ;; Install only html documentation,
1313 ;; since the build is currently
1314 ;; non-reproducible with the ps, pdf,
1316 '(;; "ps" "pdf" "dvi"
1319 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
1320 (synopsis "File synchronizer")
1322 "Unison is a file-synchronization tool. It allows two replicas of
1323 a collection of files and directories to be stored on different hosts
1324 (or different disks on the same host), modified separately, and then
1325 brought up to date by propagating the changes in each replica
1327 (license license:gpl3+)))
1329 (define-public ocaml-findlib
1331 (name "ocaml-findlib")
1335 (uri (string-append "http://download.camlcity.org/download/"
1336 "findlib" "-" version ".tar.gz"))
1339 "0hfcwamcvinmww59b5i4yxbf0kxyzkp5qv3d1c7ybn9q52vgq463"))))
1340 (build-system gnu-build-system)
1344 `(#:tests? #f ; no test suite
1345 #:parallel-build? #f
1346 #:make-flags (list "all" "opt")
1347 #:phases (modify-phases %standard-phases
1350 (lambda* (#:key inputs outputs #:allow-other-keys)
1351 (let ((out (assoc-ref outputs "out")))
1354 "-bindir" (string-append out "/bin")
1355 "-config" (string-append out "/etc/ocamfind.conf")
1356 "-mandir" (string-append out "/share/man")
1357 "-sitelib" (string-append out "/lib/ocaml/site-lib")
1360 (lambda* (#:key outputs #:allow-other-keys)
1361 (let ((out (assoc-ref outputs "out")))
1362 (invoke "make" "install"
1363 (string-append "OCAML_CORE_STDLIB="
1364 out "/lib/ocaml/site-lib"))))))))
1365 (home-page "http://projects.camlcity.org/projects/findlib.html")
1366 (synopsis "Management tool for OCaml libraries")
1368 "The \"findlib\" library provides a scheme to manage reusable software
1369 components (packages), and includes tools that support this scheme. Packages
1370 are collections of OCaml modules for which metainformation can be stored. The
1371 packages are kept in the file system hierarchy, but with strict directory
1372 structure. The library contains functions to look the directory up that
1373 stores a package, to query metainformation about a package, and to retrieve
1374 dependency information about multiple packages. There is also a tool that
1375 allows the user to enter queries on the command-line. In order to simplify
1376 compilation and linkage, there are new frontends of the various OCaml
1377 compilers that can directly deal with packages.")
1378 (license license:x11)))
1380 (define-public ocaml4.07-findlib
1382 (inherit ocaml-findlib)
1383 (name "ocaml4.07-findlib")
1385 (list m4 ocaml-4.07))))
1387 (define-public ocaml4.09-findlib
1389 (inherit ocaml-findlib)
1390 (name "ocaml4.09-findlib")
1392 (list m4 ocaml-4.09))))
1394 (define-public ocaml-ounit2
1396 (name "ocaml-ounit2")
1401 (url "https://github.com/gildor478/ounit.git")
1402 (commit (string-append "v" version))))
1403 (file-name (git-file-name name version))
1406 "04c841hpk2yij370w30w3pis8nibnr28v74mpq2qz7z5gb8l07p1"))))
1407 (build-system dune-build-system)
1409 (list ocaml-lwt ocaml-stdlib-shims))
1410 (home-page "https://github.com/gildor478/ounit")
1411 (synopsis "Unit testing framework for OCaml")
1412 (description "OUnit2 is a unit testing framework for OCaml. It is similar
1413 to JUnit and other XUnit testing frameworks.")
1414 (license license:expat)))
1416 ;; note that some tests may hang for no obvious reason.
1417 (define-public ocaml-ounit
1419 (inherit ocaml-ounit2)
1420 (name "ocaml-ounit")
1423 (modify-phases %standard-phases
1426 (invoke "make" "install-ounit" ,(string-append "version="
1427 (package-version ocaml-ounit2))))))))
1429 (list ocaml-ounit2))
1430 (home-page "http://ounit.forge.ocamlcore.org")
1431 (synopsis "Unit testing framework for OCaml")
1432 (description "Unit testing framework for OCaml. It is similar to JUnit and
1433 other XUnit testing frameworks.")
1434 (license license:expat)))
1436 (define-public camlzip
1443 (url "https://github.com/xavierleroy/camlzip")
1444 (commit (string-append
1446 (string-join (string-split version #\.) "")))))
1447 (file-name (git-file-name name version))
1450 "16jnn3czxnvyjngnz167x5kw097k7izdqvkix8qvgvhdmgvqm89b"))))
1451 (build-system ocaml-build-system)
1456 (modify-phases %standard-phases
1457 (delete 'configure))
1458 #:install-target "install-findlib"
1460 ,#~(list "all" "allopt"
1461 (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
1462 (home-page "https://github.com/xavierleroy/camlzip")
1463 (synopsis "Provides easy access to compressed files")
1464 (description "Provides easy access to compressed files in ZIP, GZIP and
1465 JAR format. It provides functions for reading from and writing to compressed
1466 files in these formats.")
1467 (license license:lgpl2.1+)))
1469 (define-public ocamlmod
1475 (uri (ocaml-forge-uri name version 1702))
1478 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
1479 (build-system ocaml-build-system)
1481 `(("ounit" ,ocaml-ounit)
1482 ("ocamlbuild" ,ocamlbuild)))
1485 (modify-phases %standard-phases
1486 ;; Tests are done during build.
1488 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1489 (synopsis "Generate modules from OCaml source files")
1490 (description "Generate modules from OCaml source files.")
1491 (license license:lgpl2.1+))) ; with an exception
1493 (define-public ocaml-zarith
1495 (name "ocaml-zarith")
1500 (url "https://github.com/ocaml/Zarith")
1501 (commit (string-append "release-" version))))
1502 (file-name (git-file-name name version))
1505 "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"))))
1506 (build-system ocaml-build-system)
1512 `(#:tests? #f ; no test target
1514 (modify-phases %standard-phases
1516 (lambda _ (invoke "./configure")))
1517 (add-after 'install 'move-sublibs
1518 (lambda* (#:key outputs #:allow-other-keys)
1519 (let* ((out (assoc-ref outputs "out"))
1520 (lib (string-append out "/lib/ocaml/site-lib")))
1521 (mkdir-p (string-append lib "/stublibs"))
1522 (rename-file (string-append lib "/zarith/dllzarith.so")
1523 (string-append lib "/stublibs/dllzarith.so"))))))))
1524 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1525 (synopsis "Implements arbitrary-precision integers")
1526 (description "Implements arithmetic and logical operations over
1527 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1528 over big integers. Small integers are represented as Caml unboxed integers,
1529 for speed and space economy.")
1530 (license license:lgpl2.1+))) ; with an exception
1532 (define-public ocaml-frontc
1534 (name "ocaml-frontc")
1539 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1540 (commit (string-append "v" version))))
1541 (file-name (git-file-name name version))
1544 "1mi1vh4qgscnb470qwidccaqd068j1bqlz6pf6wddk21paliwnqb"))))
1545 (build-system dune-build-system)
1547 `(#:test-target "test.t"
1549 (modify-phases %standard-phases
1550 (add-after 'unpack 'make-writable
1552 (for-each make-file-writable (find-files "." ".")))))))
1554 (list ocaml-menhir ocaml-odoc))
1555 (properties `((upstream-name . "FrontC")
1556 (ocaml4.07-variant . ,(delay ocaml4.07-frontc))))
1557 (home-page "https://www.irit.fr/FrontC")
1558 (synopsis "C parser and lexer library")
1559 (description "FrontC is an OCAML library providing a C parser and lexer.
1560 The result is a syntactic tree easy to process with usual OCAML tree management.
1561 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1562 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1563 (license license:lgpl2.1)))
1565 (define-public ocaml4.07-frontc
1566 (package-with-ocaml4.07
1568 (inherit ocaml-frontc)
1573 (url "https://github.com/mirage/ocaml-base64")
1574 (commit (string-append
1575 "V_" (string-join (string-split version #\.) "_")))))
1576 (file-name (git-file-name "ocaml-frontc" version))
1579 "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
1580 (build-system ocaml-build-system)
1583 (modify-phases %standard-phases
1585 (add-after 'install 'install-meta
1586 (lambda* (#:key outputs #:allow-other-keys)
1587 (let ((out (assoc-ref outputs "out")))
1588 (with-output-to-file
1589 (string-append out "/lib/ocaml/frontc/META")
1593 "description = \"Parser for the C language\"
1594 version = \"" ,version "\"
1596 archive(byte) = \"frontc.cma\"
1597 archive(native) = \"frontc.cmxa\""))))
1598 (symlink (string-append out "/lib/ocaml/frontc")
1599 (string-append out "/lib/ocaml/FrontC"))))))
1600 #:make-flags ,#~(list (string-append "PREFIX=" #$output)
1601 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1604 (define-public ocaml-qcheck
1606 (name "ocaml-qcheck")
1612 (url "https://github.com/c-cube/qcheck")
1613 (commit (string-append "v" version))))
1614 (file-name (git-file-name name version))
1616 (base32 "0g3r8lrw6fsdphgpnp08saxyxk1vd3chpmb564ir2qnsp716vz6z"))))
1617 (build-system dune-build-system)
1619 `(#:test-target "."))
1621 (list ocaml-alcotest ocaml-ounit))
1624 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-qcheck))))
1625 (home-page "https://github.com/c-cube/qcheck")
1626 (synopsis "QuickCheck inspired property-based testing for OCaml")
1627 (description "QuickCheck inspired property-based testing for OCaml. This
1628 module checks invariants (properties of some types) over randomly
1629 generated instances of the type. It provides combinators for generating
1630 instances and printing them.")
1631 (license license:lgpl3+)))
1633 (define-public ocaml4.07-qcheck
1634 (package-with-ocaml4.07
1636 (inherit ocaml-qcheck)
1641 (url "https://github.com/c-cube/qcheck")
1643 (file-name (git-file-name "ocaml-qcheck" version))
1646 "1llnfynhlndwyjig7wrayjnds2b3mggp5lw20dwxhn2i2lkkb22m"))))
1649 (define-public ocaml-qtest
1651 (name "ocaml-qtest")
1656 (url "https://github.com/vincent-hugot/qtest/")
1657 (commit (string-append "v" version))))
1658 (file-name (git-file-name name version))
1661 "04ghjshh6104xyglm0db9kv90m62qla5f4bfrlndv6dsvgw3rdjl"))))
1662 (build-system dune-build-system)
1664 `(#:test-target "tests"))
1666 `(("ounit" ,ocaml-ounit)
1667 ("qcheck" ,ocaml-qcheck)))
1668 (home-page "https://github.com/vincent-hugot/qtest")
1669 (synopsis "Inline (Unit) Tests for OCaml")
1670 (description "Qtest extracts inline unit tests written using a special
1671 syntax in comments. Those tests are then run using the oUnit framework and the
1672 qcheck library. The possibilities range from trivial tests -- extremely simple
1673 to use -- to sophisticated random generation of test cases.")
1674 (license license:lgpl3+)))
1676 (define-public ocaml-stringext
1678 (name "ocaml-stringext")
1683 (url "https://github.com/rgrinberg/stringext")
1685 (file-name (git-file-name name version))
1688 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
1689 (build-system dune-build-system)
1691 `(#:test-target "."))
1693 `(("ocamlbuild" ,ocamlbuild)
1694 ("qtest" ,ocaml-qtest)))
1695 (home-page "https://github.com/rgrinberg/stringext")
1696 (synopsis "Extra string functions for OCaml")
1697 (description "Provides a single module named Stringext that provides a grab
1698 bag of often used but missing string functions from the stdlib. E.g, split,
1699 full_split, cut, rcut, etc..")
1700 ;; the only mention of a license in this project is in its `opam' file
1701 ;; where it says `mit'.
1702 (license license:expat)))
1704 (define dune-bootstrap
1711 (url "https://github.com/ocaml/dune")
1713 (file-name (git-file-name name version))
1716 "0fa8fkj2piis8b56phl6p77pl1na81krdnmmvyw16hq45zbmm9rk"))))
1717 (build-system ocaml-build-system)
1719 `(#:tests? #f; require odoc
1720 #:make-flags ,#~(list "release"
1721 (string-append "PREFIX=" #$output)
1722 (string-append "LIBDIR=" #$output
1723 "/lib/ocaml/site-lib"))
1725 (modify-phases %standard-phases
1727 (lambda* (#:key outputs #:allow-other-keys)
1728 (mkdir-p "src/dune")
1729 (invoke "./configure")
1731 (home-page "https://github.com/ocaml/dune")
1732 (synopsis "OCaml build system")
1733 (description "Dune is a build system that was designed to simplify the
1734 release of Jane Street packages. It reads metadata from @file{dune} files
1735 following a very simple s-expression syntax.")
1736 (license license:expat)))
1738 (define ocaml4.09-dune-bootstrap
1739 (package-with-ocaml4.09 dune-bootstrap))
1741 (define-public dune-configurator
1743 (inherit dune-bootstrap)
1744 (name "dune-configurator")
1745 (build-system dune-build-system)
1747 `(#:package "dune-configurator"
1748 #:dune ,dune-bootstrap
1749 ; require ppx_expect
1752 (modify-phases %standard-phases
1753 ;; When building dune, these directories are normally removed after
1755 (add-before 'build 'remove-vendor
1757 (delete-file-recursively "vendor/csexp")
1758 (delete-file-recursively "vendor/pp"))))))
1761 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
1762 (synopsis "Dune helper library for gathering system configuration")
1763 (description "Dune-configurator is a small library that helps writing
1764 OCaml scripts that test features available on the system, in order to generate
1765 config.h files for instance. Among other things, dune-configurator allows one to:
1768 @item test if a C program compiles
1769 @item query pkg-config
1770 @item import #define from OCaml header files
1771 @item generate config.h file
1774 (define-public ocaml4.09-dune-configurator
1776 (inherit dune-configurator)
1777 (name "ocaml4.09-dune-configurator")
1779 `(,@(package-arguments dune-configurator)
1780 #:dune ,ocaml4.09-dune-bootstrap
1782 #:findlib ,ocaml4.09-findlib))
1784 `(("ocaml-csexp" ,ocaml4.09-csexp)))))
1788 (inherit dune-bootstrap)
1790 (list dune-configurator))
1791 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
1792 (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
1794 (define-public ocaml4.09-dune
1796 (inherit ocaml4.09-dune-bootstrap)
1798 (list dune-configurator))))
1800 (define-public ocaml4.07-dune
1802 (inherit (package-with-ocaml4.07 dune-bootstrap))
1807 (url "https://github.com/ocaml/dune")
1809 (file-name (git-file-name "dune" version))
1812 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
1814 (define-public ocaml-csexp
1816 (name "ocaml-csexp")
1821 (url "https://github.com/ocaml-dune/csexp")
1823 (file-name (git-file-name name version))
1826 "1v5y4x1a21193h8q536c0s0d8hv3hyyky4pgzm2dw9807v36s2x4"))))
1827 (build-system dune-build-system)
1829 `(#:tests? #f; FIXME: needs ppx_expect, but which version?
1830 #:dune ,dune-bootstrap
1832 (modify-phases %standard-phases
1833 (add-before 'build 'chmod
1835 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
1838 (list ocaml-result))
1839 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
1840 (home-page "https://github.com/ocaml-dune/csexp")
1841 (synopsis "Parsing and printing of S-expressions in Canonical form")
1842 (description "This library provides minimal support for Canonical
1843 S-expressions. Canonical S-expressions are a binary encoding of
1844 S-expressions that is super simple and well suited for communication
1847 This library only provides a few helpers for simple applications. If
1848 you need more advanced support, such as parsing from more fancy input
1849 sources, you should consider copying the code of this library given
1850 how simple parsing S-expressions in canonical form is.
1852 To avoid a dependency on a particular S-expression library, the only
1853 module of this library is parameterised by the type of S-expressions.")
1854 (license license:expat)))
1856 (define-public ocaml4.09-csexp
1858 (inherit ocaml-csexp)
1859 (name "ocaml4.09-csexp")
1861 `(#:ocaml ,ocaml-4.09
1862 #:findlib ,ocaml4.09-findlib
1863 ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
1864 ((#:dune _) ocaml4.09-dune-bootstrap))))
1866 `(("ocaml-result" ,ocaml4.09-result)))))
1868 (define-public ocaml-migrate-parsetree
1870 (name "ocaml-migrate-parsetree")
1872 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1878 (commit (string-append "v" version))))
1879 (file-name (git-file-name name version))
1882 "1nqmhsc72xmgm865nn8q0hngklhvqav281hgnx1gf5ns49a0n3ig"))))
1883 (build-system dune-build-system)
1884 (arguments `(#:tests? #f))
1886 (list ocaml-ppx-derivers ocamlbuild ocaml-result))
1887 (properties `((upstream-name . "ocaml-migrate-parsetree")
1888 (ocaml4.07-variant . ,(delay ocaml4.07-migrate-parsetree))))
1889 (synopsis "OCaml parsetree converter")
1890 (description "This library converts between parsetrees of different OCaml
1891 versions. For each version, there is a snapshot of the parsetree and conversion
1892 functions to the next and/or previous version.")
1893 (license license:lgpl2.1+)))
1895 ;; OCaml 4.07 packages require version 1.*
1896 (define-public ocaml4.07-migrate-parsetree
1897 (package-with-ocaml4.07
1899 (inherit ocaml-migrate-parsetree)
1900 (name "ocaml-migrate-parsetree")
1902 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1908 (commit (string-append "v" version))))
1909 (file-name (git-file-name name version))
1912 "16x8sxc4ygxrr1868qpzfqyrvjf3hfxvjzmxmf6ibgglq7ixa2nq"))))
1913 (properties '((upstream-name . "ocaml-migrate-parsetree"))))))
1915 (define-public ocaml4.07-ppx-tools-versioned
1916 (package-with-ocaml4.07
1918 (name "ocaml-ppx-tools-versioned")
1923 (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
1925 (file-name (git-file-name name version))
1928 "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
1929 (build-system dune-build-system)
1932 #:package "ppx_tools_versioned"))
1934 (list ocaml-migrate-parsetree))
1935 (properties `((upstream-name . "ppx_tools_versioned")))
1936 (home-page "https://github.com/let-def/ppx_tools_versioned")
1937 (synopsis "Variant of ppx_tools")
1938 (description "This package is a variant of ppx_tools based on
1939 ocaml-migrate-parsetree")
1940 (license license:expat))))
1942 (define-public ocaml-bitstring
1944 (name "ocaml-bitstring")
1949 (url "https://github.com/xguerin/bitstring")
1950 (commit (string-append "v" version))))
1951 (file-name (git-file-name name version))
1954 "0mghsl8b2zd2676mh1r9142hymhvzy9cw8kgkjmirxkn56wbf56b"))))
1955 (build-system dune-build-system)
1957 (list time autoconf automake))
1959 (list ocaml-stdlib-shims))
1961 `(#:package "bitstring"
1962 #:tests? #f; Tests fail to build
1964 (modify-phases %standard-phases
1965 (add-before 'build 'upgrade
1967 (invoke "dune" "upgrade")
1969 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-bitstring))))
1970 (home-page "https://github.com/xguerin/bitstring")
1971 (synopsis "Bitstrings and bitstring matching for OCaml")
1972 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1973 a syntax extension and library for OCaml. You can use this module to both parse
1974 and generate binary formats, files and protocols. Bitstring handling is added
1975 as primitives to the language, making it exceptionally simple to use and very
1977 (license license:isc)))
1979 (define-public ocaml4.07-bitstring
1980 (package-with-ocaml4.07
1982 (inherit ocaml-bitstring)
1986 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1987 "get/v" version ".tar.gz"))
1988 (file-name (string-append "ocaml-bitsring-" version ".tar.gz"))
1991 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
1993 `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)))
1996 (define-public ocaml-result
1998 (name "ocaml-result")
2003 (url "https://github.com/janestreet/result")
2005 (file-name (git-file-name name version))
2008 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
2009 (build-system dune-build-system)
2012 #:dune ,dune-bootstrap))
2013 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
2014 (home-page "https://github.com/janestreet/result")
2015 (synopsis "Compatibility Result module")
2016 (description "Uses the new result type defined in OCaml >= 4.03 while
2017 staying compatible with older version of OCaml should use the Result module
2018 defined in this library.")
2019 (license license:bsd-3)))
2021 (define-public ocaml4.09-result
2023 (inherit ocaml-result)
2024 (name "ocaml4.09-result")
2027 #:dune ,ocaml4.09-dune-bootstrap
2029 #:findlib ,ocaml4.09-findlib))))
2031 (define-public ocaml-topkg
2033 (name "ocaml-topkg")
2037 (uri (string-append "http://erratique.ch/software/topkg/releases/"
2038 "topkg-" version ".tbz"))
2041 "1iyinmcfqpprk7k4cc51nqgypayprbj4larwcfqw86k5dri84825"))))
2042 (build-system ocaml-build-system)
2044 (list opam ocamlbuild))
2046 `(("result" ,ocaml-result)))
2049 #:build-flags '("build")
2051 (modify-phases %standard-phases
2052 (delete 'configure))))
2053 (home-page "https://erratique.ch/software/topkg")
2054 (synopsis "Transitory OCaml software packager")
2055 (description "Topkg is a packager for distributing OCaml software. It
2056 provides an API to describe the files a package installs in a given build
2057 configuration and to specify information about the package's distribution,
2058 creation and publication procedures.")
2059 (license license:isc)))
2061 (define-public ocaml-rresult
2063 (name "ocaml-rresult")
2067 (uri (string-append "http://erratique.ch/software/rresult/releases/"
2068 "rresult-" version ".tbz"))
2071 "0h2mjyzhay1p4k7n0mzaa7hlc7875kiy6m1i3r1n03j6hddpzahi"))))
2072 (build-system ocaml-build-system)
2074 (list opam ocamlbuild))
2076 `(("topkg" ,ocaml-topkg)))
2079 #:build-flags '("build")
2081 (modify-phases %standard-phases
2082 (delete 'configure))))
2083 (home-page "https://erratique.ch/software/rresult")
2084 (synopsis "Result value combinators for OCaml")
2085 (description "Handle computation results and errors in an explicit and
2086 declarative manner, without resorting to exceptions. It defines combinators
2087 to operate on the result type available from OCaml 4.03 in the standard
2089 (license license:isc)))
2091 (define-public ocaml-sqlite3
2093 (name "ocaml-sqlite3")
2099 (url "https://github.com/mmottl/sqlite3-ocaml")
2101 (file-name (git-file-name name version))
2104 "1ksm0a490315sf0yy8lmva5f3bgr0jnllffanyq89431grpj6x15"))))
2105 (build-system dune-build-system)
2106 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sqlite3))))
2108 (list dune-configurator ocaml-odoc))
2110 (list ocaml-ppx-inline-test pkg-config sqlite))
2111 (home-page "https://mmottl.github.io/sqlite3-ocaml")
2112 (synopsis "SQLite3 Bindings for OCaml")
2114 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
2115 API. Sqlite3 is a self-contained, serverless, zero-configuration,
2116 transactional SQL database engine with outstanding performance for many use
2117 cases. These bindings are written in a way that enables a friendly
2118 coexistence with the old (version 2) SQLite and its OCaml wrapper
2119 @code{ocaml-sqlite}.")
2120 (license license:expat)))
2122 (define-public ocaml4.07-sqlite3
2123 (package-with-ocaml4.07
2125 (inherit ocaml-sqlite3)
2131 (url "https://github.com/mmottl/sqlite3-ocaml")
2133 (file-name (git-file-name "ocaml-sqlite3" version))
2136 "15mmq7ak5facpfawfrc6hjz211gli7jab52iqdsihfvh790xm55f"))))
2139 (modify-phases %standard-phases
2140 (add-before 'build 'chmod
2142 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2145 `(("ocaml-odoc" ,ocaml-odoc)))
2148 (define-public ocaml-csv
2156 (url "https://github.com/Chris00/ocaml-csv")
2158 (file-name (git-file-name name version))
2161 "0y2hlqlmqs7r4y5mfzc5qdv7gdp3wxbwpz458vf7fj4593vg94cf"))))
2162 (build-system dune-build-system)
2166 (home-page "https://github.com/Chris00/ocaml-csv")
2167 (synopsis "Pure OCaml functions to read and write CSV")
2169 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
2170 by all major spreadsheets. This library implements pure OCaml functions to
2171 read and write files in this format as well as some convenience functions to
2172 manipulate such data.")
2173 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
2174 ;; against the library to be released under any terms.
2175 (license license:lgpl2.1)))
2177 (define-public ocaml-mtime
2179 (name "ocaml-mtime")
2183 (uri (string-append "http://erratique.ch/software/mtime/releases/"
2184 "mtime-" version ".tbz"))
2187 "1xy6lg52n2zynp4p164ym9j0f1b95j5n4bi5y4mbdrry9w99h32m"))))
2188 (build-system ocaml-build-system)
2190 (list ocamlbuild opam))
2192 `(("topkg" ,ocaml-topkg)))
2195 #:build-flags (list "build")
2197 (modify-phases %standard-phases
2198 (delete 'configure))))
2199 (home-page "https://erratique.ch/software/mtime")
2200 (synopsis "Monotonic wall-clock time for OCaml")
2201 (description "Access monotonic wall-clock time. It measures time
2202 spans without being subject to operating system calendar time adjustments.")
2203 (license license:isc)))
2205 (define-public ocaml-calendar
2207 ;; Commit from 2019-02-03.
2208 (let ((commit "a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da")
2211 (name "ocaml-calendar")
2212 ;; Makefile.in says 2.04.
2213 (version (git-version "2.04" revision commit))
2218 (url "https://github.com/ocaml-community/calendar")
2220 (file-name (git-file-name name version))
2223 "09d9gyqm3zkf3z2m9fx87clqihx6brf8rnzm4yq7c8kf1p572hmc"))))
2224 (build-system gnu-build-system)
2226 '(#:test-target "tests"
2228 (modify-phases %standard-phases
2229 (add-after 'unpack 'make-deterministic
2231 (substitute* "Makefile.in"
2232 (("`date`") "no date for reproducibility"))))
2233 (add-before 'install 'set-environment-variables
2234 (lambda* (#:key outputs #:allow-other-keys)
2235 (let ((out (assoc-ref outputs "out")))
2236 (setenv "OCAMLFIND_DESTDIR"
2237 (string-append out "/lib/ocaml/site-lib"))
2238 (setenv "OCAMLFIND_LDCONF" "ignore")
2239 (mkdir-p (string-append
2240 out "/lib/ocaml/site-lib/calendar"))))))))
2242 (list autoconf automake))
2245 ("ocamlfind" ,ocaml-findlib)))
2246 (home-page "https://github.com/ocaml-community/calendar")
2247 (synopsis "OCaml library for handling dates and times")
2248 (description "This package provides types and operations over
2250 ;; With linking exception.
2251 (license license:lgpl2.1+))))
2253 (define-public ocaml-cmdliner
2255 (name "ocaml-cmdliner")
2259 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2260 "cmdliner-" version ".tbz"))
2263 "1yxm4x34cbi06bfld601ds9drlbnyx0797ym3n6yyh4rlz1qgbm1"))))
2264 (build-system ocaml-build-system)
2266 (list ocaml-result))
2271 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
2272 "/lib/ocaml/site-lib/cmdliner"))
2274 (modify-phases %standard-phases
2276 (add-before 'build 'fix-source-file-order
2278 (substitute* "build.ml"
2279 (("Sys.readdir dir")
2280 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
2282 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-cmdliner))))
2283 (home-page "https://erratique.ch/software/cmdliner")
2284 (synopsis "Declarative definition of command line interfaces for OCaml")
2285 (description "Cmdliner is a module for the declarative definition of command
2286 line interfaces. It provides a simple and compositional mechanism to convert
2287 command line arguments to OCaml values and pass them to your functions. The
2288 module automatically handles syntax errors, help messages and UNIX man page
2289 generation. It supports programs with single or multiple commands and respects
2290 most of the POSIX and GNU conventions.")
2291 (license license:bsd-3)))
2293 (define-public ocaml4.07-cmdliner
2294 (package-with-ocaml4.07
2296 (inherit ocaml-cmdliner)
2300 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2301 "cmdliner-" version ".tbz"))
2304 "1h04q0zkasd0mw64ggh4y58lgzkhg6yhzy60lab8k8zq9ba96ajw"))))
2307 (define-public ocaml-fmt
2314 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2317 "0q8j2in2473xh7k4hfgnppv9qy77f2ih89yp6yhpbp92ba021yzi"))))
2318 (build-system ocaml-build-system)
2320 `(("ocamlbuild" ,ocamlbuild)
2322 ("topkg" ,ocaml-topkg)))
2324 `(("cmdliner" ,ocaml-cmdliner)
2325 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
2326 ("ocaml-uchar" ,ocaml-uchar)))
2327 (arguments `(#:tests? #f
2328 #:build-flags (list "build" "--with-base-unix" "true"
2329 "--with-cmdliner" "true")
2331 (modify-phases %standard-phases
2332 (delete 'configure))))
2333 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-fmt))))
2334 (home-page "https://erratique.ch/software/fmt")
2335 (synopsis "OCaml Format pretty-printer combinators")
2336 (description "Fmt exposes combinators to devise Format pretty-printing
2338 (license license:isc)))
2340 (define-public ocaml4.07-fmt
2341 (package-with-ocaml4.07
2347 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2351 "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
2354 (define-public ocaml-astring
2356 (name "ocaml-astring")
2361 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
2364 "1ykhg9gd3iy7zsgyiy2p9b1wkpqg9irw5pvcqs3sphq71iir4ml6"))))
2365 (build-system ocaml-build-system)
2367 `(("ocamlbuild" ,ocamlbuild)
2369 ("topkg" ,ocaml-topkg)))
2372 #:build-flags (list "build")
2374 (modify-phases %standard-phases
2375 (delete 'configure))))
2376 (home-page "https://erratique.ch/software/astring")
2377 (synopsis "Alternative String module for OCaml")
2378 (description "Astring exposes an alternative String module for OCaml. This
2379 module balances minimality and expressiveness for basic, index-free, string
2380 processing and provides types and functions for substrings, string sets and
2381 string maps. The String module exposed by Astring has exception safe functions,
2382 removes deprecated and rarely used functions, alters some signatures and names,
2383 adds a few missing functions and fully exploits OCaml's newfound string
2385 (license license:isc)))
2387 (define-public ocaml-alcotest
2389 (name "ocaml-alcotest")
2394 (url "https://github.com/mirage/alcotest")
2396 (file-name (git-file-name name version))
2399 "1lgadc7p56677fi5gwl7r9bml4z87rzh50khhqaij7bwp37zrmpi"))))
2400 (build-system dune-build-system)
2402 `(#:package "alcotest"
2405 (modify-phases %standard-phases
2406 (add-after 'unpack 'fix-test-format
2408 ;; cmdliner changed the format and the tests fail
2409 (substitute* "test/e2e/alcotest/failing/unknown_option.expected"
2411 (("COMMAND") "[COMMAND]")
2412 (("\\.\\.\\.") "…")))))))
2423 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-alcotest))))
2424 (home-page "https://github.com/mirage/alcotest")
2425 (synopsis "Lightweight OCaml test framework")
2426 (description "Alcotest exposes simple interface to perform unit tests. It
2427 exposes a simple TESTABLE module type, a check function to assert test
2428 predicates and a run function to perform a list of unit -> unit test callbacks.
2429 Alcotest provides a quiet and colorful output where only faulty runs are fully
2430 displayed at the end of the run (with the full logs ready to inspect), with a
2431 simple (yet expressive) query language to select the tests to run.")
2432 (license license:isc)))
2434 (define-public ocaml4.07-alcotest
2435 (package-with-ocaml4.07
2437 (inherit ocaml-alcotest)
2442 (url "https://github.com/mirage/alcotest")
2444 (file-name (git-file-name "ocaml-alcotest" version))
2447 "1frwi185z4aadmaf0vp8xk5227nyg7nmh28ijj5l7ncjr5slvhz8"))))
2449 `(#:package "alcotest"
2453 (define-public ocaml-ppx-tools
2455 (name "ocaml-ppx-tools")
2461 (url "https://github.com/alainfrisch/ppx_tools")
2463 (file-name (git-file-name name version))
2466 "0fwibah2hgllrnbdrmfqil5gr5raf6pb5h2zx6zs1h3d4ykvy8k8"))))
2467 (build-system dune-build-system)
2473 (properties `((upstream-name . "ppx_tools")))
2474 (home-page "https://github.com/alainfrisch/ppx_tools")
2475 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
2477 "Ppx_tools provides tools for authors of ppx rewriters and other
2479 (license license:expat)))
2481 (define-public ocaml-react
2483 (name "ocaml-react")
2488 (uri (string-append "http://erratique.ch/software/react/releases/react-"
2491 "16cg4byj8lfbbw96dhh8sks5y9n1c3fshz7f2p8m7wgisqax7bf4"))))
2492 (build-system ocaml-build-system)
2494 (list ocamlbuild opam ocaml-topkg))
2497 #:build-flags (list "build")
2499 (modify-phases %standard-phases
2500 (delete 'configure))))
2501 (home-page "https://erratique.ch/software/react")
2502 (synopsis "Declarative events and signals for OCaml")
2503 (description "React is an OCaml module for functional reactive programming
2504 (FRP). It provides support to program with time varying values: declarative
2505 events and signals. React doesn't define any primitive event or signal, it
2506 lets the client choose the concrete timeline.")
2507 (license license:bsd-3)))
2509 (define-public ocaml-ssl
2517 (url "https://github.com/savonet/ocaml-ssl")
2518 (commit (string-append "v" version))))
2519 (file-name (git-file-name name version))
2521 "1rszqiqayh67xlwd5411k8vib47x9kapdr037z1majd2c14z3kcb"))))
2522 (build-system dune-build-system)
2524 `(#:test-target "."))
2526 (list autoconf automake which))
2527 (propagated-inputs (list openssl))
2528 (home-page "https://github.com/savonet/ocaml-ssl/")
2529 (synopsis "OCaml bindings for OpenSSL")
2531 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
2532 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
2533 (license license:lgpl2.1)))
2535 (define-public ocaml-mmap
2542 (url "https://github.com/mirage/mmap")
2543 (commit (string-append "v" version))))
2544 (file-name (git-file-name name version))
2547 "1a7w7l682cbksn2zlmz24gb519x7wb65ivr5vndm9x5pi9fw5pfb"))))
2548 (build-system dune-build-system)
2549 (propagated-inputs (list ocaml-bigarray-compat))
2550 (home-page "https://github.com/mirage/mmap")
2551 (synopsis "File mapping for OCaml")
2552 (description "This project provides a @command{Mmap.map_file} function
2553 for mapping files in memory. This function is the same as the
2554 @command{Unix.map_file} function added in OCaml >= 4.06.")
2555 (license (list license:qpl license:lgpl2.0))))
2557 (define-public ocaml-lwt
2565 (url "https://github.com/ocsigen/lwt")
2567 (file-name (git-file-name name version))
2569 "1jbjz2rsz3j56k8vh5qlmm87hhkr250bs2m3dvpy9vsri8rkzj9z"))))
2570 (build-system dune-build-system)
2574 (list ocaml-cppo pkg-config))
2578 (list ocaml-mmap ocaml-ocplib-endian ocaml-result ocaml-seq libev))
2579 (home-page "https://github.com/ocsigen/lwt")
2580 (synopsis "Cooperative threads and I/O in monadic style")
2581 (description "Lwt provides typed, composable cooperative threads. These
2582 make it easy to run normally-blocking I/O operations concurrently in a single
2583 process. Also, in many cases, Lwt threads can interact without the need for
2584 locks or other synchronization primitives.")
2585 (license license:lgpl2.1)))
2587 (define-public ocaml-lwt-react
2590 (name "ocaml-lwt-react")
2595 (url "https://github.com/ocsigen/lwt")
2596 ;; Version from opam
2598 (file-name (git-file-name name version))
2601 "1jbjz2rsz3j56k8vh5qlmm87hhkr250bs2m3dvpy9vsri8rkzj9z"))))
2603 `(#:package "lwt_react"))
2604 (properties `((upstream-name . "lwt_react")))
2606 (list ocaml-lwt ocaml-react))))
2608 (define-public ocaml-lwt-log
2610 (name "ocaml-lwt-log")
2615 (url "https://github.com/aantron/lwt_log")
2617 (file-name (git-file-name name version))
2620 "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
2621 (build-system dune-build-system)
2623 `(#:tests? #f)); require lwt_ppx
2625 `(("lwt" ,ocaml-lwt)))
2626 (properties `((upstream-name . "lwt_log")))
2627 (home-page "https://github.com/aantron/lwt_log")
2628 (synopsis "Logging library")
2629 (description "This package provides a deprecated logging component for
2631 (license license:lgpl2.1)))
2633 (define-public ocaml-logs
2639 (uri (string-append "http://erratique.ch/software/logs/releases/"
2640 "logs-" version ".tbz"))
2643 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
2644 (build-system ocaml-build-system)
2647 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2649 (modify-phases %standard-phases
2650 (delete 'configure))))
2652 (list ocamlbuild opam))
2654 `(("fmt" ,ocaml-fmt)
2656 ("mtime" ,ocaml-mtime)
2657 ("result" ,ocaml-result)
2658 ("cmdliner" ,ocaml-cmdliner)
2659 ("topkg" ,ocaml-topkg)))
2660 (home-page "https://erratique.ch/software/logs")
2661 (synopsis "Logging infrastructure for OCaml")
2662 (description "Logs provides a logging infrastructure for OCaml. Logging is
2663 performed on sources whose reporting level can be set independently. Log
2664 message report is decoupled from logging and is handled by a reporter.")
2665 (license license:isc)))
2667 (define-public ocaml-fpath
2669 (name "ocaml-fpath")
2673 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2674 "fpath-" version ".tbz"))
2677 "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"))))
2678 (build-system ocaml-build-system)
2681 #:build-flags (list "build")
2683 (modify-phases %standard-phases
2684 (delete 'configure))))
2686 (list ocamlbuild opam))
2688 `(("topkg" ,ocaml-topkg)
2689 ("astring" ,ocaml-astring)))
2690 (home-page "https://erratique.ch/software/fpath")
2691 (synopsis "File system paths for OCaml")
2692 (description "Fpath is an OCaml module for handling file system paths with
2693 POSIX or Windows conventions. Fpath processes paths without accessing the
2694 file system and is independent from any system library.")
2695 (license license:isc)))
2697 (define-public ocaml-bos
2703 (uri (string-append "http://erratique.ch/software/bos/releases/"
2704 "bos-" version ".tbz"))
2707 "0dwg7lpaq30rvwc5z1gij36fn9xavvpah1bj8ph9gmhhddw2xmnq"))))
2708 (build-system ocaml-build-system)
2711 #:build-flags (list "build")
2713 (modify-phases %standard-phases
2714 (delete 'configure))))
2716 (list ocamlbuild opam))
2718 `(("topkg" ,ocaml-topkg)
2719 ("astring" ,ocaml-astring)
2721 ("fpath" ,ocaml-fpath)
2722 ("logs" ,ocaml-logs)
2723 ("rresult" ,ocaml-rresult)))
2724 (home-page "https://erratique.ch/software/bos")
2725 (synopsis "Basic OS interaction for OCaml")
2726 (description "Bos provides support for basic and robust interaction with
2727 the operating system in OCaml. It has functions to access the process
2728 environment, parse command line arguments, interact with the file system and
2729 run command line programs.")
2730 (license license:isc)))
2732 (define-public ocaml-xmlm
2738 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2739 "xmlm-" version ".tbz"))
2742 "1ynrjba3wm3axscvggrfijfgsznmphhxnkffqch67l9xiqjm44h9"))))
2743 (build-system ocaml-build-system)
2746 #:build-flags (list "build")
2748 (modify-phases %standard-phases
2749 (delete 'configure))))
2751 (list ocamlbuild ocaml-topkg opam))
2752 (home-page "https://erratique.ch/software/xmlm")
2753 (synopsis "Streaming XML codec for OCaml")
2754 (description "Xmlm is a streaming codec to decode and encode the XML data
2755 format. It can process XML documents without a complete in-memory
2756 representation of the data.")
2757 (license license:isc)))
2759 (define-public ocaml-gen
2766 (url "https://github.com/c-cube/gen")
2767 (commit (string-append "v" version))))
2768 (file-name (git-file-name name version))
2771 "1z5nw5wljvcqp8q07h336bbvf9paynia0jsdh4486hlkbmr1ask1"))))
2772 (build-system dune-build-system)
2777 (list ocaml-odoc ocaml-seq))
2779 (list ocaml-qtest ocaml-qcheck))
2780 (home-page "https://github.com/c-cube/gen/")
2781 (synopsis "Iterators for OCaml, both restartable and consumable")
2782 (description "Gen implements iterators of OCaml, that are both restartable
2784 (license license:bsd-2)))
2786 (define-public ocaml-sedlex
2788 (name "ocaml-sedlex")
2793 (url "https://github.com/ocaml-community/sedlex")
2794 (commit (string-append "v" version))))
2795 (file-name (git-file-name name version))
2798 "062a5dvrzvb81l3a9phljrhxfw9nlb61q341q0a6xn65hll3z2wy"))))
2799 (build-system dune-build-system)
2801 `(#:tests? #f ; no tests
2804 (modify-phases %standard-phases
2805 (add-before 'build 'copy-resources
2806 (lambda* (#:key inputs #:allow-other-keys)
2807 (with-directory-excursion "src/generator/data"
2808 ;; Newer versions of dune emit an error if files it wants to
2809 ;; build already exist. Delete the dune file so dune doesn't
2811 (delete-file "dune")
2814 (copy-file (assoc-ref inputs file) file))
2815 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
2818 (add-before 'build 'chmod
2820 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2823 (list ocaml-gen ocaml-ppxlib ocaml-uchar))
2824 ;; These three files are needed by src/generator/data/dune, but would be
2825 ;; downloaded using curl at build time.
2827 `(("DerivedCoreProperties.txt"
2830 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
2833 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
2834 ("DerivedGeneralCategory.txt"
2837 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
2840 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
2844 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2847 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
2848 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sedlex))))
2849 (home-page "https://www.cduce.org/download.html#side")
2850 (synopsis "Lexer generator for Unicode and OCaml")
2851 (description "Lexer generator for Unicode and OCaml.")
2852 (license license:expat)))
2854 (define-public ocaml4.07-sedlex
2855 (package-with-ocaml4.07
2857 (inherit ocaml-sedlex)
2858 (name "ocaml-sedlex")
2863 (url "https://github.com/ocaml-community/sedlex")
2864 (commit (string-append "v" version))))
2865 (file-name (git-file-name name version))
2868 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
2870 `(("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
2871 ,@(package-propagated-inputs ocaml-sedlex)))
2874 (define-public ocaml-uchar
2876 (name "ocaml-uchar")
2881 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2882 version "/uchar-" version ".tbz"))
2884 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
2885 (build-system ocaml-build-system)
2888 #:build-flags (list "native=true" "native-dynlink=true")
2890 (modify-phases %standard-phases
2891 (delete 'configure))))
2893 (list ocamlbuild opam))
2894 (home-page "https://github.com/ocaml/uchar")
2895 (synopsis "Compatibility library for OCaml's Uchar module")
2896 (description "The uchar package provides a compatibility library for the
2897 `Uchar` module introduced in OCaml 4.03.")
2898 (license license:lgpl2.1)))
2900 (define-public ocaml-uutf
2906 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2907 "uutf-" version ".tbz"))
2910 "0s05r8ggp1g97zq4rnvbxzj22pv8ld0k5wsdw662jw0y7mhsawl7"))))
2911 (build-system ocaml-build-system)
2914 #:build-flags (list "build")
2916 (modify-phases %standard-phases
2917 (delete 'configure))))
2919 `(("ocamlbuild" ,ocamlbuild)
2921 ("topkg" ,ocaml-topkg)))
2923 `(("uchar" ,ocaml-uchar)
2924 ("cmdliner" ,ocaml-cmdliner)))
2925 (home-page "https://erratique.ch/software/uutf")
2926 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2927 (description "Uutf is a non-blocking streaming codec to decode and encode
2928 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2929 work character by character without blocking on IO. Decoders perform character
2930 position tracking and support newline normalization.
2932 Functions are also provided to fold over the characters of UTF encoded OCaml
2933 string values and to directly encode characters in OCaml Buffer.t values.")
2934 (license license:isc)))
2936 (define-public ocaml-uunf
2943 (uri (string-append "https://erratique.ch/software/uunf/releases/uunf-"
2947 "17wv0nm3vvwcbzb1b09akw8jblmigyhbfmh1sy9lkb5756ni94a2"))))
2948 (build-system ocaml-build-system)
2950 `(#:build-flags (list "build" "--tests" "true")
2952 (modify-phases %standard-phases
2954 (add-before 'check 'check-data
2955 (lambda* (#:key inputs #:allow-other-keys)
2956 (copy-file (assoc-ref inputs "NormalizationTest.txt")
2957 "test/NormalizationTest.txt")
2960 `(("ocamlbuild" ,ocamlbuild)
2962 ("topkg" ,ocaml-topkg)
2963 ;; Test data is otherwise downloaded with curl
2964 ("NormalizationTest.txt"
2967 (uri (string-append "https://www.unicode.org/Public/"
2969 "/ucd/NormalizationTest.txt"))
2970 (file-name (string-append "NormalizationTest-" version ".txt"))
2972 (base32 "0c93pqdkksf7b7zw8y2w0h9i5kkrsdjmh2cr5clrrhp6mg10rcvw"))))))
2973 (propagated-inputs (list ocaml-uutf))
2974 (home-page "https://erratique.ch/software/uunf")
2975 (synopsis "Unicode text normalization for OCaml")
2977 "Uunf is an OCaml library for normalizing Unicode text. It supports all
2978 Unicode normalization forms. The library is independent from any
2979 IO mechanism or Unicode text data structure and it can process text
2980 without a complete in-memory representation.")
2981 (license license:isc)))
2983 (define-public ocaml-jsonm
2985 (name "ocaml-jsonm")
2989 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2990 "jsonm-" version ".tbz"))
2993 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
2994 (build-system ocaml-build-system)
2997 #:build-flags (list "build")
2999 (modify-phases %standard-phases
3000 (delete 'configure))))
3002 `(("ocamlbuild" ,ocamlbuild)
3004 ("topkg" ,ocaml-topkg)))
3006 `(("uutf" ,ocaml-uutf)
3007 ("cmdliner" ,ocaml-cmdliner)))
3008 (home-page "https://erratique.ch/software/jsonm")
3009 (synopsis "Non-blocking streaming JSON codec for OCaml")
3010 (description "Jsonm is a non-blocking streaming codec to decode and encode
3011 the JSON data format. It can process JSON text without blocking on IO and
3012 without a complete in-memory representation of the data.")
3013 (license license:isc)))
3015 (define-public ocaml-ocp-indent
3017 (name "ocaml-ocp-indent")
3023 (url "https://github.com/OCamlPro/ocp-indent")
3025 (file-name (git-file-name name version))
3028 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
3029 (build-system dune-build-system)
3031 `(#:test-target "tests"))
3033 (list ocaml-cmdliner))
3034 (home-page "https://www.typerex.org/ocp-indent.html")
3035 (synopsis "Tool to indent OCaml programs")
3037 "Ocp-indent is based on an approximate, tolerant OCaml parser
3038 and a simple stack machine. Presets and configuration options are available,
3039 with the possibility to set them project-wide. It supports the most common
3040 syntax extensions, and it is extensible for others.
3042 This package includes:
3045 @item An indentor program, callable from the command-line or from within editors,
3046 @item Bindings for popular editors,
3047 @item A library that can be directly used by editor writers, or just for
3048 fault-tolerant and approximate parsing.
3050 (license license:lgpl2.1)))
3052 (define-public ocaml-ocp-index
3054 (name "ocaml-ocp-index")
3060 (url "https://github.com/OCamlPro/ocp-index")
3062 (file-name (git-file-name name version))
3065 "1gbigw5s2cafkr82n9vkxbb892qfkykj0adj0hrdkrkw8j6rfl0j"))))
3066 (build-system dune-build-system)
3068 `(#:package "ocp-index"))
3070 (list ocaml-ocp-indent ocaml-re ocaml-cmdliner))
3073 (home-page "https://www.typerex.org/ocp-index.html")
3074 (synopsis "Lightweight completion and documentation browsing for OCaml libraries")
3075 (description "This package includes only the @code{ocp-index} library
3076 and command-line tool.")
3077 ;; All files in libs/ are GNU lgpl2.1
3078 ;; For static linking, clause 6 of LGPL is lifted
3079 ;; All other files under GNU gpl3
3080 (license (list license:gpl3+
3081 license:lgpl2.1+))))
3083 (define-public ocaml-ocurl
3085 (name "ocaml-ocurl")
3089 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
3093 "0qvpsqbq4qbd397n0nlv9cwlqfyjw7gfb5mmq1awvnklr0c9fdg0"))))
3094 (build-system ocaml-build-system)
3097 (modify-phases %standard-phases
3098 (add-before 'configure 'fix-/bin/sh
3099 (lambda* (#:key inputs #:allow-other-keys)
3100 (substitute* "configure"
3101 (("-/bin/sh") (string-append "-" (which "bash")))))))))
3104 (inputs (list curl))
3105 (home-page "http://ocurl.forge.ocamlcore.org/")
3106 (synopsis "OCaml bindings for libcurl")
3107 (description "Client-side URL transfer library, supporting HTTP and a
3108 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
3109 (license license:isc)))
3111 (define-public ocaml-base64
3113 (name "ocaml-base64")
3118 (url "https://github.com/mirage/ocaml-base64")
3119 (commit (string-append "v" version))))
3120 (file-name (git-file-name name version))
3123 "068hwdbpl7vx9jjpxdc6a10zqd8xa55j3xx7ga6fnwrlfsbs2pjj"))))
3124 (build-system dune-build-system)
3126 (list ocaml-alcotest ocaml-bos ocaml-rresult))
3127 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base64))))
3128 (home-page "https://github.com/mirage/ocaml-base64")
3129 (synopsis "Base64 encoding for OCaml")
3130 (description "Base64 is a group of similar binary-to-text encoding schemes
3131 that represent binary data in an ASCII string format by translating it into a
3132 radix-64 representation. It is specified in RFC 4648.")
3133 (license license:isc)))
3135 (define-public ocaml4.07-base64
3136 (package-with-ocaml4.07
3138 (inherit ocaml-base64)
3143 (url "https://github.com/mirage/ocaml-base64")
3144 (commit (string-append "v" version))))
3145 (file-name (git-file-name "ocaml-base64" version))
3148 "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy"))))
3150 ;; Tests are likely incompatible with our recent alcotest
3154 (define-public ocamlify
3161 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
3162 version "/ocamlify-" version ".tar.gz"))
3164 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
3165 (build-system ocaml-build-system)
3167 `(#:tests? #f; no tests
3169 (modify-phases %standard-phases
3172 ;; This package uses pre-generated setup.ml by oasis, but is
3173 ;; a dependency of oasis. the pre-generated setup.ml is broken
3174 ;; with recent versions of OCaml, so we perform a bootstrap instead.
3176 (substitute* "src/OCamlifyConfig.ml.ab"
3177 (("$pkg_version") ,version))
3178 (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
3179 (with-directory-excursion "src"
3180 (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
3184 (lambda* (#:key outputs #:allow-other-keys)
3185 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
3187 (install-file "src/ocamlify" bin)
3189 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
3190 (synopsis "Include files in OCaml code")
3191 (description "OCamlify creates OCaml source code by including
3192 whole files into OCaml string or string list. The code generated can be
3193 compiled as a standard OCaml file. It allows embedding external resources as
3195 (license license:lgpl2.1+))); with the OCaml static compilation exception
3197 (define-public omake
3203 (uri (string-append "http://download.camlcity.org/download/"
3204 "omake-" version ".tar.gz"))
3207 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
3208 (patches (search-patches "omake-fix-non-determinism.patch"))))
3209 (build-system ocaml-build-system)
3212 ,#~(list (string-append "PREFIX=" #$output))
3213 #:tests? #f ; no test target
3215 (modify-phases %standard-phases
3216 (add-before 'configure 'fix-makefile
3217 (lambda* (#:key outputs #:allow-other-keys)
3218 (substitute* "mk/osconfig_unix.mk"
3219 (("CC = cc") "CC = gcc")))))))
3220 (native-inputs (list hevea))
3221 (home-page "http://projects.camlcity.org/projects/omake.html")
3222 (synopsis "Build system designed for scalability and portability")
3223 (description "Similar to make utilities you may have used, but it features
3224 many additional enhancements, including:
3227 @item Support for projects spanning several directories or directory hierarchies.
3228 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
3229 with full support for incremental builds.
3230 @item Dependency analysis takes the command lines into account — whenever the
3231 command line used to build a target changes, the target is considered
3233 @item Fully scriptable, includes a library that providing support for standard
3234 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
3236 (license (list license:lgpl2.1 ; libmojave
3237 license:expat ; OMake scripts
3238 license:gpl2)))) ; OMake itself, with ocaml linking exception
3241 (define-public ocaml-benchmark
3243 (name "ocaml-benchmark")
3249 (url "https://github.com/Chris00/ocaml-benchmark")
3251 (file-name (git-file-name name version))
3253 (base32 "0d0vdfjgjzf1y6wkd714d8b0piv1z9qav5ahsapynqzk4b4ahhnp"))))
3254 (build-system dune-build-system)
3255 (arguments `(#:test-target "tests"))
3256 (home-page "https://github.com/Chris00/ocaml-benchmark")
3257 (synopsis "Benchmark running times of code")
3259 "This module provides a set of tools to measure the running times of
3260 your functions and to easily compare the results. A statistical test
3261 is used to determine whether the results truly differ.")
3262 (license license:lgpl3+)))
3264 (define-public ocaml-batteries
3266 (name "ocaml-batteries")
3271 (url "https://github.com/ocaml-batteries-team/batteries-included")
3272 (commit (string-append "v" version))))
3273 (file-name (git-file-name name version))
3276 "07387jp93civ9p1q2ixmq8qkzzyssp94ssxd4w2ndvkg1nr6kfcl"))))
3277 (build-system ocaml-build-system)
3278 (propagated-inputs (list ocaml-num))
3280 (list ocamlbuild ocaml-benchmark ocaml-qcheck ocaml-qtest))
3283 (modify-phases %standard-phases
3284 (add-after 'unpack 'make-writable
3286 (for-each make-file-writable (find-files "." "."))))
3287 (add-before 'build 'fix-nondeterminism
3289 (substitute* "setup.ml"
3290 (("Sys.readdir dirname")
3291 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
3293 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-batteries))))
3294 (home-page "http://batteries.forge.ocamlcore.org/")
3295 (synopsis "Development platform for the OCaml programming language")
3296 (description "Define a standard set of libraries which may be expected on
3297 every compliant installation of OCaml and organize these libraries into a
3298 hierarchy of modules.")
3299 (license license:lgpl2.1+)))
3301 (define-public ocaml4.07-batteries
3302 (package-with-ocaml4.07
3304 (inherit ocaml-batteries)
3309 (url "https://github.com/ocaml-batteries-team/batteries-included")
3310 (commit (string-append "v" version))))
3311 (file-name (git-file-name "ocaml-batteries" version))
3314 "02fxa1nkp7rpiwfp04n0sagdp9lad4dh9bvljp95xfshm1cx7y4q"))))
3317 (modify-phases %standard-phases
3318 (delete 'check) ; tests are run by the build phase
3319 (add-before 'build 'fix-nondeterminism
3321 (substitute* "setup.ml"
3322 (("Sys.readdir dirname")
3323 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
3326 (lambda* (#:key inputs outputs #:allow-other-keys)
3329 (substring str 0 (- (string-length str) 1)))
3331 (find-files "src" ".*.mliv")
3332 (find-files "src" ".*.mlv")
3333 (find-files "src" ".*.mlp")))))
3334 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
3335 "-lflag" "-dllpath-all" files)
3336 (for-each (lambda (file)
3337 (copy-file (string-append "_build/" file) file))
3339 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
3340 "-lflag" "-dllpath-all" "build/mkconf.byte")
3341 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
3342 (invoke "make" "all")
3345 `(("ocamlbuild" ,ocamlbuild)
3346 ("qtest" ,ocaml-qtest)))
3349 (define-public ocaml-pcre
3357 (url "https://github.com/mmottl/pcre-ocaml")
3359 (file-name (git-file-name name version))
3362 "048k1rl17fcml000yh8fnghk1a06h14lbyrnk9nbigxsymrz6cq2"))))
3363 (build-system dune-build-system)
3368 (list dune-configurator pcre))
3370 `(("pcre:bin" ,pcre "bin")))
3371 (home-page "https://mmottl.github.io/pcre-ocaml")
3373 "Bindings to the Perl Compatibility Regular Expressions library")
3374 (description "Pcre-ocaml offers library functions for string
3375 pattern matching and substitution, similar to the functionality
3376 offered by the Perl language.")
3377 ;; With static linking exception
3378 (license license:lgpl2.1+)))
3380 (define-public ocaml-expect
3382 (name "ocaml-expect")
3386 (uri (ocaml-forge-uri name version 1736))
3389 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
3392 (build-system ocaml-build-system)
3394 `(("ocamlbuild" ,ocamlbuild)
3395 ("ocaml-num" ,ocaml-num)
3396 ("ocaml-pcre" ,ocaml-pcre)
3397 ("ounit" ,ocaml-ounit)))
3399 `(("batteries" ,ocaml-batteries)))
3400 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
3401 (synopsis "Simple implementation of expect")
3402 (description "This package provides utilities for building unitary testing
3403 of interactive program. You can match the question using a regular expression
3405 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
3407 (define-public ocaml-stdlib-shims
3409 (name "ocaml-stdlib-shims")
3414 (url "https://github.com/ocaml/stdlib-shims")
3416 (file-name (git-file-name name version))
3419 "0gmg8w67j3ww17llk7hl4dx0vq7p50rn5s4ib9sy984k543rz59h"))))
3420 (build-system dune-build-system)
3421 (home-page "https://github.com/ocaml/stdlib-shims")
3422 (synopsis "OCaml stdlib features backport to older OCaml compilers")
3423 (description "This package backports some of the new stdlib features to
3424 older compilers, such as the Stdlib module. This allows projects that require
3425 compatibility with older compiler to use these new features in their code.")
3426 ;; with ocaml-linking exception
3427 (license license:lgpl2.1+)))
3429 (define-public ocaml-fileutils
3431 (name "ocaml-fileutils")
3436 (url "https://github.com/gildor478/ocaml-fileutils")
3437 (commit (string-append "v" version))))
3438 (file-name (git-file-name name version))
3441 "0aa7p5qymi8p7iqym42yk2akjd1ff81fvaks82nhjc533zl01pnf"))))
3442 (build-system dune-build-system)
3444 (list ocaml-stdlib-shims))
3447 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
3448 (synopsis "Pure OCaml functions to manipulate real file and filename")
3449 (description "Library to provide pure OCaml functions to manipulate real
3450 file (POSIX like) and filename.")
3451 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
3453 (define-public ocaml-oasis
3455 (name "ocaml-oasis")
3459 (uri (ocaml-forge-uri name version 1757))
3462 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
3463 (modules '((guix build utils)))
3466 (substitute* "test/test-main/Test.ml"
3467 ;; most of these tests fail because ld cannot find crti.o, but according
3468 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
3469 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
3470 (("TestBaseCompat.tests;") "")
3471 (("TestExamples.tests;") "")
3472 (("TestFull.tests;") "")
3473 (("TestPluginDevFiles.tests;") "")
3474 (("TestPluginInternal.tests;") "")
3475 (("TestPluginOCamlbuild.tests;") "")
3476 (("TestPluginOMake.tests;") ""))
3478 (build-system ocaml-build-system)
3482 (list ocamlbuild ocamlify ocamlmod))
3483 (home-page "https://oasis.forge.ocamlcore.org")
3484 (synopsis "Integrates a configure, build, install system in OCaml projects")
3485 (description "OASIS is a tool to integrate a configure, build and install
3486 system in your OCaml projects. It helps to create standard entry points in your
3487 build system and allows external tools to analyse your project easily.")
3488 (license license:lgpl2.1+))) ; with ocaml static compilation exception
3490 (define-public ocaml-cppo
3498 (url "https://github.com/mjambon/cppo")
3499 (commit (string-append "v" version))))
3500 (file-name (git-file-name name version))
3502 "1c8jlr2s0allw1h6czz5q24vn5jsnrrh44j7hjyilzaifm17dlrm"))))
3503 (build-system dune-build-system)
3508 (home-page "https://github.com/mjambon/cppo")
3509 (synopsis "Equivalent of the C preprocessor for OCaml programs")
3510 (description "Cppo is an equivalent of the C preprocessor for OCaml
3511 programs. It allows the definition of simple macros and file inclusion. Cppo is:
3513 @item more OCaml-friendly than @command{cpp}
3514 @item easy to learn without consulting a manual
3515 @item reasonably fast
3516 @item simple to install and to maintain.
3518 (license license:bsd-3)))
3520 (define-public ocaml-seq
3528 (url "https://github.com/c-cube/seq")
3530 (file-name (git-file-name name version))
3532 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
3533 (build-system ocaml-build-system)
3537 (modify-phases %standard-phases
3541 (lambda* (#:key outputs #:allow-other-keys)
3542 (let ((install-dir (string-append (assoc-ref outputs "out")
3543 "/lib/ocaml/site-lib/seq")))
3544 (mkdir-p install-dir)
3545 (with-output-to-file (string-append install-dir "/META")
3547 (display "name=\"seq\"
3548 version=\"[distributed with ocaml]\"
3549 description=\"dummy package for compatibility\"
3552 (home-page "https://github.com/c-cube/seq")
3553 (synopsis "OCaml's standard iterator type")
3554 (description "This package is a compatibility package for OCaml's
3555 standard iterator type starting from 4.07.")
3556 (license license:lgpl2.1+)))
3558 (define-public ocaml-re
3566 (url "https://github.com/ocaml/ocaml-re")
3568 (file-name (git-file-name name version))
3570 (base32 "1g0vmpx6ylv8m0w77zarn215pgb4czc6gcpb2fi5da1s307zwr0w"))))
3571 (build-system dune-build-system)
3573 `(#:test-target "."))
3577 `(("ounit" ,ocaml-ounit)))
3578 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-re))))
3579 (home-page "https://github.com/ocaml/ocaml-re/")
3580 (synopsis "Regular expression library for OCaml")
3581 (description "Pure OCaml regular expressions with:
3583 @item Perl-style regular expressions (module Re_perl)
3584 @item Posix extended regular expressions (module Re_posix)
3585 @item Emacs-style regular expressions (module Re_emacs)
3586 @item Shell-style file globbing (module Re_glob)
3587 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
3589 (license license:expat)))
3591 (define-public ocaml4.07-re
3592 (package-with-ocaml4.07
3598 (modify-phases %standard-phases
3599 (add-after 'unpack 'fix-dune-version
3601 (delete-file "dune-project"))))))
3604 (define-public ocaml-ocplib-endian
3606 (name "ocaml-ocplib-endian")
3611 (url "https://github.com/OCamlPro/ocplib-endian/")
3615 "1klj4g451s7m5r8bxmwc1rpvngpqdm40csnx9smgc06pwy2fax2c"))
3616 (file-name (git-file-name name version))))
3617 (build-system dune-build-system)
3619 `(#:test-target "tests"))
3621 `(("cppo" ,ocaml-cppo)))
3622 (home-page "https://github.com/OCamlPro/ocplib-endian")
3623 (synopsis "Optimised functions to read and write int16/32/64 from strings
3625 (description "Optimised functions to read and write int16/32/64 from strings
3626 and bigarrays, based on new primitives added in version 4.01. It works on
3627 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
3628 big- and little-endian, with their unsafe counter-parts.")
3629 (license license:lgpl2.1)))
3631 (define-public ocaml-cstruct
3633 (name "ocaml-cstruct")
3638 (url "https://github.com/mirage/ocaml-cstruct")
3639 (commit (string-append "v" version))))
3640 (file-name (git-file-name name version))
3643 "1pwfkfs8zzr88slnvl5b28lx6w2k149ybgvrs6diay3qvwcmkhx5"))))
3644 (build-system dune-build-system)
3646 `(#:package "cstruct"
3649 (list ocaml-bigarray-compat))
3651 (list ocaml-alcotest))
3652 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-cstruct))))
3653 (home-page "https://github.com/mirage/ocaml-cstruct")
3654 (synopsis "Access C structures via a camlp4 extension")
3655 (description "Cstruct is a library and syntax extension to make it easier
3656 to access C-like structures directly from OCaml. It supports both reading and
3657 writing to these structures, and they are accessed via the Bigarray module.")
3658 (license license:isc)))
3660 (define-public ocaml4.07-cstruct
3661 (package-with-ocaml4.07
3663 (inherit ocaml-cstruct)
3668 (url "https://github.com/mirage/ocaml-cstruct")
3669 (commit (string-append "v" version))))
3670 (file-name (git-file-name "ocaml-cstruct" version))
3673 "0jj3whs8r3jc524i9bb67rffh7y7r157hjgvws0bkxijxpjzwkbk"))))
3676 (define-public ocaml-hex
3683 (url "https://github.com/mirage/ocaml-hex")
3684 (commit (string-append "v" version))))
3685 (file-name (git-file-name name version))
3688 "0xnl5wxd2qrba7phm3mdrjwd2kk26kb17dv94ciwp49ljcj28qc1"))))
3689 (build-system dune-build-system)
3691 `(#:test-target "."))
3693 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
3694 ("cstruct" ,ocaml-cstruct)))
3695 (home-page "https://github.com/mirage/ocaml-hex/")
3696 (synopsis "Minimal library providing hexadecimal converters")
3697 (description "Hex is a minimal library providing hexadecimal converters.")
3698 (license license:isc)))
3700 (define-public ocaml4.07-ezjsonm
3702 (name "ocaml4.07-ezjsonm")
3708 (url "https://github.com/mirage/ezjsonm")
3709 (commit (string-append "v" version))))
3710 (file-name (git-file-name name version))
3712 (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
3713 (build-system dune-build-system)
3715 `(#:package "ezjsonm"
3718 #:findlib ,ocaml4.07-findlib
3719 #:dune ,ocaml4.07-dune))
3721 `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))))
3723 `(("ocaml-hex" ,(package-with-ocaml4.07 ocaml-hex))
3724 ("ocaml-jsonm" ,(package-with-ocaml4.07 ocaml-jsonm))
3725 ("ocaml-sexplib" ,(package-with-ocaml4.07 ocaml-sexplib))))
3726 (home-page "https://github.com/mirage/ezjsonm/")
3727 (synopsis "Read and write JSON data")
3728 (description "Ezjsonm provides more convenient (but far less flexible) input
3729 and output functions that go to and from [string] values than jsonm. This avoids
3730 the need to write signal code, which is useful for quick scripts that manipulate
3732 (license license:isc)))
3734 (define-public ocaml-uri
3738 (home-page "https://github.com/mirage/ocaml-uri")
3744 (commit (string-append "v" version))))
3745 (file-name (git-file-name name version))
3748 "1bgkc66cq00mgnkz3i535srwzwc4cpdsv0mly5dzvvq33451xwf0"))))
3749 (build-system dune-build-system)
3750 (arguments '(#:package "uri"
3753 (list ocaml-stringext ocaml-angstrom))
3755 (list ocaml-ounit ocaml-ppx-sexp-conv))
3756 (properties `((upstream-name . "uri")
3757 (ocaml4.07-variant ,(delay ocaml4.07-uri))))
3758 (synopsis "RFC3986 URI/URL parsing library")
3759 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3760 (license license:isc)))
3762 (define-public ocaml4.07-uri
3764 (name "ocaml4.07-uri")
3770 (url "https://github.com/mirage/ocaml-uri")
3771 (commit (string-append "v" version))))
3772 (file-name (git-file-name name version))
3774 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
3775 (build-system dune-build-system)
3779 (modify-phases %standard-phases
3780 (add-before 'build 'update-deprecated
3782 (substitute* "lib/uri.ml"
3783 (("Re.get") "Re.Group.get")))))
3785 #:findlib ,ocaml4.07-findlib
3786 #:dune ,ocaml4.07-dune))
3788 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
3789 ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))))
3791 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
3792 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
3793 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3794 (properties `((upstream-name . "uri")))
3795 (home-page "https://github.com/mirage/ocaml-uri")
3796 (synopsis "RFC3986 URI/URL parsing library")
3797 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3798 (license license:isc)))
3800 (define-public ocaml-easy-format
3802 (name "ocaml-easy-format")
3807 (url "https://github.com/mjambon/easy-format")
3809 (file-name (git-file-name name version))
3812 "1dl5faibbb5nm3v70ix7k6208yib1954x20nmw3g56wff5vdlzid"))))
3813 (build-system dune-build-system)
3815 `(#:package "easy-format"
3817 (modify-phases %standard-phases
3818 (add-before 'build 'make-writable
3823 (find-files "." "."))
3825 (home-page "https://github.com/mjambon/easy-format")
3826 (synopsis "Interface to the Format module")
3827 (description "Easy-format is a high-level and functional interface to the
3828 Format module of the OCaml standard library.")
3829 (license license:bsd-3)))
3831 (define-public ocaml4.07-piqilib
3833 (name "ocaml4.07-piqilib")
3839 (url "https://github.com/alavrik/piqi")
3840 (commit (string-append "v" version))))
3841 (file-name (git-file-name name version))
3843 (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
3844 (build-system ocaml-build-system)
3847 (modify-phases %standard-phases
3848 (add-before 'configure 'fix-ocamlpath
3850 (substitute* '("Makefile" "make/Makefile.ocaml")
3851 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
3854 (lambda* (#:key outputs #:allow-other-keys)
3855 (let ((out (assoc-ref outputs "out")))
3856 (substitute* "make/OCamlMakefile"
3857 (("/bin/sh") (which "bash")))
3858 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3859 (string-append out "/lib/ocaml/site-lib")))
3861 (add-after 'build 'build-ocaml
3862 (lambda* (#:key outputs #:allow-other-keys)
3863 (invoke "make" "ocaml")
3865 (add-after 'install 'install-ocaml
3866 (lambda* (#:key outputs #:allow-other-keys)
3867 (invoke "make" "ocaml-install")
3869 (add-after 'install-ocaml 'link-stubs
3870 (lambda* (#:key outputs #:allow-other-keys)
3871 (let* ((out (assoc-ref outputs "out"))
3872 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3873 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3875 (symlink (string-append lib "/dllpiqilib_stubs.so")
3876 (string-append stubs "/dllpiqilib_stubs.so"))
3879 #:findlib ,ocaml4.07-findlib))
3883 `(("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm))
3884 ("ocaml-sedlex" ,(package-with-ocaml4.07 ocaml-sedlex))
3885 ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))
3886 ("ocaml-base64" ,(package-with-ocaml4.07 ocaml-base64))))
3887 (home-page "http://piqi.org")
3888 (synopsis "Data serialization and conversion library")
3889 (description "Piqilib is the common library used by the piqi command-line
3890 tool and piqi-ocaml.")
3891 (license license:asl2.0)))
3893 (define-public ocaml-uuidm
3895 (name "ocaml-uuidm")
3899 (uri (string-append "http://erratique.ch/software/uuidm/"
3900 "releases/uuidm-" version ".tbz"))
3903 "1cr6xlzla9fmd587lfhzac0icifspjnqi9f4cdafshj3jn85nrpw"))))
3904 (build-system ocaml-build-system)
3907 (list "build" "--tests" "true" "--with-cmdliner" "true")
3909 (modify-phases %standard-phases
3910 (delete 'configure))))
3912 (list ocamlbuild opam))
3914 `(("cmdliner" ,ocaml-cmdliner)
3915 ("topkg" ,ocaml-topkg)))
3916 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-uuidm))))
3917 (home-page "https://erratique.ch/software/uuidm")
3918 (synopsis "Universally unique identifiers for OCaml")
3919 (description "Uuidm is an OCaml module implementing 128 bits universally
3920 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
3921 and 4 (random based) according to RFC 4122.")
3922 (license license:isc)))
3924 (define-public ocaml4.07-uuidm
3925 (package-with-ocaml4.07
3927 (inherit ocaml-uuidm)
3931 (uri (string-append "http://erratique.ch/software/uuidm/"
3932 "releases/uuidm-" version ".tbz"))
3935 "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"))))
3938 (define-public ocaml-graph
3940 (name "ocaml-graph")
3944 (uri (string-append "http://ocamlgraph.lri.fr/download/"
3945 "ocamlgraph-" version ".tar.gz"))
3948 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
3949 (build-system ocaml-build-system)
3951 `(#:install-target "install-findlib"
3954 (modify-phases %standard-phases
3955 (add-before 'configure 'set-shell
3956 (lambda* (#:key inputs #:allow-other-keys)
3957 (setenv "CONFIG_SHELL"
3958 (search-input-file inputs "/bin/sh")))))))
3959 (inputs (list lablgtk))
3960 (properties `((upstream-name . "ocamlgraph")))
3961 (home-page "http://ocamlgraph.lri.fr/")
3962 (synopsis "Graph library for OCaml")
3963 (description "OCamlgraph is a generic graph library for OCaml.")
3964 (license license:lgpl2.1)))
3966 (define-public ocaml4.07-piqi
3968 (name "ocaml4.07-piqi")
3973 (url "https://github.com/alavrik/piqi-ocaml")
3974 (commit (string-append "v" version))))
3975 (file-name (git-file-name name version))
3978 "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"))))
3979 (build-system ocaml-build-system)
3982 ,#~(list (string-append "DESTDIR=" #$output)
3983 (string-append "SHELL="
3984 #+(file-append (canonical-package bash-minimal)
3987 (modify-phases %standard-phases
3988 (add-after 'unpack 'make-files-writable
3990 (for-each make-file-writable (find-files "."))
3992 (delete 'configure))
3994 #:findlib ,ocaml4.07-findlib))
3996 (list which protobuf)) ; for tests
3998 `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
3999 ("ocaml-piqilib" ,ocaml4.07-piqilib)
4000 ("ocaml-stdlib-shims" ,(package-with-ocaml4.07 ocaml-stdlib-shims))))
4001 (home-page "https://github.com/alavrik/piqi-ocaml")
4002 (synopsis "Protocol serialization system for OCaml")
4003 (description "Piqi is a multi-format data serialization system for OCaml.
4004 It provides a uniform interface for serializing OCaml data structures to JSON,
4005 XML and Protocol Buffers formats.")
4006 (license license:asl2.0)))
4012 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
4017 (commit (string-append "v" version))))
4018 (file-name (git-file-name name version))
4021 "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
4022 (build-system ocaml-build-system)
4024 `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
4025 ("clang" ,clang-3.8)
4026 ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
4028 `(("camlzip" ,(package-with-ocaml4.07 camlzip))
4029 ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
4030 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
4031 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
4032 ("ocaml-ezjsonm" ,ocaml4.07-ezjsonm)
4033 ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
4034 ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
4035 ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
4036 ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
4037 ("ocaml-piqi" ,ocaml4.07-piqi)
4038 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
4039 ("ocaml-utop" ,ocaml4.07-utop)
4040 ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
4041 ("ocaml-uri" ,ocaml4.07-uri)
4042 ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
4044 (list gmp llvm-3.8 ncurses))
4048 (modify-phases %standard-phases
4049 (add-before 'configure 'fix-ncurses
4051 (substitute* "oasis/llvm"
4052 (("-lcurses") "-lncurses"))
4055 (lambda* (#:key outputs inputs #:allow-other-keys)
4056 ;; add write for user, to prevent a failure in the install phase
4059 (let ((stat (stat file)))
4060 (chmod file (+ #o200 (stat:mode stat)))))
4061 (find-files "." "."))
4062 (invoke "./configure" "--prefix"
4063 (assoc-ref outputs "out")
4066 (assoc-ref outputs "out")
4067 "/lib/ocaml/site-lib")
4068 "--with-llvm-version=3.8"
4069 "--with-llvm-config=llvm-config"
4070 "--enable-everything"))))
4072 #:findlib ,ocaml4.07-findlib))
4073 (synopsis "Binary Analysis Platform")
4074 (description "Binary Analysis Platform is a framework for writing program
4075 analysis tools, that target binary files. The framework consists of a plethora
4076 of libraries, plugins, and frontends. The libraries provide code reusability,
4077 the plugins facilitate extensibility, and the frontends serve as entry points.")
4078 (license license:expat)))
4080 (define-public ocaml-camomile
4082 (name "ocaml-camomile")
4084 (home-page "https://github.com/yoriyuki/Camomile")
4087 (uri (string-append home-page "/releases/download/" version
4088 "/camomile-" version ".tbz"))
4091 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
4092 (build-system dune-build-system)
4094 `(#:test-target "camomile-test"
4095 #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
4097 (modify-phases %standard-phases
4098 (add-before 'build 'fix-usr-share
4099 (lambda* (#:key outputs #:allow-other-keys)
4100 (substitute* '("Camomile/dune" "configure.ml")
4101 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
4103 (synopsis "Comprehensive Unicode library")
4104 (description "Camomile is a Unicode library for OCaml. Camomile provides
4105 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
4106 200 encodings, collation and locale-sensitive case mappings, and more. The
4107 library is currently designed for Unicode Standard 3.2.")
4108 ;; with an exception for linked libraries to use a different license
4109 (license license:lgpl2.0+)))
4111 (define-public ocaml-charinfo-width
4112 ;; Add LICENSE file and Dune tests
4113 (let ((commit "20aaaa6dca8f1e0b1ace55b6f2a8ba5e5910b620"))
4115 (name "ocaml-charinfo-width")
4116 (version (git-version "1.1.0" "1" commit))
4117 (home-page "https://github.com/kandu/charinfo_width/")
4123 (file-name (git-file-name name version))
4126 "04gil5hxm2jax9paw3i24d8zyzhyl5cphzfyryvy2lcrm3c485q0"))))
4127 (build-system dune-build-system)
4129 (list ocaml-result ocaml-camomile))
4131 (list ocaml-ppx-expect))
4133 `((upstream-name . "charInfo_width")))
4134 (synopsis "Determine column width for a character")
4135 (description "This module implements purely in OCaml a character width
4136 function that follows the prototype of POSIX's wcwidth.")
4137 (license license:expat))))
4139 (define-public ocaml-zed
4143 (home-page "https://github.com/ocaml-community/zed")
4150 (file-name (git-file-name name version))
4152 (base32 "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p"))))
4153 (build-system dune-build-system)
4155 `(#:test-target "."))
4157 `(("ocaml-charInfo-width" ,ocaml-charinfo-width)
4158 ("ocaml-camomile" ,ocaml-camomile)
4159 ("ocaml-react" ,ocaml-react)))
4160 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-zed))))
4161 (synopsis "Abstract engine for text edition in OCaml")
4163 "This module provides an abstract engine for text edition. It can be
4164 used to write text editors, edition widgets, readlines, and more. The module
4165 Zed uses Camomile to fully support the Unicode specification, and implements
4166 an UTF-8 encoded string type with validation, and a rope datastructure to
4167 achieve efficient operations on large Unicode buffers. Zed also features a
4168 regular expression search on ropes. To support efficient text edition
4169 capabilities, Zed provides macro recording and cursor management facilities.")
4170 (license license:bsd-3)))
4172 (define-public ocaml4.07-zed
4173 (package-with-ocaml4.07
4180 (url "https://github.com/ocaml-community/zed")
4182 (file-name (git-file-name "ocaml4.07-zed" version))
4185 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
4188 (define-public ocaml-lambda-term
4190 (name "ocaml-lambda-term")
4192 (home-page "https://github.com/ocaml-community/lambda-term")
4198 (file-name (git-file-name name version))
4201 "048k26644wq5wlwk0j179dxrxyz9nxqqq4vvhyh6pqpgxdajd44i"))))
4202 (build-system dune-build-system)
4204 `(#:test-target "."))
4213 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lambda-term))))
4214 (synopsis "Terminal manipulation library for OCaml")
4215 (description "Lambda-Term is a cross-platform library for manipulating the
4216 terminal. It provides an abstraction for keys, mouse events, colors, as well as
4217 a set of widgets to write curses-like applications. The main objective of
4218 Lambda-Term is to provide a higher level functional interface to terminal
4219 manipulation than, for example, ncurses, by providing a native OCaml interface
4220 instead of bindings to a C library.")
4221 (license license:bsd-3)))
4223 (define-public ocaml4.07-lambda-term
4224 (package-with-ocaml4.07
4226 (inherit ocaml-lambda-term)
4232 (url "https://github.com/ocaml-community/lambda-term")
4234 (file-name (git-file-name "ocaml4.07-lambda-term" version))
4236 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
4238 `(("ocaml-lwt" ,ocaml-lwt)
4239 ("ocaml-lwt-log" ,ocaml-lwt-log)
4240 ("ocaml-lwt-react" ,ocaml-lwt-react)
4241 ("ocaml-zed" ,ocaml-zed)))
4244 (define-public ocaml-utop
4252 (url "https://github.com/ocaml-community/utop")
4254 (file-name (git-file-name name version))
4256 (base32 "1pmsmi0j4gb1vsd69j0bppkv79wbwz5xcffq78n1i2ibhff6r4j0"))))
4257 (build-system dune-build-system)
4259 `(#:test-target "."))
4263 (list ocaml-lambda-term ocaml-lwt ocaml-lwt-react ocaml-camomile
4265 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-utop))))
4266 (home-page "https://github.com/ocaml-community/utop")
4267 (synopsis "Improved interface to the OCaml toplevel")
4268 (description "UTop is an improved toplevel for OCaml. It can run in a
4269 terminal or in Emacs. It supports line editing, history, real-time and context
4270 sensitive completion, colors, and more.")
4271 (license license:bsd-3)))
4273 (define-public ocaml4.07-utop
4274 (package-with-ocaml4.07
4276 (inherit ocaml-utop)
4282 (url "https://github.com/ocaml-community/utop")
4284 (file-name (git-file-name "ocaml4.07-utop" version))
4286 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
4288 `(("ocaml-lambda-term" ,ocaml-lambda-term)
4289 ("ocaml-lwt" ,ocaml-lwt)
4290 ("ocaml-react" ,ocaml-react)
4291 ("ocaml-camomile" ,ocaml-camomile)
4292 ("ocaml-zed" ,ocaml-zed)))
4295 (define-public ocaml-integers
4297 (name "ocaml-integers")
4299 (home-page "https://github.com/ocamllabs/ocaml-integers")
4305 (file-name (git-file-name name version))
4308 "0c0bmy53ag6504kih0cvnp4yf7mbcimb18m1mgs592ffb0zj1rff"))))
4309 (build-system dune-build-system)
4311 `(#:tests? #f)) ; no tests
4313 (list ocaml-stdlib-shims))
4314 (synopsis "Various signed and unsigned integer types for OCaml")
4315 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
4316 and 64-bit signed and unsigned integer types, together with aliases such as
4317 long and size_t whose sizes depend on the host platform.")
4318 (license license:expat)))
4320 (define-public ocaml-ctypes
4322 (name "ocaml-ctypes")
4324 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
4330 (file-name (git-file-name name version))
4333 "0ilzq9qzvwv9rc08cc9wchsx636zp870i7qvqmbigaa2qb812m0z"))))
4334 (build-system ocaml-build-system)
4337 (modify-phases %standard-phases
4338 (add-after 'unpack 'make-writable
4340 (for-each make-file-writable
4342 (delete 'configure))))
4344 `(("pkg-config" ,pkg-config)
4345 ("ounit" ,ocaml-ounit)
4346 ("lwt" ,ocaml-lwt)))
4348 `(("bigarray-compat" ,ocaml-bigarray-compat)
4349 ("integers" ,ocaml-integers)))
4352 (synopsis "Library for binding to C libraries using pure OCaml")
4353 (description "Ctypes is a library for binding to C libraries using pure
4354 OCaml. The primary aim is to make writing C extensions as straightforward as
4355 possible. The core of ctypes is a set of combinators for describing the
4356 structure of C types -- numeric types, arrays, pointers, structs, unions and
4357 functions. You can use these combinators to describe the types of the
4358 functions that you want to call, then bind directly to those functions -- all
4359 without writing or generating any C!")
4360 (license license:expat)))
4362 (define-public ocaml-ocb-stubblr
4364 (name "ocaml-ocb-stubblr")
4366 (home-page "https://github.com/pqwy/ocb-stubblr")
4370 home-page "/releases/download/v0.1.1/ocb-stubblr-"
4372 (file-name (string-append name "-" version ".tbz"))
4375 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
4376 (build-system ocaml-build-system)
4378 `(#:build-flags (list "build" "--tests" "true")
4380 (modify-phases %standard-phases
4382 (add-before 'build 'fix-for-guix
4384 (substitute* "src/ocb_stubblr.ml"
4385 ;; Do not fail when opam is not present or initialized
4386 (("error_msgf \"error running opam\"") "\"\"")
4387 ;; Guix doesn't have cc, but it has gcc
4388 (("\"cc\"") "\"gcc\""))
4391 `(("topkg" ,ocaml-topkg)
4394 `(("astring" ,ocaml-astring)
4395 ("ocamlbuild" ,ocamlbuild)))
4396 (synopsis "OCamlbuild plugin for C stubs")
4397 (description "Ocb-stubblr is about ten lines of code that you need to
4398 repeat over, over, over and over again if you are using ocamlbuild to build
4399 OCaml projects that contain C stubs.")
4400 (license license:isc)))
4402 (define-public ocaml-tsdl
4406 (home-page "https://erratique.ch/software/tsdl")
4409 (uri (string-append home-page "/releases/tsdl-"
4411 (file-name (string-append name "-" version ".tar.gz"))
4414 "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"))))
4415 (build-system ocaml-build-system)
4417 `(#:build-flags '("build")
4418 #:tests? #f; tests require a display device
4420 (modify-phases %standard-phases
4421 (delete 'configure))))
4423 (list ocamlbuild ocaml-astring opam pkg-config))
4425 `(("topkg" ,ocaml-topkg)
4427 ("integers" ,ocaml-integers)
4428 ("ctypes" ,ocaml-ctypes)))
4429 (synopsis "Thin bindings to SDL for OCaml")
4430 (description "Tsdl is an OCaml library providing thin bindings to the
4431 cross-platform SDL C library.")
4432 (license license:isc)))
4434 (define-public dedukti
4438 (home-page "https://deducteam.github.io/")
4443 (url "https://github.com/deducteam/dedukti")
4444 (commit (string-append "v" version))))
4445 (file-name (git-file-name name version))
4448 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
4450 `(("menhir" ,ocaml-menhir)))
4453 (build-system ocaml-build-system)
4456 ,#~(modify-phases %standard-phases
4463 (invoke "make" "tests")))
4464 (add-before 'install 'set-binpath
4465 ;; Change binary path in the makefile
4467 (substitute* "GNUmakefile"
4469 (string-append "BINDIR = " #$output "/bin")))))
4472 (invoke "make" "install"))))))
4473 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4475 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4476 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4477 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4478 λΠ-calculus where the context contains variable declaration as well as rewrite
4479 rules. This system is not designed to develop proofs, but to check proofs
4480 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4481 (license license:cecill-c)))
4483 (define-public emacs-dedukti-mode
4484 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
4486 (name "emacs-dedukti-mode")
4487 (version (git-version "0" "0" commit))
4488 (home-page "https://github.com/rafoo/dedukti-mode")
4496 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
4497 (file-name (git-file-name name version))))
4500 (build-system emacs-build-system)
4503 (modify-phases %standard-phases
4504 (add-before 'install 'patch-dkpath
4506 (let ((dkcheck-path (which "dkcheck")))
4507 (substitute* "dedukti-mode.el"
4508 (("dedukti-path \"(.*)\"")
4509 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
4510 (synopsis "Emacs major mode for Dedukti files")
4511 (description "This package provides an Emacs major mode for editing
4513 (license license:cecill-b))))
4515 (define-public emacs-flycheck-dedukti
4516 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
4518 (name "emacs-flycheck-dedukti")
4519 (version (git-version "0" "0" commit))
4520 (home-page "https://github.com/rafoo/flycheck-dedukti")
4528 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
4529 (file-name (git-file-name name version))))
4530 (build-system emacs-build-system)
4532 (list emacs-dedukti-mode emacs-flycheck))
4533 (synopsis "Flycheck integration for the dedukti language")
4534 (description "This package provides a frontend for Flycheck to perform
4535 syntax checking on dedukti files.")
4536 (license license:cecill-b))))
4538 (define-public ocaml-jst-config
4540 (name "ocaml-jst-config")
4546 (url "https://github.com/janestreet/jst-config")
4547 (commit (string-append "v" version))))
4548 (file-name (git-file-name name version))
4551 "1yp5p63clvaxmkf7vlasgyapxc31x29c154pyq63n0fvi2fpf4y3"))))
4552 (build-system dune-build-system)
4553 (arguments '(#:tests? #f)) ; no tests
4555 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
4556 (home-page "https://github.com/janestreet/jst-config")
4557 (synopsis "Compile-time configuration for Jane Street libraries")
4558 (description "Defines compile-time constants used in Jane Street libraries
4559 such as Base, Core, and Async. This package has an unstable interface; it is
4560 intended only to share configuration between different packages from Jane
4561 Street. Future updates may not be backward-compatible, and we do not
4562 recommend using this package directly.")
4563 (license license:expat)))
4565 (define-public ocaml-jane-street-headers
4567 (name "ocaml-jane-street-headers")
4571 "jane-street-headers" version
4572 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
4573 (build-system dune-build-system)
4574 (arguments '(#:tests? #f)) ; no tests
4575 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-jane-street-headers))))
4576 (home-page "https://github.com/janestreet/jane-street-headers")
4577 (synopsis "Jane Street C header files")
4578 (description "C header files shared between the various Jane Street
4580 (license license:expat)))
4582 (define-public ocaml-time-now
4584 (name "ocaml-time-now")
4589 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
4590 (build-system dune-build-system)
4591 (arguments '(#:tests? #f)) ; no tests
4593 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
4594 ocaml-ppx-base ocaml-ppx-optcomp))
4595 (properties `((upstream-name . "time_now")))
4597 "https://github.com/janestreet/time_now")
4598 (synopsis "Reports the current time")
4600 "Provides a single function to report the current time in nanoseconds
4601 since the start of the Unix epoch.")
4602 (license license:expat)))
4604 (define-public ocaml-ppx-inline-test
4606 (name "ocaml-ppx-inline-test")
4608 (home-page "https://github.com/janestreet/ppx_inline_test")
4613 (url (string-append home-page ".git"))
4614 (commit (string-append "v" version))))
4615 (file-name (git-file-name name version))
4618 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
4619 (build-system dune-build-system)
4621 `(#:tests? #f)) ;see home page README for further information
4624 ocaml-migrate-parsetree
4630 (properties `((upstream-name . "ppx_inline_test")
4631 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
4632 (synopsis "Syntax extension for writing in-line tests in ocaml code")
4633 (description "This package contains a syntax extension for writing
4634 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
4636 (license license:expat)))
4638 (define-public ocaml4.07-ppx-inline-test
4639 (package-with-ocaml4.07
4641 (inherit ocaml-ppx-inline-test)
4642 (name "ocaml-ppx-inline-test")
4644 (home-page "https://github.com/janestreet/ppx_inline_test")
4649 (url (string-append home-page ".git"))
4650 (commit (string-append "v" version))))
4651 (file-name (git-file-name name version))
4654 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
4656 `(("ocaml-base" ,ocaml-base)
4657 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4658 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
4659 ("ocaml-sexplib0" ,ocaml-sexplib0)
4660 ("ocaml-stdio" ,ocaml-stdio)
4661 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4662 (properties `((upstream-name . "ppx_inline_test"))))))
4664 (define-public ocaml-bindlib
4666 (name "ocaml-bindlib")
4672 (url "https://github.com/rlepigre/ocaml-bindlib")
4674 (file-name (git-file-name name version))
4677 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
4678 (build-system dune-build-system)
4680 `(#:test-target "."))
4682 (list ocamlbuild ocaml-findlib))
4683 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
4684 (synopsis "OCaml Bindlib library for bound variables")
4685 (description "Bindlib is a library allowing the manipulation of data
4686 structures with bound variables. It is particularly useful when writing ASTs
4687 for programming languages, but also for manipulating terms of the λ-calculus
4688 or quantified formulas.")
4689 (license license:gpl3+)))
4691 (define-public ocaml-earley
4693 (name "ocaml-earley")
4695 (home-page "https://github.com/rlepigre/ocaml-earley")
4700 (url (string-append home-page ".git"))
4702 (file-name (git-file-name name version))
4705 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
4706 (build-system dune-build-system)
4708 `(#:test-target "."))
4710 (list ocaml-stdlib-shims))
4711 (synopsis "Parsing library based on Earley Algorithm")
4712 (description "Earley is a parser combinator library base on Earley's
4713 algorithm. It is intended to be used in conjunction with an OCaml syntax
4714 extension which allows the definition of parsers inside the language. There
4715 is also support for writing OCaml syntax extensions in a camlp4 style.")
4716 (license license:cecill-b)))
4718 (define-public ocaml-timed
4720 (name "ocaml-timed")
4722 (home-page "https://github.com/rlepigre/ocaml-timed")
4726 (url (string-append home-page ".git"))
4727 (commit (string-append name "_" version))))
4730 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
4731 (file-name (git-file-name name version))))
4732 (build-system ocaml-build-system)
4735 (modify-phases %standard-phases
4742 (invoke "make" "install")))
4745 (invoke "make" "tests"))))))
4746 (synopsis "Timed references for imperative state")
4747 (description "Timed references for imperative state. This module provides
4748 an alternative type for references (or mutable cells) supporting undo/redo
4749 operations. In particular, an abstract notion of time is used to capture the
4750 state of the references at any given point, so that it can be restored. Note
4751 that usual reference operations only have a constant time / memory overhead
4752 (compared to those of the standard library).
4754 Moreover, we provide an alternative implementation based on the references
4755 of the standard library (Pervasives module). However, it is less efficient
4756 than the first one.")
4757 (license license:expat)))
4759 (define-public ocaml-biniou
4761 (name "ocaml-biniou")
4763 (home-page "https://github.com/mjambon/biniou")
4768 (url (string-append home-page ".git"))
4770 (file-name (git-file-name name version))
4773 "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
4774 (build-system dune-build-system)
4777 (modify-phases %standard-phases
4778 (add-before 'build 'make-writable
4779 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
4781 (list ocaml-easy-format))
4784 (synopsis "Data format designed for speed, safety, ease of use and backward
4786 (description "Biniou (pronounced \"be new\" is a binary data format
4787 designed for speed, safety, ease of use and backward compatibility as
4788 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4789 functionality but allows implementations several times faster (4 times faster
4790 than yojson), with 25-35% space savings.")
4791 (license license:bsd-3)))
4793 (define-public ocaml-yojson
4795 (name "ocaml-yojson")
4797 (home-page "https://github.com/ocaml-community/yojson")
4802 (url (string-append home-page ".git"))
4804 (file-name (git-file-name name version))
4807 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
4808 (build-system dune-build-system)
4810 `(#:test-target "."))
4812 (list ocaml-biniou ocaml-easy-format))
4814 (list ocaml-alcotest ocaml-cppo))
4815 (synopsis "Low-level JSON library for OCaml")
4816 (description "Yojson is an optimized parsing and printing library for the
4817 JSON format. It addresses a few shortcomings of json-wheel including 2x
4818 speedup, polymorphic variants and optional syntax for tuples and variants.
4819 @code{ydump} is a pretty printing command-line program provided with the
4820 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4821 serializers and deserializers from type definitions.")
4822 (license license:bsd-3)))
4824 (define-public ocaml-craml
4826 (name "ocaml-craml")
4828 (home-page "https://github.com/realworldocaml/craml")
4833 (url (string-append home-page ".git"))
4835 (file-name (git-file-name name version))
4838 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
4839 (build-system dune-build-system)
4842 (modify-phases %standard-phases
4843 (add-before 'build 'upgrade
4845 (invoke "dune" "upgrade")
4848 (list ocaml-fmt ocaml-astring ocaml-logs ocaml-cmdliner))
4850 "CRAM-testing framework for testing command line applications")
4851 (description "CRAM is a is functional testing framework for command line
4852 applications. @code{craml} is freely inspired by the
4853 Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
4854 format}. @code{craml} is released as a single binary (called @code{craml}).")
4855 (license license:isc)))
4857 (define-public ocaml-dot-merlin-reader
4859 (name "ocaml-dot-merlin-reader")
4865 (url "https://github.com/ocaml/merlin")
4866 (commit (string-append "v" version))))
4867 (file-name (git-file-name name version))
4870 "125gyk63fg9plqkyrkl3wvpr3czjxgvshf4496fc4swldl7z587c"))))
4871 (build-system dune-build-system)
4872 (arguments '(#:package "dot-merlin-reader"
4873 #:tests? #f)) ; no tests
4875 (list ocaml-yojson ocaml-csexp ocaml-result))
4876 (home-page "https://ocaml.github.io/merlin/")
4877 (synopsis "Reads config files for @code{ocaml-merlin}")
4878 (description "@code{ocaml-dot-merlin-reader} is an external reader for
4879 @code{ocaml-merlin} configurations.")
4880 (license license:expat)))
4882 (define-public ocaml-merlin
4884 (inherit ocaml-dot-merlin-reader)
4885 (name "ocaml-merlin")
4887 '(#:package "merlin"
4889 (modify-phases %standard-phases
4891 (lambda* (#:key tests? #:allow-other-keys)
4893 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
4895 (list ocaml-yojson ocaml-csexp ocaml-result))
4897 (list ocaml-dot-merlin-reader ; required for tests
4899 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
4900 (description "Merlin is an editor service that provides modern IDE
4901 features for OCaml. Emacs and Vim support is provided out-of-the-box.
4902 External contributors added support for Visual Studio Code, Sublime Text and
4904 (license license:expat)))
4906 (define-public ocaml-gsl
4915 "https://github.com/mmottl/gsl-ocaml/releases/download/"
4916 version "/gsl-" version ".tbz"))
4919 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
4920 (build-system dune-build-system)
4924 (modify-phases %standard-phases
4925 (add-after 'unpack 'fix-gsl-directory
4926 (lambda* (#:key inputs #:allow-other-keys)
4927 (substitute* "src/config/discover.ml"
4928 (("/usr") (assoc-ref inputs "gsl"))))))))
4932 (list ocaml-base ocaml-stdio))
4933 (home-page "https://mmottl.github.io/gsl-ocaml")
4934 (synopsis "Bindings to the GNU Scientific Library")
4936 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4937 the OCaml language.")
4938 (license license:gpl3+)))
4940 (define-public ocaml4.07-gsl-1
4941 (package-with-ocaml4.07
4947 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
4948 "/releases/download/v"
4949 version "/gsl-ocaml-" version ".tar.gz"))
4952 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
4953 (build-system ocaml-build-system)
4955 `(("gsl" ,gsl-static)))
4957 `(("ocamlbuild" ,ocamlbuild)))
4959 (propagated-inputs '()))))
4961 (define-public cubicle
4967 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4971 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4972 (build-system gnu-build-system)
4974 (list automake ocaml
4975 (@@ (gnu packages base) which)))
4977 (list ocaml-num z3))
4979 `(#:configure-flags (list "--with-z3")
4980 #:make-flags (list "QUIET=")
4983 (modify-phases %standard-phases
4984 (add-before 'configure 'make-deterministic
4986 (substitute* "Makefile.in"
4987 (("`date`") "no date for reproducibility"))))
4988 (add-before 'configure 'configure-for-release
4990 (substitute* "Makefile.in"
4991 (("SVNREV=") "#SVNREV="))
4993 (add-before 'configure 'fix-/bin/sh
4995 (substitute* "configure"
4996 (("-/bin/sh") (string-append "-" (which "sh"))))
4998 (add-before 'configure 'fix-smt-z3wrapper.ml
5000 (substitute* "Makefile.in"
5003 (add-before 'configure 'fix-ocaml-num
5004 (lambda* (#:key inputs #:allow-other-keys)
5005 (substitute* "Makefile.in"
5006 (("nums.cma") "num.cma num_core.cma")
5007 (("= \\$\\(FUNCTORYLIB\\)")
5008 (string-append "= -I "
5009 (assoc-ref inputs "ocaml-num")
5010 "/lib/ocaml/site-lib/num/core -I "
5011 (assoc-ref inputs "ocaml-num")
5012 "/lib/ocaml/site-lib/num"
5013 " $(FUNCTORYLIB)")))
5015 (home-page "http://cubicle.lri.fr/")
5016 (synopsis "Model checker for array-based systems")
5017 (description "Cubicle is a model checker for verifying safety properties
5018 of array-based systems. This is a syntactically restricted class of
5019 parametrized transition systems with states represented as arrays indexed by
5020 an arbitrary number of processes. Cache coherence protocols and mutual
5021 exclusion algorithms are typical examples of such systems.")
5022 (license license:asl2.0)))
5024 (define-public ocaml-sexplib0
5026 (name "ocaml-sexplib0")
5028 (home-page "https://github.com/janestreet/sexplib0")
5030 (janestreet-origin "sexplib0" version
5031 "1fpg991n578m11r0ki4als4c76s3sp703b4khivx40v48402qill"))
5032 (build-system dune-build-system)
5033 (arguments `(#:tests? #f)) ;no tests
5034 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
5035 (synopsis "Library containing the definition of S-expressions and some
5037 (description "Part of Jane Street's Core library The Core suite of
5038 libraries is an industrial strength alternative to OCaml's standard library
5039 that was developed by Jane Street, the largest industrial user of OCaml.")
5040 (license license:expat)))
5042 (define-public ocaml4.07-sexplib0
5043 (package-with-ocaml4.07
5045 (inherit ocaml-sexplib0)
5046 (name "ocaml-sexplib0")
5049 (janestreet-origin "sexplib0" version
5050 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
5051 (arguments `(#:tests? #f)) ; no tests
5054 (define-public ocaml-parsexp
5056 (name "ocaml-parsexp")
5058 (home-page "https://github.com/janestreet/parsexp")
5063 (commit (string-append "v" version))))
5064 (file-name (git-file-name name version))
5067 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
5068 (build-system dune-build-system)
5070 (list ocaml-sexplib0 ocaml-base))
5071 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
5072 (synopsis "S-expression parsing library")
5074 "This library provides generic parsers for parsing S-expressions from
5075 strings or other medium.
5077 The library is focused on performances but still provide full generic
5078 parsers that can be used with strings, bigstrings, lexing buffers,
5079 character streams or any other sources effortlessly.
5081 It provides three different class of parsers:
5084 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
5086 the parsers with positions, building compact position sequences so
5087 that one can recover original positions in order to report properly
5088 located errors at little cost
5090 the Concrete Syntax Tree parsers, produce values of type
5091 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
5092 syntax, including comments
5095 This library is portable and doesn't provide IO functions. To read
5096 s-expressions from files or other external sources, you should use
5098 (license license:expat)))
5100 (define-public ocaml4.07-parsexp
5101 (package-with-ocaml4.07
5103 (inherit ocaml-parsexp)
5104 (name "ocaml-parsexp")
5107 (janestreet-origin "parsexp" version
5108 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
5111 (define-public ocaml-sexplib
5113 (name "ocaml-sexplib")
5115 (home-page "https://github.com/janestreet/sexplib")
5117 (janestreet-origin "sexplib" version
5118 "1xs55f11yhscnfrzpvy1vn05j6xi9kxy097465624l615j7k8qm5"))
5119 (build-system dune-build-system)
5121 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
5122 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
5124 "Library for serializing OCaml values to and from S-expressions")
5126 "This package is part of Jane Street's Core library. Sexplib contains
5127 functionality for parsing and pretty-printing s-expressions.")
5128 (license license:expat)))
5130 (define-public ocaml4.07-sexplib
5131 (package-with-ocaml4.07
5133 (inherit ocaml-sexplib)
5136 (janestreet-origin "sexplib" version
5137 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
5140 (define-public ocaml-base
5144 (home-page "https://github.com/janestreet/base")
5149 (url "https://github.com/janestreet/base")
5150 (commit (string-append "v" version))))
5151 (file-name (git-file-name name version))
5154 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
5155 (build-system dune-build-system)
5157 (list ocaml-sexplib0))
5158 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
5160 "Full standard library replacement for OCaml")
5162 "Base is a complete and portable alternative to the OCaml standard
5163 library. It provides all standard functionalities one would expect
5164 from a language standard library. It uses consistent conventions
5165 across all of its module.
5167 Base aims to be usable in any context. As a result system dependent
5168 features such as I/O are not offered by Base. They are instead
5169 provided by companion libraries such as
5170 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5171 (license license:expat)))
5173 (define-public ocaml4.07-base
5174 (package-with-ocaml4.07
5176 (inherit ocaml-base)
5181 ;; version 0.11.1 is not released on ocaml.janestreet.org.
5184 (url "https://github.com/janestreet/base.git")
5185 (commit (string-append "v" version))))
5186 (file-name (git-file-name name version))
5189 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5192 (define-public ocaml-compiler-libs
5194 (name "ocaml-compiler-libs")
5196 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5202 (commit (string-append "v" version))))
5203 (file-name (git-file-name name version))
5206 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
5207 (build-system dune-build-system)
5208 (arguments `(#:tests? #f)) ;no tests
5209 (properties `((upstream-name . "ocaml-compiler-libs")
5210 (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
5211 (synopsis "Compiler libraries repackaged")
5212 (description "This package simply repackages the OCaml compiler libraries
5213 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5214 is now @code{Ocaml_common.Ast_helper}.")
5215 (license license:expat)))
5217 (define-public ocaml4.07-compiler-libs
5218 (package-with-ocaml4.07
5220 (inherit ocaml-compiler-libs)
5221 (name "ocaml-compiler-libs")
5223 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5229 (commit (string-append "v" version))))
5230 (file-name (git-file-name name version))
5233 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5234 (properties `((upstream-name . "ocaml-compiler-libs"))))))
5236 (define-public ocaml-stdio
5238 (name "ocaml-stdio")
5240 (home-page "https://github.com/janestreet/stdio")
5242 (janestreet-origin "stdio" version
5243 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
5244 (build-system dune-build-system)
5246 (list ocaml-base ocaml-sexplib0))
5247 (arguments `(#:tests? #f)) ;no tests
5248 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
5249 (synopsis "Standard IO library for OCaml")
5251 "Stdio implements simple input/output functionalities for OCaml. It
5252 re-exports the input/output functions of the OCaml standard libraries using
5253 a more consistent API.")
5254 (license license:expat)))
5256 (define-public ocaml4.07-stdio
5257 (package-with-ocaml4.07
5259 (inherit ocaml-stdio)
5262 (janestreet-origin "stdio" version
5263 "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
5266 (define-public ocaml-ppx-deriving
5268 (name "ocaml-ppx-deriving")
5274 (url "https://github.com/ocaml-ppx/ppx_deriving")
5275 (commit (string-append "v" version))))
5276 (file-name (git-file-name name version))
5279 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
5280 (build-system dune-build-system)
5282 `(#:test-target "."))
5284 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
5286 (list ocaml-cppo ocaml-ounit2))
5287 (properties `((upstream-name . "ppx_deriving")))
5288 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
5289 (synopsis "Type-driven code generation for OCaml")
5291 "Ppx_deriving provides common infrastructure for generating code based
5292 on type definitions, and a set of useful plugins for common tasks.")
5293 (license license:expat)))
5295 (define-public ocaml-ppx-derivers
5297 (name "ocaml-ppx-derivers")
5300 "https://github.com/ocaml-ppx/ppx_derivers")
5305 (url (string-append home-page ".git"))
5307 (file-name (git-file-name name version))
5310 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
5311 (build-system dune-build-system)
5313 '(#:tests? #f)) ;no tests
5314 (properties `((upstream-name . "ppx_derivers")))
5315 (synopsis "Shared @code{@@deriving} plugin registry")
5317 "Ppx_derivers is a tiny package whose sole purpose is to allow
5318 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5319 as part of the same ocaml-migrate-parsetree driver.")
5320 (license license:bsd-3)))
5322 (define-public ocaml-ppxlib
5324 (name "ocaml-ppxlib")
5326 (home-page "https://github.com/ocaml-ppx/ppxlib")
5333 (file-name (git-file-name name version))
5336 "0wlqvyqy9ccp7z981blv42aqwq7zfq93cakbahjyy48hiiir6vp2"))))
5337 (build-system dune-build-system)
5340 (modify-phases %standard-phases
5341 (add-after 'unpack 'fix-test-format
5343 ;; Since sexplib >= 0.15, error formating has changed
5344 (substitute* "test/driver/exception_handling/run.t"
5345 (("\\(Failure ") "Failure("))
5346 (substitute* "test/base/test.ml"
5347 (("Invalid_argument \\((.*)\\)." _ m)
5348 (string-append "Invalid_argument " m "."))
5349 (("\\(Invalid_argument (.*)\\)" _ m)
5350 (string-append "Invalid_argument " m ".")))
5351 (substitute* "test/ppx_import_support/test.ml"
5352 (("\\(Failure") "Failure")
5353 ((" \"(Some ppx-es.*)\")" _ m)
5354 (string-append " \"" m "\"."))))))))
5358 ocaml-migrate-parsetree
5364 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
5366 "Base library and tools for ppx rewriters")
5368 "A comprehensive toolbox for ppx development. It features:
5370 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5371 independent of the version of OCaml;
5372 @item a library for library for ppx rewriters in general, and type-driven code
5373 generators in particular;
5375 a feature-full driver for OCaml AST transformers;
5376 @item a quotation mechanism allowing to write values representing the
5377 OCaml AST in the OCaml syntax;
5378 @item a generator of open recursion classes from type definitions.
5380 (license license:expat)))
5382 (define-public ocaml4.07-ppxlib
5383 (package-with-ocaml4.07
5385 (inherit ocaml-ppxlib)
5386 (name "ocaml-ppxlib")
5388 (home-page "https://github.com/ocaml-ppx/ppxlib")
5395 (file-name (git-file-name name version))
5398 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
5399 (build-system dune-build-system)
5402 (modify-phases %standard-phases
5403 (add-before 'check 'set-topfind
5404 (lambda* (#:key inputs #:allow-other-keys)
5405 ;; add the line #directory ".." at the top of each file
5406 ;; using #use "topfind";; to be able to find topfind
5407 (let* ((findlib-path (assoc-ref inputs "findlib"))
5409 (string-append findlib-path "/lib/ocaml/site-lib")))
5410 (substitute* '("test/base/test.ml"
5411 "test/code_path/test.ml"
5412 "test/deriving/test.ml"
5413 "test/driver/attributes/test.ml"
5414 "test/driver/non-compressible-suffix/test.ml"
5415 "test/driver/transformations/test.ml")
5416 (("#use \"topfind\";;" all)
5417 (string-append "#directory \"" findlib-libdir "\"\n"
5422 (define-public ocaml-ppx-compare
5424 (name "ocaml-ppx-compare")
5427 (janestreet-origin "ppx_compare" version
5428 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
5429 (build-system dune-build-system)
5431 ;; Tests are currenlty failing
5432 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
5435 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5436 (properties `((upstream-name . "ppx_compare")
5437 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
5438 (home-page "https://github.com/janestreet/ppx_compare")
5439 (synopsis "Generation of comparison functions from types")
5440 (description "Generation of fast comparison functions from type expressions
5441 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
5442 from type representations. The scaffolded functions are usually much faster
5443 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
5444 flexibility by allowing you to override them for a specific type and more safety
5445 by making sure that you only compare comparable values.")
5446 (license license:asl2.0)))
5448 (define-public ocaml4.07-ppx-compare
5449 (package-with-ocaml4.07
5451 (inherit ocaml-ppx-compare)
5452 (name "ocaml-ppx-compare")
5454 (home-page "https://github.com/janestreet/ppx_compare")
5459 (commit (string-append "v" version))))
5460 (file-name (git-file-name name version))
5463 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
5464 (properties `((upstream-name . "ppx_compare"))))))
5466 (define-public ocaml-fieldslib
5468 (name "ocaml-fieldslib")
5470 (source (janestreet-origin
5472 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
5473 (build-system dune-build-system)
5474 (arguments `(#:tests? #f)) ; No tests
5476 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5477 (properties `((upstream-name . "fieldslib")
5478 (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
5479 (home-page "https://github.com/janestreet/fieldslib")
5480 (synopsis "Syntax extension to record fields")
5481 (description "Syntax extension to define first class values representing
5482 record fields, to get and set record fields, iterate and fold over all fields
5483 of a record and create new record values.")
5484 (license license:asl2.0)))
5486 (define-public ocaml4.07-fieldslib
5487 (package-with-ocaml4.07
5489 (inherit ocaml-fieldslib)
5491 (source (janestreet-origin
5493 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
5494 (properties `((upstream-name . "fieldslib"))))))
5496 (define-public ocaml-variantslib
5498 (name "ocaml-variantslib")
5501 (janestreet-origin "variantslib" version
5502 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
5503 (build-system dune-build-system)
5508 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5509 (properties `((upstream-name . "variantslib")
5510 (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
5511 (home-page "https://github.com/janestreet/variantslib")
5512 (synopsis "OCaml variants as first class values")
5513 (description "The Core suite of libraries is an alternative to OCaml's
5515 (license license:asl2.0)))
5517 (define-public ocaml4.07-variantslib
5518 (package-with-ocaml4.07
5520 (inherit ocaml-variantslib)
5521 (name "ocaml-variantslib")
5525 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5526 (version-major+minor version)
5527 "/files/variantslib-v" version ".tar.gz"))
5530 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
5531 (properties `((upstream-name . "variantslib"))))))
5533 (define-public ocaml-ppx-fields-conv
5535 (name "ocaml-ppx-fields-conv")
5537 (home-page "https://github.com/janestreet/ppx_fields_conv")
5543 (commit (string-append "v" version))))
5544 (file-name (git-file-name name version))
5547 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
5548 (build-system dune-build-system)
5550 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
5552 (properties `((upstream-name . "ppx_fields_conv")
5553 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
5554 (synopsis "Generation of accessor and iteration functions for ocaml records")
5555 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
5556 first class values representing record fields, and additional routines, to get
5557 and set record fields, iterate and fold over all fields of a record and create
5558 new record values.")
5559 (license license:asl2.0)))
5561 (define-public ocaml4.07-ppx-fields-conv
5562 (package-with-ocaml4.07
5564 (inherit ocaml-ppx-fields-conv)
5566 (source (janestreet-origin
5567 "ppx_fields_conv" version
5568 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
5569 (properties `((upstream-name . "ppx_fields_conv"))))))
5571 (define-public ocaml-ppx-sexp-conv
5573 (name "ocaml-ppx-sexp-conv")
5575 (home-page "https://github.com/janestreet/ppx_sexp_conv")
5581 (commit (string-append "v" version))))
5582 (file-name (git-file-name name version))
5585 "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"))))
5586 (build-system dune-build-system)
5588 (list ocaml-base ocaml-ppxlib))
5589 (properties `((upstream-name . "ppx_sexp_conv")
5590 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
5591 (synopsis "Generation of S-expression conversion functions from type definitions")
5592 (description "This package generates S-expression conversion functions from type
5594 (license license:asl2.0)))
5596 (define-public ocaml4.07-ppx-sexp-conv
5597 (package-with-ocaml4.07
5599 (inherit ocaml-ppx-sexp-conv)
5600 (name "ocaml-ppx-sexp-conv")
5605 (url "https://github.com/janestreet/ppx_sexp_conv")
5606 (commit (string-append "v" version))))
5607 (file-name (git-file-name name version))
5610 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
5611 (properties `((upstream-name . "ppx_sexp_conv"))))))
5613 (define-public ocaml-ppx-variants-conv
5615 (name "ocaml-ppx-variants-conv")
5621 (url "https://github.com/janestreet/ppx_variants_conv")
5622 (commit (string-append "v" version))))
5623 (file-name (git-file-name name version))
5626 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
5627 (build-system dune-build-system)
5629 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
5632 `((upstream-name . "ppx_variants_conv")
5633 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
5635 "https://github.com/janestreet/ppx_variants_conv")
5636 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
5638 "This package generates accessors and iteration functions for OCaml
5640 (license license:asl2.0)))
5642 (define-public ocaml4.07-ppx-variants-conv
5643 (package-with-ocaml4.07
5645 (inherit ocaml-ppx-variants-conv)
5646 (name "ocaml-ppx-variants-conv")
5652 (url "https://github.com/janestreet/ppx_variants_conv")
5653 (commit (string-append "v" version))))
5654 (file-name (git-file-name name version))
5657 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
5658 (properties `((upstream-name . "ppx_variants_conv"))))))
5660 (define-public ocaml-ppx-custom-printf
5662 (name "ocaml-ppx-custom-printf")
5664 (home-page "https://github.com/janestreet/ppx_custom_printf")
5670 (commit (string-append "v" version))))
5671 (file-name (git-file-name name version))
5674 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
5675 (build-system dune-build-system)
5677 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
5679 (properties `((upstream-name . "ppx_custom_printf")
5680 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
5681 (synopsis "Printf-style format-strings for user-defined string conversion")
5682 (description "Extensions to printf-style format-strings for user-defined
5683 string conversion.")
5684 (license license:asl2.0)))
5686 (define-public ocaml4.07-ppx-custom-printf
5687 (package-with-ocaml4.07
5689 (inherit ocaml-ppx-custom-printf)
5693 "ppx_custom_printf" version
5694 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
5695 (properties `((upstream-name . "ppx_custom_printf"))))))
5697 (define-public ocaml-bin-prot
5699 (name "ocaml-bin-prot")
5705 (url "https://github.com/janestreet/bin_prot")
5706 (commit (string-append "v" version))))
5707 (file-name (git-file-name name version))
5709 (base32 "1qfqglscc25wwnjx7byqmjcnjww1msnr8940gyg8h93wdq43fjnh"))))
5710 (build-system dune-build-system)
5714 ocaml-ppx-custom-printf
5715 ocaml-ppx-fields-conv
5718 ocaml-ppx-variants-conv))
5719 (properties `((upstream-name . "bin_prot")
5720 (ocaml4.07-variant . ,(delay ocaml4.07-bin-prot))))
5721 (home-page "https://github.com/janestreet/bin_prot")
5722 (synopsis "Binary protocol generator")
5723 (description "This library contains functionality for reading and writing
5724 OCaml-values in a type-safe binary protocol. It is extremely efficient,
5725 typically supporting type-safe marshalling and unmarshalling of even highly
5726 structured values at speeds sufficient to saturate a gigabit connection. The
5727 protocol is also heavily optimized for size, making it ideal for long-term
5728 storage of large amounts of data.")
5729 (license license:expat)))
5731 (define-public ocaml4.07-bin-prot
5732 (package-with-ocaml4.07
5734 (inherit ocaml-bin-prot)
5738 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5739 (version-major+minor version)
5740 "/files/bin_prot-v" version ".tar.gz"))
5743 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
5744 (propagated-inputs (list ocaml-base
5746 ocaml-ppx-custom-printf
5747 ocaml-ppx-fields-conv
5748 ocaml-ppx-variants-conv
5749 ocaml-migrate-parsetree))
5755 (define-public ocaml-octavius
5757 (name "ocaml-octavius")
5762 (url "https://github.com/ocaml-doc/octavius")
5763 (commit (string-append "v" version))))
5764 (file-name (git-file-name name version))
5767 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
5768 (build-system dune-build-system)
5771 (modify-phases %standard-phases
5772 (add-before 'build 'make-writable
5774 (for-each (lambda (file)
5776 (find-files "." "."))
5778 (properties `((upstream-name . "octavius")))
5779 (home-page "https://github.com/ocaml-doc/octavius")
5780 (synopsis "Ocamldoc comment syntax parser")
5781 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
5782 (license license:isc)))
5784 (define-public ocaml-ppx-hash
5786 (name "ocaml-ppx-hash")
5789 (janestreet-origin "ppx_hash" version
5790 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
5791 (build-system dune-build-system)
5793 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
5794 ocaml-migrate-parsetree ocaml-ppxlib))
5795 (properties `((upstream-name . "ppx_hash")
5796 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
5797 (home-page "https://github.com/janestreet/ppx_hash")
5798 (synopsis "Generation of hash functions from type expressions and definitions")
5799 (description "This package is a collection of ppx rewriters that generate
5800 hash functions from type exrpessions and definitions.")
5801 (license license:asl2.0)))
5803 (define-public ocaml4.07-ppx-hash
5804 (package-with-ocaml4.07
5806 (inherit ocaml-ppx-hash)
5807 (name "ocaml-ppx-hash")
5808 (home-page "https://github.com/janestreet/ppx_hash")
5814 (commit (string-append "v" version))))
5815 (file-name (git-file-name name version))
5818 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
5819 (properties `((upstream-name . "ppx_hash"))))))
5821 (define-public ocaml-ppx-enumerate
5823 (name "ocaml-ppx-enumerate")
5827 "ppx_enumerate" version
5828 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
5829 (build-system dune-build-system)
5831 `(#:tests? #f)) ; no test suite
5833 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5834 (properties `((upstream-name . "ppx_enumerate")
5835 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
5836 (home-page "https://github.com/janestreet/ppx_enumerate")
5837 (synopsis "Generate a list containing all values of a finite type")
5838 (description "Ppx_enumerate is a ppx rewriter which generates a definition
5839 for the list of all values of a type (for a type which only has finitely
5841 (license license:asl2.0)))
5843 (define-public ocaml4.07-ppx-enumerate
5844 (package-with-ocaml4.07
5846 (inherit ocaml-ppx-enumerate)
5847 (name "ocaml-ppx-enumerate")
5849 (home-page "https://github.com/janestreet/ppx_enumerate")
5854 (commit (string-append "v" version))))
5855 (file-name (git-file-name name version))
5858 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
5859 (properties `((upstream-name . "ppx_enumerate"))))))
5861 (define-public ocaml-ppx-bench
5863 (name "ocaml-ppx-bench")
5869 (url "https://github.com/janestreet/ppx_bench")
5870 (commit (string-append "v" version))))
5871 (file-name (git-file-name name version))
5873 (base32 "0bc0gbm922417wqisafxh35jslcp7xy1s0h0a1q32rhx0ivxx3g6"))))
5874 (build-system dune-build-system)
5878 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
5879 (properties `((upstream-name . "ppx_bench")
5880 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bench))))
5881 (home-page "https://github.com/janestreet/ppx_bench")
5882 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
5883 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
5884 (license license:expat)))
5886 (define-public ocaml4.07-ppx-bench
5887 (package-with-ocaml4.07
5889 (inherit ocaml-ppx-bench)
5893 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5894 (version-major+minor version)
5895 "/files/ppx_bench-v" version ".tar.gz"))
5898 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
5900 (list ocaml-ppx-inline-test ocaml-migrate-parsetree ocaml-ppxlib))
5902 (license license:asl2.0))))
5904 (define-public ocaml-ppx-here
5906 (name "ocaml-ppx-here")
5909 (janestreet-origin "ppx_here" version
5910 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
5911 (build-system dune-build-system)
5916 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5917 (properties `((upstream-name . "ppx_here")
5918 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
5919 (home-page "https://github.com/janestreet/ppx_here")
5920 (synopsis "Expands [%here] into its location")
5922 "Part of the Jane Street's PPX rewriters collection.")
5923 (license license:asl2.0)))
5925 (define-public ocaml4.07-ppx-here
5926 (package-with-ocaml4.07
5928 (inherit ocaml-ppx-here)
5931 (janestreet-origin "ppx_here" version
5932 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
5933 (properties `((upstream-name . "ppx_here"))))))
5935 (define-public ocaml-typerep
5937 (name "ocaml-typerep")
5943 (url "https://github.com/janestreet/typerep")
5944 (commit (string-append "v" version))))
5945 (file-name (git-file-name name version))
5947 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
5948 (build-system dune-build-system)
5949 (arguments `(#:tests? #f)); no tests
5950 (propagated-inputs (list ocaml-base))
5951 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-typerep))))
5952 (home-page "https://github.com/janestreet/typerep")
5953 (synopsis "Typerep is a library for runtime types")
5954 (description "Typerep is a library for runtime types.")
5955 (license license:expat)))
5957 (define-public ocaml4.07-typerep
5958 (package-with-ocaml4.07
5960 (inherit ocaml-typerep)
5964 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5965 (version-major+minor version)
5966 "/files/typerep-v" version ".tar.gz"))
5969 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
5971 (license license:asl2.0))))
5973 (define-public ocaml-ppx-sexp-value
5975 (name "ocaml-ppx-sexp-value")
5981 (url "https://github.com/janestreet/ppx_sexp_value")
5982 (commit (string-append "v" version))))
5983 (file-name (git-file-name name version))
5985 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
5986 (build-system dune-build-system)
5988 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
5989 (properties `((upstream-name . "ppx_sexp_value")
5990 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-value))))
5991 (home-page "https://github.com/janestreet/ppx_sexp_value")
5992 (synopsis "Simplify building s-expressions from ocaml values")
5993 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
5994 building s-expressions from ocaml values.")
5995 (license license:expat)))
5997 (define-public ocaml4.07-ppx-sexp-value
5998 (package-with-ocaml4.07
6000 (inherit ocaml-ppx-sexp-value)
6004 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6005 (version-major+minor version)
6006 "/files/ppx_sexp_value-v" version ".tar.gz"))
6009 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
6014 ocaml-migrate-parsetree
6017 (license license:asl2.0))))
6019 (define-public ocaml-ppx-sexp-message
6021 (name "ocaml-ppx-sexp-message")
6027 (url "https://github.com/janestreet/ppx_sexp_message")
6028 (commit (string-append "v" version))))
6029 (file-name (git-file-name name version))
6031 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
6032 (build-system dune-build-system)
6034 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6035 (properties `((upstream-name . "ppx_sexp_message")
6036 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-message))))
6037 (home-page "https://github.com/janestreet/ppx_sexp_message")
6038 (synopsis "Ppx rewriter for easy construction of s-expressions")
6039 (description "Ppx_sexp_message aims to ease the creation of s-expressions
6040 in OCaml. This is mainly motivated by writing error and debugging messages,
6041 where one needs to construct a s-expression based on various element of the
6042 context such as function arguments.")
6043 (license license:expat)))
6045 (define-public ocaml4.07-ppx-sexp-message
6046 (package-with-ocaml4.07
6048 (inherit ocaml-ppx-sexp-message)
6052 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6053 (version-major+minor version)
6054 "/files/ppx_sexp_message-v" version ".tar.gz"))
6057 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
6062 ocaml-migrate-parsetree
6065 (license license:asl2.0))))
6067 (define-public ocaml-ppx-pipebang
6069 (name "ocaml-ppx-pipebang")
6075 (url "https://github.com/janestreet/ppx_pipebang")
6076 (commit (string-append "v" version))))
6077 (file-name (git-file-name name version))
6079 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
6080 (build-system dune-build-system)
6081 (arguments `(#:tests? #f)); no tests
6082 (propagated-inputs (list ocaml-ppxlib))
6083 (properties `((upstream-name . "ppx_pipebang")
6084 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-pipebang))))
6085 (home-page "https://github.com/janestreet/ppx_pipebang")
6086 (synopsis "Inline reverse application operators `|>` and `|!`")
6087 (description "A ppx rewriter that inlines reverse application operators
6088 @code{|>} and @code{|!}.")
6089 (license license:expat)))
6091 (define-public ocaml4.07-ppx-pipebang
6092 (package-with-ocaml4.07
6094 (inherit ocaml-ppx-pipebang)
6098 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6099 (version-major+minor version)
6100 "/files/ppx_pipebang-v" version ".tar.gz"))
6103 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
6104 (propagated-inputs (list ocaml-migrate-parsetree ocaml-ppxlib))
6106 (license license:asl2.0))))
6108 (define-public ocaml-ppx-module-timer
6110 (name "ocaml-ppx-module-timer")
6116 (url "https://github.com/janestreet/ppx_module_timer")
6117 (commit (string-append "v" version))))
6118 (file-name (git-file-name name version))
6120 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
6121 (build-system dune-build-system)
6123 `(#:tests? #f)); no tests
6125 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
6126 (properties `((upstream-name . "ppx_module_timer")))
6127 (home-page "https://github.com/janestreet/ppx_module_timer")
6128 (synopsis "Ppx rewriter that records top-level module startup times")
6129 (description "Modules using @samp{ppx_module_timer} have instrumentation
6130 to record their startup time.")
6131 (license license:expat)))
6133 (define-public ocaml-ppx-fixed-literal
6135 (name "ocaml-ppx-fixed-literal")
6141 (url "https://github.com/janestreet/ppx_fixed_literal")
6142 (commit (string-append "v" version))))
6143 (file-name (git-file-name name version))
6145 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
6146 (build-system dune-build-system)
6148 `(#:tests? #f)); no tests
6149 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6150 (properties `((upstream-name . "ppx_fixed_literal")))
6151 (home-page "https://github.com/janestreet/ppx_fixed_literal")
6152 (synopsis "Simpler notation for fixed point literals")
6154 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
6155 literal of the form 1.0v to conversion functions currently in scope.")
6156 (license license:expat)))
6158 (define-public ocaml-ppx-optional
6160 (name "ocaml-ppx-optional")
6164 "ppx_optional" version
6165 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
6166 (build-system dune-build-system)
6167 (arguments `(#:tests? #f)) ; No tests
6169 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6170 (properties `((upstream-name . "ppx_optional")
6171 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
6172 (home-page "https://github.com/janestreet/ppx_optional")
6173 (synopsis "Pattern matching on flat options")
6175 "A ppx rewriter that rewrites simple match statements with an if then
6177 (license license:asl2.0)))
6179 (define-public ocaml4.07-ppx-optional
6180 (package-with-ocaml4.07
6182 (inherit ocaml-ppx-optional)
6186 "ppx_optional" version
6187 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
6188 (properties `((upstream-name . "ppx_optional"))))))
6190 (define-public ocaml-ppx-optcomp
6192 (name "ocaml-ppx-optcomp")
6194 (home-page "https://github.com/janestreet/ppx_optcomp")
6200 (commit (string-append "v" version))))
6201 (file-name (git-file-name name version))
6204 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
6205 (build-system dune-build-system)
6207 (list ocaml-base ocaml-stdio ocaml-ppxlib))
6208 (properties `((upstream-name . "ppx_optcomp")
6209 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
6210 (synopsis "Optional compilation for OCaml")
6211 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
6212 used to handle optional compilations of pieces of code depending of the word
6213 size, the version of the compiler, ...")
6214 (license license:asl2.0)))
6216 (define-public ocaml4.07-ppx-optcomp
6217 (package-with-ocaml4.07
6219 (inherit ocaml-ppx-optcomp)
6223 "ppx_optcomp" version
6224 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
6225 (properties `((upstream-name . "ppx_optcomp"))))))
6227 (define-public ocaml-ppx-let
6229 (name "ocaml-ppx-let")
6232 (janestreet-origin "ppx_let" version
6233 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
6234 (build-system dune-build-system)
6236 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
6237 (properties `((upstream-name . "ppx_let")
6238 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
6239 (home-page "https://github.com/janestreet/ppx_let")
6240 (synopsis "Monadic let-bindings")
6241 (description "A ppx rewriter for monadic and applicative let bindings,
6242 match expressions, and if expressions.")
6243 (license license:asl2.0)))
6245 (define-public ocaml4.07-ppx-let
6246 (package-with-ocaml4.07
6248 (inherit ocaml-ppx-let)
6251 (janestreet-origin "ppx_let" version
6252 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
6254 (properties `((upstream-name . "ppx_let"))))))
6256 (define-public ocaml-ppx-fail
6258 (name "ocaml-ppx-fail")
6264 (url "https://github.com/janestreet/ppx_fail")
6265 (commit (string-append "v" version))))
6266 (file-name (git-file-name name version))
6268 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
6269 (build-system dune-build-system)
6270 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
6271 (properties `((upstream-name . "ppx_fail")
6272 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fail))))
6273 (home-page "https://github.com/janestreet/ppx_fail")
6274 (synopsis "Add location to calls to failwiths")
6275 (description "Syntax extension that makes [failwiths] always include a
6277 (license license:expat)))
6279 (define-public ocaml4.07-ppx-fail
6280 (package-with-ocaml4.07
6282 (inherit ocaml-ppx-fail)
6286 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6287 (version-major+minor version)
6288 "/files/ppx_fail-v" version ".tar.gz"))
6291 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
6293 (list ocaml-base ocaml-ppx-here ocaml-migrate-parsetree ocaml-ppxlib))
6295 (license license:asl2.0))))
6297 (define-public ocaml-ppx-cold
6299 (name "ocaml-ppx-cold")
6301 (home-page "https://github.com/janestreet/ppx_cold")
6303 (janestreet-origin "ppx_cold" version
6304 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
6305 (build-system dune-build-system)
6306 (arguments `(#:test-target "tests"))
6308 (list ocaml-base ocaml-ppxlib))
6309 (properties `((upstream-name . "ppx_cold")))
6310 (synopsis "Syntax extension for indicating cold path")
6312 "This package contains an syntax extension to indicate that the code is
6313 on the cold path and should be kept out of the way to avoid polluting the
6314 instruction cache on the hot path. See also
6315 https://github.com/ocaml/ocaml/issues/8563.")
6316 (license license:expat)))
6318 (define-public ocaml-ppx-assert
6320 (name "ocaml-ppx-assert")
6323 (janestreet-origin "ppx_assert" version
6324 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
6325 (build-system dune-build-system)
6332 ocaml-migrate-parsetree
6334 (properties `((upstream-name . "ppx_assert")
6335 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
6336 (home-page "https://github.com/janestreet/ppx_assert")
6337 (synopsis "Assert-like extension nodes that raise useful errors on failure")
6338 (description "This package contains assert-like extension nodes that raise
6339 useful errors on failure.")
6340 (license license:asl2.0)))
6342 (define-public ocaml4.07-ppx-assert
6343 (package-with-ocaml4.07
6345 (inherit ocaml-ppx-assert)
6348 (janestreet-origin "ppx_assert" version
6349 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
6351 `(("ocaml-base" ,ocaml-base)
6352 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6353 ("ocaml-ppx-here" ,ocaml-ppx-here)
6354 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6355 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6356 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6357 (properties `((upstream-name . "ppx_assert"))))))
6359 (define-public ocaml-ppx-expect
6361 (name "ocaml-ppx-expect")
6367 (url "https://github.com/janestreet/ppx_expect")
6368 (commit (string-append "v" version))))
6369 (file-name (git-file-name name version))
6372 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
6373 (build-system dune-build-system)
6377 ocaml-ppx-inline-test
6380 ocaml-migrate-parsetree
6382 (properties `((upstream-name . "ppx_expect")
6383 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
6384 (home-page "https://github.com/janestreet/ppx_expect")
6385 (synopsis "Cram like framework for OCaml")
6386 (description "Expect-test is a framework for writing tests in OCaml, similar
6387 to Cram. Expect-tests mimics the existing inline tests framework with the
6388 @code{let%expect_test} construct. The body of an expect-test can contain
6389 output-generating code, interleaved with @code{%expect} extension expressions
6390 to denote the expected output.")
6391 (license license:asl2.0)))
6393 (define-public ocaml4.07-ppx-expect
6394 (package-with-ocaml4.07
6396 (inherit ocaml-ppx-expect)
6399 (janestreet-origin "ppx_expect" version
6400 "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
6402 `(("ocaml-base" ,ocaml-base)
6403 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
6404 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6405 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
6406 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
6407 ("ocaml-ppx-here" ,ocaml-ppx-here)
6408 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
6409 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6410 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
6411 ("ocaml-stdio" ,ocaml-stdio)
6412 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6413 ("ocaml-ppxlib" ,ocaml-ppxlib)
6414 ("ocaml-re" ,ocaml-re)))
6415 (properties `((upstream-name . "ppx_expect"))))))
6417 (define-public ocaml-ppx-js-style
6419 (name "ocaml-ppx-js-style")
6425 (url "https://github.com/janestreet/ppx_js_style")
6426 (commit (string-append "v" version))))
6427 (file-name (git-file-name name version))
6430 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
6431 (build-system dune-build-system)
6432 (arguments `(#:tests? #f)) ; No tests
6434 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
6435 (properties `((upstream-name . "ppx_js_style")
6436 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
6437 (home-page "https://github.com/janestreet/ppx_js_style")
6438 (synopsis "Code style checker for Jane Street Packages")
6439 (description "This package is a no-op ppx rewriter. It is used as a
6440 @code{lint} tool to enforce some coding conventions across all Jane Street
6442 (license license:asl2.0)))
6444 (define-public ocaml4.07-ppx-js-style
6445 (package-with-ocaml4.07
6447 (inherit ocaml-ppx-js-style)
6450 (janestreet-origin "ppx_js_style" version
6451 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
6452 (properties `((upstream-name . "ppx_js_style"))))))
6454 (define-public ocaml-ppx-typerep-conv
6456 (name "ocaml-ppx-typerep-conv")
6462 (url "https://github.com/janestreet/ppx_typerep_conv/")
6463 (commit (string-append "v" version))))
6464 (file-name (git-file-name name version))
6466 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
6467 (build-system dune-build-system)
6469 `(#:test-target "."))
6470 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
6471 (properties `((upstream-name . "ppx_typerep_conv")
6472 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
6473 (home-page "https://github.com/janestreet/ppx_typerep_conv")
6474 (synopsis "Generation of runtime types from type declarations")
6475 (description "This package can automatically generate runtime types
6476 from type definitions.")
6477 (license license:expat)))
6479 (define-public ocaml4.07-ppx-typerep-conv
6480 (package-with-ocaml4.07
6482 (inherit ocaml-ppx-typerep-conv)
6487 (url "https://github.com/janestreet/ppx_typerep_conv")
6488 (commit (string-append "v" version))))
6489 (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
6492 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
6495 (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
6496 (license license:asl2.0))))
6498 (define-public ocaml-ppx-string
6500 (name "ocaml-ppx-string")
6506 (url "https://github.com/janestreet/ppx_string")
6507 (commit (string-append "v" version))))
6508 (file-name (git-file-name name version))
6510 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
6511 (build-system dune-build-system)
6512 (arguments `(#:tests? #f)); no tests
6514 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
6515 (properties `((upstream-name . "ppx_string")))
6516 (home-page "https://github.com/janestreet/ppx_string")
6517 (synopsis "Ppx extension for string interpolation")
6518 (description "This extension provides a syntax for string interpolation.")
6519 (license license:expat)))
6521 (define-public ocaml-ppx-stable
6523 (name "ocaml-ppx-stable")
6529 (url "https://github.com/janestreet/ppx_stable")
6530 (commit (string-append "v" version))))
6531 (file-name (git-file-name name version))
6533 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
6534 (build-system dune-build-system)
6536 `(#:test-target "tests"))
6537 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6538 (properties `((upstream-name . "ppx_stable")))
6539 (home-page "https://github.com/janestreet/ppx_stable")
6540 (synopsis "Stable types conversions generator")
6541 (description "This package is a ppx extension for easier implementation of
6542 conversion functions between almost identical types.")
6543 (license license:expat)))
6545 (define-public ocaml-ppx-base
6547 (name "ocaml-ppx-base")
6552 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
6553 (build-system dune-build-system)
6555 `(#:test-target "."))
6557 (list ocaml-ppx-compare
6563 ocaml-migrate-parsetree
6565 (properties `((upstream-name . "ppx_base")
6566 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
6567 (home-page "https://github.com/janestreet/ppx_base")
6568 (synopsis "Base set of ppx rewriters")
6569 (description "Ppx_base is the set of ppx rewriters used for Base.
6571 Note that Base doesn't need ppx to build, it is only used as a
6572 verification tool.")
6573 (license license:asl2.0)))
6575 (define-public ocaml4.07-ppx-base
6576 (package-with-ocaml4.07
6578 (inherit ocaml-ppx-base)
6583 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
6585 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
6586 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
6587 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
6588 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
6589 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6590 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6591 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6592 (properties `((upstream-name . "ppx_base"))))))
6594 (define-public ocaml-ppx-bin-prot
6596 (name "ocaml-ppx-bin-prot")
6602 (url "https://github.com/janestreet/ppx_bin_prot")
6603 (commit (string-append "v" version))))
6604 (file-name (git-file-name name version))
6606 (base32 "1280wsls061fmvmdysjqn3lv4mnkyg400jnjf4jyfr14s33h1ad5"))))
6607 (build-system dune-build-system)
6609 ;; Cyclic dependency with ocaml-ppx-jane
6612 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
6613 (properties `((upstream-name . "ppx_bin_prot")
6614 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bin-prot))))
6615 (home-page "https://github.com/janestreet/ppx_bin_prot")
6616 (synopsis "Generation of bin_prot readers and writers from types")
6617 (description "Generation of binary serialization and deserialization
6618 functions from type definitions.")
6619 (license license:expat)))
6621 (define-public ocaml4.07-ppx-bin-prot
6622 (package-with-ocaml4.07
6624 (inherit ocaml-ppx-bin-prot)
6629 (url "https://github.com/janestreet/ppx_bin_prot")
6630 (commit (string-append "v" version))))
6631 (file-name (git-file-name "ocaml4.07-ppx-bin-prot" version))
6634 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
6639 ocaml-migrate-parsetree
6642 (license license:asl2.0))))
6644 (define-public ocaml-ppx-ignore-instrumentation
6646 (name "ocaml-ppx-ignore-instrumentation")
6652 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
6653 (commit (string-append "v" version))))
6654 (file-name (git-file-name name version))
6656 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
6657 (build-system dune-build-system)
6659 `(#:tests? #f)) ;no tests
6660 (propagated-inputs (list ocaml-ppxlib))
6661 (properties `((upstream-name . "ppx_ignore_instrumentation")))
6662 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
6663 (synopsis "Ignore Jane Street specific instrumentation extensions")
6665 "Ignore Jane Street specific instrumentation extensions from internal
6666 PPXs or compiler features not yet upstreamed.")
6667 (license license:expat)))
6669 (define-public ocaml-ppx-log
6671 (name "ocaml-ppx-log")
6677 (url "https://github.com/janestreet/ppx_log")
6678 (commit (string-append "v" version))))
6679 (file-name (git-file-name name version))
6681 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
6682 (build-system dune-build-system)
6687 ocaml-ppx-sexp-message
6690 (properties `((upstream-name . "ppx_log")))
6691 (home-page "https://github.com/janestreet/ppx_log")
6692 (synopsis "Extension nodes for lazily rendering log messages")
6693 (description "This package provides ppx_sexp_message-like extension
6694 nodes for lazily rendering log messages.")
6695 (license license:expat)))
6697 (define-public ocaml-ppx-disable-unused-warnings
6699 (name "ocaml-ppx-disable-unused-warnings")
6705 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
6706 (commit (string-append "v" version))))
6707 (file-name (git-file-name name version))
6709 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
6710 (build-system dune-build-system)
6712 `(#:test-target "tests"))
6713 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6714 (properties `((upstream-name . "ppx_disable_unused_warnings")))
6715 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
6716 (synopsis "Simple ppx extension for commonly unused warnings")
6717 (description "This package expands @code{@@disable_unused_warnings} into
6718 @code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
6719 (license license:expat)))
6721 (define-public ocaml-ppx-jane
6723 (name "ocaml-ppx-jane")
6729 (url "https://github.com/janestreet/ppx_jane")
6730 (commit (string-append "v" version))))
6731 (file-name (git-file-name name version))
6733 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
6734 (build-system dune-build-system)
6736 `(#:test-target "."))
6738 (list ocaml-base-quickcheck
6743 ocaml-ppx-custom-printf
6744 ocaml-ppx-disable-unused-warnings
6746 ocaml-ppx-fields-conv
6747 ocaml-ppx-fixed-literal
6749 ocaml-ppx-ignore-instrumentation
6750 ocaml-ppx-inline-test
6753 ocaml-ppx-module-timer
6757 ocaml-ppx-sexp-message
6758 ocaml-ppx-sexp-value
6761 ocaml-ppx-typerep-conv
6762 ocaml-ppx-variants-conv
6764 (properties `((upstream-name . "ppx_jane")
6765 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-jane))))
6766 (home-page "https://github.com/janestreet/ppx_jane")
6767 (synopsis "Standard Jane Street ppx rewriters")
6768 (description "This package installs a ppx-jane executable, which is a ppx
6769 driver including all standard Jane Street ppx rewriters.")
6770 (license license:expat)))
6772 (define-public ocaml4.07-ppx-jane
6773 (package-with-ocaml4.07
6775 (inherit ocaml-ppx-jane)
6779 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6780 (version-major+minor version)
6781 "/files/ppx_jane-v" version ".tar.gz"))
6784 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
6786 (list ocaml-ppx-assert
6790 ocaml-ppx-custom-printf
6793 ocaml-ppx-fields-conv
6795 ocaml-ppx-inline-test
6800 ocaml-ppx-sexp-message
6801 ocaml-ppx-sexp-value
6802 ocaml-ppx-typerep-conv
6803 ocaml-ppx-variants-conv
6804 ocaml-migrate-parsetree
6807 (license license:asl2.0))))
6809 (define-public ocaml-base-bigstring
6811 (name "ocaml-base-bigstring")
6817 (url "https://github.com/janestreet/base_bigstring")
6818 (commit (string-append "v" version))))
6819 (file-name (git-file-name name version))
6821 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
6822 (build-system dune-build-system)
6823 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
6824 (properties `((upstream-name . "base_bigstring")))
6825 (home-page "https://github.com/janestreet/base_bigstring")
6826 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
6827 (description "This package provides string type based on [Bigarray], for
6828 use in I/O and C-bindings.")
6829 (license license:expat)))
6831 (define-public ocaml-splittable-random
6833 (name "ocaml-splittable-random")
6839 (url "https://github.com/janestreet/splittable_random")
6840 (commit (string-append "v" version))))
6841 (file-name (git-file-name name version))
6843 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
6844 (build-system dune-build-system)
6849 ocaml-ppx-inline-test
6850 ocaml-ppx-sexp-message))
6851 (properties `((upstream-name . "splittable_random")
6852 (ocaml-4.07-variant . ,(delay ocaml4.07-splittable-random))))
6853 (home-page "https://github.com/janestreet/splittable_random")
6854 (synopsis "PRNG that can be split into independent streams")
6855 (description "This package provides a splittable
6856 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
6857 be used as a stream of random values; it can also be split to produce a
6858 second, independent stream of random values.
6860 This library implements a splittable pseudo-random number generator that sacrifices
6861 cryptographic-quality randomness in favor of performance.")
6862 (license license:expat)))
6864 (define-public ocaml4.07-splittable-random
6865 (package-with-ocaml4.07
6867 (inherit ocaml-splittable-random)
6871 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6872 (version-major+minor version)
6873 "/files/splittable_random-v" version ".tar.gz"))
6876 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
6878 (list ocaml-base ocaml-ppx-jane ocaml-migrate-parsetree))
6880 (license license:asl2.0))))
6882 (define-public ocaml-base-quickcheck
6884 (name "ocaml-base-quickcheck")
6890 (url "https://github.com/janestreet/base_quickcheck")
6891 (commit (string-append "v" version))))
6892 (file-name (git-file-name name version))
6894 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
6895 (build-system dune-build-system)
6899 ocaml-ppx-fields-conv
6901 ocaml-ppx-sexp-message
6902 ocaml-ppx-sexp-value
6903 ocaml-splittable-random
6905 (properties `((upstream-name . "base_quickcheck")))
6906 (home-page "https://github.com/janestreet/base_quickcheck")
6908 "Randomized testing framework, designed for compatibility with Base")
6910 "@samp{base-quickcheck} provides randomized testing in the style of
6911 Haskell's Quickcheck library, with support for built-in types as well as
6912 types provided by Base.")
6913 (license license:expat)))
6915 (define-public ocaml4.07-jane-street-headers
6917 (name "ocaml4.07-jane-street-headers")
6921 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6922 (version-major+minor version)
6923 "/files/jane-street-headers-v" version ".tar.gz"))
6926 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
6927 (build-system dune-build-system)
6931 #:findlib ,ocaml4.07-findlib
6932 #:dune ,ocaml4.07-dune))
6933 (home-page "https://github.com/janestreet/jane-street-headers")
6934 (synopsis "Jane Street C header files")
6935 (description "This package provides C header files shared between the
6936 various Jane Street packages.")
6937 (license license:asl2.0)))
6939 (define-public ocaml4.07-configurator
6941 (name "ocaml4.07-configurator")
6945 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6946 (version-major+minor version)
6947 "/files/configurator-v" version ".tar.gz"))
6950 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
6951 (build-system dune-build-system)
6956 #:findlib ,ocaml4.07-findlib
6957 #:dune ,ocaml4.07-dune))
6959 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
6960 ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
6961 (home-page "https://github.com/janestreet/configurator")
6962 (synopsis "Helper library for gathering system configuration")
6963 (description "Configurator is a small library that helps writing OCaml
6964 scripts that test features available on the system, in order to generate config.h
6967 Configurator allows one to:
6969 @item test if a C program compiles
6970 @item query pkg-config
6971 @item import #define from OCaml header files
6972 @item generate config.h file
6974 (license license:asl2.0)))
6976 (define-public ocaml-spawn
6978 (name "ocaml-spawn")
6983 (url "https://github.com/janestreet/spawn")
6984 (commit (string-append "v" version))))
6985 (file-name (git-file-name name version))
6988 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
6989 (build-system dune-build-system)
6990 (propagated-inputs (list ocaml-odoc))
6991 (native-inputs (list ocaml-ppx-expect))
6993 `((ocaml4.07-variant . ,(delay ocaml4.07-spawn))))
6994 (home-page "https://github.com/janestreet/spawn")
6995 (synopsis "Spawning sub-processes")
6997 "Spawn is a small library exposing only one functionality: spawning sub-process.
6999 It has three main goals:
7002 @item provide missing features of Unix.create_process such as providing a
7004 @item provide better errors when a system call fails in the
7005 sub-process. For instance if a command is not found, you get a proper
7006 @code{Unix.Unix_error} exception,
7007 @item improve performances by using vfork when available. It is often
7008 claimed that nowadays fork is as fast as vfork, however in practice
7009 fork takes time proportional to the process memory while vfork is
7010 constant time. In application using a lot of memory, vfork can be
7011 thousands of times faster than fork.
7013 (license license:asl2.0)))
7015 (define-public ocaml4.07-spawn
7016 (package-with-ocaml4.07
7018 (inherit ocaml-spawn)
7023 (url "https://github.com/janestreet/spawn")
7024 (commit (string-append "v" version))))
7025 (file-name (git-file-name "ocaml4.07-spawn" version))
7028 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
7031 (modify-phases %standard-phases
7032 (add-before 'check 'fix-tests
7034 (substitute* "test/tests.ml"
7035 (("/bin/pwd") (which "pwd"))
7036 (("/bin/echo") (which "echo")))
7039 #:findlib ,ocaml4.07-findlib
7040 #:dune ,ocaml4.07-dune))
7041 (propagated-inputs '())
7044 (define-public ocaml-core
7052 (url "https://github.com/janestreet/core")
7053 (commit (string-append "v" version))))
7054 (file-name (git-file-name name version))
7056 (base32 "1m2ybvlz9zlb2d0jc0j7wdgd18mx9sh3ds2ylkv0cfjx1pzi0l25"))))
7057 (build-system dune-build-system)
7060 #:tests? #f)); Require a cyclic dependency: core_extended
7063 ocaml-base-bigstring
7064 ocaml-base-quickcheck
7067 ocaml-jane-street-headers
7072 ocaml-ppx-inline-test
7075 ocaml-ppx-sexp-message
7077 ocaml-splittable-random
7082 (home-page "https://github.com/janestreet/core")
7083 (synopsis "Alternative to OCaml's standard library")
7084 (description "The Core suite of libraries is an alternative to OCaml's
7085 standard library that was developed by Jane Street.")
7086 ;; Also contains parts of OCaml, relicensed to expat, as permitted
7087 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7088 (license license:expat)))
7090 (define-public ocaml4.07-core
7091 (package-with-ocaml4.07
7093 (inherit ocaml-core)
7098 (url "https://github.com/janestreet/core")
7099 (commit (string-append "v" version))))
7100 (file-name (git-file-name "ocaml4.07-core" version))
7103 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
7106 ocaml4.07-configurator
7113 ocaml-migrate-parsetree
7115 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
7116 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7117 (license license:asl2.0))))
7119 (define-public ocaml-int-repr
7121 (name "ocaml-int-repr")
7127 (url "https://github.com/janestreet/int_repr")
7128 (commit (string-append "v" version))))
7129 (file-name (git-file-name name version))
7131 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
7132 (build-system dune-build-system)
7134 `(#:tests? #f)) ;no tests
7135 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
7136 (properties `((upstream-name . "int_repr")))
7137 (home-page "https://github.com/janestreet/int_repr")
7138 (synopsis "Integers of various widths")
7139 (description "Integers of various widths.")
7140 (license license:expat)))
7142 (define-public ocaml-core-kernel
7144 (name "ocaml-core-kernel")
7150 (url "https://github.com/janestreet/core_kernel")
7151 (commit (string-append "v" version))))
7152 (file-name (git-file-name name version))
7154 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
7155 (build-system dune-build-system)
7157 ;; Cyclic dependency with ocaml-core
7160 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
7161 (properties `((upstream-name . "core_kernel")
7162 (ocaml4.07-variant . ,(delay ocaml4.07-core-kernel))))
7163 (home-page "https://github.com/janestreet/core_kernel")
7164 (synopsis "Portable standard library for OCaml")
7165 (description "Core is an alternative to the OCaml standard library.
7167 Core_kernel is the system-independent part of Core. It is aimed for cases when
7168 the full Core is not available, such as in Javascript.")
7169 (license license:expat)))
7171 (define-public ocaml4.07-core-kernel
7172 (package-with-ocaml4.07
7174 (inherit ocaml-core-kernel)
7179 (url "https://github.com/janestreet/core_kernel")
7180 (commit (string-append "v" version))))
7181 (file-name (git-file-name "ocaml4.07-core-kernel" version))
7184 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
7188 ocaml4.07-configurator
7190 ocaml-jane-street-headers
7194 ocaml-ppx-inline-test
7197 ocaml-ppx-sexp-message
7199 ocaml-splittable-random
7203 ocaml-migrate-parsetree))
7206 ;; this package and parts of OCaml, relicensed by janestreet
7211 (define-public ocaml-timezone
7213 (name "ocaml-timezone")
7219 (url "https://github.com/janestreet/timezone")
7220 (commit (string-append "v" version))))
7221 (file-name (git-file-name name version))
7223 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
7224 (build-system dune-build-system)
7225 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7226 (home-page "https://github.com/janestreet/timezone")
7227 (synopsis "Time-zone handling")
7229 "Timezone handles parsing timezone data and create @code{Timezone.t}
7230 that can later be used to manipulate time in core_kernel or core.")
7231 (license license:expat)))
7233 (define-public ocaml-markup
7235 (name "ocaml-markup")
7237 (home-page "https://github.com/aantron/markup.ml")
7242 (url (string-append home-page ".git"))
7244 (file-name (git-file-name name version))
7247 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
7248 (build-system dune-build-system)
7250 `(#:package "markup"))
7252 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
7254 (list ocaml-ounit2 pkg-config))
7256 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
7257 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
7258 (description "Markup.ml provides an HTML parser and an XML parser. The
7259 parsers are wrapped in a simple interface: they are functions that transform
7260 byte streams to parsing signal streams. Streams can be manipulated in various
7261 ways, such as processing by fold, filter, and map, assembly into DOM tree
7262 structures, or serialization back to HTML or XML.
7264 Both parsers are based on their respective standards. The HTML parser, in
7265 particular, is based on the state machines defined in HTML5.
7267 The parsers are error-recovering by default, and accept fragments. This makes
7268 it very easy to get a best-effort parse of some input. The parsers can,
7269 however, be easily configured to be strict, and to accept only full documents.
7271 Apart from this, the parsers are streaming (do not build up a document in
7272 memory), non-blocking (can be used with threading libraries), lazy (do not
7273 consume input unless the signal stream is being read), and process the input in
7274 a single pass. They automatically detect the character encoding of the input
7275 stream, and convert everything to UTF-8.")
7276 (license license:bsd-3)))
7278 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
7279 ;; package-with-ocaml4.07
7280 (define-public ocaml-markup0.8.0
7282 (inherit ocaml-markup)
7283 (name "ocaml-markup")
7285 (home-page "https://github.com/aantron/markup.ml")
7290 (url (string-append home-page ".git"))
7292 (file-name (git-file-name name version))
7295 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
7297 (list ocaml-ounit pkg-config))
7300 (define-public ocaml-tyxml
7302 (name "ocaml-tyxml")
7308 (url "https://github.com/ocsigen/tyxml")
7310 (file-name (git-file-name name version))
7313 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
7314 (build-system dune-build-system)
7316 (list ocaml-re ocaml-seq ocaml-uutf))
7318 (list ocaml-alcotest))
7319 (arguments `(#:package "tyxml"))
7320 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-tyxml))))
7321 (home-page "https://github.com/ocsigen/tyxml/")
7322 (synopsis "TyXML is a library for building correct HTML and SVG documents")
7323 (description "TyXML provides a set of convenient combinators that uses the
7324 OCaml type system to ensure the validity of the generated documents. TyXML can
7325 be used with any representation of HTML and SVG: the textual one, provided
7326 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
7327 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
7328 also create your own representation and use it to instantiate a new set of
7330 (license license:lgpl2.1)))
7332 (define-public ocaml4.07-tyxml
7333 (package-with-ocaml4.07
7335 (inherit ocaml-tyxml)
7340 (url "https://github.com/ocsigen/tyxml")
7342 (file-name (git-file-name "ocaml-tyxml" version))
7345 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
7348 (define-public ocaml-bisect-ppx
7350 (name "ocaml-bisect-ppx")
7356 (url "https://github.com/aantron/bisect_ppx")
7358 (file-name (git-file-name name version))
7361 "0562rwwnhqlf5alxl1wd1n0xs0k4aamxafrh8bbmh5yl3i5rxrx4"))))
7362 (build-system dune-build-system)
7364 (list ocaml-ppxlib ocaml-cmdliner))
7366 ;; Tests require ocamlformat which would lead to circular dependencies
7368 (properties `((upstream-name . "bisect_ppx")
7369 (ocaml4.07-variant . ,(delay ocaml4.07-bisect-ppx))))
7370 (home-page "https://github.com/aantron/bisect_ppx")
7371 (synopsis "Code coverage for OCaml")
7372 (description "Bisect_ppx helps you test thoroughly. It is a small
7373 preprocessor that inserts instrumentation at places in your code, such as
7374 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
7375 nice HTML report showing which places were visited and which were missed.
7377 Usage is simple - add package bisect_ppx when building tests, run your tests,
7378 then run the Bisect_ppx report tool on the generated visitation files.")
7379 (license license:mpl2.0)))
7381 (define-public ocaml4.07-bisect-ppx
7382 (package-with-ocaml4.07
7384 (inherit ocaml-bisect-ppx)
7390 (url "https://github.com/aantron/bisect_ppx")
7392 (file-name (git-file-name "ocaml-bisect-ppx" version))
7395 "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
7397 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
7398 ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
7399 ,@(package-propagated-inputs ocaml-bisect-ppx)))
7401 `(("ocaml-ounit2" ,ocaml-ounit2)))
7404 ;; tests require git and network
7406 (properties '((upstream-name . "bisect_ppx"))))))
7408 (define-public ocaml-odoc
7411 ;; 2.2.0-alpha contains fixes for Dune 3.0 compatibility
7412 ;; (https://github.com/ocaml/odoc/commit/6ac97f3148f7791ec7451785ef4dbd9ca0daf2d1)
7413 (version "2.2.0-alpha")
7418 (url "https://github.com/ocaml/odoc")
7420 (file-name (git-file-name name version))
7422 (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
7423 (build-system dune-build-system)
7426 (modify-phases %standard-phases
7427 (add-after 'unpack 'fix-test
7429 ;; test results expects #!/bin/sh but gets a store path instead
7430 (substitute* "test/xref2/with.t/run.t"
7431 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
7439 ocaml-migrate-parsetree
7445 (list ocaml-alcotest
7455 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
7456 (home-page "https://github.com/ocaml/odoc")
7457 (synopsis "OCaml documentation generator")
7458 (description "Odoc is a documentation generator for OCaml. It reads
7459 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
7462 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
7463 advantage over ocamldoc is an accurate cross-referencer, which handles the
7464 complexity of the OCaml module system.")
7465 (license license:isc)))
7467 (define-public ocaml-odoc-parser
7469 (name "ocaml-odoc-parser")
7475 (url "https://github.com/ocaml-doc/odoc-parser")
7477 (file-name (git-file-name name version))
7480 "0mvwbnla0wd29bc7ckwpb494qv7p616cx8hnm0zg36np7v3zwy4w"))))
7481 (build-system dune-build-system)
7483 (list ocaml-astring ocaml-result))
7485 (list ocaml-ppx-expect))
7486 (home-page "https://github.com/ocaml-doc/odoc-parser")
7487 (synopsis "Parser for ocaml documentation comments")
7489 "This package provides a library for parsing the contents of OCaml
7490 documentation comments, formatted using Odoc syntax, an extension of the
7491 language understood by ocamldoc.")
7492 (license license:isc)))
7494 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
7495 ;; with old version of dune used in package-with-ocaml4.07
7496 (define-public ocaml4.07-odoc
7497 (package-with-ocaml4.07
7499 (inherit ocaml-odoc)
7506 (url "https://github.com/ocaml/odoc")
7508 (file-name (git-file-name name version))
7510 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
7513 `(("ocaml-alcotest" ,ocaml-alcotest)
7514 ("ocaml-markup" ,ocaml-markup)
7515 ("ocaml-sexplib" ,ocaml-sexplib)
7516 ("ocaml-re" ,ocaml-re)
7517 ("ocaml-uutf" ,ocaml-uutf)))
7519 `(("ocaml-astring" ,ocaml-astring)
7520 ("ocaml-cmdliner" ,ocaml-cmdliner)
7521 ("ocaml-cppo" ,ocaml-cppo)
7522 ("ocaml-fpath" ,ocaml-fpath)
7523 ("ocaml-result" ,ocaml-result)
7524 ("ocaml-tyxml" ,ocaml-tyxml)
7525 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
7526 ("tidy-html" ,tidy-html)))
7529 (define-public ocaml-fftw3
7531 (name "ocaml-fftw3")
7537 (url "https://github.com/Chris00/fftw-ocaml")
7539 (file-name (git-file-name name version))
7542 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
7543 (build-system dune-build-system)
7545 `(#:test-target "tests"))
7549 (list ocaml-cppo ocaml-lacaml))
7551 "https://github.com/Chris00/fftw-ocaml")
7553 "Bindings to FFTW3")
7555 "Bindings providing OCaml support for the seminal Fast Fourier Transform
7557 (license license:lgpl2.1))) ; with static linking exception.
7559 (define-public ocaml-lacaml
7561 (name "ocaml-lacaml")
7567 (url "https://github.com/mmottl/lacaml")
7569 (file-name (git-file-name name version))
7572 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
7573 (modules '((guix build utils)))
7574 (snippet '(substitute* '("src/dune" "src/config/dune")
7575 (("-march=native") "")))))
7576 (properties '((tunable? . #t)))
7577 (build-system dune-build-system)
7579 `(#:tests? #f)) ; No test target.
7581 (list openblas lapack ocaml-base ocaml-stdio))
7582 (home-page "https://mmottl.github.io/lacaml/")
7584 "OCaml-bindings to BLAS and LAPACK")
7586 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
7587 LAPACK-library (Linear Algebra routines). It also contains many additional
7588 convenience functions for vectors and matrices.")
7589 (license license:lgpl2.1)))
7591 (define-public ocaml-cairo2
7593 (name "ocaml-cairo2")
7598 (url "https://github.com/Chris00/ocaml-cairo")
7600 (file-name (git-file-name name version))
7603 "1m0wh0s0sqjfa3mgq99lwk0dsg0bwxipaz93hq18m0lz5fqxib1m"))))
7604 (build-system dune-build-system)
7606 `(#:test-target "tests"))
7610 ("lablgtk" ,lablgtk)))
7613 (home-page "https://github.com/Chris00/ocaml-cairo")
7614 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
7615 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
7616 with support for multiple output devices. Currently supported output targets
7617 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
7618 and SVG file output.")
7619 (license license:lgpl3+)))
7621 (define-public ocaml-version
7623 (name "ocaml-version")
7629 (url "https://github.com/ocurrent/ocaml-version")
7630 (commit (string-append "v" version))))
7631 (file-name (git-file-name name version))
7634 "1c13zk1qna59m5z9jx7da3p7cxd48scpyk7zg7gi6gc6hx5hhjx8"))))
7635 (build-system dune-build-system)
7636 (arguments `(#:tests? #f)) ; no tests
7637 (properties '((upstream-name . "ocaml-version")))
7639 "https://github.com/ocurrent/ocaml-version")
7641 "Manipulate, parse and generate OCaml compiler version strings")
7643 "This library provides facilities to parse version numbers of the OCaml
7644 compiler, and enumerates the various official OCaml releases and configuration
7646 (license license:isc)))
7648 (define-public ocaml-mdx
7655 (url "https://github.com/realworldocaml/mdx")
7657 (file-name (git-file-name name version))
7660 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
7661 (build-system dune-build-system)
7664 (modify-phases %standard-phases
7665 (add-after 'unpack 'fix-test-format
7667 ;; cmdliner changed the format and the tests fail
7668 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
7669 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
7671 (("COMMAND") "[COMMAND]")
7672 (("\\.\\.\\.") "…")))))))
7684 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
7686 "https://github.com/realworldocaml/mdx")
7688 "Executable code blocks inside markdown files")
7690 "@code{ocaml-mdx} executes code blocks inside markdown files.
7691 There are (currently) two sub-commands, corresponding
7692 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
7693 and tests (@code{ocaml-mdx test}]).
7695 The pre-processor mode allows mixing documentation and code,
7696 and to practice @dfn{literate programming} using markdown and OCaml.
7698 The test mode ensures that shell scripts and OCaml fragments
7699 in the documentation always stays up-to-date.
7701 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
7702 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
7704 (license license:isc)))
7706 (define-public ocaml-mparser
7708 (name "ocaml-mparser")
7714 (url "https://github.com/murmour/mparser")
7716 (file-name (git-file-name name version))
7719 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
7720 (build-system dune-build-system)
7723 '(#:package "mparser"
7725 (home-page "https://github.com/murmour/mparser")
7726 (synopsis "Simple monadic parser combinator library")
7728 "This library implements a rather complete and efficient monadic parser
7729 combinator library similar to the Parsec library for Haskell by Daan Leijen and
7730 the FParsec library for FSharp by Stephan Tolksdorf.")
7731 ;; With static linking exception.
7732 (license license:lgpl2.1+)))
7734 (define-public ocaml-mparser-re
7736 (inherit ocaml-mparser)
7737 (name "ocaml-mparser-re")
7740 '(#:package "mparser-re"
7743 (list ocaml-mparser ocaml-re))
7744 (synopsis "MParser plugin for RE-based regular expressions")
7745 (description "This package provides RE-based regular expressions
7746 support for Mparser.")))
7748 (define-public ocaml-mparser-pcre
7750 (inherit ocaml-mparser)
7751 (name "ocaml-mparser-pcre")
7754 '(#:package "mparser-pcre"
7757 (list ocaml-mparser ocaml-pcre))
7758 (synopsis "MParser plugin for PCRE-based regular expressions")
7759 (description "This package provides PCRE-based regular expressions
7760 support for Mparser.")))
7762 (define-public lablgtk3
7769 (url "https://github.com/garrigue/lablgtk")
7771 (file-name (git-file-name name version))
7774 "11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
7775 (build-system dune-build-system)
7779 (modify-phases %standard-phases
7780 (add-before 'build 'make-writable
7782 (for-each (lambda (file)
7784 (find-files "." "."))))
7785 (add-before 'build 'set-version
7787 (substitute* "dune-project"
7788 (("\\(name lablgtk3\\)")
7789 (string-append "(name lablgtk3)\n(version " ,version ")"))))))))
7791 (list ocaml-cairo2))
7793 (list camlp5 gtk+ gtksourceview-3 gtkspell3))
7796 (home-page "https://github.com/garrigue/lablgtk")
7797 (synopsis "OCaml interface to GTK+3")
7798 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
7799 provides a strongly-typed object-oriented interface that is compatible with the
7800 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
7801 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
7802 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
7803 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
7804 ;; Version 2 only, with linking exception.
7805 (license license:lgpl2.0)))
7807 (define-public ocaml-reactivedata
7809 (name "ocaml-reactivedata")
7814 (url "https://github.com/ocsigen/reactiveData")
7816 (file-name (git-file-name name version))
7819 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
7821 `(#:tests? #f)) ;no tests
7822 (build-system dune-build-system)
7823 (properties `((upstream-name . "reactiveData")))
7826 (home-page "https://github.com/ocsigen/reactiveData")
7827 (synopsis "Declarative events and signals for OCaml")
7829 "React is an OCaml module for functional reactive programming (FRP). It
7830 provides support to program with time varying values: declarative events and
7831 signals. React doesn't define any primitive event or signal, it lets the
7832 client chooses the concrete timeline.")
7833 (license license:lgpl2.1+)))
7835 (define-public ocaml-uucd
7842 (uri (string-append "https://erratique.ch/software/uucd/releases/"
7843 "uucd-" version ".tbz"))
7846 "0fc737v5gj3339jx4x9xr096lxrpwvp6vaiylhavcvsglcwbgm30"))))
7847 (build-system ocaml-build-system)
7849 '(#:build-flags '("build" "--tests" "true")
7851 (modify-phases %standard-phases
7852 (delete 'configure))))
7856 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
7857 (home-page "https://erratique.ch/software/uucd")
7858 (synopsis "Unicode character database decoder for OCaml")
7859 (description "Uucd is an OCaml module to decode the data of the Unicode
7860 character database from its XML representation. It provides high-level (but
7861 not necessarily efficient) access to the data so that efficient
7862 representations can be extracted.")
7863 (license license:isc)))
7865 (define-public ocaml-uucp
7872 (uri (string-append "https://erratique.ch/software/uucp/releases/"
7873 "uucp-" version ".tbz"))
7876 "1yx9nih3d9prb9zizq8fzmmqylf24a6yifhf81h33znrj5xn1mpj"))))
7877 (build-system ocaml-build-system)
7879 '(#:build-flags '("build" "--tests" "true")
7881 (modify-phases %standard-phases
7882 (delete 'configure))))
7891 (home-page "https://erratique.ch/software/uucp")
7892 (synopsis "Unicode character properties for OCaml")
7893 (description "Uucp is an OCaml library providing efficient access to a
7894 selection of character properties of the Unicode character database.")
7895 (license license:isc)))
7897 (define-public ocaml-uuseg
7899 (name "ocaml-uuseg")
7904 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
7905 "uuseg-" version ".tbz"))
7908 "1g9zyzjkhqxgbb9mh3cgaawscwdazv6y8kdqvmy6yhnimmfqv25p"))))
7909 (build-system ocaml-build-system)
7911 '(#:build-flags '("build" "--tests" "true")
7913 (modify-phases %standard-phases
7914 (delete 'configure))))
7916 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
7918 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
7919 (home-page "https://erratique.ch/software/uuseg")
7920 (synopsis "Unicode text segmentation for OCaml")
7921 (description "Uuseg is an OCaml library for segmenting Unicode text. It
7922 implements the locale independent Unicode text segmentation algorithms to
7923 detect grapheme cluster, word and sentence boundaries and the Unicode line
7924 breaking algorithm to detect line break opportunities.
7926 The library is independent from any IO mechanism or Unicode text data
7927 structure and it can process text without a complete in-memory
7929 (license license:isc)))
7931 (define-public ocaml-fix
7934 (version "20220121")
7939 (url "https://gitlab.inria.fr/fpottier/fix")
7941 (file-name (git-file-name name version))
7944 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
7945 (build-system dune-build-system)
7949 (home-page "https://gitlab.inria.fr/fpottier/fix")
7950 (synopsis "Facilities for memoization and fixed points")
7951 (description "This package provides helpers with various constructions
7952 that involve memoization and recursion.")
7953 (license license:lgpl2.0)))
7955 (define-public ocaml-dune-build-info
7958 (name "ocaml-dune-build-info")
7959 (build-system dune-build-system)
7961 '(#:package "dune-build-info"
7962 ;; No separate test suite from dune.
7966 (synopsis "Embed build information inside an executable")
7967 (description "This package allows one to access information about how the
7968 executable was built, such as the version of the project at which it was built
7969 or the list of statically linked libraries with their versions. It supports
7970 reporting the version from the version control system during development to
7971 get an precise reference of when the executable was built.")))
7973 (define-public ocaml-either
7975 (name "ocaml-either")
7981 (url "https://github.com/mirage/either")
7983 (file-name (git-file-name name version))
7985 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
7986 (build-system dune-build-system)
7990 (home-page "https://github.com/mirage/either")
7991 (synopsis "Compatibility Either module")
7992 (description "This library is a compatibility module for the Either module
7993 defined in OCaml 4.12.0.")
7994 (license license:expat)))
7996 (define-public ocamlformat
7998 (name "ocamlformat")
8004 (url "https://github.com/ocaml-ppx/ocamlformat")
8006 (file-name (git-file-name name version))
8009 "10vy102a0isd8cg94y61pm4qfgy74d6003dw0qn0bdmbd19r5071"))))
8010 (build-system dune-build-system)
8012 '(#:package "ocamlformat"
8014 (modify-phases %standard-phases
8015 (add-after 'unpack 'fix-test-format
8017 (substitute* "test/cli/repl_file_errors.t/run.t"
8018 ((" ;;") ";;")))))))
8023 ocaml-dune-build-info
8036 (list git-minimal ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
8037 (home-page "https://github.com/ocaml-ppx/ocamlformat")
8038 (synopsis "Auto-formatter for OCaml code")
8039 (description "OCamlFormat is a tool to automatically format OCaml code in
8041 (license license:expat)))
8043 (define-public ocaml-bigstringaf
8045 (name "ocaml-bigstringaf")
8047 (home-page "https://github.com/inhabitedtype/bigstringaf")
8054 (file-name (git-file-name name version))
8057 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
8058 (build-system dune-build-system)
8060 '(#:test-target "."))
8062 (list ocaml-bigarray-compat))
8064 (list ocaml-alcotest pkg-config))
8066 "Bigstring intrinsics and fast blits based on memcpy/memmove")
8068 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
8069 not widely-known, sometimes misused, and so programs that use Bigstrings are
8070 slower than they have to be. And even if a library got that part right and
8071 exposed the intrinsics properly, the compiler doesn't have any fast blits
8072 between Bigstrings and other string-like types. @code{bigstringaf} provides
8073 these missing pieces.")
8074 (license license:bsd-3)))
8076 (define-public ocaml-trie
8080 (home-page "https://github.com/kandu/trie/")
8087 (file-name (git-file-name name version))
8089 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
8090 (build-system dune-build-system)
8092 '(#:tests? #f)) ;no tests
8093 (synopsis "Strict impure trie tree")
8095 "This module implements strict impure trie tree data structure for
8097 (license license:expat)))
8099 (define-public ocaml-mew
8103 (home-page "https://github.com/kandu/mew")
8110 (file-name (git-file-name name version))
8112 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
8113 (build-system dune-build-system)
8115 (list ocaml-result ocaml-trie))
8117 (list ocaml-ppx-expect))
8118 (synopsis "General modal editing engine generator")
8120 "This package provides the core modules of Modal Editing Witch, a general
8121 modal editing engine generator.")
8122 (license license:expat)))
8124 (define-public ocaml-mew-vi
8126 (name "ocaml-mew-vi")
8128 (home-page "https://github.com/kandu/mew_vi")
8135 (file-name (git-file-name name version))
8137 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
8138 (build-system dune-build-system)
8140 (list ocaml-mew ocaml-react))
8142 (list ocaml-ppx-expect))
8143 (properties `((upstream-name . "mew_vi")))
8144 (synopsis "Modal editing VI-like editing engine generator")
8145 (description "This module provides a vi-like modal editing engine
8147 (license license:expat)))
8149 (define-public ocaml-syntax-shims
8151 (name "ocaml-syntax-shims")
8153 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
8160 (file-name (git-file-name name version))
8163 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
8164 (build-system dune-build-system)
8166 `((upstream-name . "ocaml-syntax-shims")))
8168 "Backport new syntax to older OCaml versions")
8170 "This package backports new language features such as @code{let+} to older
8172 (license license:expat)))
8174 (define-public ocaml-angstrom
8176 (name "ocaml-angstrom")
8178 (home-page "https://github.com/inhabitedtype/angstrom")
8185 (file-name (git-file-name name version))
8188 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
8189 (build-system dune-build-system)
8191 ;; Only build the base angstrom package.
8192 '(#:package "angstrom"
8195 (list ocaml-bigstringaf))
8197 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
8198 (synopsis "Parser combinators built for speed and memory-efficiency")
8200 "Angstrom is a parser-combinator library that makes it easy to write
8201 efficient, expressive, and reusable parsers suitable for high-performance
8202 applications. It exposes monadic and applicative interfaces for composition,
8203 and supports incremental input through buffered and unbuffered interfaces.
8204 Both interfaces give the user total control over the blocking behavior of
8205 their application, with the unbuffered interface enabling zero-copy IO.
8206 Parsers are backtracking by default and support unbounded lookahead.")
8207 (license license:bsd-3)))
8209 (define-public ocaml-graphics
8211 (name "ocaml-graphics")
8213 (home-page "https://github.com/ocaml/graphics")
8220 (file-name (git-file-name name version))
8223 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
8224 (build-system dune-build-system)
8227 (synopsis "The OCaml graphics library")
8229 "The graphics library provides a set of portable drawing primitives.
8230 Drawing takes place in a separate window that is created when
8231 Graphics.open_graph is called. This library used to be distributed with OCaml
8233 (license license:lgpl2.1+)))
8235 (define-public ocaml-uri-sexp
8238 (name "ocaml-uri-sexp")
8240 '(#:package "uri-sexp"
8243 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
8244 (native-inputs (list ocaml-ounit))
8245 (synopsis "RFC3986 URI/URL parsing library")
8246 (description "This package adds S-exp support to @code{ocaml-uri}.")))
8248 (define-public ocaml-cohttp
8250 (name "ocaml-cohttp")
8256 (url "https://github.com/mirage/ocaml-cohttp")
8257 (commit (string-append "v" version))))
8258 (file-name (git-file-name name version))
8261 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
8262 (build-system dune-build-system)
8264 '(#:package "cohttp"
8265 #:test-target "cohttp_test/src"))
8275 (list ocaml-fmt ocaml-jsonm ocaml-alcotest))
8276 (home-page "https://github.com/mirage/ocaml-cohttp")
8277 (synopsis "OCaml library for HTTP clients and servers")
8279 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
8280 HTTP parser, and implementations using various asynchronous programming
8282 (license license:isc)))
8284 (define-public js-of-ocaml
8286 (name "js-of-ocaml")
8292 (url "https://github.com/ocsigen/js_of_ocaml")
8294 (file-name (git-file-name name version))
8296 (base32 "0iyhl9z57j53j2jvyqcwmxhbvy23l6g80aa0abmlgwam14yskspf"))))
8297 (build-system dune-build-system)
8299 `(#:tests? #f ;tests assume ocaml 4.13
8315 (list node ocaml-ppx-expect ocaml-num))
8316 (properties `((upstream-name . "js_of_ocaml")))
8317 (home-page "https://ocsigen.org/js_of_ocaml/")
8318 (synopsis "Compiler from OCaml bytecode to Javascript")
8319 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
8320 It makes it possible to run pure OCaml programs in JavaScript environment like
8321 browsers and Node.js.")
8322 (license license:lgpl2.1+)))
8324 (define-public ocaml-bibtex2html
8326 (name "ocaml-bibtex2html")
8331 (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
8332 (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
8333 (build-system ocaml-build-system)
8336 (modify-phases %standard-phases
8337 (add-after 'unpack 'patch-/bin/sh
8339 (substitute* "configure" (("/bin/sh") (which "bash")))
8340 (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
8344 ("texlive" ,(texlive-updmap.cfg
8345 (list texlive-fonts-ec texlive-preprint
8346 texlive-hyperref texlive-bibtex)))))
8349 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
8350 (synopsis "BibTeX to HTML translator")
8351 (description "This package allows you to produce, from a set of
8352 bibliography files in BibTeX format, a bibliography in HTML format.")
8353 (license license:gpl2)))