projects/guix·blob ruby-team · refs

9873 lines · 371.4 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013 Cyril Roelandt <[email protected]>
3;;; Copyright © 2014, 2015 Mark H Weaver <[email protected]>
4;;; Copyright © 2015 Andreas Enge <[email protected]>
5;;; Copyright © 2015 David Hashe <[email protected]>
6;;; Copyright © 2016 Eric Bavier <[email protected]>
7;;; Copyright © 2016 Jan Nieuwenhuizen <[email protected]>
8;;; Copyright © 2016, 2018-2020, 2023, 2024 Efraim Flashner <[email protected]>
9;;; Copyright © 2016-2024 Julien Lepiller <[email protected]>
10;;; Copyright © 2017 Ben Woodcroft <[email protected]>
11;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <[email protected]>
12;;; Copyright © 2018 Peter Kreye <[email protected]>
13;;; Copyright © 2018, 2019 Gabriel Hondet <[email protected]>
14;;; Copyright © 2018 Kei Kebreau <[email protected]>
15;;; Copyright © 2019 Ricardo Wurmus <[email protected]>
16;;; Copyright © 2020 Brett Gilio <[email protected]>
17;;; Copyright © 2020 Marius Bakke <[email protected]>
18;;; Copyright © 2020, 2021, 2025 Simon Tournier <[email protected]>
19;;; Copyright © 2020 divoplade <[email protected]>
20;;; Copyright © 2020, 2021, 2022 pukkamustard <[email protected]>
21;;; Copyright © 2021 aecepoglu <[email protected]>
22;;; Copyright © 2021 Sharlatan Hellseher <[email protected]>
23;;; Copyright © 2021 Xinglu Chen <[email protected]>
24;;; Copyright © 2021 Ivan Gankevich <[email protected]>
25;;; Copyright © 2021 Maxime Devos <[email protected]>
26;;; Copyright © 2021 Sarah Morgensen <[email protected]>
27;;; Copyright © 2022 Maxim Cournoyer <[email protected]>
28;;; Copyright © 2022 John Kehayias <[email protected]>
29;;; Copyright © 2022 Garek Dyszel <[email protected]>
30;;; Copyright © 2023 Csepp <[email protected]>
31;;; Copyright © 2023, 2024 Foundation Devices, Inc. <[email protected]>
32;;; Copyright © 2023 Arnaud DABY-SEESARAM <[email protected]>
33;;; Copyright © 2024 Sören Tempel <[email protected]>
34;;; Copyright © 2025 Jussi Timperi <[email protected]>
35;;;
36;;; This file is part of GNU Guix.
37;;;
38;;; GNU Guix is free software; you can redistribute it and/or modify it
39;;; under the terms of the GNU General Public License as published by
40;;; the Free Software Foundation; either version 3 of the License, or (at
41;;; your option) any later version.
42;;;
43;;; GNU Guix is distributed in the hope that it will be useful, but
44;;; WITHOUT ANY WARRANTY; without even the implied warranty of
45;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46;;; GNU General Public License for more details.
47;;;
48;;; You should have received a copy of the GNU General Public License
49;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
50
51(define-module (gnu packages ocaml)
52 #:use-module (gnu packages)
53 #:use-module (gnu packages algebra)
54 #:use-module (gnu packages autotools)
55 #:use-module (gnu packages base)
56 #:use-module (gnu packages bash)
57 #:use-module (gnu packages bison)
58 #:use-module (gnu packages boost)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages curl)
61 #:use-module (gnu packages emacs)
62 #:use-module (gnu packages emacs-xyz)
63 #:use-module (gnu packages compiler-tools)
64 #:use-module (gnu packages gcc)
65 #:use-module (gnu packages ghostscript)
66 #:use-module (gnu packages glib)
67 #:use-module (gnu packages gnome)
68 #:use-module (gnu packages gtk)
69 #:use-module (gnu packages guile)
70 #:use-module (gnu packages libevent)
71 #:use-module (gnu packages libffi)
72 #:use-module (gnu packages llvm)
73 #:use-module (gnu packages m4)
74 #:use-module (gnu packages maths)
75 #:use-module (gnu packages multiprecision)
76 #:use-module (gnu packages ncurses)
77 #:use-module (gnu packages node)
78 #:use-module (gnu packages parallel)
79 #:use-module (gnu packages pcre)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages protobuf)
83 #:use-module (gnu packages python)
84 #:use-module (gnu packages python-xyz)
85 #:use-module (gnu packages rsync)
86 #:use-module (gnu packages sdl)
87 #:use-module (gnu packages sqlite)
88 #:use-module (gnu packages tex)
89 #:use-module (gnu packages texinfo)
90 #:use-module (gnu packages time)
91 #:use-module (gnu packages tls)
92 #:use-module (gnu packages unicode)
93 #:use-module (gnu packages version-control)
94 #:use-module (gnu packages vim)
95 #:use-module (gnu packages virtualization)
96 #:use-module (gnu packages web)
97 #:use-module (gnu packages web-browsers)
98 #:use-module (gnu packages xml)
99 #:use-module (gnu packages xorg)
100 #:use-module (guix build-system dune)
101 #:use-module (guix build-system emacs)
102 #:use-module (guix build-system gnu)
103 #:use-module (guix build-system ocaml)
104 #:use-module (guix download)
105 #:use-module (guix gexp)
106 #:use-module (guix git-download)
107 #:use-module ((guix licenses) #:prefix license:)
108 #:use-module (guix packages)
109 #:use-module (guix svn-download)
110 #:use-module (guix utils)
111 #:use-module ((srfi srfi-1) #:hide (zip)))
112
113;; A shortcut for files from ocaml forge. Downloaded files are computed from
114;; their number, not their name.
115(define (ocaml-forge-uri name version file-number)
116 (string-append "https://forge.ocamlcore.org/frs/download.php/"
117 (number->string file-number) "/" name "-" version
118 ".tar.gz"))
119
120(define (janestreet-origin name version hash)
121 (origin (method url-fetch)
122 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
123 (version-major+minor version) "/files/"
124 name "-v" (version-major+minor+point version)
125 ".tar.gz"))
126 (sha256 (base32 hash))))
127
128(define-public camlboot
129 (let ((commit "45045d0afa82f7e9b7ea07314aab08be2d3cd64b")
130 (revision "1"))
131 (package
132 (name "camlboot")
133 (version (git-version "0.0.0" revision commit))
134 (source (origin
135 (method git-fetch)
136 (uri (git-reference
137 (url "https://github.com/Ekdohibs/camlboot")
138 (commit commit)
139 (recursive? #t)))
140 (file-name (git-file-name name version))
141 (sha256
142 (base32
143 "1f5gl3hzvixbgk0v3kmxiyn432znyy3jh5fa65cfzcaxzgfv1i1c"))
144 (patches (search-patches
145 "camlboot-dynamically-allocate-stack-signal.patch"))
146 (modules '((guix build utils)))
147 (snippet
148 `(begin
149 ;; Remove bootstrap binaries and pre-generated source files,
150 ;; to ensure we actually bootstrap properly.
151 (for-each delete-file (find-files "ocaml-src" "^.depend$"))
152 (delete-file "ocaml-src/boot/ocamlc")
153 (delete-file "ocaml-src/boot/ocamllex")
154 ;; Ensure writable
155 (for-each
156 (lambda (file)
157 (chmod file (logior (stat:mode (stat file)) #o200)))
158 (find-files "." "."))))))
159 (build-system gnu-build-system)
160 (arguments
161 `(#:make-flags (list "_boot/ocamlc") ; build target
162 #:tests? #f ; no tests
163 #:phases
164 (modify-phases %standard-phases
165 (delete 'configure)
166 (add-after 'unpack 'patch-makefile
167 (lambda _
168 (substitute*
169 ;; Problems during the configure phase tend to cause build
170 ;; failures ("<feature> not implemented") after hours of
171 ;; compile time. Run the configure script verbosely to make
172 ;; these problems more visible.
173 "Makefile"
174 (("bash configure") "bash configure --verbose"))))
175 (add-after 'unpack 'patch-cflags
176 (lambda _
177 (substitute*
178 "ocaml-src/configure"
179 ;; Disable error for redefined macro `sigsetjmp`
180 (("-Wall -Werror") "-Wall")
181 ;; Disable strict checks in GCC 14
182 (("\"-O2 -fno-strict-aliasing -fwrapv\"")
183 (string-append "\"-O2 -fno-strict-aliasing -fwrapv "
184 "-Wno-incompatible-pointer-types "
185 "-Wno-implicit-function-declaration\"")))
186 ;; The GCC 14 flags above apply to the source build itself but
187 ;; not when calling config helper scripts, so update these too.
188 (substitute*
189 '("ocaml-src/config/auto-aux/hasgot"
190 "ocaml-src/config/auto-aux/hasgot2")
191 (("[$]cflags")
192 (string-append "$cflags -Wno-incompatible-pointer-types "
193 "-Wno-implicit-function-declaration")))))
194 (add-before 'build 'no-autocompile
195 (lambda _
196 ;; prevent a guile warning
197 (setenv "GUILE_AUTO_COMPILE" "0")))
198 (replace 'install
199 (lambda* (#:key outputs #:allow-other-keys)
200 (let* ((out (assoc-ref outputs "out"))
201 (bin (string-append out "/bin")))
202 (mkdir-p bin)
203 (install-file "_boot/ocamlc" bin)
204 (rename-file "miniml/interp/lex.byte" "ocamllex")
205 (install-file "ocamllex" bin)))))))
206 (native-inputs
207 (list guile-3.0))
208 (properties
209 ;; 10 hours, mostly for arm, more than 1 expected even on x86_64
210 `((max-silent-time . 36000)))
211 (home-page "https://github.com/Ekdohibs/camlboot")
212 (synopsis "OCaml source bootstrap")
213 (description "OCaml is written in OCaml. Its sources contain a pre-compiled
214bytecode version of @command{ocamlc} and @command{ocamllex} that are used to
215build the next version of the compiler. Camlboot implements a bootstrap for
216the OCaml compiler and provides a bootstrapped equivalent to these files.
217
218It contains a compiler for a small subset of OCaml written in Guile Scheme,
219an interpreter for OCaml written in that subset and a manually-written lexer
220for OCaml. These elements eliminate the need for the binary bootstrap in
221OCaml and can effectively bootstrap OCaml 4.07.
222
223This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.")
224 (license license:expat))))
225
226;; WARNING: this older release of the compiler has known vulnerabilities and
227;; is NOT supported. It remains in the distribution only to aid in building a
228;; bootstrap chain.
229;;
230;; For example, all versions in the 5.x series < 5.4.1 are vulnerable to
231;; CVE-2026-28364:
232;; https://github.com/ocaml/security-advisories/blob/main/advisories/2026/OSEC-2026-01.md
233(define-public ocaml-5.0
234 (package
235 (name "ocaml")
236 (version "5.0.0")
237 (source (origin
238 (method git-fetch)
239 (uri (git-reference
240 (url "https://github.com/ocaml/ocaml")
241 (commit version)))
242 (file-name (git-file-name name version))
243 (sha256
244 (base32
245 "1p0p8wldrnbr61wfy3x4122017g4k5gjvfwlg3mvlqn8r2fxn2m5"))))
246 (build-system gnu-build-system)
247 (native-search-paths
248 (list (search-path-specification
249 (variable "OCAMLPATH")
250 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
251 (search-path-specification
252 (variable "CAML_LD_LIBRARY_PATH")
253 (files (list "lib/ocaml/site-lib/stubslibs"
254 "lib/ocaml/site-lib/stublibs")))))
255 (native-inputs
256 (list parallel perl pkg-config))
257 (inputs
258 (list libx11 libiberty ;needed for objdump support
259 zlib)) ;also needed for objdump support
260 (arguments
261 `(#:configure-flags '("--enable-ocamltest")
262 #:test-target "tests"
263 ;; This doesn't have the desired effect and makes test runs less
264 ;; stable. See https://codeberg.org/guix/guix/pulls/2933.
265 #:parallel-tests? #f
266 #:make-flags '("defaultentry")
267 #:phases
268 (modify-phases %standard-phases
269 (add-after 'unpack 'enable-parallel-tests
270 (lambda _
271 ;; Patch the `tests` build target to enable a special parallel
272 ;; execution mode based on GNU Parallel.
273 (substitute* "Makefile"
274 (("-C testsuite all") "-C testsuite parallel"))))
275 (add-after 'unpack 'patch-/bin/sh-references
276 (lambda* (#:key inputs #:allow-other-keys)
277 (let* ((sh (search-input-file inputs "/bin/sh"))
278 (quoted-sh (string-append "\"" sh "\"")))
279 (with-fluids ((%default-port-encoding #f))
280 (for-each
281 (lambda (file)
282 (substitute* file
283 (("\"/bin/sh\"")
284 (begin
285 (format (current-error-port) "\
286patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
287 file quoted-sh)
288 quoted-sh))))
289 (find-files "." "\\.ml$")))))))))
290 (home-page "https://ocaml.org/")
291 (synopsis "The OCaml programming language")
292 (description
293 "OCaml is a general purpose industrial-strength programming language with
294an emphasis on expressiveness and safety. Developed for more than 20 years at
295Inria it benefits from one of the most advanced type systems and supports
296functional, imperative and object-oriented styles of programming.")
297 ;; The compiler is distributed under qpl1.0 with a change to choice of
298 ;; law: the license is governed by the laws of France. The library is
299 ;; distributed under lgpl2.0.
300 (license (list license:qpl license:lgpl2.0))))
301
302;; WARNING: this older release of the compiler has known vulnerabilities and
303;; is NOT supported. It remains in the distribution only to aid in building a
304;; bootstrap chain.
305(define-public ocaml-5.3
306 (package
307 (inherit ocaml-5.0)
308 (version "5.3.0")
309 (source (origin
310 (method git-fetch)
311 (uri (git-reference
312 (url "https://github.com/ocaml/ocaml")
313 (commit version)))
314 (file-name (git-file-name "ocaml" version))
315 (sha256
316 (base32
317 "05jhy9zn53v12rn3sg3vllqf5blv1gp7f06803npimc58crxy6rv"))))))
318
319(define-public ocaml-5.4
320 (package
321 (inherit ocaml-5.0)
322 (version "5.4.1")
323 (source (origin
324 (method git-fetch)
325 (uri (git-reference
326 (url "https://github.com/ocaml/ocaml")
327 (commit version)))
328 (file-name (git-file-name "ocaml" version))
329 (sha256
330 (base32
331 "0bpfwdfc7j53hb57arb6nxdj0ahkcxzkbj2ax90nvkjcyr96xcr3"))))))
332
333(define-public ocaml-4.14
334 (package
335 (name "ocaml")
336 (version "4.14.3")
337 (source (origin
338 (method url-fetch)
339 (uri (string-append
340 "https://caml.inria.fr/pub/distrib/ocaml-"
341 (version-major+minor version)
342 "/ocaml-" version ".tar.xz"))
343 (sha256
344 (base32
345 "0sdh7qs5s485657a7dvdzz5xmzp772ffywprdjzsg7mbzfw87md5"))))
346 (build-system gnu-build-system)
347 (native-search-paths
348 (list (search-path-specification
349 (variable "OCAMLPATH")
350 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
351 (search-path-specification
352 (variable "CAML_LD_LIBRARY_PATH")
353 (files (list "lib/ocaml/site-lib/stubslibs"
354 "lib/ocaml/site-lib/stublibs")))))
355 (native-inputs
356 (list perl pkg-config))
357 (inputs
358 (list libx11 libiberty ;needed for objdump support
359 zlib)) ;also needed for objdump support
360 (arguments
361 `(#:configure-flags '("--enable-ocamltest")
362 #:test-target "tests"
363 #:make-flags '("world.opt")
364 #:phases
365 (modify-phases %standard-phases
366 (add-after 'unpack 'patch-/bin/sh-references
367 (lambda* (#:key inputs #:allow-other-keys)
368 (let* ((sh (search-input-file inputs "/bin/sh"))
369 (quoted-sh (string-append "\"" sh "\"")))
370 (with-fluids ((%default-port-encoding #f))
371 (for-each
372 (lambda (file)
373 (substitute* file
374 (("\"/bin/sh\"")
375 (begin
376 (format (current-error-port) "\
377patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
378 file quoted-sh)
379 quoted-sh))))
380 (find-files "." "\\.ml$")))))))))
381 (home-page "https://ocaml.org/")
382 (synopsis "The OCaml programming language")
383 (description
384 "OCaml is a general purpose industrial-strength programming language with
385an emphasis on expressiveness and safety. Developed for more than 20 years at
386Inria it benefits from one of the most advanced type systems and supports
387functional, imperative and object-oriented styles of programming.")
388 ;; The compiler is distributed under qpl1.0 with a change to choice of
389 ;; law: the license is governed by the laws of France. The library is
390 ;; distributed under lgpl2.0.
391 (license (list license:qpl license:lgpl2.0))))
392
393;; WARNING: this older release of the compiler has known vulnerabilities and
394;; is NOT supported. It remains in the distribution only to aid in building a
395;; bootstrap chain.
396;;
397;; For example, all versions in the 4.x series < 4.14.3 are vulnerable to
398;; CVE-2026-28364:
399;; https://github.com/ocaml/security-advisories/blob/main/advisories/2026/OSEC-2026-01.md
400(define-public ocaml-4.09
401 (package
402 (inherit ocaml-4.14)
403 (version "4.09.0")
404 (source (origin
405 (method url-fetch)
406 (uri (string-append
407 "https://caml.inria.fr/pub/distrib/ocaml-"
408 (version-major+minor version)
409 "/ocaml-" version ".tar.xz"))
410 (patches (search-patches
411 "ocaml-4.09-multiple-definitions.patch"
412 "ocaml-4.09-dynamically-allocate-signal-stack.patch"))
413 (sha256
414 (base32
415 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))
416 (arguments
417 `(#:phases
418 (modify-phases %standard-phases
419 (add-after 'unpack 'patch-/bin/sh-references
420 (lambda* (#:key inputs #:allow-other-keys)
421 (let* ((sh (search-input-file inputs "/bin/sh"))
422 (quoted-sh (string-append "\"" sh "\"")))
423 (with-fluids ((%default-port-encoding #f))
424 (for-each
425 (lambda (file)
426 (substitute* file
427 (("\"/bin/sh\"")
428 (begin
429 (format (current-error-port) "\
430patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
431 file quoted-sh)
432 quoted-sh))))
433 (find-files "." "\\.ml$"))))))
434 (replace 'build
435 (lambda _
436 (invoke "make" "-j" (number->string (parallel-job-count))
437 "world.opt")))
438 (replace 'check
439 (lambda _
440 (with-directory-excursion "testsuite"
441 (invoke "make" "all")))))))))
442
443;; This package is a bootstrap package for ocaml-4.07. It builds from camlboot,
444;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
445;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files
446;; that we otherwise remove for bootstrap purposes.
447(define ocaml-4.07-boot
448 (package
449 (inherit ocaml-4.09)
450 (name "ocaml-boot")
451 (version "4.07.1")
452 (source (origin
453 (method url-fetch)
454 (uri (string-append
455 "https://caml.inria.fr/pub/distrib/ocaml-"
456 (version-major+minor version)
457 "/ocaml-" version ".tar.xz"))
458 (sha256
459 (base32
460 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))
461 (patches (search-patches
462 "ocaml-multiple-definitions.patch"
463 "ocaml-4.07-dynamically-allocate-signal-stack.patch"))
464 (modules '((guix build utils)))
465 (snippet
466 `(begin
467 ;; Remove bootstrap binaries and pre-generated source files,
468 ;; to ensure we actually bootstrap properly.
469 (for-each delete-file (find-files "." "^.depend$"))
470 (delete-file "boot/ocamlc")
471 (delete-file "boot/ocamllex")))))
472 (arguments
473 `(#:tests? #f
474 #:phases
475 (modify-phases %standard-phases
476 (add-before 'configure 'copy-bootstrap
477 (lambda* (#:key inputs #:allow-other-keys)
478 (let ((camlboot (assoc-ref inputs "camlboot")))
479 (copy-file (string-append camlboot "/bin/ocamllex") "boot/ocamllex")
480 (copy-file (string-append camlboot "/bin/ocamlc") "boot/ocamlc")
481 (chmod "boot/ocamllex" #o755)
482 (chmod "boot/ocamlc" #o755))))
483 (replace 'configure
484 (lambda* (#:key outputs #:allow-other-keys)
485 (let* ((out (assoc-ref outputs "out"))
486 (mandir (string-append out "/share/man")))
487 (invoke "./configure"
488 "--prefix" out
489 "--mandir" mandir))))
490 (replace 'build
491 (lambda* (#:key parallel-build? #:allow-other-keys)
492 (define* (make . args)
493 (apply invoke "make"
494 (append (if parallel-build?
495 `("-j" ,(number->string (parallel-job-count)))
496 '())
497 args)))
498 ;; create empty .depend files because they are included by various
499 ;; Makefiles, and they have no rule to generate them.
500 (invoke "touch" ".depend" "stdlib/.depend" "byterun/.depend"
501 "tools/.depend" "lex/.depend" "asmrun/.depend"
502 "debugger/.depend" "ocamltest/.depend" "ocamldoc/.depend"
503 "ocamldoc/stdlib_non_prefixed/.depend"
504 "otherlibs/bigarray/.depend" "otherlibs/graph/.depend"
505 "otherlibs/raw_spacetime_lib/.depend" "otherlibs/str/.depend"
506 "otherlibs/systhreads/.depend" "otherlibs/threads/.depend"
507 "otherlibs/unix/.depend" "otherlibs/win32unix/.depend")
508 ;; We cannot build ocamldep until we have created all the .depend
509 ;; files, so replace it with ocamlc -depend.
510 (substitute* "tools/Makefile"
511 (("\\$\\(CAMLRUN\\) ./ocamldep") "../boot/ocamlc -depend"))
512 (substitute* '("otherlibs/graph/Makefile"
513 "otherlibs/systhreads/Makefile"
514 "otherlibs/threads/Makefile"
515 "otherlibs/unix/Makefile")
516 (("\\$\\(CAMLRUN\\) ../../tools/ocamldep")
517 "../../boot/ocamlc -depend"))
518 (substitute* '("otherlibs/bigarray/Makefile"
519 "otherlibs/raw_spacetime_lib/Makefile"
520 "otherlibs/str/Makefile"
521 "otherlibs/win32unix/Makefile")
522 (("\\$\\(CAMLRUN\\) \\$\\(ROOTDIR\\)/tools/ocamldep")
523 "../../boot/ocamlc -depend"))
524 ;; Ensure we copy needed file, so we can generate a proper .depend
525 (substitute* "ocamldoc/Makefile"
526 (("include Makefile.unprefix")
527 "include Makefile.unprefix
528depend: $(STDLIB_MLIS) $(STDLIB_DEPS)"))
529 ;; Generate required tools for `alldepend'
530 (make "-C" "byterun" "depend")
531 (make "-C" "byterun" "all")
532 (copy-file "byterun/ocamlrun" "boot/ocamlrun")
533 (make "ocamlyacc")
534 (copy-file "yacc/ocamlyacc" "boot/ocamlyacc")
535 (make "-C" "stdlib" "sys.ml")
536 (make "-C" "stdlib" "CAMLDEP=../boot/ocamlc -depend" "depend")
537 ;; Build and copy files later used by `tools'
538 (make "-C" "stdlib" "COMPILER="
539 "CAMLC=../boot/ocamlc -use-prims ../byterun/primitives"
540 "all")
541 (for-each
542 (lambda (file)
543 (copy-file file (string-append "boot/" (basename file))))
544 (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo" "stdlib/camlheader"
545 (find-files "stdlib" ".*.cmi$")))
546 (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a")
547 ;; required for ocamldoc/stdlib_non_prefixed
548 (make "parsing/parser.mli")
549 ;; required for dependencies
550 (make "-C" "tools"
551 "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims ../byterun/primitives -I .."
552 "make_opcodes" "cvt_emit")
553 ;; generate all remaining .depend files
554 (make "alldepend"
555 (string-append "ocamllex=" (getcwd) "/boot/ocamlrun "
556 (getcwd) "/boot/ocamllex")
557 (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend")
558 (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc -depend")
559 (string-append "ocamldep=" (getcwd) "/boot/ocamlc -depend"))
560 ;; Build ocamllex
561 (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims byterun/primitives"
562 "ocamlc")
563 ;; Build ocamlc
564 (make "-C" "lex"
565 "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I ../boot -use-prims ../byterun/primitives"
566 "all")))
567 (replace 'install
568 (lambda* (#:key outputs #:allow-other-keys)
569 (let* ((out (assoc-ref outputs "out"))
570 (bin (string-append out "/bin"))
571 (depends (string-append out "/share/depends")))
572 (mkdir-p bin)
573 (mkdir-p depends)
574 (install-file "ocamlc" bin)
575 (install-file "lex/ocamllex" bin)
576 (for-each
577 (lambda (file)
578 (let ((dir (string-append depends "/" (dirname file))))
579 (mkdir-p dir)
580 (install-file file dir)))
581 (find-files "." "^\\.depend$"))))))))
582 (native-inputs
583 `(("camlboot" ,camlboot)
584 ("perl" ,perl)
585 ("pkg-config" ,pkg-config)))))
586
587;; WARNING: this older release of the compiler has known vulnerabilities and
588;; is NOT supported. It remains in the distribution only to aid in building a
589;; bootstrap chain.
590(define-public ocaml-4.07
591 (package
592 (inherit ocaml-4.07-boot)
593 (name "ocaml")
594 (arguments
595 (substitute-keyword-arguments (package-arguments ocaml-4.09)
596 ((#:phases phases)
597 `(modify-phases ,phases
598 (add-after 'unpack 'patch-cflags
599 (lambda _
600 (substitute*
601 "configure"
602 ;; Disable error for redefined macro `sigsetjmp`
603 (("-Wall -Werror") "-Wall")
604 ;; Disable strict checks in GCC 14
605 (("\"-O2 -fno-strict-aliasing -fwrapv\"")
606 (string-append "\"-O2 -fno-strict-aliasing -fwrapv "
607 "-Wno-incompatible-pointer-types "
608 "-Wno-implicit-function-declaration\"")))
609 ;; The GCC 14 flags above apply to the source build
610 ;; itself but not when calling config helper scripts, so
611 ;; update these too.
612 (substitute*
613 '("config/auto-aux/hasgot"
614 "config/auto-aux/hasgot2")
615 (("[$]cflags")
616 (string-append "$cflags -Wno-incompatible-pointer-types "
617 "-Wno-implicit-function-declaration")))))
618 (add-before 'configure 'copy-bootstrap
619 (lambda* (#:key inputs #:allow-other-keys)
620 (let ((ocaml (assoc-ref inputs "ocaml")))
621 (copy-file (string-append ocaml "/bin/ocamllex") "boot/ocamllex")
622 (copy-file (string-append ocaml "/bin/ocamlc") "boot/ocamlc")
623 (chmod "boot/ocamllex" #o755)
624 (chmod "boot/ocamlc" #o755)
625 (let ((rootdir (getcwd)))
626 (with-directory-excursion (string-append ocaml "/share/depends")
627 (for-each
628 (lambda (file)
629 (copy-file file (string-append rootdir "/" file)))
630 (find-files "." ".")))))))
631 (replace 'configure
632 (lambda* (#:key outputs #:allow-other-keys)
633 (let* ((out (assoc-ref outputs "out"))
634 (mandir (string-append out "/share/man")))
635 ;; Custom configure script doesn't recognize
636 ;; --prefix=<PREFIX> syntax (with equals sign).
637 (invoke "./configure"
638 "--prefix" out
639 "--mandir" mandir))))))))
640 (native-inputs
641 `(("ocaml" ,ocaml-4.07-boot)
642 ("perl" ,perl)
643 ("pkg-config" ,pkg-config)))))
644
645(define-public ocaml ocaml-4.14)
646
647(define-public ocamlbuild
648 (package
649 (name "ocamlbuild")
650 (version "0.14.2")
651 (source
652 (origin
653 (method git-fetch)
654 (uri (git-reference
655 (url "https://github.com/ocaml/ocamlbuild")
656 (commit version)))
657 (file-name (git-file-name name version))
658 (sha256
659 (base32 "16q8s22msyfq66i1sbz99wj04a9x9ad95x458ixxacxsv0qqh2j0"))))
660 (build-system ocaml-build-system)
661 (arguments
662 `(#:make-flags
663 ,#~(list (string-append "OCAMLBUILD_PREFIX=" #$output)
664 (string-append "OCAMLBUILD_BINDIR=" #$output "/bin")
665 (string-append "OCAMLBUILD_LIBDIR=" #$output
666 "/lib/ocaml/site-lib")
667 (string-append "OCAMLBUILD_MANDIR=" #$output "/share/man"))
668 #:phases
669 (modify-phases %standard-phases
670 (delete 'configure))
671 ; some failures because of changes in OCaml's error message formatting
672 #:tests? #f))
673 (home-page "https://github.com/ocaml/ocamlbuild")
674 (synopsis "OCaml build tool")
675 (description "OCamlbuild is a generic build tool, that has built-in rules
676for building OCaml library and programs.")
677 (license license:lgpl2.1+)))
678
679(define-public camlidl
680 (package
681 (name "camlidl")
682 (version "1.09")
683 (source
684 (origin
685 (method git-fetch)
686 (uri (git-reference
687 (url "https://github.com/xavierleroy/camlidl")
688 (commit "camlidl109")))
689 (sha256
690 (base32 "0zrkaq7fk23b2b9vg6jwdjx7l0hdqp4synbbrw1zcg8gjf6n3c80"))
691 (file-name (git-file-name name version))))
692 (build-system gnu-build-system)
693 (arguments
694 `(#:tests? #f ;; No test suite
695 #:make-flags
696 (list
697 (string-append
698 "BINDIR=" (assoc-ref %outputs "out") "/bin")
699 (string-append
700 "OCAMLLIB=" (assoc-ref %outputs "out") "/lib/ocaml/site-lib/camlidl"))
701 #:phases
702 (modify-phases %standard-phases
703 (delete 'configure)
704 (replace 'build
705 (lambda _
706 (copy-file "config/Makefile.unix" "config/Makefile")
707 ;; Note: do not pass '-jN' as this appears to not be
708 ;; parallel-safe (race condition related to libcamlidl.a).
709 (invoke "make" "all")
710 #t))
711 (add-before 'install 'create-target-directories
712 (lambda* (#:key outputs #:allow-other-keys)
713 (let ((out (string-append (assoc-ref outputs "out"))))
714 (mkdir-p
715 (string-append out "/bin"))
716 (mkdir-p
717 (string-append out "/lib/ocaml/site-lib/camlidl/stublibs"))
718 (mkdir-p
719 (string-append out "/lib/ocaml/site-lib/camlidl/caml")))
720 #t))
721 (add-after 'install 'install-meta
722 (lambda* (#:key outputs #:allow-other-keys)
723 (let ((out (assoc-ref outputs "out")))
724 (with-output-to-file
725 (string-append out "/lib/ocaml/site-lib/camlidl/META")
726 (lambda _
727 (display
728 (string-append
729 "description = \"Stub code generator for OCaml/C interface\"
730version = \"" ,version "\"
731directory = \"^\"
732archive(byte) = \"com.cma\"
733archive(native) = \"com.cmxa\"")))))
734 #t)))))
735 (native-inputs
736 (list ocaml))
737 (home-page "https://github.com/xavierleroy/camlidl")
738 (synopsis "Stub code generator for OCaml/C interface")
739 (description
740 "Camlidl is a stub code generator for Objective Caml. It generates stub
741code for interfacing Caml with C from an IDL description of the C functions.")
742 (license license:lgpl2.1)))
743
744(define-public ocaml-extlib
745 (package
746 (name "ocaml-extlib")
747 (version "1.8.0")
748 (source (origin
749 (method url-fetch)
750 (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
751 "extlib-" version ".tar.gz"))
752 (sha256
753 (base32
754 "0w2xskv8hl0fwjri68q5bpf6n36ab4fp1q08zkfqw2i807q7fhln"))))
755 (build-system dune-build-system)
756 (arguments
757 (list #:package "extlib"))
758 (native-inputs
759 (list ocaml-cppo))
760 (home-page "https://github.com/ygrek/ocaml-extlib")
761 (synopsis "Complete and small extension for OCaml standard library")
762 (description "This library adds new functions to OCaml standard library
763modules, modifies some functions in order to get better performances or
764safety (tail-recursive) and also provides new modules which should be useful
765for day to day programming.")
766 ;; With static-linking exception
767 (license license:lgpl2.1+)))
768
769(define-public ocaml-camlpdf
770 (package
771 (name "ocaml-camlpdf")
772 (version "2.8.1")
773 (source
774 (origin
775 (method git-fetch)
776 (uri (git-reference
777 (url "https://github.com/johnwhitington/camlpdf")
778 (commit (string-append "v" version))))
779 (file-name (git-file-name name version))
780 (sha256
781 (base32 "1cbqgwh62cqnsbax4k4iv9gb63k1v545izmbffxj8gj1q6sm0k34"))))
782 (build-system ocaml-build-system)
783 (arguments
784 (list
785 #:tests? #f ;no tests
786 #:make-flags
787 #~(list (string-append "CC=" #$(cc-for-target)))
788 #:phases
789 #~(modify-phases %standard-phases
790 (delete 'configure)
791 (add-after 'unpack 'patch-makefile-shell
792 (lambda _
793 (patch-makefile-SHELL "OCamlMakefile")))
794 (add-after 'install 'install-doc
795 (lambda _
796 (let ((doc (string-append #$output "/share/doc/"
797 #$name "-" #$version)))
798 (copy-recursively "doc/camlpdf/html"
799 (string-append doc "/html"))))))))
800 (home-page "https://github.com/johnwhitington/camlpdf")
801 (synopsis "OCaml library for PDF file manipulation")
802 (description
803 "CamlPDF is an OCaml library that provides functionality for reading,
804writing, and modifying PDF files. It serves as the foundation for the
805@command{cpdf} command-line tool and various API bindings.")
806 (license license:lgpl2.1+)))
807
808(define-public ocaml-cudf
809 (package
810 (name "ocaml-cudf")
811 (version "0.10")
812 (source (origin
813 (method git-fetch)
814 (uri (git-reference
815 (url "https://gitlab.com/irill/cudf")
816 (commit (string-append "v" version))))
817 (file-name (git-file-name name version))
818 (sha256
819 (base32
820 "1lvrmpscbk1kjv5ag5bzlzv520xk5zw2haf6q7chvz98gcm9g0hk"))))
821 (build-system dune-build-system)
822 (propagated-inputs (list ocaml-extlib))
823 (native-inputs (list ocaml-ounit2))
824 (home-page "https://www.mancoosi.org/cudf/")
825 (synopsis "CUDF library (part of the Mancoosi tools)")
826 (description
827 "@acronym{CUDF, Common Upgradeability Description Format} is a format for
828describing upgrade scenarios in package-based software distributions.")
829 ;; With static-linking exception
830 (license license:lgpl2.1+)))
831
832(define-public ocaml-mccs
833 (package
834 (name "ocaml-mccs")
835 (version "1.1+19")
836 (source
837 (origin
838 (method git-fetch)
839 (uri (git-reference
840 (url "https://github.com/AltGr/ocaml-mccs")
841 (commit version)))
842 (file-name (git-file-name name version))
843 (sha256
844 (base32 "1x1y5rhj4f0xakbgfn9f90a9xy09v99p8mc42pbnam5kghyjmxy6"))))
845 (build-system dune-build-system)
846 (propagated-inputs (list ocaml-cudf))
847 (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
848 (synopsis "Upgrade path problem solver")
849 (description
850 "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
851Mccs take as input a CUDF problem and computes the best solution according to
852a set of criteria. It relies on a Integer Programming solver or a
853Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
854underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
855 (license (list license:bsd-3 license:gpl3+
856 ;; With static-linking exception
857 license:lgpl2.1+))))
858
859(define-public ocaml-dose3
860 (package
861 (name "ocaml-dose3")
862 (version "7.0.0")
863 (source (origin
864 (method git-fetch)
865 (uri (git-reference
866 (url "https://gitlab.com/irill/dose3")
867 (commit version)))
868 (file-name (git-file-name name version))
869 (sha256
870 (base32
871 "0hcjh68svicap7j9bghgkp49xa12qhxa1pygmrgc9qwm0m4dhirb"))))
872 (build-system dune-build-system)
873 (arguments `(#:package "dose3"))
874 (propagated-inputs (list ocaml-extlib
875 ocaml-base64-boot
876 ocaml-cudf
877 ocaml-graph
878 ocaml-re
879 ocaml-stdlib-shims))
880 (native-inputs (list ocaml-ounit))
881 (home-page "https://www.mancoosi.org/software/")
882 (synopsis "Package distribution management framework")
883 (description "Dose3 is a framework made of several OCaml libraries for
884managing distribution packages and their dependencies. Though not tied to
885any particular distribution, dose3 constitutes a pool of libraries which
886enable analyzing packages coming from various distributions. Besides basic
887functionalities for querying and setting package properties, dose3 also
888implements algorithms for solving more complex problems such as monitoring
889package evolutions, correct and complete dependency resolution and
890repository-wide uninstallability checks.")
891 ;; with static-linking exception
892 (license license:lgpl2.1+)))
893
894(define-public ocaml-down
895 (package
896 (name "ocaml-down")
897 (version "0.1.0")
898 (source
899 (origin
900 (method url-fetch)
901 (uri (string-append "https://erratique.ch/software/down/releases/down-"
902 version ".tbz"))
903 (sha256
904 (base32
905 "1q467y6qz96ndiybpmggdcnrcip49kxw2i93pb54j1xjzkv1vnl1"))))
906 (build-system ocaml-build-system)
907 (arguments
908 `(#:tests? #f ;no tests
909 #:phases
910 (modify-phases %standard-phases
911 (delete 'configure))
912 #:build-flags
913 ,#~(list "build" "--lib-dir"
914 (string-append #$output "/lib/ocaml/site-lib"))))
915 (native-inputs
916 (list ocaml-findlib ocamlbuild ocaml-topkg opam-installer))
917 (home-page "https://erratique.ch/software/down")
918 (synopsis "OCaml toplevel (REPL) upgrade")
919 (description "Down is an unintrusive user experience upgrade for the
920@command{ocaml} toplevel (REPL).
921
922Simply load the zero dependency @code{down} library in the @command{ocaml}
923toplevel and you get line edition, history, session support and identifier
924completion and documentation with @command{ocp-index}.
925
926Add this to your @file{~/.ocamlinit}:
927
928@example
929#use \"down.top\"
930@end example
931
932You may also need to add this to your @file{~/.ocamlinit} and declare
933the environment variable @code{OCAML_TOPLEVEL_PATH}:
934
935@example
936let () =
937 try Topdirs.dir_directory (Sys.getenv \"OCAML_TOPLEVEL_PATH\")
938 with Not_found -> ()
939@end example
940
941OR
942
943@example
944let () = String.split_on_char ':' (Sys.getenv \"OCAMLPATH\")
945 |> List.filter (fun x -> Filename.check_suffix x \"/site-lib\")
946 |> List.map (fun x -> x ^ \"/toplevel\")
947 (* remove the line below if you don't want to see the text
948 every time you start the toplevel *)
949 |> List.map (fun x -> Printf.printf \"adding directory %s\\n\" x; x)
950 |> List.iter Topdirs.dir_directory;;
951@end example")
952 (license license:isc)))
953
954(define-public ocaml-opam-file-format
955 (package
956 (name "ocaml-opam-file-format")
957 (version "2.1.4")
958 (source (origin
959 (method git-fetch)
960 (uri (git-reference
961 (url "https://github.com/ocaml/opam-file-format")
962 (commit version)))
963 (file-name (git-file-name name version))
964 (sha256
965 (base32
966 "0dmnb1mqdy4913f9ma446hi5m99q7hfibj6j0m8x2wsfnfy2fw62"))))
967 (build-system ocaml-build-system)
968 (arguments
969 `(#:tests? #f; No tests
970 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
971 "/lib/ocaml/site-lib"))
972 #:phases
973 (modify-phases %standard-phases
974 (delete 'configure))))
975 (home-page "https://opam.ocaml.org")
976 (synopsis "Parser and printer for the opam file syntax")
977 (description "This package contains a parser and a pretty-printer for
978the opam file format.")
979 ;; With static-linking exception
980 (license license:lgpl2.1+)))
981
982(define-public ocaml-swhid-core
983 (package
984 (name "ocaml-swhid-core")
985 (version "0.1")
986 (source
987 (origin
988 (method git-fetch)
989 (uri (git-reference
990 (url "https://github.com/OCamlPro/swhid_core")
991 (commit version)))
992 (file-name (git-file-name name version))
993 (sha256
994 (base32 "0h3zndyk94lf2lakc3cb8b7a00jqh0y1m8xk6mg61gj2kdpdbfdq"))))
995 (build-system dune-build-system)
996 (properties `((upstream-name . "swhid_core")))
997 (home-page "https://github.com/ocamlpro/swhid_core")
998 (synopsis "OCaml library to work with swhids")
999 (description
1000 "swhid_core is an OCaml library to work with Software Heritage persistent
1001identifiers (swhids). This is the core library, for most use cases you should
1002use the swhid library instead.")
1003 (license license:isc)))
1004
1005(define-public ocaml-spdx-licenses
1006 (package
1007 (name "ocaml-spdx-licenses")
1008 (version "1.3.0")
1009 (source
1010 (origin
1011 (method git-fetch)
1012 (uri (git-reference
1013 (url "https://github.com/kit-ty-kate/spdx_licenses")
1014 (commit (string-append "v" version))))
1015 (file-name (git-file-name name version))
1016 (sha256
1017 (base32 "08vh9mfkq34f0l5ka94hhklc43kvz09wd04x1gkxkawn4786rf9z"))))
1018 (build-system dune-build-system)
1019 (native-inputs (list ocaml-alcotest))
1020 (properties `((upstream-name . "spdx_licenses")))
1021 (home-page "https://github.com/kit-ty-kate/spdx_licenses")
1022 (synopsis "Strict SPDX License Expression parser")
1023 (description
1024 "This package provides an up-to-date and strict SPDX License Expression
1025parser. It implements the format described in:
1026https://spdx.github.io/spdx-spec/v2.3/SPDX-license-expressions/
1027See https://spdx.org/licenses/ for more details.")
1028 (license license:expat)))
1029
1030(define-public ocaml-0install-solver
1031 (package
1032 (name "ocaml-0install-solver")
1033 (version "2.18")
1034 (source
1035 (origin
1036 (method git-fetch)
1037 (uri (git-reference
1038 (url "https://github.com/0install/0install")
1039 (commit (string-append "v" version))))
1040 (file-name (git-file-name name version))
1041 (sha256
1042 (base32 "1hm72k355qwgh16hngmnd77bgawf20ipnqxfncdzl10rqrc0640b"))))
1043 (build-system dune-build-system)
1044 (arguments
1045 `(#:package "0install-solver"))
1046 (native-inputs (list ocaml-ounit2))
1047 (home-page "https://docs.0install.net/developers/solver/")
1048 (synopsis "Package dependency solver")
1049 (description
1050 "This package provides a package dependency resolver based on a SAT solver.
1051This was originally written for the 0install package manager, but is now
1052generic and is also used as a solver backend for opam. The SAT solver is
1053based on @code{MiniSat} (http://minisat.se/Papers.html) and the application to
1054package management is based on OPIUM (Optimal Package Install/Uninstall
1055Manager). 0install-solver uses a (novel?) strategy to find the optimal
1056solution extremely quickly (even for a SAT-based solver).")
1057 (license license:lgpl2.1+)))
1058
1059(define-public ocaml-opam-0install-cudf
1060 (package
1061 (name "ocaml-opam-0install-cudf")
1062 (version "0.5.0")
1063 (source
1064 (origin
1065 (method git-fetch)
1066 (uri (git-reference
1067 (url "https://github.com/ocaml-opam/opam-0install-cudf")
1068 (commit (string-append "v" version))))
1069 (file-name (git-file-name name version))
1070 (sha256
1071 (base32 "12v1bgnxcxdylgxbsjlcr90rzwcp39rjlv191cy8g2s33nyxyi2c"))))
1072 (build-system dune-build-system)
1073 (propagated-inputs (list ocaml-cudf ocaml-0install-solver))
1074 (native-inputs (list ocaml-alcotest))
1075 (home-page "https://opam.ocaml.org")
1076 (synopsis "Opam solver using 0install backend using the CUDF interface")
1077 (description
1078 "Opam's default solver is designed to maintain a set of packages over time,
1079minimising disruption when installing new programs and finding a compromise
1080solution across all packages. In many situations (e.g. CI, local roots or
1081duniverse builds) this is not necessary, and we can get a solution much faster
1082by using a different algorithm. This package provides a generic solver library
1083which uses 0install's solver library. The library uses the CUDF library in
1084order to interface with opam as it is the format common used to talk to all the
1085supported solvers.")
1086 (license license:isc)))
1087
1088(define ocaml-opam-core
1089 (package
1090 (name "ocaml-opam-core")
1091 (version "2.5.2")
1092 (source
1093 (origin
1094 (method git-fetch)
1095 (uri (git-reference
1096 (url "https://github.com/ocaml/opam")
1097 (commit version)))
1098 (file-name (git-file-name name version))
1099 (sha256
1100 (base32 "0yva8w5mcfrmrwsscm596m60k75n659bdkl8qa2mhr23zlq7jzbx"))))
1101 (build-system dune-build-system)
1102 (arguments
1103 `(#:package "opam-core"
1104 ;; tests are run with the opam package
1105 #:tests? #f
1106 #:phases (modify-phases %standard-phases
1107 (add-before 'build 'pre-build
1108 (lambda* (#:key inputs make-flags #:allow-other-keys)
1109 (let ((bash (assoc-ref inputs "bash"))
1110 (bwrap (search-input-file inputs "/bin/bwrap")))
1111 (substitute* "src/core/opamSystem.ml"
1112 (("\"/bin/sh\"")
1113 (string-append "\"" bash "/bin/sh\""))
1114 (("getconf")
1115 (which "getconf")))))))))
1116 (propagated-inputs (list ocaml-graph
1117 ocaml-re
1118 ocaml-patch
1119 ocaml-uutf
1120 ocaml-swhid-core
1121 ocaml-jsonm
1122 ocaml-sha))
1123 (inputs (list bubblewrap))
1124 (home-page "https://opam.ocaml.org")
1125 (synopsis "Package manager for OCaml")
1126 (description
1127 "OPAM is a tool to manage OCaml packages. It supports multiple
1128simultaneous compiler installations, flexible package constraints, and a
1129Git-friendly development workflow.")
1130 ;; The 'LICENSE' file waives some requirements compared to LGPLv2.1.
1131 (license license:lgpl2.1)))
1132
1133(define ocaml-opam-format
1134 (package
1135 (inherit ocaml-opam-core)
1136 (name "ocaml-opam-format")
1137 (inputs '())
1138 (propagated-inputs (list ocaml-opam-core
1139 ocaml-opam-file-format
1140 ocaml-re))
1141 (arguments `(#:package "opam-format"
1142 ;; tests are run with the opam package
1143 #:tests? #f
1144 #:phases %standard-phases))))
1145
1146(define-public opam-installer
1147 (package
1148 (name "opam-installer")
1149 (version "2.5.2")
1150 ;; opam has some library dependencies that in turn depend on
1151 ;; opam-installer (https://codeberg.org/guix/guix/issues/3588). To break
1152 ;; the cycle, we build opam-installer from a version of the release that
1153 ;; vendors all dependencies. Then the remaining opam packages can be built
1154 ;; in the usual way from git sources.
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (string-append "https://github.com/ocaml/opam/releases/download/"
1159 version "/opam-full-" version ".tar.gz"))
1160 (sha256
1161 (base32 "1hsmhmnl97bry1gqfjpzid0wkphbpixqr6v7bmmys6bzaq4khqmk"))))
1162 (build-system gnu-build-system)
1163 (arguments
1164 (list
1165 ;; Tests depend on the full opam package.
1166 #:tests? #f
1167 #:configure-flags
1168 #~'("--with-vendored-deps")
1169 #:phases
1170 #~(modify-phases %standard-phases
1171 (add-after 'unpack 'fix-shell-path
1172 (lambda _
1173 (let ((sh (which "sh")))
1174 (substitute* "configure"
1175 (("/bin/sh") sh)))))
1176 ;; The Makefile builds both opam and opam-installer, but we
1177 ;; only want the latter.
1178 (replace 'install
1179 (lambda _
1180 (define (install source dest-dir)
1181 (install-file source
1182 (string-append #$output "/" dest-dir)))
1183 (install "opam-installer" "bin")
1184 (install "_build/default/doc/man/opam-installer.1"
1185 "share/man/man1"))))))
1186 (native-inputs (list ocaml))
1187 (home-page "https://opam.ocaml.org")
1188 (synopsis "Tool for installing OCaml packages")
1189 (description
1190 "@var{opam-installer} is a tool for installing OCaml packages
1191based on @code{.install} files defined by the OPAM package manager. It is
1192useful for installing OCaml packages without requiring the entirety of
1193OPAM.")
1194 (properties `((ocaml5.0-variant unquote
1195 (delay opam-installer))))
1196 ;; The 'LICENSE' file waives some requirements compared to LGPLv2.1.
1197 (license license:lgpl2.1)))
1198
1199(define ocaml-opam-repository
1200 (package
1201 (inherit ocaml-opam-core)
1202 (name "ocaml-opam-repository")
1203 (inputs '())
1204 (propagated-inputs (list ocaml-opam-format))
1205 (arguments `(#:package "opam-repository"
1206 ;; tests are run with the opam package
1207 #:tests? #f
1208 #:phases %standard-phases))))
1209
1210(define ocaml-opam-state
1211 (package
1212 (inherit ocaml-opam-core)
1213 (name "ocaml-opam-state")
1214 (arguments `(#:package "opam-state"
1215 ;; tests are run with the opam package
1216 #:tests? #f
1217 #:phases
1218 (modify-phases %standard-phases
1219 (add-before 'build 'pre-build
1220 (lambda* (#:key inputs make-flags #:allow-other-keys)
1221 (let ((bwrap (search-input-file inputs "/bin/bwrap")))
1222 ;; Use bwrap from the store directly.
1223 (substitute* "src/state/shellscripts/bwrap.sh"
1224 (("-v bwrap") (string-append "-v " bwrap))
1225 (("exec bwrap") (string-append "exec " bwrap))
1226 ;; Mount /gnu and /run/current-system in the
1227 ;; isolated environment when building with opam.
1228 ;; This is necessary for packages to find external
1229 ;; dependencies, such as a C compiler, make, etc...
1230 (("^add_sys_mounts /usr")
1231 (string-append "add_sys_mounts "
1232 (%store-directory)
1233 " /run/current-system /usr")))))))))
1234 (inputs (list bubblewrap ocaml-spdx-licenses))
1235 (propagated-inputs (list ocaml-opam-repository))))
1236
1237(define ocaml-opam-solver
1238 (package
1239 (inherit ocaml-opam-core)
1240 (name "ocaml-opam-solver")
1241 (inputs '())
1242 (propagated-inputs (list ocaml-opam-format
1243 ocaml-mccs
1244 ocaml-dose3
1245 ocaml-opam-0install-cudf))
1246 (arguments `(#:package "opam-solver"
1247 ;; tests are run with the opam package
1248 #:tests? #f
1249 #:phases %standard-phases))))
1250
1251(define ocaml-opam-client
1252 (package
1253 (inherit ocaml-opam-core)
1254 (name "ocaml-opam-client")
1255 (arguments `(#:package "opam-client"
1256 ;; tests are run with the opam package
1257 #:tests? #f
1258 #:phases
1259 (modify-phases %standard-phases
1260 (add-before 'build 'pre-build
1261 (lambda* (#:key inputs make-flags #:allow-other-keys)
1262 (let ((bwrap (search-input-file inputs "/bin/bwrap")))
1263 (substitute* "src/client/opamInitDefaults.ml"
1264 (("\"bwrap\"") (string-append "\"" bwrap "\"")))))))))
1265 (inputs (list bubblewrap))
1266 (propagated-inputs
1267 (list ocaml-opam-state
1268 ocaml-opam-solver
1269 ocaml-opam-repository
1270 ocaml-base64
1271 ocaml-re
1272 ocaml-spdx-licenses))))
1273
1274(define-public opam
1275 (package
1276 (inherit ocaml-opam-core)
1277 (name "opam")
1278 (build-system dune-build-system)
1279 (arguments
1280 `(#:package "opam"
1281 #:phases (modify-phases %standard-phases
1282 (add-before 'check 'prepare-checks
1283 (lambda* (#:key inputs #:allow-other-keys)
1284 ;; Opam tests need to run an isolated environment from a writable
1285 ;; home directory.
1286 (mkdir-p "test-home")
1287 (setenv "HOME"
1288 (string-append (getcwd) "/test-home"))
1289 (with-output-to-file (string-append (getcwd)
1290 "/test-home/.gitconfig")
1291 (lambda _
1292 (display "[user]
1293email = [email protected]
1294name = Guix Builder
1295
1296[protocol \"file\"]
1297allow = always")
1298 (newline)))
1299
1300 ;; Opam tests require data from opam-repository. Instead
1301 ;; of downloading them with wget from the guix
1302 ;; environment, copy the content to the expected
1303 ;; directory.
1304 (substitute* "tests/reftests/dune.inc"
1305 (("tar -C.*opam-archive-([0-9a-f]*)[^)]*" _ commit)
1306 (string-append "rmdir %{targets}) (run cp -r "
1307 (begin
1308 ;; When updating opam, uncomment the following
1309 ;; call. It will list "opam-repo" commit-ish
1310 ;; required to run tests (see native-inputs
1311 ;; below). Remove versions that are no longer
1312 ;; required, and add new ones if necessary.
1313 ;;
1314 ;; (pk commit)
1315 (assoc-ref inputs
1316 (string-append "opam-repo-" commit)))
1317 "/ %{targets}) (run chmod +w -R %{targets}"))
1318 (("wget[^)]*")
1319 "touch %{targets}")
1320
1321 ;; Selectively disable a fraction of opam's "reftests"
1322 ;; (CRAM-style regression tests). Most of these tests
1323 ;; make assumptions about the build environment that
1324 ;; don't hold for Guix.
1325
1326 ;; Test tries to clone a git repository from inside
1327 ;; bwrap
1328 (("diff upgrade-format.test upgrade-format.out")
1329 "run true")
1330 ;; Test tries to figure out which distro this is, and
1331 ;; it doesn't know Guix
1332 (("diff pin.unix.test pin.unix.out")
1333 "run true")
1334 ;; A variable expansion fails.
1335 (("diff opamroot-versions.test opamroot-versions.out")
1336 "run true")
1337 ;; The repository we replaced is probably not as
1338 ;; expected
1339 (("diff opamrt-big-upgrade.test opamrt-big-upgrade.out")
1340 "run true")
1341 ;; Disable a failing test because of missing sandboxing
1342 ;; functionality
1343 (("diff init.test init.out")
1344 "run true")
1345 ;; These tests try to normalize output to exclude
1346 ;; version strings, but this seems to break some
1347 ;; output assertions if $BASEDIR happens to include
1348 ;; the version.
1349 (("diff cli-versioning.test cli-versioning.out")
1350 "run true")
1351 (("diff hooks-variables.test hooks-variables.out")
1352 "run true")
1353 ;; Fails on noisy git output.
1354 (("diff action-disk.test action-disk.out")
1355 "run true")
1356 ;; Requires network access.
1357 (("diff download.test download.out")
1358 "run true")
1359 (("diff swhid.unix.test swhid.unix.out")
1360 "run true")
1361 ;; Depends on 3rd-party git repos.
1362 (("diff lock.test lock.out")
1363 "run true"))
1364
1365 (substitute* "tests/reftests/dune"
1366 ;; Because of our changes to the previous file, we
1367 ;; cannot check it can be regenerated
1368 (("diff dune.inc dune.inc.gen")
1369 "run true"))
1370 ;; Ensure we can run the generated build.sh (no /bin/sh)
1371 (substitute* '("tests/reftests/legacy-local.test"
1372 "tests/reftests/legacy-git.test")
1373 (("#! ?/bin/sh")
1374 (string-append "#!"
1375 (search-input-file inputs "/bin/sh"))))
1376 (substitute* "tests/reftests/testing-env"
1377 (("OPAMSTRICT=1")
1378 (string-append "OPAMSTRICT=1\nLIBRARY_PATH="
1379 (assoc-ref inputs "libc") "/lib"))))))))
1380
1381 (native-inputs (let ((opam-repo (lambda (commit hash)
1382 (origin
1383 (method git-fetch)
1384 (uri (git-reference
1385 (url
1386 "https://github.com/ocaml/opam-repository")
1387 (commit commit)))
1388 (file-name (git-file-name "opam-repo"
1389 commit))
1390 (sha256 (base32 hash))))))
1391 `(("dune" ,dune)
1392
1393 ;; For tests.
1394 ("git" ,git-minimal/pinned)
1395 ("openssl" ,openssl)
1396 ("python" ,python-wrapper)
1397 ("rsync" ,rsync)
1398 ("unzip" ,unzip)
1399 ("which" ,which)
1400 ("xxd" ,xxd)
1401
1402 ;; Data for tests
1403 ("opam-repo-0070613707" ,(opam-repo
1404 "00706137074d536d2019d2d222fbe1bea929deda"
1405 "1gv1vvmfscj7wirfv6qncp8pf81wygnpzjwd0lyqcxm7g8r8lb4w"))
1406 ("opam-repo-009e00fa" ,(opam-repo
1407 "009e00fa86300d11c311309a2544e5c6c3eb8de2"
1408 "1wwy0rwrsjf4q10j1rh1dazk32fbzhzy6f7zl6qmndidx9b1bq7w"))
1409 ("opam-repo-11ea1cb" ,(opam-repo
1410 "11ea1cb6f2418b1f8a6679e4422771a04c9c3655"
1411 "1s4p0wfn3bx97yvm8xvj3yhzv2pz0jwml68g2ybv37hj9mpbrsq0"))
1412 ("opam-repo-143dd2a2f59f5befbf3cb90bb2667f911737fbf8" ,
1413 (opam-repo "143dd2a2f59f5befbf3cb90bb2667f911737fbf8"
1414 "1kliiy9n2j8myxhbz1brq6yingfy0si1bmv15j1hbnbpyi3bavr9"))
1415 ("opam-repo-297366c" ,(opam-repo
1416 "297366cd01c3aaf29b967bf0b34ccc7989d4d5b3"
1417 "1ysg69gys37nc2cxivs2ikh6xp0gj85if4rcrr874mqb9z12dm0j"))
1418 ("opam-repo-3235916" ,(opam-repo
1419 "3235916a162a59d7c82dac3fe24214975d48f1aa"
1420 "1yf73rv2n740a4s9g7a9k4j91b4k7al88nwnw9cdw0k2ncbmr486"))
1421 ("opam-repo-7090735c" ,(opam-repo
1422 "7090735c9d1dd2dc481c4128c5ef4d3667238f15"
1423 "1bccsgjhlp64lmvfjfn6viywf3x73ji75myg9ssf1ij1fkmabn0z"))
1424 ("opam-repo-7371c1d9" ,(opam-repo
1425 "7371c1d9c53000840fb9a6d8ec13d87ffaa98401"
1426 "0lmy3rmp5liyp2dsx4s90rjdwc012947ig2fz6y97s3pmwsbf9g8"))
1427 ("opam-repo-a5d7cdc0" ,(opam-repo
1428 "a5d7cdc0c91452b0aef4fa71c331ee5237f6dddd"
1429 "0z7kawqisy07088p5xjxwpvmvzlbj1d9cgdipsj90yx7nc5qh369"))
1430 ("opam-repo-ad4dd344" ,(opam-repo
1431 "ad4dd344fe5cd1cab49ced49d6758a9844549fb4"
1432 "1a1qj47kj8xjdnc4zc50ijrix1kym1n7k20n3viki80a7518baw8"))
1433 ("opam-repo-c1842d168d" ,(opam-repo
1434 "c1842d168de956caf06d7ac8588e65020d7594d8"
1435 "142y1ac7sprygyh91shcp0zcyfxjjkshi9g44qgg4rx60rbsbhai"))
1436 ("opam-repo-c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a" ,
1437 (opam-repo "c1ba97dafe95c865d37ad4d88f6e57c9ffbe7f0a"
1438 "0sllm110dvs3w1k7qhias5y8v6ikkk2knw97v1fk9lnw4lq45gv6"))
1439 ("opam-repo-de897adf36c4230dfea812f40c98223b31c4521a" ,
1440 (opam-repo "de897adf36c4230dfea812f40c98223b31c4521a"
1441 "1m18x9gcwnbar8yv9sbfz8a3qpw412fp9cf4d6fb7syn0p0h96jw"))
1442 ("opam-repo-f372039d" ,(opam-repo
1443 "f372039db86a970ef3e662adbfe0d4f5cd980701"
1444 "0ld7fcry6ss6fmrpswvr6bikgx299w97h0gwrjjh7kd7rydsjdws")))))
1445 (inputs (list ocaml-opam-client))))
1446
1447(define-public ocaml-opam-monorepo
1448 (package
1449 (name "ocaml-opam-monorepo")
1450 (version "0.3.5")
1451 (source (origin
1452 (method git-fetch)
1453 (uri
1454 (git-reference
1455 (url "https://github.com/tarides/opam-monorepo/")
1456 (commit version)))
1457 (file-name name)
1458 (sha256
1459 (base32
1460 "09lq788b1sai4v1nxd16b00pw0m55plcwrx3f9v5a90gpxg0a6sc"))))
1461 (build-system dune-build-system)
1462 (arguments
1463 ;; TODO
1464 ;; Too many tests require a fully initialized opam, disabling them would
1465 ;; be a huge pain. "Mocking" opam init is difficult because it requires
1466 ;; networking access.
1467 '(#:tests? #f))
1468 ;; TODO: not entirely clear if these should be native, test cross-building
1469 (native-inputs (list ocaml-odoc
1470 pkg-config))
1471 ;; (propagated-inputs lablgtk3) optional and is currently failing to build
1472 (home-page "https://github.com/tarides/opam-monorepo")
1473 (synopsis "Assemble and manage fully vendored Dune repositories")
1474 (description
1475 "The opam monorepo plugin provides a convenient interface to bridge the
1476opam package manager with having a local copy of all the source code required
1477to build a project using the dune build tool.")
1478 (license license:isc)))
1479
1480(define-public ocaml-camlp-streams
1481 (package
1482 (name "ocaml-camlp-streams")
1483 (version "5.0.1")
1484 (source
1485 (origin
1486 (method git-fetch)
1487 (uri (git-reference
1488 (url "https://github.com/ocaml/camlp-streams")
1489 (commit (string-append "v" version))))
1490 (file-name (git-file-name name version))
1491 (sha256
1492 (base32 "0r3wvffkzyyk4als78akirxanzbib5hvc3kvwxpk36mlmc38aywh"))))
1493 (build-system dune-build-system)
1494 (arguments
1495 ;; No tests
1496 `(#:tests? #f))
1497 (home-page "https://github.com/ocaml/camlp-streams")
1498 (synopsis "Stream and Genlex libraries for use with Camlp4 and Camlp5")
1499 (description
1500 "This package provides two library modules:
1501
1502@itemize
1503@item Stream: imperative streams, with in-place update and memoization of
1504the latest element produced.
1505@item Genlex: a small parameterized lexical analyzer producing streams of
1506tokens from streams of characters.
1507@end itemize
1508
1509The two modules are designed for use with Camlp4 and Camlp5: The stream
1510patterns and stream expressions of Camlp4/Camlp5 consume and produce data of
1511type 'a Stream.t. The Genlex tokenizer can be used as a simple lexical
1512analyzer for Camlp4/Camlp5-generated parsers.
1513
1514The Stream module can also be used by hand-written recursive-descent parsers,
1515but is not very convenient for this purpose.
1516
1517The Stream and Genlex modules have been part of the OCaml standard library for a
1518long time, and have been distributed as part of the core OCaml system. They
1519will be removed from the OCaml standard library at some future point, but will
1520be maintained and distributed separately in the camlpstreams package.")
1521 (license license:lgpl2.1)))
1522
1523(define-public camlp5
1524 (package
1525 (name "camlp5")
1526 (version "8.00.03")
1527 (source
1528 (origin
1529 (method git-fetch)
1530 (uri (git-reference
1531 (url "https://github.com/camlp5/camlp5")
1532 (commit (string-append "rel" version))))
1533 (file-name (git-file-name name version))
1534 (sha256
1535 (base32 "1fnvmaw9cland09pjx5h6w3f6fz9s23l4nbl4m9fcaa2i4dpraz6"))))
1536 (build-system gnu-build-system)
1537 (arguments
1538 `(#:tests? #f ; XXX TODO figure out how to run the tests
1539 #:phases
1540 (modify-phases %standard-phases
1541 (replace 'configure
1542 (lambda* (#:key outputs #:allow-other-keys)
1543 (let* ((out (assoc-ref outputs "out"))
1544 (mandir (string-append out "/share/man")))
1545 ;; Custom configure script doesn't recognize
1546 ;; --prefix=<PREFIX> syntax (with equals sign).
1547 (invoke "./configure"
1548 "--prefix" out
1549 "--mandir" mandir))))
1550 (add-before 'build 'fix-/bin-references
1551 (lambda _
1552 (substitute* "config/Makefile"
1553 (("/bin/rm") "rm"))
1554 #t))
1555 (replace 'build
1556 (lambda _
1557 (invoke "make" "-j" (number->string
1558 (parallel-job-count))
1559 "world.opt")))
1560 ;; Required for findlib to find camlp5's libraries
1561 (add-after 'install 'install-meta
1562 (lambda* (#:key outputs #:allow-other-keys)
1563 (install-file "etc/META" (string-append (assoc-ref outputs "out")
1564 "/lib/ocaml/camlp5/"))
1565 #t)))))
1566 (inputs
1567 (list ocaml ocaml-camlp-streams))
1568 (native-inputs
1569 (list perl ocaml-findlib))
1570 (home-page "https://camlp5.github.io/")
1571 (synopsis "Pre-processor Pretty Printer for OCaml")
1572 (description
1573 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
1574tools for syntax (Stream Parsers and Grammars) and the ability to modify the
1575concrete syntax of the language (Quotations, Syntax Extensions).")
1576 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
1577 (license (list license:bsd-3 license:qpl))))
1578
1579(define-public hevea
1580 (package
1581 (name "hevea")
1582 (version "2.36")
1583 (source (origin
1584 (method url-fetch)
1585 (uri (string-append "http://hevea.inria.fr/old/"
1586 "hevea-" version ".tar.gz"))
1587 (sha256
1588 (base32
1589 "0j06f8gb8f5is34kzmzy3znb0jkm2qd2l6rcl5v5qa9af3bmjrsx"))))
1590 (build-system gnu-build-system)
1591 (inputs
1592 (list ocaml))
1593 (native-inputs
1594 (list ocamlbuild))
1595 (arguments
1596 `(#:tests? #f ; no test suite
1597 #:make-flags (list (string-append "PREFIX=" %output))
1598 #:phases (modify-phases %standard-phases
1599 (delete 'configure)
1600 (add-before 'build 'patch-/bin/sh
1601 (lambda _
1602 (substitute* "_tags"
1603 (("/bin/sh") (which "sh")))
1604 #t)))))
1605 (home-page "https://hevea.inria.fr/")
1606 (synopsis "LaTeX to HTML translator")
1607 (description
1608 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
1609written in Objective Caml.")
1610 (license license:qpl)))
1611
1612(define-public ocaml-num
1613 (package
1614 (name "ocaml-num")
1615 (version "1.4")
1616 (source
1617 (origin
1618 (method git-fetch)
1619 (uri (git-reference
1620 (url "https://github.com/ocaml/num")
1621 (commit (string-append "v" version))))
1622 (file-name (git-file-name name version))
1623 (sha256
1624 (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc"))))
1625 (build-system dune-build-system)
1626 (arguments
1627 `(#:phases
1628 (modify-phases %standard-phases
1629 (add-after 'unpack 'fix-race
1630 (lambda _
1631 ;; There's a race between bng.o and bng_generic.c. Both depend on
1632 ;; the architecture specific bng.c, but only the latter declares
1633 ;; the dependency.
1634 (mkdir-p "_build/default/src")
1635 (for-each
1636 (lambda (f)
1637 (copy-file f (string-append "_build/default/" f)))
1638 (find-files "src" "bng_.*\\.c")))))))
1639 (home-page "https://github.com/ocaml/num")
1640 (synopsis "Arbitrary-precision integer and rational arithmetic")
1641 (description "OCaml-Num contains the legacy Num library for
1642arbitrary-precision integer and rational arithmetic that used to be part of
1643the OCaml core distribution.")
1644 (license license:lgpl2.1+))); with linking exception
1645
1646(define-public emacs-tuareg
1647 (package
1648 (name "emacs-tuareg")
1649 (version "3.1.0")
1650 (source
1651 (origin
1652 (method git-fetch)
1653 (uri (git-reference
1654 (url "https://github.com/ocaml/tuareg")
1655 (commit version)))
1656 (file-name (git-file-name name version))
1657 (sha256
1658 (base32 "0gmgxqy0x3318gpwb8bjr5f53mv9xy3psrcz1h9c4xqrc189lm68"))))
1659 (build-system gnu-build-system)
1660 (arguments
1661 (list
1662 #:imported-modules `(,@%default-gnu-imported-modules
1663 (guix build emacs-build-system)
1664 (guix build emacs-utils))
1665 #:modules '((guix build gnu-build-system)
1666 ((guix build emacs-build-system) #:prefix emacs:)
1667 (guix build emacs-utils)
1668 (guix build utils))
1669 #:phases
1670 #~(modify-phases %standard-phases
1671 (add-after 'unpack 'make-git-checkout-writable
1672 (lambda _
1673 (for-each make-file-writable (find-files "."))))
1674 (delete 'configure)
1675 (add-before 'install 'fix-install-path
1676 (lambda _
1677 (substitute* "Makefile"
1678 (("/emacs/site-lisp")
1679 (emacs:elpa-directory #$output)))))
1680 (add-after 'install 'post-install
1681 (lambda _
1682 (symlink "tuareg.el"
1683 (string-append (emacs:elpa-directory #$output)
1684 "/tuareg-autoloads.el")))))))
1685 (native-inputs
1686 (list emacs-minimal opam))
1687 (home-page "https://github.com/ocaml/tuareg")
1688 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
1689 (description "Tuareg helps editing OCaml code, to highlight important
1690parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
1691Emacs.")
1692 (license license:gpl2+)))
1693
1694(define-public ocaml-menhir
1695 (package
1696 (name "ocaml-menhir")
1697 (version "20220210")
1698 (source
1699 (origin
1700 (method git-fetch)
1701 (uri (git-reference
1702 (url "https://gitlab.inria.fr/fpottier/menhir.git")
1703 (commit version)))
1704 (file-name (git-file-name name version))
1705 (sha256
1706 (base32 "0f31isr3cyiishflz6qr4xc3gp9xwf32r3vxdvm5wnr2my1fnn1n"))))
1707 (build-system dune-build-system)
1708 (inputs
1709 (list ocaml))
1710 (arguments
1711 `(#:tests? #f)) ; No check target
1712 (properties `((ocaml4.07-variant . ,(delay (strip-ocaml4.07-variant ocaml-menhir)))))
1713 (home-page "https://gallium.inria.fr/~fpottier/menhir/")
1714 (synopsis "Parser generator")
1715 (description "Menhir is a parser generator. It turns high-level grammar
1716specifications, decorated with semantic actions expressed in the OCaml
1717programming language into parsers, again expressed in OCaml. It is based on
1718Knuth’s LR(1) parser construction technique.")
1719 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
1720 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
1721 ;; are QPL licensed.
1722 (license (list license:gpl2+ license:qpl))))
1723
1724(define-public ocaml-bigarray-compat
1725 (package
1726 (name "ocaml-bigarray-compat")
1727 (version "1.1.0")
1728 (source (origin
1729 (method git-fetch)
1730 (uri (git-reference
1731 (url "https://github.com/mirage/bigarray-compat")
1732 (commit (string-append "v" version))))
1733 (file-name (git-file-name name version))
1734 (sha256
1735 (base32
1736 "0hif5baiwswdblymyfbxh9066pfqynlz5vj3b2brpn0a12k6i5fq"))))
1737 (build-system dune-build-system)
1738 (arguments
1739 `(#:tests? #f)); no tests
1740 (home-page "https://github.com/mirage/bigarray-compat")
1741 (synopsis "OCaml compatibility library")
1742 (description "This package contains a compatibility library for
1743@code{Stdlib.Bigarray} in OCaml.")
1744 (license license:isc)))
1745
1746(define-public binsec
1747 (package
1748 (name "binsec")
1749 (version "0.10.1")
1750 (source
1751 (origin
1752 (method git-fetch)
1753 (uri (git-reference
1754 (url "https://github.com/binsec/binsec")
1755 (commit version)))
1756 (file-name (git-file-name name version))
1757 (sha256
1758 (base32 "0mb7n20b1p2np9dchwwcv046ivsan0n2zssp4b8gi7bg5m2nq11m"))))
1759 (build-system dune-build-system)
1760 (arguments
1761 (list #:phases
1762 #~(modify-phases %standard-phases
1763 (add-after 'install 'wrap-programs
1764 (lambda _
1765 (let ((ocamlpath
1766 `(,(string-append #$output "/lib/ocaml/site-lib")
1767 ,@(search-path-as-string->list (getenv "OCAMLPATH")))))
1768 (wrap-program (string-append #$output "/bin/" "binsec")
1769 `("OCAMLPATH" ":" prefix ,ocamlpath))))))))
1770 (inputs (list bash-minimal))
1771 (native-inputs (list gmp ocaml-qcheck ocaml-ounit2 z3))
1772 (propagated-inputs (list dune-site
1773 ocaml-base
1774 ocaml-menhir
1775 ocaml-graph
1776 ocaml-zarith
1777 ocaml-grain-dypgen
1778 ocaml-toml
1779 ocaml-z3))
1780 (synopsis "Binary-level analysis platform")
1781 (description
1782 "BINSEC is a binary analysis platform which implements analysis
1783techniques such as symbolic execution. The goal of BINSEC is to improve
1784software security at the binary level through binary analysis. BINSEC
1785is a research tool which relies on prior work in binary code analysis
1786at the intersection of formal methods, program analysis security and
1787software engineering.")
1788 (home-page "https://binsec.github.io/")
1789 (license license:lgpl2.1)))
1790
1791(define-public unison
1792 (package
1793 (name "unison")
1794 (version "2.53.5")
1795 (source (origin
1796 (method git-fetch)
1797 (uri (git-reference
1798 (url "https://github.com/bcpierce00/unison")
1799 (commit (string-append "v" version))))
1800 (file-name (git-file-name name version))
1801 (sha256
1802 (base32
1803 "1fy4c1wb6xn9gxdabs25yajbzik3amifyr7nzd4d9vn6r3gll9sw"))))
1804 (build-system dune-build-system)
1805 (propagated-inputs (list lablgtk3 zlib))
1806 (native-inputs (list ghostscript (texlive-local-tree '()) hevea lynx which))
1807 (arguments
1808 `(#:phases
1809 (modify-phases %standard-phases
1810 (add-before 'build 'writable-texmfvar
1811 ;; Generating font shapes requires a writable TEXMFVAR.
1812 (lambda _ (setenv "TEXMFVAR" "/tmp")))
1813 (add-after 'install 'install-doc
1814 (lambda* (#:key outputs #:allow-other-keys)
1815 (let ((doc (string-append (assoc-ref outputs "out")
1816 "/share/doc/unison")))
1817 (mkdir-p doc)
1818 ;; This file needs write-permissions, because it's
1819 ;; overwritten by 'docs' during documentation generation.
1820 (chmod "src/strings.ml" #o600)
1821 (invoke "make" "docs"
1822 "TEXDIRECTIVES=\\\\draftfalse")
1823 (for-each (lambda (f)
1824 (install-file f doc))
1825 (map (lambda (ext)
1826 (string-append "doc/unison-manual." ext))
1827 ;; Install only html documentation,
1828 ;; since the build is currently
1829 ;; non-reproducible with the ps, pdf,
1830 ;; and dvi docs.
1831 '(;; "ps" "pdf" "dvi"
1832 "html")))
1833 #t))))))
1834 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
1835 (synopsis "File synchronizer")
1836 (description
1837 "Unison is a file-synchronization tool. It allows two replicas of
1838a collection of files and directories to be stored on different hosts
1839(or different disks on the same host), modified separately, and then
1840brought up to date by propagating the changes in each replica
1841to the other.")
1842 (license license:gpl3+)))
1843
1844(define-public ocaml-findlib
1845 (package
1846 (name "ocaml-findlib")
1847 (version "1.9.5")
1848 (source (origin
1849 (method url-fetch)
1850 (uri (string-append "http://download.camlcity.org/download/"
1851 "findlib" "-" version ".tar.gz"))
1852 (sha256
1853 (base32
1854 "0w9578j1561f5gi51sn2jgxm3kh3sn88cpannhdkqcdg1kk08iqd"))))
1855 (build-system gnu-build-system)
1856 (native-inputs
1857 (list m4 ocaml))
1858 (arguments
1859 `(#:tests? #f ; no test suite
1860 #:parallel-build? #f
1861 #:make-flags (list "all" "opt")
1862 #:phases (modify-phases %standard-phases
1863 (replace
1864 'configure
1865 (lambda* (#:key inputs outputs #:allow-other-keys)
1866 (let ((out (assoc-ref outputs "out")))
1867 (invoke
1868 "./configure"
1869 "-bindir" (string-append out "/bin")
1870 "-config" (string-append out "/etc/ocamfind.conf")
1871 "-mandir" (string-append out "/share/man")
1872 "-sitelib" (string-append out "/lib/ocaml/site-lib")
1873 "-with-toolbox"))))
1874 (replace 'install
1875 (lambda* (#:key outputs #:allow-other-keys)
1876 (let ((out (assoc-ref outputs "out")))
1877 (invoke "make" "install"
1878 (string-append "OCAML_CORE_STDLIB="
1879 out "/lib/ocaml/site-lib"))))))))
1880 (home-page "http://projects.camlcity.org/projects/findlib.html")
1881 (synopsis "Management tool for OCaml libraries")
1882 (description
1883 "The \"findlib\" library provides a scheme to manage reusable software
1884components (packages), and includes tools that support this scheme. Packages
1885are collections of OCaml modules for which metainformation can be stored. The
1886packages are kept in the file system hierarchy, but with strict directory
1887structure. The library contains functions to look the directory up that
1888stores a package, to query metainformation about a package, and to retrieve
1889dependency information about multiple packages. There is also a tool that
1890allows the user to enter queries on the command-line. In order to simplify
1891compilation and linkage, there are new frontends of the various OCaml
1892compilers that can directly deal with packages.")
1893 (license license:x11)))
1894
1895(define-public ocaml4.07-findlib
1896 (package
1897 (inherit ocaml-findlib)
1898 (name "ocaml4.07-findlib")
1899 (native-inputs
1900 (list m4 ocaml-4.07))))
1901
1902(define-public ocaml4.09-findlib
1903 (package
1904 (inherit ocaml-findlib)
1905 (name "ocaml4.09-findlib")
1906 (native-inputs
1907 (list m4 ocaml-4.09))))
1908
1909(define-public ocaml5.0-findlib
1910 (package
1911 (inherit ocaml-findlib)
1912 (name "ocaml5.0-findlib")
1913 (native-inputs
1914 (list m4 ocaml-5.0))))
1915
1916(define-public ocaml-ounit2
1917 (package
1918 (name "ocaml-ounit2")
1919 (version "2.2.6")
1920 (source (origin
1921 (method git-fetch)
1922 (uri (git-reference
1923 (url "https://github.com/gildor478/ounit.git")
1924 (commit (string-append "v" version))))
1925 (file-name (git-file-name name version))
1926 (sha256
1927 (base32
1928 "04c841hpk2yij370w30w3pis8nibnr28v74mpq2qz7z5gb8l07p1"))))
1929 (build-system dune-build-system)
1930 (propagated-inputs
1931 (list ocaml-lwt ocaml-stdlib-shims))
1932 (home-page "https://github.com/gildor478/ounit")
1933 (synopsis "Unit testing framework for OCaml")
1934 (description "OUnit2 is a unit testing framework for OCaml. It is similar
1935to JUnit and other XUnit testing frameworks.")
1936 (license license:expat)))
1937
1938;; note that some tests may hang for no obvious reason.
1939(define-public ocaml-ounit
1940 (package
1941 (inherit ocaml-ounit2)
1942 (name "ocaml-ounit")
1943 (arguments
1944 `(#:phases
1945 (modify-phases %standard-phases
1946 (replace 'install
1947 (lambda _
1948 (invoke "make" "install-ounit" ,(string-append "version="
1949 (package-version ocaml-ounit2))))))))
1950 (propagated-inputs
1951 (list ocaml-ounit2))
1952 (home-page "http://ounit.forge.ocamlcore.org")
1953 (synopsis "Unit testing framework for OCaml")
1954 (description "Unit testing framework for OCaml. It is similar to JUnit and
1955other XUnit testing frameworks.")
1956 (license license:expat)))
1957
1958(define-public ocaml-junit
1959 (package
1960 (name "ocaml-junit")
1961 (version "2.0.2")
1962 (home-page "https://github.com/Khady/ocaml-junit")
1963 (source
1964 (origin
1965 (method git-fetch)
1966 (uri (git-reference
1967 (url home-page)
1968 (commit version)))
1969 (file-name (git-file-name name version))
1970 (sha256
1971 (base32 "1cam7zzarrh9p1l5m3ba3h5rkh9mhark8j37rjgw35a66qd0gds1"))))
1972 (build-system dune-build-system)
1973 (arguments
1974 `(#:package "junit"
1975 #:phases (modify-phases %standard-phases
1976 (add-before 'build 'dune-subst
1977 (lambda _
1978 (invoke "dune" "subst") #t)))))
1979 (properties `((upstream-name . "junit")))
1980 (propagated-inputs (list ocaml-ounit ocaml-ptime ocaml-tyxml ocaml-odoc))
1981 (synopsis "JUnit XML reports generation library")
1982 (description "Ocaml-junit is a package for the creation of JUnit XML
1983reports. It provides a typed API to produce valid reports. They are supposed
1984to be accepted by Jenkins.")
1985 ;; with OCaml linking exception
1986 (license license:gpl3+)))
1987
1988(define-public ocaml-junit-alcotest
1989 (package
1990 (inherit ocaml-junit)
1991 (name "ocaml-junit-alcotest")
1992 (propagated-inputs (list ocaml-odoc ocaml-alcotest ocaml-junit))
1993 (build-system dune-build-system)
1994 (arguments
1995 `(#:package "junit_alcotest"
1996 #:tests? #f)); tests fail
1997 (properties `((upstream-name . "junit_alcotest")))
1998 (synopsis "JUnit XML reports generation for alcotest tests")
1999 (description "This package generates JUnit XML reports from ocaml-alcotest
2000test suites.")
2001 ;; with OCaml linking exception
2002 (license license:gpl3+)))
2003
2004(define-public camlzip
2005 (package
2006 (name "camlzip")
2007 (version "1.11")
2008 (source (origin
2009 (method git-fetch)
2010 (uri (git-reference
2011 (url "https://github.com/xavierleroy/camlzip")
2012 (commit (string-append
2013 "rel"
2014 (string-join (string-split version #\.) "")))))
2015 (file-name (git-file-name name version))
2016 (sha256
2017 (base32
2018 "16jnn3czxnvyjngnz167x5kw097k7izdqvkix8qvgvhdmgvqm89b"))))
2019 (build-system ocaml-build-system)
2020 (inputs
2021 (list zlib))
2022 (arguments
2023 `(#:phases
2024 (modify-phases %standard-phases
2025 (delete 'configure))
2026 #:install-target "install-findlib"
2027 #:make-flags
2028 ,#~(list "all" "allopt"
2029 (string-append "INSTALLDIR=" #$output "/lib/ocaml"))))
2030 (home-page "https://github.com/xavierleroy/camlzip")
2031 (synopsis "Provides easy access to compressed files")
2032 (description "Provides easy access to compressed files in ZIP, GZIP and
2033JAR format. It provides functions for reading from and writing to compressed
2034files in these formats.")
2035 (license license:lgpl2.1+)))
2036
2037(define-public ocamlmod
2038 (package
2039 (name "ocamlmod")
2040 (version "0.0.9")
2041 (source (origin
2042 (method url-fetch)
2043 (uri (ocaml-forge-uri name version 1702))
2044 (sha256
2045 (base32
2046 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
2047 (build-system ocaml-build-system)
2048 (native-inputs
2049 `(("ounit" ,ocaml-ounit)
2050 ("ocamlbuild" ,ocamlbuild)))
2051 (arguments
2052 `(#:phases
2053 (modify-phases %standard-phases
2054 ;; Tests are done during build.
2055 (delete 'check))))
2056 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
2057 (synopsis "Generate modules from OCaml source files")
2058 (description "Generate modules from OCaml source files.")
2059 (license license:lgpl2.1+))) ; with an exception
2060
2061(define-public ocaml-zarith
2062 (package
2063 (name "ocaml-zarith")
2064 (version "1.12")
2065 (source (origin
2066 (method git-fetch)
2067 (uri (git-reference
2068 (url "https://github.com/ocaml/Zarith")
2069 (commit (string-append "release-" version))))
2070 (file-name (git-file-name name version))
2071 (sha256
2072 (base32
2073 "1jslm1rv1j0ya818yh23wf3bb6hz7qqj9pn5fwl45y9mqyqa01s9"))))
2074 (build-system ocaml-build-system)
2075 (native-inputs
2076 (list perl))
2077 (inputs
2078 (list gmp))
2079 (arguments
2080 `(#:tests? #f ; no test target
2081 #:phases
2082 (modify-phases %standard-phases
2083 (replace 'configure
2084 (lambda _ (invoke "./configure")))
2085 (add-after 'install 'move-sublibs
2086 (lambda* (#:key outputs #:allow-other-keys)
2087 (let* ((out (assoc-ref outputs "out"))
2088 (lib (string-append out "/lib/ocaml/site-lib")))
2089 (mkdir-p (string-append lib "/stublibs"))
2090 (rename-file (string-append lib "/zarith/dllzarith.so")
2091 (string-append lib "/stublibs/dllzarith.so"))))))))
2092 (home-page "https://forge.ocamlcore.org/projects/zarith/")
2093 (synopsis "Implements arbitrary-precision integers")
2094 (description "Implements arithmetic and logical operations over
2095arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
2096over big integers. Small integers are represented as Caml unboxed integers,
2097for speed and space economy.")
2098 (license license:lgpl2.1+))) ; with an exception
2099
2100(define-public ocaml-frontc
2101 (package
2102 (name "ocaml-frontc")
2103 (version "4.1.0")
2104 (source (origin
2105 (method git-fetch)
2106 (uri (git-reference
2107 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
2108 (commit (string-append "v" version))))
2109 (file-name (git-file-name name version))
2110 (sha256
2111 (base32
2112 "1mi1vh4qgscnb470qwidccaqd068j1bqlz6pf6wddk21paliwnqb"))))
2113 (build-system dune-build-system)
2114 (arguments
2115 `(#:phases
2116 (modify-phases %standard-phases
2117 (add-after 'unpack 'make-writable
2118 (lambda _
2119 (for-each make-file-writable (find-files "." ".")))))))
2120 (native-inputs
2121 (list ocaml-menhir ocaml-odoc))
2122 (properties `((upstream-name . "FrontC")))
2123 (home-page "https://www.irit.fr/FrontC")
2124 (synopsis "C parser and lexer library")
2125 (description "FrontC is an OCAML library providing a C parser and lexer.
2126The result is a syntactic tree easy to process with usual OCAML tree management.
2127It provides support for ANSI C syntax, old-C K&R style syntax and the standard
2128GNU CC attributes. It provides also a C pretty printer as an example of use.")
2129 (license license:lgpl2.1)))
2130
2131(define-public ocaml-qcheck
2132 (package
2133 (name "ocaml-qcheck")
2134 (version "0.20")
2135 (source
2136 (origin
2137 (method git-fetch)
2138 (uri (git-reference
2139 (url "https://github.com/c-cube/qcheck")
2140 (commit (string-append "v" version))))
2141 (file-name (git-file-name name version))
2142 (sha256
2143 (base32 "1r0m5p1dd06lbgfxqdpl1ya4vb8252z7hqkvdi9k444g4rx2ay3p"))))
2144 (build-system dune-build-system)
2145 (propagated-inputs
2146 (list ocaml-alcotest ocaml-ounit ocaml-ppxlib))
2147 (native-inputs
2148 (list ocamlbuild))
2149 (home-page "https://github.com/c-cube/qcheck")
2150 (synopsis "QuickCheck inspired property-based testing for OCaml")
2151 (description "QuickCheck inspired property-based testing for OCaml. This
2152module checks invariants (properties of some types) over randomly
2153generated instances of the type. It provides combinators for generating
2154instances and printing them.")
2155 (license license:lgpl3+)))
2156
2157(define-public ocaml-qtest
2158 (package
2159 (name "ocaml-qtest")
2160 (version "2.11.2")
2161 (source (origin
2162 (method git-fetch)
2163 (uri (git-reference
2164 (url "https://github.com/vincent-hugot/qtest/")
2165 (commit (string-append "v" version))))
2166 (file-name (git-file-name name version))
2167 (sha256
2168 (base32
2169 "04ghjshh6104xyglm0db9kv90m62qla5f4bfrlndv6dsvgw3rdjl"))))
2170 (build-system dune-build-system)
2171 (propagated-inputs
2172 `(("ounit" ,ocaml-ounit)
2173 ("qcheck" ,ocaml-qcheck)))
2174 (home-page "https://github.com/vincent-hugot/qtest")
2175 (synopsis "Inline (Unit) Tests for OCaml")
2176 (description "Qtest extracts inline unit tests written using a special
2177syntax in comments. Those tests are then run using the oUnit framework and the
2178qcheck library. The possibilities range from trivial tests -- extremely simple
2179to use -- to sophisticated random generation of test cases.")
2180 (license license:lgpl3+)))
2181
2182(define-public ocaml-stringext
2183 (package
2184 (name "ocaml-stringext")
2185 (version "1.6.0")
2186 (source (origin
2187 (method git-fetch)
2188 (uri (git-reference
2189 (url "https://github.com/rgrinberg/stringext")
2190 (commit version)))
2191 (file-name (git-file-name name version))
2192 (sha256
2193 (base32
2194 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
2195 (build-system dune-build-system)
2196 (native-inputs
2197 `(("ocamlbuild" ,ocamlbuild)
2198 ("qtest" ,ocaml-qtest)))
2199 (home-page "https://github.com/rgrinberg/stringext")
2200 (synopsis "Extra string functions for OCaml")
2201 (description "Provides a single module named Stringext that provides a grab
2202bag of often used but missing string functions from the stdlib. E.g, split,
2203full_split, cut, rcut, etc..")
2204 ;; the only mention of a license in this project is in its `opam' file
2205 ;; where it says `mit'.
2206 (license license:expat)))
2207
2208(define-public dune-bootstrap
2209 (package
2210 (name "dune")
2211 (version "3.19.1")
2212 (source (origin
2213 (method git-fetch)
2214 (uri (git-reference
2215 (url "https://github.com/ocaml/dune")
2216 (commit version)))
2217 (file-name (git-file-name name version))
2218 (sha256
2219 (base32
2220 "01ys792jnld5yihhyirwkk4jlqm59bk0vrqjvvk5xjn8pp26vryq"))))
2221 (build-system ocaml-build-system)
2222 (arguments
2223 `(#:tests? #f; require odoc
2224 #:make-flags ,#~(list "release"
2225 (string-append "PREFIX=" #$output)
2226 (string-append "LIBDIR=" #$output
2227 "/lib/ocaml/site-lib"))
2228 #:phases
2229 (modify-phases %standard-phases
2230 (replace 'configure
2231 (lambda* (#:key outputs #:allow-other-keys)
2232 (mkdir-p "src/dune")
2233 (invoke "./configure")
2234 #t)))))
2235 (home-page "https://github.com/ocaml/dune")
2236 (synopsis "OCaml build system")
2237 (description "Dune is a build system for OCaml. It provides a consistent
2238experience and takes care of the low-level details of OCaml compilation.
2239Descriptions of projects, libraries and executables are provided in
2240@file{dune} files following an s-expression syntax.")
2241 (properties '((hidden? . #t)))
2242 (license license:expat)))
2243
2244(define-public ocaml4.09-dune-bootstrap
2245 (package-with-ocaml4.09 dune-bootstrap))
2246
2247(define-public ocaml5.0-dune-bootstrap
2248 (package-with-ocaml5.0 dune-bootstrap))
2249
2250(define-public dune-configurator
2251 (package
2252 (inherit dune-bootstrap)
2253 (name "dune-configurator")
2254 (build-system dune-build-system)
2255 (arguments
2256 `(#:package "dune-configurator"
2257 #:dune ,dune-bootstrap
2258 ; require ppx_expect
2259 #:tests? #f
2260 #:phases
2261 (modify-phases %standard-phases
2262 ;; When building dune, these directories are normally removed after
2263 ;; the bootstrap.
2264 (add-before 'build 'remove-vendor
2265 (lambda _
2266 (delete-file-recursively "vendor/csexp")
2267 (delete-file-recursively "vendor/pp"))))))
2268 (propagated-inputs
2269 (list ocaml-csexp))
2270 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))
2271 (ocaml5.0-variant . ,(delay ocaml5.0-dune-configurator))))
2272 (synopsis "Dune helper library for gathering system configuration")
2273 (description "Dune-configurator is a small library that helps writing
2274OCaml scripts that test features available on the system, in order to generate
2275config.h files for instance. Among other things, dune-configurator allows one to:
2276
2277@itemize
2278@item test if a C program compiles
2279@item query pkg-config
2280@item import #define from OCaml header files
2281@item generate config.h file
2282@end itemize")))
2283
2284(define-public ocaml4.09-dune-configurator
2285 (package
2286 (inherit dune-configurator)
2287 (name "ocaml4.09-dune-configurator")
2288 (arguments
2289 `(,@(package-arguments dune-configurator)
2290 #:dune ,ocaml4.09-dune-bootstrap
2291 #:ocaml ,ocaml-4.09
2292 #:findlib ,ocaml4.09-findlib))
2293 (propagated-inputs
2294 `(("ocaml-csexp" ,ocaml4.09-csexp)))))
2295
2296(define-public ocaml5.0-dune-configurator
2297 (package
2298 (inherit dune-configurator)
2299 (name "ocaml5.0-dune-configurator")
2300 (arguments
2301 `(,@(package-arguments dune-configurator)
2302 #:dune ,ocaml5.0-dune-bootstrap
2303 #:ocaml ,ocaml-5.0
2304 #:findlib ,ocaml5.0-findlib))
2305 (propagated-inputs (list ocaml5.0-csexp))))
2306
2307(define-public dune
2308 (package
2309 (inherit dune-bootstrap)
2310 (propagated-inputs
2311 (list dune-configurator))
2312 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
2313 (ocaml4.09-variant . ,(delay ocaml4.09-dune))
2314 (ocaml5.0-variant . ,(delay ocaml5.0-dune))))))
2315
2316(define-public ocaml4.09-dune
2317 (package
2318 (inherit ocaml4.09-dune-bootstrap)
2319 (propagated-inputs
2320 (list dune-configurator))))
2321
2322(define-public ocaml4.07-dune
2323 (package
2324 (inherit (package-with-ocaml4.07 dune-bootstrap))
2325 (version "1.11.3")
2326 (source (origin
2327 (method git-fetch)
2328 (uri (git-reference
2329 (url "https://github.com/ocaml/dune")
2330 (commit version)))
2331 (file-name (git-file-name "dune" version))
2332 (sha256
2333 (base32
2334 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
2335
2336(define-public ocaml5.0-dune
2337 (package
2338 (inherit ocaml5.0-dune-bootstrap)
2339 (propagated-inputs
2340 (list ocaml5.0-dune-configurator))))
2341
2342(define-public ocaml-pp
2343 (package
2344 (name "ocaml-pp")
2345 (version "2.0.0")
2346 (source (origin
2347 (method git-fetch)
2348 (uri (git-reference
2349 (url "https://github.com/ocaml-dune/pp")
2350 (commit version)))
2351 (file-name (git-file-name name version))
2352 (sha256
2353 (base32
2354 "1gfd6hrb031qzb54v2zhlfxs54x0vnbaj6a8as07pvpwx7qznyss"))))
2355 (build-system dune-build-system)
2356 (propagated-inputs (list ocaml-odoc))
2357 (native-inputs (list ocaml-ppx-expect))
2358 (home-page "https://github.com/ocaml-dune/pp")
2359 (synopsis "Pretty-printing library")
2360 (description
2361 "This library provides an alternative to the @code{Format} module of the OCaml
2362standard library. Pp uses the same concepts of boxes and break hints, and the
2363final rendering is done to formatter from the @code{Format} module. However it
2364defines its own algebra which some might find easier to work with and reason
2365about.")
2366 (license license:expat)))
2367
2368(define-public dune-ordering
2369 (package
2370 (inherit dune)
2371 (name "dune-ordering")
2372 (source (origin
2373 (inherit (package-source dune))
2374 (modules '((guix build utils)))
2375 (snippet
2376 `(begin
2377 (delete-file-recursively "vendor/pp")
2378 (delete-file-recursively "vendor/csexp")))))
2379 (build-system dune-build-system)
2380 (arguments
2381 `(#:package "ordering"
2382 ;; Tests have a cyclic dependency on stdune
2383 #:tests? #f))
2384 (properties '())
2385 (synopsis "Dune element ordering")
2386 (description "This library represents element ordering in OCaml.")))
2387
2388(define-public dune-dyn
2389 (package
2390 (inherit dune-ordering)
2391 (name "dune-dyn")
2392 (build-system dune-build-system)
2393 (arguments
2394 `(#:package "dyn"
2395 ;; Tests have a cyclic dependency on stdune
2396 #:tests? #f))
2397 (propagated-inputs (list ocaml-pp dune-ordering))
2398 (synopsis "Dune dynamic types")
2399 (description "This library represents dynamic types in OCaml.")))
2400
2401(define-public dune-stdune
2402 (package
2403 (inherit dune-ordering)
2404 (name "dune-stdune")
2405 (build-system dune-build-system)
2406 (arguments
2407 `(#:package "stdune"
2408 ;; Tests have a cyclic dependency on itself
2409 #:tests? #f))
2410 (propagated-inputs (list dune-dyn ocaml-pp))
2411 (synopsis "Unstable standard library from Dune")
2412 (description "This library implements the standard functions used by Dune.")))
2413
2414(define-public dune-private-libs
2415 (package
2416 (inherit dune-ordering)
2417 (name "dune-private-libs")
2418 (build-system dune-build-system)
2419 (arguments
2420 `(#:package "dune-private-libs"
2421 #:tests? #f))
2422 (native-inputs (list dune-stdune ocaml-ppx-expect ocaml-ppx-inline-test))
2423 (synopsis "Private libraries of Dune")
2424 (description "This package contains code that is shared between various
2425dune packages. However, it is not meant for public consumption and provides
2426no stability guarantee.")))
2427
2428(define-public dune-site
2429 (package
2430 (inherit dune-ordering)
2431 (name "dune-site")
2432 (build-system dune-build-system)
2433 (arguments
2434 `(#:package "dune-site"
2435 #:tests? #f))
2436 (propagated-inputs (list dune-private-libs))
2437 (synopsis "Location information embedder")
2438 (description "This library helps embed location information inside
2439executables and libraries")))
2440
2441(define-public ocaml-csexp
2442 (package
2443 (name "ocaml-csexp")
2444 (version "1.5.1")
2445 (source (origin
2446 (method git-fetch)
2447 (uri (git-reference
2448 (url "https://github.com/ocaml-dune/csexp")
2449 (commit version)))
2450 (file-name (git-file-name name version))
2451 (sha256
2452 (base32
2453 "1v5y4x1a21193h8q536c0s0d8hv3hyyky4pgzm2dw9807v36s2x4"))))
2454 (build-system dune-build-system)
2455 (arguments
2456 `(#:tests? #f; FIXME: needs ppx_expect, but which version?
2457 #:dune ,dune-bootstrap
2458 #:phases
2459 (modify-phases %standard-phases
2460 (add-before 'build 'chmod
2461 (lambda _
2462 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
2463 #t)))))
2464 (propagated-inputs
2465 (list ocaml-result))
2466 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))
2467 (ocaml5.0-variant . ,(delay ocaml5.0-csexp))))
2468 (home-page "https://github.com/ocaml-dune/csexp")
2469 (synopsis "Parsing and printing of S-expressions in Canonical form")
2470 (description "This library provides minimal support for Canonical
2471S-expressions. Canonical S-expressions are a binary encoding of
2472S-expressions that is super simple and well suited for communication
2473between programs.
2474
2475This library only provides a few helpers for simple applications. If
2476you need more advanced support, such as parsing from more fancy input
2477sources, you should consider copying the code of this library given
2478how simple parsing S-expressions in canonical form is.
2479
2480To avoid a dependency on a particular S-expression library, the only
2481module of this library is parameterised by the type of S-expressions.")
2482 (license license:expat)))
2483
2484(define-public ocaml4.09-csexp
2485 (package
2486 (inherit ocaml-csexp)
2487 (name "ocaml4.09-csexp")
2488 (arguments
2489 `(#:ocaml ,ocaml-4.09
2490 #:findlib ,ocaml4.09-findlib
2491 ,@(substitute-keyword-arguments arguments
2492 ((#:dune _) ocaml4.09-dune-bootstrap))))
2493 (propagated-inputs
2494 `(("ocaml-result" ,ocaml4.09-result)))))
2495
2496(define-public ocaml5.0-csexp
2497 (package
2498 (inherit ocaml-csexp)
2499 (name "ocaml5.0-csexp")
2500 (arguments
2501 `(#:ocaml ,ocaml-5.0
2502 #:findlib ,ocaml5.0-findlib
2503 ,@(substitute-keyword-arguments arguments
2504 ((#:dune _) ocaml5.0-dune-bootstrap))))
2505 (propagated-inputs
2506 `(("ocaml-result" ,ocaml5.0-result)))))
2507
2508(define-public ocaml-migrate-parsetree
2509 (package
2510 (name "ocaml-migrate-parsetree")
2511 (version "2.4.0")
2512 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
2513 (source
2514 (origin
2515 (method git-fetch)
2516 (uri (git-reference
2517 (url home-page)
2518 (commit version)))
2519 (file-name (git-file-name name version))
2520 (sha256
2521 (base32
2522 "0a1qy0ik36j8hpqxvh3fxf4aibjqax989mihj73jncchv8qv4ynq"))))
2523 (build-system dune-build-system)
2524 (arguments `(#:tests? #f))
2525 (propagated-inputs
2526 (list ocaml-ppx-derivers ocamlbuild ocaml-result))
2527 (properties `((upstream-name . "ocaml-migrate-parsetree")))
2528 (synopsis "OCaml parsetree converter")
2529 (description "This library converts between parsetrees of different OCaml
2530versions. For each version, there is a snapshot of the parsetree and conversion
2531functions to the next and/or previous version.")
2532 (license license:lgpl2.1+)))
2533
2534(define-public ocaml-linenoise
2535 (package
2536 (name "ocaml-linenoise")
2537 (version "1.4.0")
2538 (source (origin
2539 (method git-fetch)
2540 (uri (git-reference
2541 (url "https://github.com/ocaml-community/ocaml-linenoise")
2542 (commit (string-append "v" version))))
2543 (file-name (git-file-name name version))
2544 (sha256
2545 (base32
2546 "1gk11pflal08kg2dz1b5zrlpnhbxpg2rwf8cknw3vzmq6gsmk2kc"))))
2547 (build-system dune-build-system)
2548 (arguments
2549 ;; No tests
2550 `(#:tests? #f))
2551 (propagated-inputs (list ocaml-result ocaml-odoc))
2552 (home-page "https://github.com/ocaml-community/ocaml-linenoise")
2553 (synopsis "Lightweight readline alternative")
2554 (description "This package is a line-reading library for OCaml that aims
2555to replace readline.")
2556 (license license:bsd-2)))
2557
2558(define-public ocaml-bitstring
2559 (package
2560 (name "ocaml-bitstring")
2561 (version "4.1.0")
2562 (source (origin
2563 (method git-fetch)
2564 (uri (git-reference
2565 (url "https://github.com/xguerin/bitstring")
2566 (commit (string-append "v" version))))
2567 (file-name (git-file-name name version))
2568 (sha256
2569 (base32
2570 "0mghsl8b2zd2676mh1r9142hymhvzy9cw8kgkjmirxkn56wbf56b"))))
2571 (build-system dune-build-system)
2572 (native-inputs
2573 (list time autoconf automake))
2574 (propagated-inputs
2575 (list ocaml-stdlib-shims))
2576 (arguments
2577 `(#:package "bitstring"
2578 #:tests? #f; Tests fail to build
2579 #:phases
2580 (modify-phases %standard-phases
2581 (add-before 'build 'upgrade
2582 (lambda _
2583 (invoke "dune" "upgrade")
2584 #t)))))
2585 (home-page "https://github.com/xguerin/bitstring")
2586 (synopsis "Bitstrings and bitstring matching for OCaml")
2587 (description "Adds Erlang-style bitstrings and matching over bitstrings as
2588a syntax extension and library for OCaml. You can use this module to both parse
2589and generate binary formats, files and protocols. Bitstring handling is added
2590as primitives to the language, making it exceptionally simple to use and very
2591powerful.")
2592 (license license:isc)))
2593
2594(define-public ocaml-ppx-bitstring
2595 (package
2596 (inherit ocaml-bitstring)
2597 (name "ocaml-ppx-bitstring")
2598 (arguments
2599 `(#:package "ppx_bitstring"
2600 ;; No tests
2601 #:tests? #f))
2602 (propagated-inputs (list ocaml-bitstring ocaml-ppxlib))
2603 (native-inputs (list ocaml-ounit))
2604 (properties `((upstream-name . "ppx_bitstring")))
2605 (synopsis "PPX extension for bitstrings and bitstring matching")
2606 (description
2607 "This package provides a way to write bitstrings and matching over
2608bitsrings in Erlang style as primitives to the language.")))
2609
2610(define-public ocaml-result
2611 (package
2612 (name "ocaml-result")
2613 (version "1.5")
2614 (source (origin
2615 (method git-fetch)
2616 (uri (git-reference
2617 (url "https://github.com/janestreet/result")
2618 (commit version)))
2619 (file-name (git-file-name name version))
2620 (sha256
2621 (base32
2622 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
2623 (build-system dune-build-system)
2624 (arguments
2625 `(#:dune ,dune-bootstrap))
2626 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))
2627 (ocaml5.0-variant . ,(delay ocaml5.0-result))))
2628 (home-page "https://github.com/janestreet/result")
2629 (synopsis "Compatibility Result module")
2630 (description "Uses the new result type defined in OCaml >= 4.03 while
2631staying compatible with older version of OCaml should use the Result module
2632defined in this library.")
2633 (license license:bsd-3)))
2634
2635(define-public ocaml4.09-result
2636 (package
2637 (inherit ocaml-result)
2638 (name "ocaml4.09-result")
2639 (arguments
2640 `(#:dune ,ocaml4.09-dune-bootstrap
2641 #:ocaml ,ocaml-4.09
2642 #:findlib ,ocaml4.09-findlib))))
2643
2644(define-public ocaml5.0-result
2645 (package
2646 (inherit ocaml-result)
2647 (name "ocaml5.0-result")
2648 (arguments
2649 `(#:dune ,ocaml5.0-dune-bootstrap
2650 #:ocaml ,ocaml-5.0
2651 #:findlib ,ocaml5.0-findlib))))
2652
2653(define-public ocaml-iso8601
2654 (package
2655 (name "ocaml-iso8601")
2656 (version "0.2.6")
2657 (source
2658 (origin
2659 (method git-fetch)
2660 (uri (git-reference
2661 (url "https://github.com/ocaml-community/ISO8601.ml")
2662 (commit version)))
2663 (file-name (git-file-name name version))
2664 (sha256
2665 (base32 "0nzadswspizi7s6sf67icn2xgc3w150x8vdg5nk1mjrm2s98n6d3"))))
2666 (build-system dune-build-system)
2667 (propagated-inputs (list ocaml-stdlib-shims ocaml-core-unix ocaml-ounit))
2668 (synopsis "Parser and printer for date-times in ISO8601")
2669 (description "This package allows parsing of dates that follow the ISO 8601
2670and RFC 3339 formats in OCaml.")
2671 (home-page "https://github.com/ocaml-community/ISO8601.ml")
2672 (license license:expat)))
2673
2674(define-public ocaml-toml
2675 (package
2676 (name "ocaml-toml")
2677 (version "7.1.0")
2678 (source
2679 (origin
2680 (method git-fetch)
2681 (uri (git-reference
2682 (url "https://github.com/ocaml-toml/To.ml")
2683 (commit version)))
2684 (file-name (git-file-name name version))
2685 (sha256
2686 (base32 "0z2873mj3i6h9cg8zlkipcjab8jympa4c4avhk4l04755qzphkds"))))
2687 (build-system dune-build-system)
2688 (propagated-inputs (list ocaml-base ocaml-mdx ocaml-menhir ocaml-iso8601))
2689 (synopsis "TOML library for OCaml")
2690 (description
2691 "This package provides an OCaml library for interacting with files
2692in the @acronym{TOML, Tom's Obvious Minimal Language} format. Specifically,
2693it provides a parser, a serializer, and a pretty printer.")
2694 (home-page "https://github.com/ocaml-toml/To.ml")
2695 (license license:expat)))
2696
2697(define-public ocaml-grain-dypgen
2698 (package
2699 (name "ocaml-grain-dypgen")
2700 (version "0.2")
2701 (source
2702 (origin
2703 (method git-fetch)
2704 (uri (git-reference
2705 (url "https://github.com/grain-lang/dypgen")
2706 (commit version)))
2707 (file-name (git-file-name name version))
2708 (sha256
2709 (base32 "1jyxkvi75nchk5kmhqixmjy70z55gmlqa83pxn0hsv2qxvyqxavw"))))
2710 (build-system ocaml-build-system)
2711 (arguments
2712 (list
2713 ;; Upstream does not have a test suite.
2714 #:tests? #f
2715 #:make-flags #~(let ((out #$output))
2716 (list (string-append "OCAMLLIBDIR=" out
2717 "/lib/ocaml/site-lib")
2718 (string-append "BINDIR=" out "/bin")
2719 (string-append "MANDIR=" out "/share/man")))
2720 #:phases #~(modify-phases %standard-phases
2721 (delete 'configure))))
2722 (properties `((upstream-name . "grain_dypgen")))
2723 (home-page "https://github.com/grain-lang/dypgen")
2724 (synopsis "Self-extensible parsers and lexers for OCaml")
2725 (description
2726 "This package provides a @acronym{GLR, generalized LR} parser generator
2727for OCaml. It is able to generate self-extensible parsers (also called
2728adaptive parsers) as well as extensible lexers for the parsers it produces.")
2729 (license license:cecill-b)))
2730
2731(define-public ocaml-topkg
2732 (package
2733 (name "ocaml-topkg")
2734 (version "1.0.6")
2735 (source (origin
2736 (method url-fetch)
2737 (uri (string-append "http://erratique.ch/software/topkg/releases/"
2738 "topkg-" version ".tbz"))
2739 (sha256
2740 (base32
2741 "11ycfk0prqvifm9jca2308gw8a6cjb1hqlgfslbji2cqpan09kpq"))))
2742 (build-system ocaml-build-system)
2743 (native-inputs
2744 (list opam-installer ocamlbuild))
2745 (propagated-inputs
2746 `(("result" ,ocaml-result)))
2747 (arguments
2748 `(#:tests? #f
2749 #:build-flags '("build")
2750 #:phases
2751 (modify-phases %standard-phases
2752 (delete 'configure))))
2753 (home-page "https://erratique.ch/software/topkg")
2754 (synopsis "Transitory OCaml software packager")
2755 (description "Topkg is a packager for distributing OCaml software. It
2756provides an API to describe the files a package installs in a given build
2757configuration and to specify information about the package's distribution,
2758creation and publication procedures.")
2759 (license license:isc)))
2760
2761(define-public ocaml-rresult
2762 (package
2763 (name "ocaml-rresult")
2764 (version "0.7.0")
2765 (source (origin
2766 (method url-fetch)
2767 (uri (string-append "http://erratique.ch/software/rresult/releases/"
2768 "rresult-" version ".tbz"))
2769 (sha256
2770 (base32
2771 "0h2mjyzhay1p4k7n0mzaa7hlc7875kiy6m1i3r1n03j6hddpzahi"))))
2772 (build-system ocaml-build-system)
2773 (native-inputs
2774 (list opam-installer ocamlbuild))
2775 (propagated-inputs
2776 `(("topkg" ,ocaml-topkg)))
2777 (arguments
2778 `(#:tests? #f
2779 #:build-flags '("build")
2780 #:phases
2781 (modify-phases %standard-phases
2782 (delete 'configure))))
2783 (home-page "https://erratique.ch/software/rresult")
2784 (synopsis "Result value combinators for OCaml")
2785 (description "Handle computation results and errors in an explicit and
2786declarative manner, without resorting to exceptions. It defines combinators
2787to operate on the result type available from OCaml 4.03 in the standard
2788library.")
2789 (license license:isc)))
2790
2791(define-public ocaml-sqlite3
2792 (package
2793 (name "ocaml-sqlite3")
2794 (version "5.1.0")
2795 (source
2796 (origin
2797 (method git-fetch)
2798 (uri (git-reference
2799 (url "https://github.com/mmottl/sqlite3-ocaml")
2800 (commit version)))
2801 (file-name (git-file-name name version))
2802 (sha256
2803 (base32
2804 "1ksm0a490315sf0yy8lmva5f3bgr0jnllffanyq89431grpj6x15"))))
2805 (build-system dune-build-system)
2806 (propagated-inputs
2807 (list dune-configurator ocaml-odoc))
2808 (native-inputs
2809 (list ocaml-ppx-inline-test pkg-config sqlite))
2810 (home-page "https://mmottl.github.io/sqlite3-ocaml")
2811 (synopsis "SQLite3 Bindings for OCaml")
2812 (description
2813 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
2814API. Sqlite3 is a self-contained, serverless, zero-configuration,
2815transactional SQL database engine with outstanding performance for many use
2816cases. These bindings are written in a way that enables a friendly
2817coexistence with the old (version 2) SQLite and its OCaml wrapper
2818@code{ocaml-sqlite}.")
2819 (license license:expat)))
2820
2821(define-public ocaml-csv
2822 (package
2823 (name "ocaml-csv")
2824 (version "2.4")
2825 (source
2826 (origin
2827 (method git-fetch)
2828 (uri (git-reference
2829 (url "https://github.com/Chris00/ocaml-csv")
2830 (commit version)))
2831 (file-name (git-file-name name version))
2832 (sha256
2833 (base32
2834 "0y2hlqlmqs7r4y5mfzc5qdv7gdp3wxbwpz458vf7fj4593vg94cf"))))
2835 (build-system dune-build-system)
2836 (arguments
2837 `(#:package "csv"))
2838 (home-page "https://github.com/Chris00/ocaml-csv")
2839 (synopsis "Pure OCaml functions to read and write CSV")
2840 (description
2841 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
2842by all major spreadsheets. This library implements pure OCaml functions to
2843read and write files in this format as well as some convenience functions to
2844manipulate such data.")
2845 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
2846 ;; against the library to be released under any terms.
2847 (license license:lgpl2.1)))
2848
2849(define-public ocaml-mtime
2850 (package
2851 (name "ocaml-mtime")
2852 (version "2.0.0")
2853 (source (origin
2854 (method url-fetch)
2855 (uri (string-append "https://erratique.ch/software/mtime/releases/"
2856 "mtime-" version ".tbz"))
2857 (sha256
2858 (base32
2859 "1ss4w3qxsfp51d88r0j7dzqs05dbb1xdx11hn1jl9cvd03ma0g9z"))))
2860 (build-system ocaml-build-system)
2861 (native-inputs
2862 (list ocamlbuild opam-installer))
2863 (propagated-inputs
2864 `(("topkg" ,ocaml-topkg)))
2865 (arguments
2866 `(#:tests? #f
2867 #:build-flags (list "build")
2868 #:phases
2869 (modify-phases %standard-phases
2870 (delete 'configure))))
2871 (home-page "https://erratique.ch/software/mtime")
2872 (synopsis "Monotonic wall-clock time for OCaml")
2873 (description "Access monotonic wall-clock time. It measures time
2874spans without being subject to operating system calendar time adjustments.")
2875 (license license:isc)))
2876
2877(define-public ocaml-calendar
2878 ;; No tags.
2879 ;; Commit from 2019-02-03.
2880 (let ((commit "a447a88ae3c1e9873e32d2a95d3d3e7c5ed4a7da")
2881 (revision "0"))
2882 (package
2883 (name "ocaml-calendar")
2884 ;; Makefile.in says 2.04.
2885 (version (git-version "2.04" revision commit))
2886 (source
2887 (origin
2888 (method git-fetch)
2889 (uri (git-reference
2890 (url "https://github.com/ocaml-community/calendar")
2891 (commit commit)))
2892 (file-name (git-file-name name version))
2893 (sha256
2894 (base32
2895 "09d9gyqm3zkf3z2m9fx87clqihx6brf8rnzm4yq7c8kf1p572hmc"))))
2896 (build-system gnu-build-system)
2897 (arguments
2898 '(#:test-target "tests"
2899 #:phases
2900 (modify-phases %standard-phases
2901 (add-after 'unpack 'make-deterministic
2902 (lambda _
2903 (substitute* "Makefile.in"
2904 (("`date`") "no date for reproducibility"))))
2905 (add-before 'install 'set-environment-variables
2906 (lambda* (#:key outputs #:allow-other-keys)
2907 (let ((out (assoc-ref outputs "out")))
2908 (setenv "OCAMLFIND_DESTDIR"
2909 (string-append out "/lib/ocaml/site-lib"))
2910 (setenv "OCAMLFIND_LDCONF" "ignore")
2911 (mkdir-p (string-append
2912 out "/lib/ocaml/site-lib/calendar"))))))))
2913 (native-inputs
2914 (list autoconf automake))
2915 (propagated-inputs
2916 `(("ocaml" ,ocaml)
2917 ("ocamlfind" ,ocaml-findlib)))
2918 (home-page "https://github.com/ocaml-community/calendar")
2919 (synopsis "OCaml library for handling dates and times")
2920 (description "This package provides types and operations over
2921dates and times.")
2922 ;; With linking exception.
2923 (license license:lgpl2.1+))))
2924
2925(define-public ocaml-cmdliner
2926 (package
2927 (name "ocaml-cmdliner")
2928 (version "1.1.1")
2929 (source (origin
2930 (method url-fetch)
2931 (uri (string-append "https://erratique.ch/software/cmdliner/releases/"
2932 "cmdliner-" version ".tbz"))
2933 (sha256
2934 (base32
2935 "1yxm4x34cbi06bfld601ds9drlbnyx0797ym3n6yyh4rlz1qgbm1"))))
2936 (build-system ocaml-build-system)
2937 (inputs
2938 (list ocaml-result))
2939 (native-inputs
2940 (list ocamlbuild))
2941 (arguments
2942 `(#:tests? #f
2943 #:make-flags ,#~(list (string-append "LIBDIR=" #$output
2944 "/lib/ocaml/site-lib/cmdliner"))
2945 #:phases
2946 (modify-phases %standard-phases
2947 (delete 'configure)
2948 (add-before 'build 'fix-source-file-order
2949 (lambda _
2950 (substitute* "build.ml"
2951 (("Sys.readdir dir")
2952 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
2953 #t)))))
2954 (home-page "https://erratique.ch/software/cmdliner")
2955 (synopsis "Declarative definition of command line interfaces for OCaml")
2956 (description "Cmdliner is a module for the declarative definition of command
2957line interfaces. It provides a simple and compositional mechanism to convert
2958command line arguments to OCaml values and pass them to your functions. The
2959module automatically handles syntax errors, help messages and UNIX man page
2960generation. It supports programs with single or multiple commands and respects
2961most of the POSIX and GNU conventions.")
2962 (license license:bsd-3)))
2963
2964(define-public ocaml-fmt
2965 (package
2966 (name "ocaml-fmt")
2967 (version "0.9.0")
2968 (source
2969 (origin
2970 (method url-fetch)
2971 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
2972 version ".tbz"))
2973 (sha256 (base32
2974 "0q8j2in2473xh7k4hfgnppv9qy77f2ih89yp6yhpbp92ba021yzi"))))
2975 (build-system ocaml-build-system)
2976 (native-inputs
2977 (list ocamlbuild
2978 opam-installer
2979 ocaml-topkg))
2980 (propagated-inputs
2981 (list ocaml-cmdliner
2982 ocaml-stdlib-shims
2983 ocaml-uchar))
2984 (arguments `(#:tests? #f
2985 #:build-flags (list "build" "--with-base-unix" "true"
2986 "--with-cmdliner" "true")
2987 #:phases
2988 (modify-phases %standard-phases
2989 (delete 'configure))))
2990 (home-page "https://erratique.ch/software/fmt")
2991 (synopsis "OCaml Format pretty-printer combinators")
2992 (description "Fmt exposes combinators to devise Format pretty-printing
2993functions.")
2994 (license license:isc)))
2995
2996(define-public ocaml-astring
2997 (package
2998 (name "ocaml-astring")
2999 (version "0.8.5")
3000 (source
3001 (origin
3002 (method url-fetch)
3003 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
3004 version ".tbz"))
3005 (sha256 (base32
3006 "1ykhg9gd3iy7zsgyiy2p9b1wkpqg9irw5pvcqs3sphq71iir4ml6"))))
3007 (build-system ocaml-build-system)
3008 (native-inputs
3009 (list ocamlbuild
3010 opam-installer
3011 ocaml-topkg))
3012 (arguments
3013 `(#:tests? #f
3014 #:build-flags (list "build")
3015 #:phases
3016 (modify-phases %standard-phases
3017 (delete 'configure))))
3018 (home-page "https://erratique.ch/software/astring")
3019 (synopsis "Alternative String module for OCaml")
3020 (description "Astring exposes an alternative String module for OCaml. This
3021module balances minimality and expressiveness for basic, index-free, string
3022processing and provides types and functions for substrings, string sets and
3023string maps. The String module exposed by Astring has exception safe functions,
3024removes deprecated and rarely used functions, alters some signatures and names,
3025adds a few missing functions and fully exploits OCaml's newfound string
3026immutability.")
3027 (license license:isc)))
3028
3029(define-public ocaml-alcotest
3030 (package
3031 (name "ocaml-alcotest")
3032 (version "1.7.0")
3033 (source (origin
3034 (method git-fetch)
3035 (uri (git-reference
3036 (url "https://github.com/mirage/alcotest")
3037 (commit version)))
3038 (file-name (git-file-name name version))
3039 (sha256
3040 (base32
3041 "0v01vciihd12r30pc4dai70s15p38gy990b4842sn16pvl0ab1az"))))
3042 (build-system dune-build-system)
3043 (arguments
3044 `(#:package "alcotest"
3045 #:phases
3046 (modify-phases %standard-phases
3047 (add-after 'unpack 'fix-test-format
3048 (lambda _
3049 ;; cmdliner changed the format and the tests fail
3050 (substitute* "test/e2e/alcotest/failing/unknown_option.expected"
3051 (("`") "'")
3052 (("\\.\\.\\.") "…")))))))
3053 (native-inputs
3054 (list ocamlbuild))
3055 (propagated-inputs
3056 (list ocaml-astring
3057 ocaml-cmdliner
3058 ocaml-fmt
3059 ocaml-re
3060 ocaml-stdlib-shims
3061 ocaml-uuidm
3062 ocaml-uutf))
3063 (home-page "https://github.com/mirage/alcotest")
3064 (synopsis "Lightweight OCaml test framework")
3065 (description "Alcotest exposes simple interface to perform unit tests. It
3066exposes a simple TESTABLE module type, a check function to assert test
3067predicates and a run function to perform a list of unit -> unit test callbacks.
3068Alcotest provides a quiet and colorful output where only faulty runs are fully
3069displayed at the end of the run (with the full logs ready to inspect), with a
3070simple (yet expressive) query language to select the tests to run.")
3071 (license license:isc)))
3072
3073(define-public ocaml-expect-test-helpers-core
3074 (package
3075 (name "ocaml-expect-test-helpers-core")
3076 (version "0.15.0")
3077 (source (origin
3078 (method git-fetch)
3079 (uri (git-reference
3080 (url
3081 "https://github.com/janestreet/expect_test_helpers_core")
3082 (commit (string-append "v" version))))
3083 (file-name (git-file-name name version))
3084 (sha256
3085 (base32
3086 "0bxs3g0zzym8agfcbpg5lmrh6hcb86z861bq40xhhfwqf4pzdbfa"))))
3087 (build-system dune-build-system)
3088 (propagated-inputs (list ocaml-base
3089 ocaml-base-quickcheck
3090 ocaml-core
3091 ocaml-ppx-jane
3092 ocaml-sexp-pretty
3093 ocaml-stdio
3094 ocaml-re))
3095 (properties `((upstream-name . "expect_test_helpers_core")))
3096 (home-page "https://github.com/janestreet/expect_test_helpers_core")
3097 (synopsis "Helpers for writing expectation tests")
3098 (description "Helper functions for writing expect tests.")
3099 (license license:expat)))
3100
3101(define-public ocaml-ppx-tools
3102 (package
3103 (name "ocaml-ppx-tools")
3104 (version "6.6")
3105 (source
3106 (origin
3107 (method git-fetch)
3108 (uri (git-reference
3109 (url "https://github.com/alainfrisch/ppx_tools")
3110 (commit version)))
3111 (file-name (git-file-name name version))
3112 (sha256
3113 (base32
3114 "1ms2i063cwsm8wcw7jixz3qx2f2prrmf0k44gbksvsgqvm1rl6s2"))))
3115 (build-system dune-build-system)
3116 (arguments
3117 ;; No tests
3118 `(#:tests? #f))
3119 (native-inputs
3120 (list ocaml-cppo))
3121 (properties `((upstream-name . "ppx_tools")))
3122 (home-page "https://github.com/alainfrisch/ppx_tools")
3123 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
3124 (description
3125 "Ppx_tools provides tools for authors of ppx rewriters and other
3126syntactic tools.")
3127 (license license:expat)))
3128
3129(define-public ocaml-yaml
3130 (package
3131 (name "ocaml-yaml")
3132 (version "3.2.0")
3133 (home-page "https://github.com/avsm/ocaml-yaml")
3134 (source
3135 (origin
3136 (method git-fetch)
3137 (uri (git-reference
3138 (url home-page)
3139 (commit (string-append "v" version))))
3140 (file-name (git-file-name name version))
3141 (sha256
3142 (base32 "1m0i9qdazmziswfw1bz4m1x9mlzqyv336vbrss0c21am4im9n6k6"))))
3143 (build-system dune-build-system)
3144 (propagated-inputs (list ocaml-ppx-sexp-conv ocaml-ctypes ocaml-bos))
3145 (native-inputs (list ocaml-fmt
3146 ocaml-sexplib
3147 ocaml-logs
3148 ocaml-mdx
3149 ocaml-alcotest
3150 ocaml-crowbar
3151 ocaml-junit-alcotest
3152 ocaml-ezjsonm))
3153 (synopsis "Parse and generate YAML 1.1/1.2 files")
3154 (description
3155 "This package is an OCaml library to parse and generate the YAML file
3156format. It is intended to be interoperable with the @code{Ezjsonm}
3157JSON handling library, if the simple common subset of Yaml is used. Anchors and
3158other advanced Yaml features are not implemented in the JSON compatibility
3159layer.")
3160 (license license:isc)))
3161
3162(define-public ocaml-ppx-deriving-yaml
3163 (package
3164 (name "ocaml-ppx-deriving-yaml")
3165 (version "0.2.1")
3166 (home-page "https://github.com/patricoferris/ppx_deriving_yaml")
3167 (source
3168 (origin
3169 (method git-fetch)
3170 (uri (git-reference
3171 (url home-page)
3172 (commit (string-append "v" version))))
3173 (file-name (git-file-name name version))
3174 (sha256
3175 (base32 "1cxcqgvyl4ykyl86mf2d4ka6frnq51m1yqy0z5v6vdxkixllf9jd"))))
3176 (build-system dune-build-system)
3177 (propagated-inputs (list ocaml-ppxlib ocaml-ppx-deriving ocaml-yaml
3178 ocaml-odoc))
3179 (native-inputs (list ocaml-alcotest ocaml-bos ocaml-mdx ocaml-ezjsonm))
3180 (properties `((upstream-name . "ppx_deriving_yaml")))
3181 (synopsis "Yaml PPX Deriver")
3182 (description
3183 "This package contains @code{deriving} conversion functions to and from
3184yaml for OCaml types.")
3185 (license license:isc)))
3186
3187(define-public ocaml-ppx-import
3188 (package
3189 (name "ocaml-ppx-import")
3190 (version "1.10.0")
3191 (home-page "https://github.com/ocaml-ppx/ppx_import")
3192 (source
3193 (origin
3194 (method git-fetch)
3195 (uri (git-reference
3196 (url home-page)
3197 (commit version)))
3198 (file-name (git-file-name name version))
3199 (sha256
3200 (base32 "06srfd6whfwkmjvl6m61kvc65fb7j9b25bhfr1mp338zm87smv5p"))))
3201 (build-system dune-build-system)
3202 (propagated-inputs (list ocaml-ppx-deriving ocaml-ppxlib
3203 ocaml-ppx-sexp-conv))
3204 (native-inputs (list ocaml-ounit ocaml-sexplib0))
3205 (properties `((upstream-name . "ppx_import")))
3206 (synopsis "Extension for importing declarations from interface files")
3207 (description
3208 "Ppx-import is a syntax extension for importing declarations from
3209interface files.")
3210 (license license:expat)))
3211
3212(define-public ocaml-parmap
3213 (package
3214 (name "ocaml-parmap")
3215 (version "1.2.5")
3216 (source
3217 (origin
3218 (method git-fetch)
3219 (uri (git-reference
3220 (url "https://github.com/rdicosmo/parmap")
3221 (commit version)))
3222 (file-name (git-file-name name version))
3223 (sha256
3224 (base32
3225 "0x5gnfap9f7kmgh8j725vxlbkvlplwzbpn8jdx2ywfa3dd6bn6xl"))))
3226 (build-system dune-build-system)
3227 (propagated-inputs
3228 (list ocaml-odoc))
3229 (home-page "https://github.com/rdicosmo/parmap")
3230 (synopsis "Parallel map and fold primitives for OCaml")
3231 (description
3232 "Library to perform parallel fold or map taking advantage of multiple
3233core architectures for OCaml programs. Drop-in replacement for these
3234@code{List} operations are provided:
3235
3236@itemize
3237@item @code{List.map} -> @code{parmap}
3238@item @code{List.map} -> @code{parfold}
3239@item @code{List.mapfold} -> @code{parmapfold}
3240@end itemize
3241
3242Also it allows specifying the number of cores to use with the optional
3243parameter @code{ncores}.")
3244 (license (list license:lgpl2.0
3245 (license:fsdg-compatible "file://LICENSE"
3246 "See LICENSE file for details")))))
3247
3248(define-public ocaml-pyml
3249 ;; NOTE: Using commit from master branch as 20220905 does not support
3250 ;; Python 3.10.
3251 (let ((revision "0")
3252 (commit "e33f4c49cc97e7bc6f8e5faaa64cce994470642e"))
3253 (package
3254 (name "ocaml-pyml")
3255 (version (git-version "20220905" revision commit))
3256 (source
3257 (origin
3258 (method git-fetch)
3259 (uri (git-reference
3260 (url "https://github.com/thierry-martinez/pyml")
3261 (commit commit)))
3262 (file-name (git-file-name name version))
3263 (sha256
3264 (base32
3265 "1v421i5cvj8mbgrg5cs78bz1yzdprm9r5r41niiy20d3j7j8jx9k"))))
3266 (build-system dune-build-system)
3267 (propagated-inputs
3268 (list ocaml-stdcompat
3269 python
3270 python-numpy))
3271 (home-page "https://github.com/thierry-martinez/pyml")
3272 (synopsis "Python bindings for OCaml")
3273 (description "Library that allows OCaml programs to interact with Python
3274modules and objects. The library also provides low-level bindings to the
3275Python C API.
3276
3277This library is an alternative to @code{pycaml} which is no longer
3278maintained. The @code{Pycaml} module provides a signature close to
3279@code{pycaml}, to ease migration of code to this library.")
3280 (license license:bsd-2))))
3281
3282(define-public ocaml-react
3283 (package
3284 (name "ocaml-react")
3285 (version "1.2.2")
3286 (source
3287 (origin
3288 (method url-fetch)
3289 (uri (string-append "http://erratique.ch/software/react/releases/react-"
3290 version ".tbz"))
3291 (sha256 (base32
3292 "16cg4byj8lfbbw96dhh8sks5y9n1c3fshz7f2p8m7wgisqax7bf4"))))
3293 (build-system ocaml-build-system)
3294 (native-inputs
3295 (list ocamlbuild opam-installer ocaml-topkg))
3296 (arguments
3297 `(#:tests? #f
3298 #:build-flags (list "build")
3299 #:phases
3300 (modify-phases %standard-phases
3301 (delete 'configure))))
3302 (home-page "https://erratique.ch/software/react")
3303 (synopsis "Declarative events and signals for OCaml")
3304 (description "React is an OCaml module for functional reactive programming
3305(FRP). It provides support to program with time varying values: declarative
3306events and signals. React doesn't define any primitive event or signal, it
3307lets the client choose the concrete timeline.")
3308 (license license:bsd-3)))
3309
3310(define-public ocaml-ssl
3311 (package
3312 (name "ocaml-ssl")
3313 (version "0.5.13")
3314 (source
3315 (origin
3316 (method git-fetch)
3317 (uri (git-reference
3318 (url "https://github.com/savonet/ocaml-ssl")
3319 (commit version)))
3320 (file-name (git-file-name name version))
3321 (sha256 (base32
3322 "1bg5vagklq6yfxsvcnj2i76xis8hb59088hkic82smyrxdjd1kjs"))))
3323 (build-system dune-build-system)
3324 (native-inputs
3325 (list autoconf automake ocaml-alcotest which))
3326 (propagated-inputs (list openssl))
3327 (home-page "https://github.com/savonet/ocaml-ssl/")
3328 (synopsis "OCaml bindings for OpenSSL")
3329 (description
3330 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
3331through Transport Layer Security (@dfn{TLS}) encrypted connections.")
3332 (license license:lgpl2.1)))
3333
3334(define-public ocaml-mmap
3335 (package
3336 (name "ocaml-mmap")
3337 (version "1.2.0")
3338 (source (origin
3339 (method git-fetch)
3340 (uri (git-reference
3341 (url "https://github.com/mirage/mmap")
3342 (commit (string-append "v" version))))
3343 (file-name (git-file-name name version))
3344 (sha256
3345 (base32
3346 "1a7w7l682cbksn2zlmz24gb519x7wb65ivr5vndm9x5pi9fw5pfb"))))
3347 (build-system dune-build-system)
3348 (propagated-inputs (list ocaml-bigarray-compat))
3349 (home-page "https://github.com/mirage/mmap")
3350 (synopsis "File mapping for OCaml")
3351 (description "This project provides a @command{Mmap.map_file} function
3352for mapping files in memory. This function is the same as the
3353@command{Unix.map_file} function added in OCaml >= 4.06.")
3354 (license (list license:qpl license:lgpl2.0))))
3355
3356(define-public ocaml-psq
3357 (package
3358 (name "ocaml-psq")
3359 (version "0.2.1")
3360 (home-page "https://github.com/pqwy/psq")
3361 (source
3362 (origin
3363 (method git-fetch)
3364 (uri (git-reference
3365 (url home-page)
3366 (commit (string-append "v" version))))
3367 (file-name (git-file-name name version))
3368 (sha256 (base32
3369 "0ahxbzkbq5sw8sqv31c2lil2zny4076q8b0dc7h5slq7i2r23d79"))))
3370 (build-system dune-build-system)
3371 (native-inputs (list ocaml-qcheck ocaml-alcotest))
3372 (synopsis "Functional Priority Search Queues for OCaml")
3373 (description
3374 "This library provides Functional Priority Search Queues for OCaml.
3375Typical applications are searches, schedulers and caches.")
3376 (license license:isc)))
3377
3378(define-public ocaml-optint
3379 (package
3380 (name "ocaml-optint")
3381 (version "0.3.0")
3382 (home-page "https://github.com/mirage/optint")
3383 (source
3384 (origin
3385 (method git-fetch)
3386 (uri (git-reference
3387 (url home-page)
3388 (commit (string-append "v" version))))
3389 (file-name (git-file-name name version))
3390 (sha256 (base32
3391 "1qj32bcw1in7s6raxdvbmjr3lvj99iwv98x1ar9cwxp4zf8ybfss"))))
3392 (build-system dune-build-system)
3393 (native-inputs (list ocaml-crowbar ocaml-monolith ocaml-fmt))
3394 (synopsis "Efficient integer types on 64-bit architectures for OCaml")
3395 (description
3396 "This OCaml library provides two new integer types, @code{Optint.t} and
3397@code{Int63.t}, which guarantee efficient representation on 64-bit
3398architectures and provide a best-effort boxed representation on 32-bit
3399architectures.")
3400 (license license:isc)))
3401
3402(define-public ocaml-hmap
3403 (package
3404 (name "ocaml-hmap")
3405 (version "0.8.1")
3406 (source
3407 (origin
3408 (method url-fetch)
3409 (uri "https://erratique.ch/software/hmap/releases/hmap-0.8.1.tbz")
3410 (sha256
3411 (base32 "10xyjy4ab87z7jnghy0wnla9wrmazgyhdwhr4hdmxxdn28dxn03a"))))
3412 (build-system ocaml-build-system)
3413 (arguments
3414 `(#:build-flags
3415 (list "build" "--tests" "true")
3416 #:phases
3417 (modify-phases %standard-phases
3418 (delete 'configure))))
3419 (native-inputs (list ocaml-topkg ocamlbuild opam-installer))
3420 (home-page "https://erratique.ch/software/hmap")
3421 (synopsis "Heterogeneous value maps for OCaml")
3422 (description
3423 "Hmap provides heterogeneous value maps for OCaml. These maps bind keys to
3424values with arbitrary types. Keys witness the type of the value they are bound
3425to which allows adding and looking up bindings in a type safe manner.")
3426 (license license:isc)))
3427
3428(define ocaml-eio
3429 (package
3430 (name "ocaml-eio")
3431 (version "0.8.1")
3432 (home-page "https://github.com/ocaml-multicore/eio")
3433 (source
3434 (origin
3435 (method git-fetch)
3436 (uri (git-reference
3437 (url home-page)
3438 (commit (string-append "v" version))))
3439 (file-name (git-file-name name version))
3440 (sha256 (base32
3441 "02q9i5wbb2497vd4ypc9d9p4zi3lmx0rsv8faiy7h8dnnzbjjf4z"))))
3442 (build-system dune-build-system)
3443 (arguments `(#:package "eio"))
3444 (propagated-inputs (list ocaml-bigstringaf
3445 ocaml-cstruct
3446 ocaml-lwt
3447 ocaml-lwt-dllist
3448 ocaml-logs
3449 ocaml-optint
3450 ocaml-psq
3451 ocaml-fmt
3452 ocaml-hmap
3453 ocaml-mtime
3454 ocaml-odoc))
3455 (native-inputs (list ocaml-astring
3456 ocaml-crowbar
3457 ocaml-alcotest
3458 ocaml-mdx))
3459 (synopsis "Effect-based direct-style IO API for OCaml")
3460 (description "This package provides an effect-based IO API for multicore
3461OCaml with fibers.")
3462 (license license:isc)))
3463
3464(define-public ocaml5.0-eio
3465 (package-with-ocaml5.0 ocaml-eio))
3466
3467(define ocaml-eio-luv
3468 (package
3469 (inherit ocaml-eio)
3470 (name "ocaml-eio-luv")
3471 (arguments `(#:package "eio_luv"))
3472 (propagated-inputs (list ocaml-eio ocaml-luv))
3473 (native-inputs (list ocaml-mdx))
3474 (synopsis "Libuv-based backend for Ocaml Eio")
3475 (description "@code{Eio_luv} provides a cross-platform backend for
3476@code{Ocaml Eio}'s APIs using luv (libuv)")))
3477
3478(define-public ocaml5.0-eio-luv
3479 (package-with-ocaml5.0 ocaml-eio-luv))
3480
3481(define-public ocaml-unionfind
3482 (package
3483 (name "ocaml-unionfind")
3484 (version "20220122")
3485 (source
3486 (origin
3487 (method git-fetch)
3488 (uri (git-reference
3489 (url "https://gitlab.inria.fr/fpottier/unionfind")
3490 (commit version)))
3491 (file-name (git-file-name name version))
3492 (sha256
3493 (base32 "0hdh56rbg8vfjd61q09cbmh8l5wmry5ykivg7gsm0v5ckkb3531r"))))
3494 (build-system dune-build-system)
3495 (arguments
3496 (list ;; The test allocates an Array that is too large for OCaml when on a
3497 ;; 32-bit architecture.
3498 #:tests? (target-64bit?)))
3499 (home-page "https://gitlab.inria.fr/fpottier/unionFind")
3500 (synopsis "Union-find data structure")
3501 (description "This package provides two union-find data structure
3502implementations for OCaml. Both implementations are based on disjoint sets
3503forests, with path compression and linking-by-rank, so as to guarantee good
3504asymptotic complexity: every operation requires a quasi-constant number of
3505accesses to the store.")
3506 ;; Version 2 only, with linking exception.
3507 (license license:lgpl2.0)))
3508
3509(define-public ocaml-uring
3510 (package
3511 (name "ocaml-uring")
3512 (version "0.5")
3513 (home-page "https://github.com/ocaml-multicore/ocaml-uring")
3514 (source
3515 (origin
3516 (method git-fetch)
3517 (uri (git-reference
3518 (url home-page)
3519 (commit (string-append "v" version))))
3520 (file-name (git-file-name name version))
3521 (sha256 (base32
3522 "0ygx8v01bb5808wy6nppg40h1ns8b1f2l585lwc4389z4wrppk95"))))
3523 (build-system dune-build-system)
3524 (propagated-inputs
3525 (list ocaml-cstruct
3526 ocaml-fmt
3527 ocaml-optint))
3528 (native-inputs
3529 (list ocaml-lwt
3530 ocaml-bechamel
3531 ocaml-logs
3532 ocaml-cmdliner
3533 ocaml-mdx))
3534 (synopsis "OCaml bindings for Linux io_uring")
3535 (description "This package provides OCaml bindings to the Linux
3536@code{io_uring} kernel IO interfaces.")
3537 (license
3538 (list license:isc license:expat))))
3539
3540(define ocaml-eio-linux
3541 (package
3542 (inherit ocaml-eio)
3543 (name "ocaml-eio-linux")
3544 (arguments `(#:package "eio_linux"))
3545 (propagated-inputs
3546 (list ocaml-eio
3547 ocaml-uring
3548 ocaml-logs
3549 ocaml-fmt))
3550 (native-inputs
3551 (list ocaml-mdx
3552 ocaml-alcotest
3553 ocaml-mdx))
3554 (synopsis "Linux backend for ocaml-eio")
3555 (description "@code{Eio_linux} provides a Linux io-uring backend for
3556@code{Ocaml Eio} APIs, plus a low-level API that can be used directly
3557(in non-portable code).")))
3558
3559(define-public ocaml5.0-eio-linux
3560 (package-with-ocaml5.0 ocaml-eio-linux))
3561
3562(define ocaml-eio-main
3563 (package
3564 (inherit ocaml-eio)
3565 (name "ocaml-eio-main")
3566 (arguments `(#:package "eio_main"
3567 ;; tests require network
3568 #:tests? #f))
3569 (propagated-inputs
3570 (list ocaml-eio
3571 ocaml-eio-luv
3572 ocaml-eio-linux))
3573 (native-inputs
3574 (list ocaml-mdx))
3575 (synopsis "Eio backend selector")
3576 (description "@code{Eio_main} selects an appropriate backend (e.g.
3577@samp{eio_linux} or @samp{eio_luv}), depending on your platform.")))
3578
3579(define-public ocaml5.0-eio-main
3580 (package-with-ocaml5.0 ocaml-eio-main))
3581
3582(define-public ocaml-lwt
3583 (package
3584 (name "ocaml-lwt")
3585 (version "5.6.1")
3586 (source
3587 (origin
3588 (method git-fetch)
3589 (uri (git-reference
3590 (url "https://github.com/ocsigen/lwt")
3591 (commit version)))
3592 (file-name (git-file-name name version))
3593 (sha256 (base32
3594 "0cfmhw4nsnwba49p06l9fbnbcq75w9fd3kvrr615ihjc9frlmjsy"))))
3595 (build-system dune-build-system)
3596 (arguments
3597 `(#:package "lwt"))
3598 (native-inputs
3599 (list ocaml-cppo pkg-config))
3600 (inputs
3601 (list glib))
3602 (propagated-inputs
3603 (list ocaml-mmap ocaml-ocplib-endian ocaml-result ocaml-seq libev))
3604 (home-page "https://github.com/ocsigen/lwt")
3605 (synopsis "Cooperative threads and I/O in monadic style")
3606 (description "Lwt provides typed, composable cooperative threads. These
3607make it easy to run normally-blocking I/O operations concurrently in a single
3608process. Also, in many cases, Lwt threads can interact without the need for
3609locks or other synchronization primitives.")
3610 (license license:lgpl2.1)))
3611
3612;; TODO this alias is not ideal but ocaml-lwt already explicitly specifies a
3613;; package argument and at least this way the importer doesn't try to
3614;; re-import it.
3615(define ocaml-lwt-ppx ocaml-lwt)
3616
3617(define-public ocaml-lwt-dllist
3618 (package
3619 (name "ocaml-lwt-dllist")
3620 (version "1.0.1")
3621 (home-page "https://github.com/mirage/lwt-dllist")
3622 (source (origin
3623 (method git-fetch)
3624 (uri (git-reference
3625 (url home-page)
3626 (commit (string-append "v" version))))
3627 (file-name (git-file-name name version))
3628 (sha256
3629 (base32
3630 "18bi8fb4yly1pyf43pjvvdhlyzb3wkgxifffx9d1g9y2mwsng6jw"))))
3631 (build-system dune-build-system)
3632 (native-inputs (list ocaml-lwt))
3633 (synopsis "OCaml library providing mutable doubly-linked list with Lwt iterators")
3634 (description "This OCaml library provides an implementation of a mutable
3635doubly-linked list with Lwt iterators.")
3636 (license license:expat)))
3637
3638
3639(define-public ocaml-shared-memory-ring
3640 (package
3641 (name "ocaml-shared-memory-ring")
3642 (version "3.1.1")
3643 (source (origin
3644 (method git-fetch)
3645 (uri (git-reference
3646 (url "https://github.com/mirage/shared-memory-ring")
3647 (commit (string-append "v" version))))
3648 (file-name (git-file-name name version))
3649 (sha256
3650 (base32
3651 "12cpbia39aifnd8rxpsra0lhssqj5qw0zygb5fd8kg58zy2clmrr"))))
3652 (build-system dune-build-system)
3653 (arguments
3654 '(#:package "shared-memory-ring"))
3655 (propagated-inputs (list ocaml-cstruct ocaml-ppx-cstruct ocaml-lwt-dllist
3656 ocaml-mirage-profile))
3657 (native-inputs (list ocaml-ounit))
3658 (home-page "https://github.com/mirage/shared-memory-ring")
3659 (synopsis "Xen-style shared memory rings")
3660 (description
3661 "Libraries for creating shared memory producer/consumer rings. The rings
3662follow the Xen ABI and may be used to create or implement Xen virtual
3663devices.")
3664 (license license:isc)))
3665
3666(define-public ocaml-shared-memory-ring-lwt
3667 (package
3668 (inherit ocaml-shared-memory-ring)
3669 (name "ocaml-shared-memory-ring-lwt")
3670 (arguments
3671 '(#:package "shared-memory-ring-lwt"))
3672 (propagated-inputs (modify-inputs (package-propagated-inputs
3673 ocaml-shared-memory-ring)
3674 (append ocaml-shared-memory-ring)))))
3675
3676(define-public ocaml-xenstore
3677 (package
3678 (name "ocaml-xenstore")
3679 (version "2.2.0")
3680 (source (origin
3681 (method git-fetch)
3682 (uri (git-reference
3683 (url "https://github.com/mirage/ocaml-xenstore")
3684 (commit (string-append "v" version))))
3685 (file-name (git-file-name name version))
3686 (sha256
3687 (base32
3688 "1acld5gxmvnhl5iyyy5ancpm7fv9d6ns1x32krcmb62p2czd00ky"))))
3689 (build-system dune-build-system)
3690 (propagated-inputs (list ocaml-cstruct ocaml-ppx-cstruct ocaml-lwt))
3691 (native-inputs (list ocaml-ounit2))
3692 (home-page "https://github.com/mirage/ocaml-xenstore")
3693 (synopsis "Xenstore protocol in pure OCaml")
3694 (description "Repository contents:
3695@itemize
3696@item client library, a merge of the Mirage and XCP ones
3697@item server library
3698@item server instance which runs under Unix with libxc
3699@item server instance which runs on mirage.
3700@end itemize
3701The client and the server libraries have sets of unit-tests.")
3702 ;; Has a linking exception, see LICENSE.md.
3703 (license license:lgpl2.1)))
3704
3705(define-public ocaml-mirage-xen
3706 (package
3707 (name "ocaml-mirage-xen")
3708 (version "8.0.1")
3709 (source (origin
3710 (method git-fetch)
3711 (uri (git-reference
3712 (url "https://github.com/mirage/mirage-xen")
3713 (commit (string-append "v" version))))
3714 (file-name (git-file-name name version))
3715 (sha256
3716 (base32
3717 "1qydg92dbw8hj4b809apj0f51cjgmamq3zdf34a4wyn5jv85yzyx"))))
3718 (build-system dune-build-system)
3719 (propagated-inputs (list ocaml-cstruct
3720 ocaml-lwt
3721 ocaml-shared-memory-ring-lwt
3722 ocaml-xenstore
3723 ocaml-lwt-dllist
3724 ;; ocaml-mirage-profile dependency cycle
3725 ocaml-io-page
3726 ocaml-mirage-runtime
3727 ocaml-logs
3728 ocaml-fmt
3729 ocaml-bheap
3730 ocaml-duration))
3731 (home-page "https://github.com/mirage/mirage-xen")
3732 (synopsis "Xen core platform libraries for MirageOS")
3733 (description
3734 "MirageOS OS library for Xen targets, which handles the main
3735loop and timers. It also provides the low level C startup code and C stubs
3736required by the OCaml code.")
3737 (license license:isc)))
3738
3739(define-public ocaml-io-page
3740 (package
3741 (name "ocaml-io-page")
3742 (version "3.0.0")
3743 (source (origin
3744 (method git-fetch)
3745 (uri (git-reference
3746 (url "https://github.com/mirage/io-page")
3747 (commit (string-append "v" version))))
3748 (file-name (git-file-name name version))
3749 (sha256
3750 (base32
3751 "0lmvm1whdw5s7rvi7jnjzicrp2j919dkjl856jwyjlq38f7qn0zm"))))
3752 (build-system dune-build-system)
3753 (propagated-inputs (list ocaml-cstruct))
3754 (native-inputs (list pkg-config ocaml-ounit))
3755 (home-page "https://github.com/mirage/io-page")
3756 (synopsis "Support for efficient handling of I/O memory pages")
3757 (description
3758 "IO pages are page-aligned, and wrapped in the @code{Cstruct} library to
3759avoid copying the data contained within the page.")
3760 (license license:isc)))
3761
3762(define-public ocaml-bheap
3763 (package
3764 (name "ocaml-bheap")
3765 (version "2.0.0")
3766 (source (origin
3767 (method git-fetch)
3768 (uri (git-reference
3769 (url "https://github.com/backtracking/bheap")
3770 (commit version)))
3771 (file-name (git-file-name name version))
3772 (sha256
3773 (base32
3774 "0b8md5zl4yz7j62jz0bf7lwyl0pyqkxqx36ghkgkbkxb4zzggfj1"))))
3775 (build-system dune-build-system)
3776 (native-inputs (list ocaml-stdlib-shims))
3777 (home-page "https://github.com/backtracking/bheap")
3778 (synopsis "Priority queues")
3779 (description
3780 "Traditional implementation of priority queues using a binary heap
3781encoded in a resizable array.")
3782 (license license:lgpl2.1)))
3783
3784(define-public ocaml-luv
3785 (package
3786 (name "ocaml-luv")
3787 (version "0.5.14")
3788 (source (origin
3789 (method url-fetch)
3790 (uri (string-append "https://github.com/aantron/luv/releases/download/"
3791 version "/luv-" version ".tar.gz"))
3792 (sha256
3793 (base32
3794 "16dfv8gzpqdcqpcil5pd7a44vp64hw35q94fipcwsxl81jjv80cf"))
3795 (modules '((guix build utils)))
3796 (snippet
3797 '(begin
3798 ;; Remove bundled configure and libuv.
3799 (delete-file-recursively "src/c/vendor")
3800 #t))))
3801 (build-system dune-build-system)
3802 (arguments
3803 (list #:phases
3804 #~(modify-phases %standard-phases
3805 (add-before 'build 'use-system-libuv
3806 (lambda _
3807 (setenv "LUV_USE_SYSTEM_LIBUV" "yes")))
3808 (replace 'check
3809 (lambda* (#:key tests? #:allow-other-keys)
3810 (when tests?
3811 (invoke "dune" "runtest" "--no-buffer" "--force")))))))
3812 (inputs (list libuv))
3813 (propagated-inputs (list ocaml-ctypes ocaml-result ocaml-odoc))
3814 (native-inputs (list ocaml-base ocaml-alcotest))
3815 (home-page "https://github.com/aantron/luv")
3816 (synopsis "Binding to libuv: cross-platform asynchronous I/O")
3817 (description
3818 "Luv is a binding to libuv, the cross-platform C library that does
3819asynchronous I/O in Node.js and runs its main loop. Besides asynchronous I/O,
3820libuv also supports multiprocessing and multithreading. Multiple event loops
3821can be run in different threads. libuv also exposes a lot of other
3822functionality, amounting to a full OS API, and an alternative to the standard
3823module Unix.")
3824 (license license:expat)))
3825
3826(define-public ocaml-lwt-react
3827 (package
3828 (inherit ocaml-lwt)
3829 (name "ocaml-lwt-react")
3830 (version "1.2.0")
3831 (source (origin
3832 (method git-fetch)
3833 (uri (git-reference
3834 (url "https://github.com/ocsigen/lwt")
3835 ;; Version from opam
3836 (commit "5.6.0")))
3837 (file-name (git-file-name name version))
3838 (sha256
3839 (base32
3840 "12sglfwdx4anfslj437g7gxchklgzfvba6i4p478kmqr56j2xd0c"))))
3841 (arguments
3842 `(#:package "lwt_react"))
3843 (properties `((upstream-name . "lwt_react")))
3844 (propagated-inputs
3845 (list ocaml-lwt ocaml-react))))
3846
3847(define-public ocaml-lwt-log
3848 (package
3849 (name "ocaml-lwt-log")
3850 (version "1.1.2")
3851 (source (origin
3852 (method git-fetch)
3853 (uri (git-reference
3854 (url "https://github.com/aantron/lwt_log")
3855 (commit version)))
3856 (file-name (git-file-name name version))
3857 (sha256
3858 (base32
3859 "0mbv5l9gj09jd1c4lr2axcl4v043ipmhjd9xrk27l4hylzfc6d1q"))))
3860 (build-system dune-build-system)
3861 (arguments
3862 `(#:tests? #f)); require lwt_ppx
3863 (propagated-inputs
3864 `(("lwt" ,ocaml-lwt)))
3865 (properties `((upstream-name . "lwt_log")))
3866 (home-page "https://github.com/aantron/lwt_log")
3867 (synopsis "Logging library")
3868 (description "This package provides a deprecated logging component for
3869ocaml lwt.")
3870 (license license:lgpl2.1)))
3871
3872(define-public ocaml-logs
3873 (package
3874 (name "ocaml-logs")
3875 (version "0.7.0")
3876 (source (origin
3877 (method url-fetch)
3878 (uri (string-append "http://erratique.ch/software/logs/releases/"
3879 "logs-" version ".tbz"))
3880 (sha256
3881 (base32
3882 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
3883 (build-system ocaml-build-system)
3884 (arguments
3885 `(#:tests? #f
3886 #:build-flags (list "build" "--with-js_of_ocaml" "false")
3887 #:phases
3888 (modify-phases %standard-phases
3889 (delete 'configure))))
3890 (native-inputs
3891 (list ocamlbuild opam-installer))
3892 (propagated-inputs
3893 `(("fmt" ,ocaml-fmt)
3894 ("lwt" ,ocaml-lwt)
3895 ("mtime" ,ocaml-mtime)
3896 ("result" ,ocaml-result)
3897 ("cmdliner" ,ocaml-cmdliner)
3898 ("topkg" ,ocaml-topkg)))
3899 (home-page "https://erratique.ch/software/logs")
3900 (synopsis "Logging infrastructure for OCaml")
3901 (description "Logs provides a logging infrastructure for OCaml. Logging is
3902performed on sources whose reporting level can be set independently. Log
3903message report is decoupled from logging and is handled by a reporter.")
3904 (license license:isc)))
3905
3906(define-public ocaml-fpath
3907 (package
3908 (name "ocaml-fpath")
3909 (version "0.7.3")
3910 (source (origin
3911 (method url-fetch)
3912 (uri (string-append "http://erratique.ch/software/fpath/releases/"
3913 "fpath-" version ".tbz"))
3914 (sha256
3915 (base32
3916 "03z7mj0sqdz465rc4drj1gr88l9q3nfs374yssvdjdyhjbqqzc0j"))))
3917 (build-system ocaml-build-system)
3918 (arguments
3919 `(#:tests? #f
3920 #:build-flags (list "build")
3921 #:phases
3922 (modify-phases %standard-phases
3923 (delete 'configure))))
3924 (native-inputs
3925 (list ocamlbuild opam-installer))
3926 (propagated-inputs
3927 `(("topkg" ,ocaml-topkg)
3928 ("astring" ,ocaml-astring)))
3929 (home-page "https://erratique.ch/software/fpath")
3930 (synopsis "File system paths for OCaml")
3931 (description "Fpath is an OCaml module for handling file system paths with
3932POSIX or Windows conventions. Fpath processes paths without accessing the
3933file system and is independent from any system library.")
3934 (license license:isc)))
3935
3936(define-public ocaml-bos
3937 (package
3938 (name "ocaml-bos")
3939 (version "0.2.1")
3940 (source (origin
3941 (method url-fetch)
3942 (uri (string-append "http://erratique.ch/software/bos/releases/"
3943 "bos-" version ".tbz"))
3944 (sha256
3945 (base32
3946 "0dwg7lpaq30rvwc5z1gij36fn9xavvpah1bj8ph9gmhhddw2xmnq"))))
3947 (build-system ocaml-build-system)
3948 (arguments
3949 `(#:tests? #f
3950 #:build-flags (list "build")
3951 #:phases
3952 (modify-phases %standard-phases
3953 (delete 'configure))))
3954 (native-inputs
3955 (list ocamlbuild opam-installer))
3956 (propagated-inputs
3957 `(("topkg" ,ocaml-topkg)
3958 ("astring" ,ocaml-astring)
3959 ("fmt" ,ocaml-fmt)
3960 ("fpath" ,ocaml-fpath)
3961 ("logs" ,ocaml-logs)
3962 ("rresult" ,ocaml-rresult)))
3963 (home-page "https://erratique.ch/software/bos")
3964 (synopsis "Basic OS interaction for OCaml")
3965 (description "Bos provides support for basic and robust interaction with
3966the operating system in OCaml. It has functions to access the process
3967environment, parse command line arguments, interact with the file system and
3968run command line programs.")
3969 (license license:isc)))
3970
3971(define-public ocaml-xml-light
3972 (package
3973 (name "ocaml-xml-light")
3974 (version "2.4")
3975 (source (origin
3976 (method git-fetch)
3977 (uri (git-reference
3978 (url "https://github.com/ncannasse/xml-light")
3979 (commit version)))
3980 (file-name (git-file-name name version))
3981 (sha256
3982 (base32
3983 "089ywjz84y4p5iln94y54vh03b5fm2zrl2dld1398dyrby96dp6s"))))
3984 (build-system ocaml-build-system)
3985 (arguments
3986 (list #:tests? #f ; There are no tests.
3987 #:phases
3988 #~(modify-phases %standard-phases
3989 (add-after 'unpack 'prefix
3990 (lambda _
3991 (substitute* "Makefile"
3992 (("`\\$\\(OCAMLC\\) -where`")
3993 (string-append #$output "/lib/ocaml/site-lib/xml-light")))))
3994 (delete 'configure) ; no configure
3995 (add-before 'install 'mkdir
3996 (lambda _
3997 (mkdir-p (string-append #$output "/lib/ocaml/site-lib/xml-light"))))
3998 (replace 'install
3999 (lambda _
4000 (invoke "make" "install_ocamlfind"))))))
4001 (home-page "https://github.com/ncannasse/xml-light")
4002 (synopsis "Minimal XML parser & printer for OCaml")
4003 (description
4004 "Xml-Light provides functions to parse an XML document into an OCaml data
4005structure, work with it, and print it back to an XML document. It also
4006supports DTD parsing and checking, and is entirely written in OCaml, hence it
4007does not require additional C libraries.")
4008 (license license:lgpl2.1+))) ; with linking exception
4009
4010(define-public ocaml-xmlm
4011 (package
4012 (name "ocaml-xmlm")
4013 (version "1.4.0")
4014 (source (origin
4015 (method url-fetch)
4016 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
4017 "xmlm-" version ".tbz"))
4018 (sha256
4019 (base32
4020 "1ynrjba3wm3axscvggrfijfgsznmphhxnkffqch67l9xiqjm44h9"))))
4021 (build-system ocaml-build-system)
4022 (arguments
4023 `(#:tests? #f
4024 #:build-flags (list "build")
4025 #:phases
4026 (modify-phases %standard-phases
4027 (delete 'configure))))
4028 (native-inputs
4029 (list ocamlbuild ocaml-topkg opam-installer))
4030 (home-page "https://erratique.ch/software/xmlm")
4031 (synopsis "Streaming XML codec for OCaml")
4032 (description "Xmlm is a streaming codec to decode and encode the XML data
4033format. It can process XML documents without a complete in-memory
4034representation of the data.")
4035 (license license:isc)))
4036
4037(define-public ocaml-gen
4038 (package
4039 (name "ocaml-gen")
4040 (version "1.0")
4041 (source (origin
4042 (method git-fetch)
4043 (uri (git-reference
4044 (url "https://github.com/c-cube/gen")
4045 (commit (string-append "v" version))))
4046 (file-name (git-file-name name version))
4047 (sha256
4048 (base32
4049 "1z5nw5wljvcqp8q07h336bbvf9paynia0jsdh4486hlkbmr1ask1"))))
4050 (build-system dune-build-system)
4051 (arguments
4052 `(#:package "gen"))
4053 (propagated-inputs
4054 (list ocaml-odoc ocaml-seq))
4055 (native-inputs
4056 (list ocaml-qtest ocaml-qcheck))
4057 (home-page "https://github.com/c-cube/gen/")
4058 (synopsis "Iterators for OCaml, both restartable and consumable")
4059 (description "Gen implements iterators of OCaml, that are both restartable
4060and consumable.")
4061 (license license:bsd-2)))
4062
4063(define-public ocaml-sedlex
4064 (package
4065 (name "ocaml-sedlex")
4066 (version "3.2")
4067 (source (origin
4068 (method git-fetch)
4069 (uri (git-reference
4070 (url "https://github.com/ocaml-community/sedlex")
4071 (commit (string-append "v" version))))
4072 (file-name (git-file-name name version))
4073 (sha256
4074 (base32
4075 "1vzsmp8mvx9vrgjr5chsk2p2s5ii08c9kizw9ilx78jj30nzamz5"))))
4076 (build-system dune-build-system)
4077 (arguments
4078 (list #:package "sedlex"
4079 #:phases
4080 #~(modify-phases %standard-phases
4081 (add-before 'build 'copy-resources
4082 ;; These three files are needed by src/generator/data/dune,
4083 ;; but would be downloaded using curl at build time.
4084 (lambda* (#:key inputs #:allow-other-keys)
4085 (with-directory-excursion "src/generator/data"
4086 ;; Newer versions of dune emit an error if files it wants to
4087 ;; build already exist. Delete the dune file so dune doesn't
4088 ;; complain.
4089 (delete-file "dune")
4090 (for-each
4091 (lambda (file)
4092 (copy-file (search-input-file inputs file)
4093 (basename file)))
4094 '("share/ucd/extracted/DerivedGeneralCategory.txt"
4095 "share/ucd/DerivedCoreProperties.txt"
4096 "share/ucd/PropList.txt")))))
4097 (add-before 'build 'chmod
4098 (lambda _
4099 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*")))))))
4100 (native-inputs (list ocaml-ppx-expect))
4101 (propagated-inputs
4102 (list ocaml-gen ocaml-ppxlib ocaml-uchar))
4103 (inputs
4104 (list ucd))
4105 (home-page "https://www.cduce.org/download.html#side")
4106 (synopsis "Lexer generator for Unicode and OCaml")
4107 (description "Lexer generator for Unicode and OCaml.")
4108 (license license:expat)))
4109
4110(define-public ocaml-sedlex-2
4111 (package
4112 (inherit ocaml-sedlex)
4113 (name "ocaml-sedlex")
4114 (version "2.6")
4115 (source (origin
4116 (method git-fetch)
4117 (uri (git-reference
4118 (url "https://github.com/ocaml-community/sedlex")
4119 (commit (string-append "v" version))))
4120 (file-name (git-file-name name version))
4121 (sha256
4122 (base32
4123 "1z8mmk1idh9hjhh2b9rp5b1h8kmzcxhagqkw0pvxn6ykx1brskq1"))))
4124 (arguments
4125 (substitute-keyword-arguments arguments
4126 ((#:tests? _ #t) #f))) ; no tests
4127 (native-inputs '())))
4128
4129(define-public ocaml-uchar
4130 (package
4131 (name "ocaml-uchar")
4132 (version "0.0.2")
4133 (source
4134 (origin
4135 (method url-fetch)
4136 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
4137 version "/uchar-" version ".tbz"))
4138 (sha256 (base32
4139 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
4140 (build-system ocaml-build-system)
4141 (arguments
4142 `(#:tests? #f
4143 #:build-flags (list "native=true" "native-dynlink=true")
4144 #:phases
4145 (modify-phases %standard-phases
4146 (delete 'configure))))
4147 (native-inputs
4148 (list ocamlbuild opam-installer))
4149 (home-page "https://github.com/ocaml/uchar")
4150 (synopsis "Compatibility library for OCaml's Uchar module")
4151 (description "The uchar package provides a compatibility library for the
4152`Uchar` module introduced in OCaml 4.03.")
4153 (license license:lgpl2.1)))
4154
4155(define-public ocaml-uutf
4156 (package
4157 (name "ocaml-uutf")
4158 (version "1.0.3")
4159 (source (origin
4160 (method url-fetch)
4161 (uri (string-append "http://erratique.ch/software/uutf/releases/"
4162 "uutf-" version ".tbz"))
4163 (sha256
4164 (base32
4165 "0s05r8ggp1g97zq4rnvbxzj22pv8ld0k5wsdw662jw0y7mhsawl7"))))
4166 (build-system ocaml-build-system)
4167 (arguments
4168 `(#:tests? #f
4169 #:build-flags (list "build")
4170 #:phases
4171 (modify-phases %standard-phases
4172 (delete 'configure))))
4173 (native-inputs
4174 (list ocamlbuild
4175 opam-installer
4176 ocaml-topkg))
4177 (propagated-inputs
4178 `(("uchar" ,ocaml-uchar)
4179 ("cmdliner" ,ocaml-cmdliner)))
4180 (home-page "https://erratique.ch/software/uutf")
4181 (synopsis "Non-blocking streaming Unicode codec for OCaml")
4182 (description "Uutf is a non-blocking streaming codec to decode and encode
4183the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
4184work character by character without blocking on IO. Decoders perform character
4185position tracking and support newline normalization.
4186
4187Functions are also provided to fold over the characters of UTF encoded OCaml
4188string values and to directly encode characters in OCaml Buffer.t values.")
4189 (license license:isc)))
4190
4191(define-public ocaml-uunf
4192 (package
4193 (name "ocaml-uunf")
4194 (version "15.0.0")
4195 (source
4196 (origin
4197 (method url-fetch)
4198 (uri (string-append "https://erratique.ch/software/uunf/releases/uunf-"
4199 version".tbz"))
4200 (sha256
4201 (base32
4202 "1s5svvdqfbzw16rf1h0zm9n92xfdr0qciprd7lcjza8z1hy6pyh7"))))
4203 (build-system ocaml-build-system)
4204 (arguments
4205 `(#:build-flags (list "build" "--tests" "true")
4206 #:phases
4207 (modify-phases %standard-phases
4208 (delete 'configure)
4209 ;; reported and fixed upstream, will be available in next version.
4210 (add-before 'build 'fix-test
4211 (lambda _
4212 (substitute* "test/test.ml"
4213 (("test/NormalizationTest.txt") "-"))))
4214 (add-before 'check 'check-data
4215 (lambda* (#:key inputs #:allow-other-keys)
4216 (copy-file (search-input-file inputs "share/ucd/NormalizationTest.txt")
4217 "test/NormalizationTest.txt"))))))
4218 (native-inputs
4219 `(("ocamlbuild" ,ocamlbuild)
4220 ("opam-installer" ,opam-installer)
4221 ("topkg" ,ocaml-topkg)
4222 ;; Test data is otherwise downloaded with curl
4223 ("unicode" ,ucd)))
4224 (propagated-inputs (list ocaml-uutf))
4225 (home-page "https://erratique.ch/software/uunf")
4226 (synopsis "Unicode text normalization for OCaml")
4227 (description
4228 "Uunf is an OCaml library for normalizing Unicode text. It supports all
4229Unicode normalization forms. The library is independent from any
4230IO mechanism or Unicode text data structure and it can process text
4231without a complete in-memory representation.")
4232 (license license:isc)))
4233
4234(define-public ocaml-jsonm
4235 (package
4236 (name "ocaml-jsonm")
4237 (version "1.0.1")
4238 (source (origin
4239 (method url-fetch)
4240 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
4241 "jsonm-" version ".tbz"))
4242 (sha256
4243 (base32
4244 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
4245 (build-system ocaml-build-system)
4246 (arguments
4247 `(#:tests? #f
4248 #:build-flags (list "build")
4249 #:phases
4250 (modify-phases %standard-phases
4251 (delete 'configure))))
4252 (native-inputs
4253 (list ocamlbuild
4254 opam-installer
4255 ocaml-topkg))
4256 (propagated-inputs
4257 `(("uutf" ,ocaml-uutf)
4258 ("cmdliner" ,ocaml-cmdliner)))
4259 (home-page "https://erratique.ch/software/jsonm")
4260 (synopsis "Non-blocking streaming JSON codec for OCaml")
4261 (description "Jsonm is a non-blocking streaming codec to decode and encode
4262the JSON data format. It can process JSON text without blocking on IO and
4263without a complete in-memory representation of the data.")
4264 (license license:isc)))
4265
4266(define-public ocaml-ocp-indent
4267 (package
4268 (name "ocaml-ocp-indent")
4269 (version "1.8.2")
4270 (source
4271 (origin
4272 (method git-fetch)
4273 (uri (git-reference
4274 (url "https://github.com/OCamlPro/ocp-indent")
4275 (commit version)))
4276 (file-name (git-file-name name version))
4277 (sha256
4278 (base32
4279 "1dvcl108ir9nqkk4mjm9xhhj4p9dx9bmg8bnms54fizs1x3x8ar3"))))
4280 (build-system dune-build-system)
4281 (propagated-inputs
4282 (list ocaml-cmdliner))
4283 (home-page "https://www.typerex.org/ocp-indent.html")
4284 (synopsis "Tool to indent OCaml programs")
4285 (description
4286 "Ocp-indent is based on an approximate, tolerant OCaml parser
4287and a simple stack machine. Presets and configuration options are available,
4288with the possibility to set them project-wide. It supports the most common
4289syntax extensions, and it is extensible for others.
4290
4291This package includes:
4292
4293@itemize
4294@item An indentor program, callable from the command-line or from within editors,
4295@item Bindings for popular editors,
4296@item A library that can be directly used by editor writers, or just for
4297 fault-tolerant and approximate parsing.
4298@end itemize")
4299 (license license:lgpl2.1)))
4300
4301(define-public ocaml-ocp-index
4302 (package
4303 (name "ocaml-ocp-index")
4304 (version "1.3.4")
4305 (source
4306 (origin
4307 (method git-fetch)
4308 (uri (git-reference
4309 (url "https://github.com/OCamlPro/ocp-index")
4310 (commit version)))
4311 (file-name (git-file-name name version))
4312 (sha256
4313 (base32
4314 "031b3s8ppqkpw1n6h87h6jzjkmny6yig9wfimmgwnljafcc83d3b"))))
4315 (build-system dune-build-system)
4316 (arguments
4317 `(#:package "ocp-index"))
4318 (propagated-inputs
4319 (list ocaml-ocp-indent ocaml-re ocaml-cmdliner))
4320 (native-inputs
4321 (list ocaml-cppo))
4322 (home-page "https://www.typerex.org/ocp-index.html")
4323 (synopsis "Lightweight completion and documentation browsing for OCaml libraries")
4324 (description "This package includes only the @code{ocp-index} library
4325and command-line tool.")
4326 ;; All files in libs/ are GNU lgpl2.1
4327 ;; For static linking, clause 6 of LGPL is lifted
4328 ;; All other files under GNU gpl3
4329 (license (list license:gpl3+
4330 license:lgpl2.1+))))
4331
4332(define-public ocaml-domain-name
4333 (package
4334 (name "ocaml-domain-name")
4335 (version "0.4.0")
4336 (source (origin
4337 (method git-fetch)
4338 (uri (git-reference
4339 (url "https://github.com/hannesm/domain-name/")
4340 (commit (string-append "v" version))))
4341 (file-name name)
4342 (sha256
4343 (base32
4344 "1a669zz1pc7sqbi1c13jsnp8algcph2b8gr5fjrjhyh3p232770k"))))
4345 (build-system dune-build-system)
4346 (native-inputs (list ocaml-alcotest))
4347 (home-page "https://github.com/hannesm/domain-name")
4348 (synopsis "RFC 1035 Internet domain name data structure and parser")
4349 (description
4350 "Parses and constructs RFC compliant domain names. The invariants on the
4351length of domain names are preserved throughout the module.")
4352 (license license:isc)))
4353
4354(define-public ocaml-patch
4355 (package
4356 (name "ocaml-patch")
4357 (version "3.1.0")
4358 (build-system dune-build-system)
4359 (source
4360 (origin
4361 (method git-fetch)
4362 (uri (git-reference
4363 (url "https://github.com/hannesm/patch")
4364 (commit (string-append "v" version))))
4365 (file-name (git-file-name name version))
4366 (sha256
4367 (base32 "1zg35f427ixd3jhkiwk91sil45pmf6ns7yfcgyi6gf2r0y241xn3"))))
4368 (native-inputs (list ocaml-alcotest))
4369 (home-page "https://github.com/hannesm/patch")
4370 (synopsis "Applies unified diffs in pure OCaml")
4371 (description
4372 "This package applies unified diffs in pure OCaml.
4373
4374The loosely specified diff file format is widely used for transmitting
4375differences of line-based information. The motivating example is opam, which
4376is able to validate updates being cryptographically signed (e.g. conex) by
4377providing a unified diff.")
4378 (license license:isc)))
4379
4380(define-public ocaml-macaddr
4381 (package
4382 (name "ocaml-macaddr")
4383 (version "5.3.1")
4384 (source (origin
4385 (method git-fetch)
4386 (uri (git-reference
4387 (url "https://github.com/mirage/ocaml-ipaddr/")
4388 (commit (string-append "v" version))))
4389 (file-name name)
4390 (sha256
4391 (base32
4392 "1zgwx0ms3l4k4dzwnkrwq4zzqjrddjsvqn66mbd0rm6aq1ib019d"))))
4393 (build-system dune-build-system)
4394 (arguments '(#:package "macaddr"))
4395 (propagated-inputs (list ocaml-cstruct ocaml-domain-name))
4396 (native-inputs (list ocaml-ounit2 ocaml-ppx-sexp-conv))
4397 (home-page "https://github.com/mirage/ocaml-ipaddr")
4398 (synopsis "OCaml library for manipulation of MAC address representations")
4399 (description
4400 "Features:
4401@itemize
4402@item MAC-48 (Ethernet) address support
4403@item @code{Macaddr} is a @code{Map.OrderedType}
4404@item All types have sexplib serializers/deserializers optionally via the
4405@code{Macaddr_sexp} library
4406@end itemize")
4407 (license license:isc)))
4408
4409(define-public ocaml-ipaddr
4410 ;; same repo and versions as ocaml-macaddr
4411 (package
4412 (inherit ocaml-macaddr)
4413 (name "ocaml-ipaddr")
4414 (arguments '(#:package "ipaddr"))
4415 (propagated-inputs (list ocaml-macaddr ocaml-domain-name))
4416 (synopsis
4417 "Library for manipulation of IP (and MAC) address representations")
4418 (description
4419 "IP address types with serialization, supporting a wide range of RFCs.")
4420 (license license:isc)))
4421
4422(define-public ocaml-pecu
4423 (package
4424 (name "ocaml-pecu")
4425 (version "0.6")
4426 (source (origin
4427 (method url-fetch)
4428 (uri
4429 "https://github.com/mirage/pecu/releases/download/v0.6/pecu-v0.6.tbz")
4430 (sha256
4431 (base32
4432 "1iz5jj9lyl1pah8dfni4wv0qml0ir5zknv4zhw7v50sc8kdbglm9"))))
4433 (build-system dune-build-system)
4434 (native-inputs (list ocaml-fmt ocaml-alcotest ocaml-crowbar ocaml-astring))
4435 (home-page "https://github.com/mirage/pecu")
4436 (synopsis "Encoder/Decoder of Quoted-Printable (RFC2045 & RFC2047)")
4437 (description
4438 "This package provides a non-blocking encoder/decoder of Quoted-Printable
4439according to RFC2045 and RFC2047 (about encoded-word). Useful to translate
4440contents of emails.")
4441 (license license:expat)))
4442
4443(define-public ocaml-emile
4444 (package
4445 (name "ocaml-emile")
4446 (version "1.1")
4447 (source (origin
4448 (method url-fetch)
4449 (uri
4450 "https://github.com/mirage/emile/releases/download/v1.1/emile-v1.1.tbz")
4451 (sha256
4452 (base32
4453 "0r1141makr0b900aby1gn0fccjv1qcqgyxib3bzq8fxmjqwjan8p"))))
4454 (build-system dune-build-system)
4455 (propagated-inputs (list ocaml-angstrom
4456 ocaml-ipaddr
4457 ocaml-base64
4458 ocaml-pecu
4459 ocaml-bigstringaf
4460 ocaml-uutf))
4461 (native-inputs (list ocaml-alcotest))
4462 (home-page "https://github.com/mirage/emile")
4463 (synopsis "Parser of email address according RFC822")
4464 (description
4465 "This package provides a parser of email address according RFC822, RFC2822,
4466RFC5321 and RFC6532. It handles UTF-8 email addresses and encoded-word
4467according RFC2047.")
4468 (license license:expat)))
4469
4470(define-public ocaml-parse-argv
4471 (package
4472 (name "ocaml-parse-argv")
4473 (version "0.2.0")
4474 (source (origin
4475 (method git-fetch)
4476 (uri (git-reference
4477 (url "https://github.com/mirage/parse-argv")
4478 (commit (string-append "v" version))))
4479 (file-name (git-file-name name version))
4480 (sha256
4481 (base32
4482 "16n18zik6vkfnhv8jaigr90fwp1ykg23p61aqchym0jil4i4yq01"))))
4483 (build-system dune-build-system)
4484 (propagated-inputs (list ocaml-astring))
4485 (native-inputs (list ocaml-ounit))
4486 (home-page "https://github.com/mirage/parse-argv")
4487 (synopsis "Process strings into sets of command-line arguments")
4488 (description "Small implementation of a simple argv parser.")
4489 (license license:isc)))
4490
4491(define-public ocaml-functoria-runtime
4492 (package
4493 (name "ocaml-functoria-runtime")
4494 (version "4.3.3")
4495 (source
4496 (origin
4497 (method git-fetch)
4498 (uri
4499 (git-reference
4500 (url "https://github.com/mirage/mirage/")
4501 (commit (string-append "v" version))))
4502 (file-name (git-file-name "mirage" version))
4503 (sha256
4504 (base32
4505 "09mqbffrhnklbc50gaflkwb3h1xysqqiwb84a9q1phjl038pic6r"))))
4506 (build-system dune-build-system)
4507 (arguments
4508 '(#:package "functoria-runtime"
4509 ;; TODO
4510 ;; again, requires opam for tests, which needs network access.
4511 ;; most other tests seem to pass.
4512 #:tests? #f))
4513 (propagated-inputs
4514 (list ocaml-cmdliner ocaml-fmt ocaml-logs ocaml-bos ocaml-ipaddr
4515 ocaml-emile ocaml-uri))
4516 (native-inputs
4517 (list ocaml-alcotest))
4518 (home-page "https://github.com/mirage/mirage")
4519 (synopsis "Runtime support library for functoria-generated code")
4520 (description
4521 "This is the runtime support library for code generated by functoria.")
4522 (license license:isc)))
4523
4524(define-public ocaml-mirage-runtime
4525 (package
4526 (inherit ocaml-functoria-runtime)
4527 (name "ocaml-mirage-runtime")
4528 (build-system dune-build-system)
4529 (arguments
4530 '(#:package "mirage-runtime"
4531 ;; TODO again, wants opam, other tests seem to pass
4532 ;; look for a way to disable tests that want network access
4533 #:tests? #f))
4534 (propagated-inputs (list ocaml-ipaddr ocaml-functoria-runtime ocaml-fmt
4535 ocaml-logs ocaml-lwt))
4536 (native-inputs (list ocaml-alcotest))
4537 (home-page "https://github.com/mirage/mirage")
4538 (synopsis
4539 "The base MirageOS runtime library, part of every MirageOS unikernel")
4540 (description
4541 "This package provides a bundle of useful runtime functions for
4542applications built with MirageOS")
4543 (license license:isc)))
4544
4545(define-public ocaml-functoria
4546 (package
4547 (inherit ocaml-functoria-runtime)
4548 (name "ocaml-functoria")
4549 (build-system dune-build-system)
4550 (arguments
4551 '(#:package "functoria"
4552 ;; TODO again, wants opam, other tests seem to pass
4553 ;; look for a way to disable tests that want network access
4554 #:tests? #f))
4555 (propagated-inputs (list ocaml-cmdliner ocaml-rresult ocaml-result
4556 ocaml-astring ocaml-fmt ocaml-logs ocaml-bos
4557 ocaml-fpath ocaml-emile ocaml-uri))
4558 (native-inputs (list ocaml-alcotest ocaml-functoria-runtime))
4559 (home-page "https://github.com/mirage/mirage")
4560 (synopsis
4561 "DSL to organize functor applications")
4562 (description
4563 "DSL to describe a set of modules and functors, their types and
4564how to apply them in order to produce a complete application. The main use
4565case is mirage.")
4566 (license license:isc)))
4567
4568(define-public ocaml-mirage
4569 (package
4570 (inherit ocaml-functoria-runtime)
4571 (name "ocaml-mirage")
4572 (build-system dune-build-system)
4573 (arguments
4574 '(#:package "mirage"
4575 ;; TODO again, wants opam, other tests seem to pass
4576 ;; look for a way to disable tests that want network access
4577 #:tests? #f))
4578 (propagated-inputs
4579 (list ocaml-astring ocaml-bos ocaml-functoria ocaml-ipaddr ocaml-logs
4580 ocaml-mirage-runtime ocaml-opam-monorepo))
4581 (native-inputs (list ocaml-alcotest ocaml-fmt))
4582 (home-page "https://github.com/mirage/mirage")
4583 (synopsis
4584 "The MirageOS library operating system")
4585 (description
4586 "Library operating system that constructs unikernels for secure,
4587high-performance network applications across a variety of cloud computing and
4588mobile platforms. Code can be developed on a normal OS and then compiled into
4589a fully-standalone, specialised unikernel.")
4590 (license license:isc)))
4591
4592(define-public ocaml-mirage-bootvar-unix
4593 (package
4594 (name "ocaml-mirage-bootvar-unix")
4595 (version "0.1.0")
4596 (source (origin
4597 (method git-fetch)
4598 (uri (git-reference
4599 (url "https://github.com/mirage/mirage-bootvar-unix")
4600 (commit version)))
4601 (file-name (git-file-name name version))
4602 (sha256
4603 (base32
4604 "1vi13q0z5ffv5hf4q5lfvkia6j2s5520px0s2x4dbjgd52icizrz"))))
4605 (build-system dune-build-system)
4606 (propagated-inputs (list ocaml-lwt ocaml-parse-argv))
4607 (home-page "https://github.com/mirage/mirage-bootvar-unix")
4608 (synopsis "Unix implementation of MirageOS Bootvar interface")
4609 (description "Library for passing boot parameters from Solo5 to MirageOS.")
4610 (license license:isc)))
4611
4612(define-public ocaml-duration
4613 (package
4614 (name "ocaml-duration")
4615 (version "0.2.1")
4616 (source (origin
4617 (method git-fetch)
4618 (uri
4619 (git-reference
4620 (url "https://github.com/hannesm/duration/")
4621 (commit (string-append "v" version))))
4622 (file-name (git-file-name name version))
4623 (sha256
4624 (base32
4625 "0vvxi0ipxmdz1k4h501brvccniwf3wpc32djbccyyrzraiz7qkff"))))
4626 (build-system dune-build-system)
4627 (native-inputs (list ocaml-alcotest))
4628 (home-page "https://github.com/hannesm/duration")
4629 (synopsis "Conversions to various time units")
4630 (description
4631 "This package provides a duration is represented in nanoseconds as an
4632unsigned 64 bit integer. This has a range of up to 584 years. Functions
4633provided check the input and raise on negative or out of bound input.")
4634 (license license:isc)))
4635
4636(define-public ocaml-mirage-time
4637 (package
4638 (name "ocaml-mirage-time")
4639 (version "3.0.0")
4640 (source (origin
4641 (method url-fetch)
4642 (uri (string-append
4643 "https://github.com/mirage/mirage-time/releases/download/v"
4644 version "/mirage-time-v3.0.0.tbz"))
4645 (sha256
4646 (base32
4647 "0z5xkhlgyhm22wyhwpf9r0rn4125cc3cxj6ccavyiiz2b2dr8h0d"))))
4648 (build-system dune-build-system)
4649 (propagated-inputs (list ocaml-lwt ocaml-duration))
4650 (home-page "https://github.com/mirage/mirage-time")
4651 (synopsis "Time operations for MirageOS")
4652 (description
4653 "Defines the signature for time-related operations for MirageOS.")
4654 (license license:isc)))
4655
4656(define-public ocaml-mirage-clock
4657 (package
4658 (name "ocaml-mirage-clock")
4659 (version "4.2.0")
4660 (source (origin
4661 (method git-fetch)
4662 (uri (git-reference
4663 (url "https://github.com/mirage/mirage-clock")
4664 (commit (string-append "v" version))))
4665 (file-name (git-file-name name version))
4666 (sha256
4667 (base32
4668 "0rkara9i3dvnzrb8jl2vkx8hgamvxnksin67wmhbv9d4i758amjy"))))
4669 (build-system dune-build-system)
4670 (home-page "https://github.com/mirage/mirage-clock")
4671 (synopsis "Libraries and module types for portable clocks")
4672 (description
4673 "This library implements portable support for an operating system
4674timesource that is compatible with the MirageOS library interfaces. It
4675implements an @code{MCLOCK} module that represents a monotonic timesource
4676since an arbitrary point, and @code{PCLOCK} which counts time since the Unix
4677epoch.")
4678 (license license:isc)))
4679
4680(define-public ocaml-ptime
4681 (package
4682 (name "ocaml-ptime")
4683 ;; TODO 1.1.0 has some issues, so for now we are stuck with 0.8.5
4684 (version "0.8.5")
4685 (source (origin
4686 (method url-fetch)
4687 (uri
4688 "https://erratique.ch/software/ptime/releases/ptime-0.8.5.tbz")
4689 (sha256
4690 (base32
4691 "1fxq57xy1ajzfdnvv5zfm7ap2nf49znw5f9gbi4kb9vds942ij27"))))
4692 (build-system ocaml-build-system)
4693 (arguments
4694 `(#:build-flags (list "build" "--with-js_of_ocaml" "true" "--tests"
4695 "true")
4696 #:phases (modify-phases %standard-phases
4697 (delete 'configure))))
4698 (propagated-inputs (list ocaml-result js-of-ocaml))
4699 (native-inputs (list ocaml-findlib ocamlbuild ocaml-topkg opam-installer))
4700 (home-page "https://erratique.ch/software/ptime")
4701 (synopsis "POSIX time for OCaml")
4702 (description
4703 "Ptime offers platform independent POSIX time support in pure OCaml. It
4704provides a type to represent a well-defined range of POSIX timestamps with
4705picosecond precision, conversion with date-time values, conversion with RFC
47063339 timestamps and pretty printing to a human-readable, locale-independent
4707representation.")
4708 (license license:isc)))
4709
4710(define-public ocaml-mirage-unix
4711 (package
4712 (name "ocaml-mirage-unix")
4713 (version "5.0.1")
4714 (source (origin
4715 (method url-fetch)
4716 (uri (string-append
4717 "https://github.com/mirage/mirage-unix/releases/download/v"
4718 version "/mirage-unix-5.0.1.tbz"))
4719 (sha256
4720 (base32
4721 "1y44hvsd5lxqbazwkv9n6cn936lpn8l7v82wf55w4183fp70nnjk"))))
4722 (build-system dune-build-system)
4723 (propagated-inputs (list ocaml-lwt ocaml-duration ocaml-mirage-runtime))
4724 (home-page "https://github.com/mirage/mirage-unix")
4725 (synopsis "Unix core platform libraries for MirageOS")
4726 (description
4727 "This package provides the MirageOS `OS` library for Unix targets, which
4728handles the main loop and timers.")
4729 (license license:isc)))
4730
4731(define-public ocaml-mirage-profile-unix
4732 (package
4733 (name "ocaml-mirage-profile-unix")
4734 (version "0.9.1")
4735 (source (origin
4736 (method git-fetch)
4737 (uri (git-reference
4738 (url "https://github.com/mirage/mirage-profile/")
4739 (commit (string-append "v" version))))
4740 (file-name (git-file-name name version))
4741 (sha256
4742 (base32
4743 "11p3ai8g993algds9mbg4xf3is0agqah127r69fb7rm35dryzq95"))))
4744 (build-system dune-build-system)
4745 (arguments
4746 '(#:package "mirage-profile-unix"
4747 #:tests? #f ;depends on ocaml-mirage-profile which would form a loop
4748 #:phases (modify-phases %standard-phases
4749 ;; TODO is there a way to do this with dune build flags?
4750 (add-after 'unpack 'disable-xen
4751 (lambda _
4752 ;; this way it is not detected as a build target
4753 (rename-file "xen" "_xen"))))))
4754 (propagated-inputs (list ocaml-cstruct ocaml-ocplib-endian ocaml-lwt
4755 ocaml-mtime ocaml-ppx-cstruct))
4756 (native-inputs (list ocaml-ppx-cstruct))
4757 (home-page "https://github.com/mirage/mirage-profile")
4758 (synopsis "Collects Ocaml/Lwt profiling information in CTF format")
4759 (description
4760 "Used to trace execution of OCaml/Lwt programs (such as Mirage
4761unikernels) at the level of Lwt threads. The traces can be viewed using
4762JavaScript or GTK viewers provided by mirage-trace-viewer or processed by
4763tools supporting the Common Trace Format.
4764When compiled against a normal version of Lwt, OCaml's cross-module inlining
4765will optimise these calls away, meaning there should be no overhead in the
4766non-profiling case.")
4767 (license license:bsd-2)))
4768
4769(define-public ocaml-mirage-profile
4770 (package
4771 (inherit ocaml-mirage-profile-unix)
4772 (name "ocaml-mirage-profile")
4773 (arguments
4774 '(#:package "mirage-profile"
4775 ;; TODO cyclic dependency with mirage-profile
4776 ;; It could be broken using package variants, if not for
4777 ;; propagated inputs leading to version conflicts.
4778 #:tests? #f))
4779 (propagated-inputs (modify-inputs (package-propagated-inputs
4780 ocaml-mirage-profile-unix)
4781 (append ocaml-mirage-profile-unix)))))
4782
4783(define-public ocaml-mirage-logs
4784 (package
4785 (name "ocaml-mirage-logs")
4786 (version "1.2.0")
4787 (source (origin
4788 (method git-fetch)
4789 (uri (git-reference
4790 (url "https://github.com/mirage/mirage-logs/")
4791 (commit (string-append "v" version))))
4792 (file-name (git-file-name name version))
4793 (sha256
4794 (base32
4795 "1wv2hz1dj38jzc8nabin9p8im43ghy8f3crv7rf9szyyzyrdanp2"))))
4796 (build-system dune-build-system)
4797 (propagated-inputs (list ocaml-logs ocaml-ptime ocaml-mirage-clock
4798 ocaml-mirage-profile ocaml-lwt))
4799 (native-inputs (list ocaml-alcotest))
4800 (home-page "https://github.com/mirage/mirage-logs")
4801 (synopsis
4802 "Reporter for the Logs library that writes to stderr with timestamps")
4803 (description
4804 "Uses a Mirage @code{CLOCK} to write timestamped log messages. It can
4805also log only important messages to the console, while writing all received
4806messages to a ring buffer which is displayed if an exception occurs. If
4807tracing is enabled (via mirage-profile), it also writes each log message to
4808the trace buffer.")
4809 (license license:isc)))
4810
4811(define-public ocaml-ocurl
4812 (package
4813 (name "ocaml-ocurl")
4814 (version "0.9.2")
4815 (source (origin
4816 (method url-fetch)
4817 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
4818 version ".tar.gz"))
4819 (sha256
4820 (base32
4821 "0qvpsqbq4qbd397n0nlv9cwlqfyjw7gfb5mmq1awvnklr0c9fdg0"))))
4822 (build-system ocaml-build-system)
4823 (arguments
4824 `(#:phases
4825 (modify-phases %standard-phases
4826 (add-before 'configure 'fix-/bin/sh
4827 (lambda* (#:key inputs #:allow-other-keys)
4828 (substitute* "configure"
4829 (("-/bin/sh") (string-append "-" (which "bash")))))))))
4830 (native-inputs
4831 (list pkg-config))
4832 (inputs (list curl))
4833 (home-page "http://ocurl.forge.ocamlcore.org/")
4834 (synopsis "OCaml bindings for libcurl")
4835 (description "Client-side URL transfer library, supporting HTTP and a
4836multitude of other network protocols (FTP/SMTP/RTSP/etc).")
4837 (license license:isc)))
4838
4839(define-public ocaml-base64
4840 (package
4841 (name "ocaml-base64")
4842 (version "3.5.1")
4843 (source (origin
4844 (method git-fetch)
4845 (uri (git-reference
4846 (url "https://github.com/mirage/ocaml-base64")
4847 (commit (string-append "v" version))))
4848 (file-name (git-file-name name version))
4849 (sha256
4850 (base32
4851 "1jq349jp663hq51a941afr2y4yyh34r19zsxla73ks9bywj4mm2q"))))
4852 (build-system dune-build-system)
4853 (native-inputs (list ocaml-alcotest ocaml-bos ocaml-rresult))
4854 (home-page "https://github.com/mirage/ocaml-base64")
4855 (synopsis "Base64 encoding for OCaml")
4856 (description "Base64 is a group of similar binary-to-text encoding schemes
4857that represent binary data in an ASCII string format by translating it into a
4858radix-64 representation. It is specified in RFC 4648.")
4859 (license license:isc)))
4860
4861;; A variant without tests that is used to prevent a cyclic dependency when
4862;; compiling ocaml-dose3.
4863(define ocaml-base64-boot
4864 (package
4865 (inherit ocaml-base64)
4866 (arguments `(#:tests? #f))
4867 (native-inputs '())))
4868
4869(define-public ocamlify
4870 (package
4871 (name "ocamlify")
4872 (version "0.0.2")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
4877 version "/ocamlify-" version ".tar.gz"))
4878 (sha256
4879 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
4880 (build-system ocaml-build-system)
4881 (arguments
4882 `(#:tests? #f; no tests
4883 #:phases
4884 (modify-phases %standard-phases
4885 (delete 'configure)
4886 (replace 'build
4887 ;; This package uses pre-generated setup.ml by oasis, but is
4888 ;; a dependency of oasis. the pre-generated setup.ml is broken
4889 ;; with recent versions of OCaml, so we perform a bootstrap instead.
4890 (lambda _
4891 (substitute* "src/OCamlifyConfig.ml.ab"
4892 (("$pkg_version") ,version))
4893 (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
4894 (with-directory-excursion "src"
4895 (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
4896 "ocamlify"))
4897 #t))
4898 (replace 'install
4899 (lambda* (#:key outputs #:allow-other-keys)
4900 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
4901 (mkdir-p bin)
4902 (install-file "src/ocamlify" bin)
4903 #t))))))
4904 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
4905 (synopsis "Include files in OCaml code")
4906 (description "OCamlify creates OCaml source code by including
4907whole files into OCaml string or string list. The code generated can be
4908compiled as a standard OCaml file. It allows embedding external resources as
4909OCaml code.")
4910 (license license:lgpl2.1+))); with the OCaml static compilation exception
4911
4912(define-public omake
4913 (package
4914 (name "omake")
4915 (version "0.10.5")
4916 (source (origin
4917 (method url-fetch)
4918 (uri (string-append "http://download.camlcity.org/download/"
4919 "omake-" version ".tar.gz"))
4920 (sha256
4921 (base32
4922 "1i7pcv53kqplrbdx9mllrhbv4j57zf87xwq18r16cvn1lbc6mqal"))
4923 (patches (search-patches "omake-fix-non-determinism.patch"))))
4924 (build-system ocaml-build-system)
4925 (arguments
4926 `(#:make-flags
4927 ,#~(list (string-append "PREFIX=" #$output))
4928 #:tests? #f ; no test target
4929 #:phases
4930 (modify-phases %standard-phases
4931 (add-before 'configure 'fix-makefile
4932 (lambda* (#:key outputs #:allow-other-keys)
4933 (substitute* "mk/osconfig_unix.mk"
4934 (("CC = cc") "CC = gcc")))))))
4935 (native-inputs (list hevea))
4936 (home-page "http://projects.camlcity.org/projects/omake.html")
4937 (synopsis "Build system designed for scalability and portability")
4938 (description "Similar to make utilities you may have used, but it features
4939many additional enhancements, including:
4940
4941@enumerate
4942@item Support for projects spanning several directories or directory hierarchies.
4943@item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
4944 with full support for incremental builds.
4945@item Dependency analysis takes the command lines into account — whenever the
4946 command line used to build a target changes, the target is considered
4947 out-of-date.
4948@item Fully scriptable, includes a library that providing support for standard
4949 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
4950@end enumerate")
4951 (license (list license:lgpl2.1 ; libmojave
4952 license:expat ; OMake scripts
4953 license:gpl2)))) ; OMake itself, with ocaml linking exception
4954 ; see LICENSE.OMake
4955
4956(define-public ocaml-benchmark
4957 (package
4958 (name "ocaml-benchmark")
4959 (version "1.6")
4960 (source
4961 (origin
4962 (method git-fetch)
4963 (uri (git-reference
4964 (url "https://github.com/Chris00/ocaml-benchmark")
4965 (commit version)))
4966 (file-name (git-file-name name version))
4967 (sha256
4968 (base32 "0d0vdfjgjzf1y6wkd714d8b0piv1z9qav5ahsapynqzk4b4ahhnp"))))
4969 (build-system dune-build-system)
4970 (home-page "https://github.com/Chris00/ocaml-benchmark")
4971 (synopsis "Benchmark running times of code")
4972 (description
4973 "This module provides a set of tools to measure the running times of
4974your functions and to easily compare the results. A statistical test
4975is used to determine whether the results truly differ.")
4976 (license license:lgpl3+)))
4977
4978(define-public ocaml-bechamel
4979 (package
4980 (name "ocaml-bechamel")
4981 (version "0.3.0")
4982 (home-page "https://github.com/mirage/bechamel")
4983 (source
4984 (origin
4985 (method git-fetch)
4986 (uri (git-reference
4987 (url home-page)
4988 (commit (string-append "v" version))))
4989 (file-name (git-file-name name version))
4990 (sha256
4991 (base32 "1x7sf45iy5dzx7kknbkkvpna42rcwpj5p55y0nqsg2fb4srj0b1q"))))
4992 (build-system dune-build-system)
4993 (arguments `(#:package "bechamel"))
4994 (propagated-inputs (list ocaml-fmt ocaml-stdlib-shims))
4995 (synopsis "Yet Another Benchmark in OCaml")
4996 (description
4997 "BEnchmark for a CHAMEL/camel/caml which is agnostic to the system. It's a
4998micro-benchmark tool for OCaml which lets the user to re-analyzes and prints
4999samples.")
5000 (license license:expat)))
5001
5002(define-public ocaml-batteries
5003 (package
5004 (name "ocaml-batteries")
5005 (version "3.5.1")
5006 (source (origin
5007 (method git-fetch)
5008 (uri (git-reference
5009 (url "https://github.com/ocaml-batteries-team/batteries-included")
5010 (commit (string-append "v" version))))
5011 (file-name (git-file-name name version))
5012 (sha256
5013 (base32
5014 "07387jp93civ9p1q2ixmq8qkzzyssp94ssxd4w2ndvkg1nr6kfcl"))))
5015 (build-system ocaml-build-system)
5016 (propagated-inputs (list ocaml-num))
5017 (native-inputs
5018 (list ocamlbuild ocaml-benchmark ocaml-qcheck ocaml-qtest))
5019 (arguments
5020 `(#:phases
5021 (modify-phases %standard-phases
5022 (add-after 'unpack 'make-writable
5023 (lambda _
5024 (for-each make-file-writable (find-files "." "."))))
5025 (add-before 'build 'fix-nondeterminism
5026 (lambda _
5027 (substitute* "setup.ml"
5028 (("Sys.readdir dirname")
5029 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
5030 #t)))))
5031 (home-page "http://batteries.forge.ocamlcore.org/")
5032 (synopsis "Development platform for the OCaml programming language")
5033 (description "Define a standard set of libraries which may be expected on
5034every compliant installation of OCaml and organize these libraries into a
5035hierarchy of modules.")
5036 (license license:lgpl2.1+)))
5037
5038(define-public ocaml-pcre
5039 (package
5040 (name "ocaml-pcre")
5041 (version "7.5.0")
5042 (source
5043 (origin
5044 (method git-fetch)
5045 (uri (git-reference
5046 (url "https://github.com/mmottl/pcre-ocaml")
5047 (commit version)))
5048 (file-name (git-file-name name version))
5049 (sha256
5050 (base32
5051 "048k1rl17fcml000yh8fnghk1a06h14lbyrnk9nbigxsymrz6cq2"))))
5052 (build-system dune-build-system)
5053 (arguments
5054 ;; No tests.
5055 '(#:tests? #f))
5056 (propagated-inputs
5057 (list dune-configurator pcre))
5058 (native-inputs
5059 `(("pcre:bin" ,pcre "bin")))
5060 (home-page "https://mmottl.github.io/pcre-ocaml")
5061 (synopsis
5062 "Bindings to the Perl Compatibility Regular Expressions library")
5063 (description "Pcre-ocaml offers library functions for string
5064pattern matching and substitution, similar to the functionality
5065offered by the Perl language.")
5066 ;; With static linking exception
5067 (license license:lgpl2.1+)))
5068
5069(define-public ocaml-expect
5070 (package
5071 (name "ocaml-expect")
5072 (version "0.0.6")
5073 (source (origin
5074 (method url-fetch)
5075 (uri (ocaml-forge-uri name version 1736))
5076 (sha256
5077 (base32
5078 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
5079 (arguments
5080 `(#:tests? #f))
5081 (build-system ocaml-build-system)
5082 (native-inputs
5083 `(("ocamlbuild" ,ocamlbuild)
5084 ("ocaml-num" ,ocaml-num)
5085 ("ocaml-pcre" ,ocaml-pcre)
5086 ("ounit" ,ocaml-ounit)))
5087 (propagated-inputs
5088 `(("batteries" ,ocaml-batteries)))
5089 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
5090 (synopsis "Simple implementation of expect")
5091 (description "This package provides utilities for building unitary testing
5092of interactive program. You can match the question using a regular expression
5093or a timeout.")
5094 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
5095
5096(define-public ocaml-stdcompat
5097 (package
5098 (name "ocaml-stdcompat")
5099 (version "19")
5100 (source
5101 (origin
5102 (method git-fetch)
5103 (uri (git-reference
5104 (url "https://github.com/thierry-martinez/stdcompat")
5105 (commit (string-append "v" version))))
5106 (file-name (git-file-name name version))
5107 (modules '((guix build utils)))
5108 (snippet
5109 #~(for-each delete-file '("Makefile.in" "configure")))
5110 (sha256
5111 (base32
5112 "0r9qcfjkn8634lzxp5bkagzwsi3vmg0hb6vq4g1p1515rys00h1b"))))
5113 (build-system dune-build-system)
5114 (arguments
5115 (list #:imported-modules `((guix build gnu-build-system)
5116 ,@%dune-build-system-modules)
5117 #:modules '((guix build dune-build-system)
5118 ((guix build gnu-build-system) #:prefix gnu:)
5119 (guix build utils))
5120 #:phases
5121 #~(modify-phases %standard-phases
5122 (add-after 'unpack 'bootstrap
5123 (assoc-ref gnu:%standard-phases 'bootstrap))
5124 (add-before 'build 'prepare-build
5125 (lambda _
5126 (let ((bash (which "bash")))
5127 (setenv "CONFIG_SHELL" bash)
5128 (setenv "SHELL" bash)))))))
5129 (native-inputs
5130 (list autoconf
5131 automake
5132 ocaml
5133 ocaml-findlib))
5134 (home-page "https://github.com/thierry-martinez/stdcompat")
5135 (synopsis "Compatibility module for OCaml standard library")
5136 (description
5137 "Compatibility module for OCaml standard library allowing programs to use
5138some recent additions to the standard library while preserving the ability to
5139be compiled on former versions of OCaml.")
5140 (license license:bsd-2)))
5141
5142(define-public ocaml-stdlib-shims
5143 (package
5144 (name "ocaml-stdlib-shims")
5145 (version "0.3.0")
5146 (source (origin
5147 (method git-fetch)
5148 (uri (git-reference
5149 (url "https://github.com/ocaml/stdlib-shims")
5150 (commit version)))
5151 (file-name (git-file-name name version))
5152 (sha256
5153 (base32
5154 "0gmg8w67j3ww17llk7hl4dx0vq7p50rn5s4ib9sy984k543rz59h"))))
5155 (build-system dune-build-system)
5156 (home-page "https://github.com/ocaml/stdlib-shims")
5157 (synopsis "OCaml stdlib features backport to older OCaml compilers")
5158 (description "This package backports some of the new stdlib features to
5159older compilers, such as the Stdlib module. This allows projects that require
5160compatibility with older compiler to use these new features in their code.")
5161 ;; with ocaml-linking exception
5162 (license license:lgpl2.1+)))
5163
5164(define-public ocaml-fileutils
5165 (package
5166 (name "ocaml-fileutils")
5167 (version "0.6.4")
5168 (source (origin
5169 (method git-fetch)
5170 (uri (git-reference
5171 (url "https://github.com/gildor478/ocaml-fileutils")
5172 (commit (string-append "v" version))))
5173 (file-name (git-file-name name version))
5174 (sha256
5175 (base32
5176 "1s2az5lv52r0fig4624652zn3jj5dy30d1xlw6gzd0s086i4bvjh"))))
5177 (build-system dune-build-system)
5178 (propagated-inputs
5179 (list ocaml-stdlib-shims))
5180 (native-inputs
5181 (list ocaml-ounit))
5182 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
5183 (synopsis "Pure OCaml functions to manipulate real file and filename")
5184 (description "Library to provide pure OCaml functions to manipulate real
5185file (POSIX like) and filename.")
5186 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
5187
5188(define-public ocaml-oasis
5189 (package
5190 (name "ocaml-oasis")
5191 (version "0.4.11")
5192 (source (origin
5193 (method url-fetch)
5194 (uri (ocaml-forge-uri name version 1757))
5195 (sha256
5196 (base32
5197 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
5198 (modules '((guix build utils)))
5199 (snippet
5200 '(begin
5201 (substitute* "test/test-main/Test.ml"
5202 ;; most of these tests fail because ld cannot find crti.o, but according
5203 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
5204 ;; are set correctly when LD_LIBRARY_PATH is defined beforehand.
5205 (("TestBaseCompat.tests;") "")
5206 (("TestExamples.tests;") "")
5207 (("TestFull.tests;") "")
5208 (("TestPluginDevFiles.tests;") "")
5209 (("TestPluginInternal.tests;") "")
5210 (("TestPluginOCamlbuild.tests;") "")
5211 (("TestPluginOMake.tests;") ""))
5212 #t))))
5213 (build-system ocaml-build-system)
5214 (arguments
5215 `(#:tests? #f))
5216 (native-inputs
5217 (list ocamlbuild ocamlify ocamlmod))
5218 (home-page "https://oasis.forge.ocamlcore.org")
5219 (synopsis "Integrates a configure, build, install system in OCaml projects")
5220 (description "OASIS is a tool to integrate a configure, build and install
5221system in your OCaml projects. It helps to create standard entry points in your
5222build system and allows external tools to analyse your project easily.")
5223 (license license:lgpl2.1+))) ; with ocaml static compilation exception
5224
5225(define-public ocaml-cppo
5226 (package
5227 (name "ocaml-cppo")
5228 (version "1.6.9")
5229 (source
5230 (origin
5231 (method git-fetch)
5232 (uri (git-reference
5233 (url "https://github.com/mjambon/cppo")
5234 (commit (string-append "v" version))))
5235 (file-name (git-file-name name version))
5236 (sha256 (base32
5237 "1c8jlr2s0allw1h6czz5q24vn5jsnrrh44j7hjyilzaifm17dlrm"))))
5238 (build-system dune-build-system)
5239 (arguments
5240 `(#:tests? #f))
5241 (native-inputs
5242 (list ocamlbuild))
5243 (home-page "https://github.com/mjambon/cppo")
5244 (synopsis "Equivalent of the C preprocessor for OCaml programs")
5245 (description "Cppo is an equivalent of the C preprocessor for OCaml
5246programs. It allows the definition of simple macros and file inclusion. Cppo is:
5247@enumerate
5248@item more OCaml-friendly than @command{cpp}
5249@item easy to learn without consulting a manual
5250@item reasonably fast
5251@item simple to install and to maintain.
5252@end enumerate")
5253 (license license:bsd-3)))
5254
5255(define-public ocaml-seq
5256 (package
5257 (name "ocaml-seq")
5258 (version "0.1")
5259 (source
5260 (origin
5261 (method git-fetch)
5262 (uri (git-reference
5263 (url "https://github.com/c-cube/seq")
5264 (commit version)))
5265 (file-name (git-file-name name version))
5266 (sha256
5267 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
5268 (build-system ocaml-build-system)
5269 (arguments
5270 `(#:tests? #f
5271 #:phases
5272 (modify-phases %standard-phases
5273 (delete 'configure)
5274 (delete 'build)
5275 (replace 'install
5276 (lambda* (#:key outputs #:allow-other-keys)
5277 (let ((install-dir (string-append (assoc-ref outputs "out")
5278 "/lib/ocaml/site-lib/seq")))
5279 (mkdir-p install-dir)
5280 (with-output-to-file (string-append install-dir "/META")
5281 (lambda _
5282 (display "name=\"seq\"
5283version=\"[distributed with ocaml]\"
5284description=\"dummy package for compatibility\"
5285requires=\"\"")))
5286 #t))))))
5287 (home-page "https://github.com/c-cube/seq")
5288 (synopsis "OCaml's standard iterator type")
5289 (description "This package is a compatibility package for OCaml's
5290standard iterator type starting from 4.07.")
5291 (license license:lgpl2.1+)))
5292
5293(define-public ocaml-re
5294 (package
5295 (name "ocaml-re")
5296 (version "1.10.4")
5297 (source
5298 (origin
5299 (method git-fetch)
5300 (uri (git-reference
5301 (url "https://github.com/ocaml/ocaml-re")
5302 (commit version)))
5303 (file-name (git-file-name name version))
5304 (sha256
5305 (base32 "1g0vmpx6ylv8m0w77zarn215pgb4czc6gcpb2fi5da1s307zwr0w"))))
5306 (build-system dune-build-system)
5307 (propagated-inputs
5308 (list ocaml-seq))
5309 (native-inputs
5310 `(("ounit" ,ocaml-ounit)))
5311 (home-page "https://github.com/ocaml/ocaml-re/")
5312 (synopsis "Regular expression library for OCaml")
5313 (description "Pure OCaml regular expressions with:
5314@enumerate
5315@item Perl-style regular expressions (module Re_perl)
5316@item Posix extended regular expressions (module Re_posix)
5317@item Emacs-style regular expressions (module Re_emacs)
5318@item Shell-style file globbing (module Re_glob)
5319@item Compatibility layer for OCaml's built-in Str module (module Re_str)
5320@end enumerate")
5321 (license license:expat)))
5322
5323(define-public ocaml-ocplib-endian
5324 (package
5325 (name "ocaml-ocplib-endian")
5326 (version "1.2")
5327 (source (origin
5328 (method git-fetch)
5329 (uri (git-reference
5330 (url "https://github.com/OCamlPro/ocplib-endian/")
5331 (commit version)))
5332 (sha256
5333 (base32
5334 "1klj4g451s7m5r8bxmwc1rpvngpqdm40csnx9smgc06pwy2fax2c"))
5335 (file-name (git-file-name name version))))
5336 (build-system dune-build-system)
5337 (native-inputs
5338 `(("cppo" ,ocaml-cppo)))
5339 (home-page "https://github.com/OCamlPro/ocplib-endian")
5340 (synopsis "Optimised functions to read and write int16/32/64 from strings
5341and bigarrays")
5342 (description "Optimised functions to read and write int16/32/64 from strings
5343and bigarrays, based on new primitives added in version 4.01. It works on
5344strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
5345big- and little-endian, with their unsafe counter-parts.")
5346 (license license:lgpl2.1)))
5347
5348(define-public ocaml-cstruct
5349 (package
5350 (name "ocaml-cstruct")
5351 (version "6.1.1")
5352 (source (origin
5353 (method git-fetch)
5354 (uri (git-reference
5355 (url "https://github.com/mirage/ocaml-cstruct")
5356 (commit (string-append "v" version))))
5357 (file-name (git-file-name name version))
5358 (sha256
5359 (base32
5360 "0dpbirs6lzp0bclr3wcw407jjspll7iy66z18zks3mjccvlxd21w"))))
5361 (build-system dune-build-system)
5362 (arguments
5363 `(#:package "cstruct"))
5364 (propagated-inputs
5365 (list ocaml-bigarray-compat))
5366 (native-inputs
5367 (list ocaml-alcotest))
5368 (home-page "https://github.com/mirage/ocaml-cstruct")
5369 (synopsis "Access C structures via a camlp4 extension")
5370 (description "Cstruct is a library and syntax extension to make it easier
5371to access C-like structures directly from OCaml. It supports both reading and
5372writing to these structures, and they are accessed via the Bigarray module.")
5373 (license license:isc)))
5374
5375;; TODO again, the "parent" package already has an explicit package argument,
5376;; so a variant package doesn't make sense, at least these aliases help the
5377;; importer out so it doesn't re-import things. At least hopefully.
5378(define ocaml-cstruct-unix ocaml-cstruct)
5379(define ocaml-cstruct-sexp ocaml-cstruct)
5380
5381(define-public ocaml-ppx-cstruct
5382 (package
5383 (inherit ocaml-cstruct)
5384 (name "ocaml-ppx-cstruct")
5385 (properties `((upstream-name . "ppx_cstruct")))
5386 (arguments
5387 '(#:package "ppx_cstruct"
5388 ;; TODO doesn't find test deps for some reason?
5389 ;; I have no clue why.
5390 #:tests? #f))
5391 (propagated-inputs (modify-inputs propagated-inputs
5392 (append ocaml-cstruct ocaml-ppxlib ocaml-sexplib)))
5393 (native-inputs (modify-inputs (package-propagated-inputs ocaml-cstruct)
5394 (append ocaml-cstruct-sexp ocaml-findlib
5395 ocaml-ppx-sexp-conv)))))
5396
5397(define-public ocaml-hex
5398 (package
5399 (name "ocaml-hex")
5400 (version "1.5.0")
5401 (source (origin
5402 (method git-fetch)
5403 (uri (git-reference
5404 (url "https://github.com/mirage/ocaml-hex")
5405 (commit (string-append "v" version))))
5406 (file-name (git-file-name name version))
5407 (sha256
5408 (base32
5409 "0xnl5wxd2qrba7phm3mdrjwd2kk26kb17dv94ciwp49ljcj28qc1"))))
5410 (build-system dune-build-system)
5411 (propagated-inputs
5412 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
5413 ("cstruct" ,ocaml-cstruct)))
5414 (home-page "https://github.com/mirage/ocaml-hex/")
5415 (synopsis "Minimal library providing hexadecimal converters")
5416 (description "Hex is a minimal library providing hexadecimal converters.")
5417 (license license:isc)))
5418
5419(define-public ocaml-ezjsonm
5420 (package
5421 (name "ocaml-ezjsonm")
5422 (version "1.3.0")
5423 (source
5424 (origin
5425 (method git-fetch)
5426 (uri (git-reference
5427 (url "https://github.com/mirage/ezjsonm")
5428 (commit (string-append "v" version))))
5429 (file-name (git-file-name name version))
5430 (sha256
5431 (base32 "004knljxqxn9zq0rnq7q7wxl4nwlzydm8p9f5cqkl8il5yl5zkjm"))))
5432 (build-system dune-build-system)
5433 (arguments
5434 `(#:package "ezjsonm"))
5435 (native-inputs (list ocaml-alcotest js-of-ocaml node-lts))
5436 (propagated-inputs (list ocaml-jsonm ocaml-uutf ocaml-sexplib0 ocaml-hex))
5437 (home-page "https://github.com/mirage/ezjsonm/")
5438 (synopsis "Read and write JSON data")
5439 (description "Ezjsonm provides more convenient (but far less flexible) input
5440and output functions that go to and from [string] values than jsonm. This avoids
5441the need to write signal code, which is useful for quick scripts that manipulate
5442JSON.")
5443 (license license:isc)))
5444
5445(define-public ocaml-uri
5446 (package
5447 (name "ocaml-uri")
5448 (version "4.2.0")
5449 (home-page "https://github.com/mirage/ocaml-uri")
5450 (source
5451 (origin
5452 (method git-fetch)
5453 (uri (git-reference
5454 (url home-page)
5455 (commit (string-append "v" version))))
5456 (file-name (git-file-name name version))
5457 (sha256
5458 (base32
5459 "1bgkc66cq00mgnkz3i535srwzwc4cpdsv0mly5dzvvq33451xwf0"))))
5460 (build-system dune-build-system)
5461 (arguments '(#:package "uri"))
5462 (propagated-inputs
5463 (list ocaml-stringext ocaml-angstrom))
5464 (native-inputs
5465 (list ocaml-ounit ocaml-ppx-sexp-conv))
5466 (properties `((upstream-name . "uri")))
5467 (synopsis "RFC3986 URI/URL parsing library")
5468 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
5469 (license license:isc)))
5470
5471(define-public ocaml-easy-format
5472 (package
5473 (name "ocaml-easy-format")
5474 (version "1.3.4")
5475 (source (origin
5476 (method git-fetch)
5477 (uri (git-reference
5478 (url "https://github.com/mjambon/easy-format")
5479 (commit version)))
5480 (file-name (git-file-name name version))
5481 (sha256
5482 (base32
5483 "0xap6az4yyb60vb1jfs640wl3cf4njv78p538x9ihhf9f6ij3nh8"))))
5484 (build-system dune-build-system)
5485 (arguments
5486 `(#:package "easy-format"
5487 #:phases
5488 (modify-phases %standard-phases
5489 (add-before 'build 'make-writable
5490 (lambda _
5491 (for-each
5492 (lambda (file)
5493 (chmod file #o644))
5494 (find-files "." "."))
5495 #t)))))
5496 (home-page "https://github.com/mjambon/easy-format")
5497 (synopsis "Interface to the Format module")
5498 (description "Easy-format is a high-level and functional interface to the
5499Format module of the OCaml standard library.")
5500 (license license:bsd-3)))
5501
5502(define-public ocaml-piqilib
5503 (package
5504 (name "ocaml-piqilib")
5505 (version "0.6.16")
5506 (source
5507 (origin
5508 (method git-fetch)
5509 (uri (git-reference
5510 (url "https://github.com/alavrik/piqi")
5511 (commit (string-append "v" version))))
5512 (file-name (git-file-name name version))
5513 (sha256
5514 (base32 "0mbhfrfrik3jlzx9zz680g0qdvv0b7cbjz28cgdlryp7nk4v4kx8"))))
5515 (build-system ocaml-build-system)
5516 (arguments
5517 `(#:phases
5518 (modify-phases %standard-phases
5519 (add-before 'configure 'fix-ocamlpath
5520 (lambda _
5521 (substitute* '("Makefile" "make/Makefile.ocaml")
5522 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))))
5523 (replace 'configure
5524 (lambda* (#:key outputs #:allow-other-keys)
5525 (let ((out (assoc-ref outputs "out")))
5526 (substitute* "make/OCamlMakefile"
5527 (("/bin/sh") (which "bash")))
5528 (invoke "./configure" "--prefix" out "--ocaml-libdir"
5529 (string-append out "/lib/ocaml/site-lib")))))
5530 (add-after 'build 'build-ocaml
5531 (lambda* (#:key outputs #:allow-other-keys)
5532 (invoke "make" "ocaml")))
5533 (add-after 'install 'install-ocaml
5534 (lambda* (#:key outputs #:allow-other-keys)
5535 (invoke "make" "ocaml-install")))
5536 (add-after 'install-ocaml 'link-stubs
5537 (lambda* (#:key outputs #:allow-other-keys)
5538 (let* ((out (assoc-ref outputs "out"))
5539 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
5540 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
5541 (mkdir-p stubs)
5542 (symlink (string-append lib "/dllpiqilib_stubs.so")
5543 (string-append stubs "/dllpiqilib_stubs.so"))))))))
5544 (native-inputs
5545 (list which))
5546 (propagated-inputs
5547 `(("ocaml-xmlm" ,ocaml-xmlm)
5548 ("ocaml-sedlex" ,ocaml-sedlex-2)
5549 ("ocaml-easy-format" ,ocaml-easy-format)
5550 ("ocaml-base64" ,ocaml-base64)))
5551 (home-page "https://piqi.org")
5552 (synopsis "Data serialization and conversion library")
5553 (description "Piqilib is the common library used by the piqi command-line
5554tool and piqi-ocaml.")
5555 (license license:asl2.0)))
5556
5557(define-public ocaml-uuidm
5558 (package
5559 (name "ocaml-uuidm")
5560 (version "0.9.8")
5561 (source (origin
5562 (method url-fetch)
5563 (uri (string-append "http://erratique.ch/software/uuidm/"
5564 "releases/uuidm-" version ".tbz"))
5565 (sha256
5566 (base32
5567 "1cr6xlzla9fmd587lfhzac0icifspjnqi9f4cdafshj3jn85nrpw"))))
5568 (build-system ocaml-build-system)
5569 (arguments
5570 `(#:build-flags
5571 (list "build" "--tests" "true" "--with-cmdliner" "true")
5572 #:phases
5573 (modify-phases %standard-phases
5574 (delete 'configure))))
5575 (native-inputs
5576 (list ocamlbuild opam-installer))
5577 (propagated-inputs
5578 `(("cmdliner" ,ocaml-cmdliner)
5579 ("topkg" ,ocaml-topkg)))
5580 (home-page "https://erratique.ch/software/uuidm")
5581 (synopsis "Universally unique identifiers for OCaml")
5582 (description "Uuidm is an OCaml module implementing 128 bits universally
5583unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
5584and 4 (random based) according to RFC 4122.")
5585 (license license:isc)))
5586
5587(define-public ocaml-graph
5588 (package
5589 (name "ocaml-graph")
5590 (version "2.0.0")
5591 (home-page "https://github.com/backtracking/ocamlgraph/")
5592 (source (origin
5593 (method git-fetch)
5594 (uri (git-reference
5595 (url home-page)
5596 (commit version)))
5597 (file-name (git-file-name name version))
5598 (sha256
5599 (base32
5600 "1gjrsyyamvvn2rd9n9yjx6hsglhw0dbm4cgazq0dpx0bbr4inwc3"))))
5601 (build-system dune-build-system)
5602 (arguments `(#:package "ocamlgraph"))
5603 (propagated-inputs (list ocaml-stdlib-shims))
5604 (native-inputs (list ocaml-graphics))
5605 (properties `((upstream-name . "ocamlgraph")))
5606 (synopsis "Graph library for OCaml")
5607 (description "OCamlgraph is a generic graph library for OCaml.")
5608 (license license:lgpl2.1)))
5609
5610(define-public ocaml-piqi
5611 (package
5612 (name "ocaml-piqi")
5613 (version "0.7.8")
5614 (source (origin
5615 (method git-fetch)
5616 (uri (git-reference
5617 (url "https://github.com/alavrik/piqi-ocaml")
5618 (commit (string-append "v" version))))
5619 (file-name (git-file-name name version))
5620 (sha256
5621 (base32
5622 "12m9vxir0cs2155nxs0a3m3npf3w79kyxf9a5lmf18qvvgismfz8"))))
5623 (build-system ocaml-build-system)
5624 (arguments
5625 `(#:make-flags
5626 ,#~(list (string-append "DESTDIR=" #$output)
5627 (string-append "SHELL="
5628 #+(file-append (canonical-package bash-minimal)
5629 "/bin/sh")))
5630 #:phases
5631 (modify-phases %standard-phases
5632 (add-after 'unpack 'make-files-writable
5633 (lambda _
5634 (for-each make-file-writable (find-files "."))
5635 #t))
5636 (delete 'configure))))
5637 (native-inputs
5638 (list which protobuf)) ; for tests
5639 (propagated-inputs
5640 `(("ocaml-num" ,ocaml-num)
5641 ("ocaml-piqilib" ,ocaml-piqilib)
5642 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
5643 (home-page "https://github.com/alavrik/piqi-ocaml")
5644 (synopsis "Protocol serialization system for OCaml")
5645 (description "Piqi is a multi-format data serialization system for OCaml.
5646It provides a uniform interface for serializing OCaml data structures to JSON,
5647XML and Protocol Buffers formats.")
5648 (license license:asl2.0)))
5649
5650(define-public ocaml-ppx-bap
5651 (package
5652 (name "ocaml-ppx-bap")
5653 (version "0.14.0")
5654 (source (origin
5655 (method git-fetch)
5656 (uri (git-reference
5657 (url "https://github.com/BinaryAnalysisPlatform/ppx_bap")
5658 (commit (string-append "v" (version-major+minor version)))))
5659 (file-name (git-file-name name version))
5660 (sha256
5661 (base32
5662 "1c6rcdp8bicdiwqc2mb59cl9l2vxlp3y8hmnr9x924fq7acly248"))))
5663 (build-system dune-build-system)
5664 (arguments
5665 ;; No tests
5666 `(#:tests? #f))
5667 (propagated-inputs (list ocaml-base-quickcheck
5668 ocaml-ppx-assert
5669 ocaml-ppx-bench
5670 ocaml-ppx-bin-prot
5671 ocaml-ppx-cold
5672 ocaml-ppx-compare
5673 ocaml-ppx-enumerate
5674 ocaml-ppx-fields-conv
5675 ocaml-ppx-hash
5676 ocaml-ppx-here
5677 ocaml-ppx-optcomp
5678 ocaml-ppx-sexp-conv
5679 ocaml-ppx-sexp-value
5680 ocaml-ppx-variants-conv
5681 ocaml-ppxlib))
5682 (properties `((upstream-name . "ppx_bap")))
5683 (home-page "https://github.com/BinaryAnalysisPlatform/ppx_bap")
5684 (synopsis "The set of ppx rewriters for BAP")
5685 (description
5686 "@code{ppx_bap} is the set of blessed ppx rewriters used in BAP projects.
5687It fills the same role as @code{ppx_base} or @code{ppx_jane} (from which it is
5688derived), but doesn't impose any style requirements and has only the minimal
5689necessary set of rewriters.")
5690 (license license:expat)))
5691
5692(define-public bap
5693 (let (;; Let pin one commit because -alpha is subject to change.
5694 ;; The last stable release v2.5.0 is from July 2022.
5695 (revision "0")
5696 (commit "f995d28a4a34abb4cef8e0b3bd3c41cd710ccf1a"))
5697 (package
5698 (name "bap")
5699 (version (git-version "2.6.0-alpha" revision commit))
5700 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
5701 (source (origin
5702 (method git-fetch)
5703 (uri (git-reference
5704 (url home-page)
5705 (commit commit)))
5706 (file-name (git-file-name name version))
5707 (sha256
5708 (base32
5709 "1zfkc8nagf8kvxbypalbhf6gs0c7i48zx53hlpak2ipjwhvm5im5"))))
5710 (build-system ocaml-build-system)
5711 (arguments
5712 (list
5713 #:use-make? #t
5714 #:phases
5715 #~(modify-phases %standard-phases
5716 (add-before 'configure 'fix-ncurses
5717 (lambda _
5718 (substitute* "oasis/llvm"
5719 (("-lcurses") "-lncurses"))
5720 #t))
5721 (replace 'configure
5722 (lambda* (#:key outputs inputs #:allow-other-keys)
5723 (for-each make-file-writable (find-files "." "."))
5724 ;; Package name changed
5725 (substitute* "oasis/elf-loader"
5726 (("bitstring.ppx") "ppx_bitstring"))
5727 ;; We don't have a monolithic llvm
5728 (substitute* "oasis/llvm.setup.ml.in"
5729 (("llvm_static = \"true\"") "true"))
5730 ;; Package update removed Make_binable, which was an alias
5731 ;; for Make_binable_without_uuid
5732 (substitute* (find-files "." ".")
5733 (("Utils.Make_binable1\\(") "Utils.Make_binable1_without_uuid(")
5734 (("Utils.Make_binable\\(") "Utils.Make_binable_without_uuid("))
5735 (invoke "./configure" "--prefix"
5736 (assoc-ref outputs "out")
5737 "--libdir"
5738 (string-append
5739 (assoc-ref outputs "out")
5740 "/lib/ocaml/site-lib")
5741 (string-append "--with-llvm-version="
5742 #$(package-version
5743 (this-package-input "llvm")))
5744 "--with-llvm-config=llvm-config"
5745 "--disable-ghidra"
5746 "--disable-llvm-static"
5747 "--enable-llvm"
5748 "--enable-everything"))))))
5749 (native-inputs (list clang-13 ocaml-oasis ocaml-ounit))
5750 (propagated-inputs
5751 (list
5752 camlzip
5753 ocaml-bitstring
5754 ocaml-cmdliner
5755 ocaml-core-kernel
5756 ocaml-ezjsonm
5757 ocaml-fileutils
5758 ocaml-frontc
5759 ocaml-graph
5760 ocaml-linenoise
5761 ocaml-ocurl
5762 ocaml-piqi
5763 ocaml-ppx-bap
5764 ocaml-ppx-bitstring
5765 ocaml-re
5766 ocaml-uri
5767 ocaml-utop
5768 ocaml-uuidm
5769 ocaml-yojson
5770 ocaml-z3
5771 ocaml-zarith))
5772 (inputs
5773 (list gmp llvm-13 ncurses))
5774 (synopsis "Binary Analysis Platform")
5775 (description "Binary Analysis Platform is a framework for writing program
5776analysis tools, that target binary files. The framework consists of a plethora
5777of libraries, plugins, and frontends. The libraries provide code reusability,
5778the plugins facilitate extensibility, and the frontends serve as entry points.")
5779 (license license:expat))))
5780
5781(define-public ocaml-camomile
5782 (package
5783 (name "ocaml-camomile")
5784 (version "1.0.2")
5785 (home-page "https://github.com/yoriyuki/Camomile")
5786 (source (origin
5787 (method url-fetch)
5788 (uri (string-append home-page "/releases/download/" version
5789 "/camomile-" version ".tbz"))
5790 (sha256
5791 (base32
5792 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
5793 (build-system dune-build-system)
5794 (arguments
5795 `(#:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
5796 #:phases
5797 (modify-phases %standard-phases
5798 (add-before 'build 'fix-usr-share
5799 (lambda* (#:key outputs #:allow-other-keys)
5800 (substitute* '("Camomile/dune" "configure.ml")
5801 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
5802 #t)))))
5803 (synopsis "Comprehensive Unicode library")
5804 (description "Camomile is a Unicode library for OCaml. Camomile provides
5805Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
5806200 encodings, collation and locale-sensitive case mappings, and more. The
5807library is currently designed for Unicode Standard 3.2.")
5808 ;; with an exception for linked libraries to use a different license
5809 (license license:lgpl2.0+)))
5810
5811(define-public ocaml-charinfo-width
5812 ;; Add LICENSE file and Dune tests
5813 (let ((commit "20aaaa6dca8f1e0b1ace55b6f2a8ba5e5910b620"))
5814 (package
5815 (name "ocaml-charinfo-width")
5816 (version (git-version "1.1.0" "1" commit))
5817 (home-page "https://github.com/kandu/charinfo_width/")
5818 (source (origin
5819 (method git-fetch)
5820 (uri (git-reference
5821 (url home-page)
5822 (commit commit)))
5823 (file-name (git-file-name name version))
5824 (sha256
5825 (base32
5826 "04gil5hxm2jax9paw3i24d8zyzhyl5cphzfyryvy2lcrm3c485q0"))))
5827 (build-system dune-build-system)
5828 (propagated-inputs
5829 (list ocaml-result ocaml-camomile))
5830 (native-inputs
5831 (list ocaml-ppx-expect))
5832 (properties
5833 `((upstream-name . "charInfo_width")))
5834 (synopsis "Determine column width for a character")
5835 (description "This module implements purely in OCaml a character width
5836function that follows the prototype of POSIX's wcwidth.")
5837 (license license:expat))))
5838
5839(define-public ocaml-zed
5840 (package
5841 (name "ocaml-zed")
5842 (version "3.2.1")
5843 (home-page "https://github.com/ocaml-community/zed")
5844 (source
5845 (origin
5846 (method git-fetch)
5847 (uri (git-reference
5848 (url home-page)
5849 (commit version)))
5850 (file-name (git-file-name name version))
5851 (sha256
5852 (base32 "17zdbm422y0qznc659civ9bmahhrbffxa50f8dnykiaq8v2ci91l"))))
5853 (build-system dune-build-system)
5854 (propagated-inputs
5855 (list ocaml-react
5856 ocaml-result
5857 ocaml-uchar
5858 ocaml-uutf
5859 ocaml-uucp
5860 ocaml-uuseg
5861 ocaml-odoc))
5862 (synopsis "Abstract engine for text edition in OCaml")
5863 (description
5864 "This module provides an abstract engine for text edition. It can be
5865used to write text editors, edition widgets, readlines, and more. The module
5866Zed uses Camomile to fully support the Unicode specification, and implements
5867an UTF-8 encoded string type with validation, and a rope datastructure to
5868achieve efficient operations on large Unicode buffers. Zed also features a
5869regular expression search on ropes. To support efficient text edition
5870capabilities, Zed provides macro recording and cursor management facilities.")
5871 (license license:bsd-3)))
5872
5873(define-public ocaml-lambda-term
5874 (package
5875 (name "ocaml-lambda-term")
5876 (version "3.3.1")
5877 (home-page "https://github.com/ocaml-community/lambda-term")
5878 (source (origin
5879 (method git-fetch)
5880 (uri (git-reference
5881 (url home-page)
5882 (commit version)))
5883 (file-name (git-file-name name version))
5884 (sha256
5885 (base32
5886 "1pkamblc6h0rsbk901cqn3xr9gqa3g8wrwyx5zryaqvb2xpbhp8b"))))
5887 (build-system dune-build-system)
5888 (propagated-inputs
5889 (list ocaml-logs
5890 ocaml-lwt
5891 ocaml-lwt-react
5892 ocaml-mew-vi
5893 ocaml-odoc
5894 ocaml-react
5895 ocaml-zed))
5896 (synopsis "Terminal manipulation library for OCaml")
5897 (description "Lambda-Term is a cross-platform library for manipulating the
5898terminal. It provides an abstraction for keys, mouse events, colors, as well as
5899a set of widgets to write curses-like applications. The main objective of
5900Lambda-Term is to provide a higher level functional interface to terminal
5901manipulation than, for example, ncurses, by providing a native OCaml interface
5902instead of bindings to a C library.")
5903 (license license:bsd-3)))
5904
5905(define-public ocaml-utop
5906 (package
5907 (name "ocaml-utop")
5908 (version "2.10.0")
5909 (source
5910 (origin
5911 (method git-fetch)
5912 (uri (git-reference
5913 (url "https://github.com/ocaml-community/utop")
5914 (commit version)))
5915 (file-name (git-file-name name version))
5916 (sha256
5917 (base32 "1pcix3h9f7is06581iax4i08zkd6sv8y5hy1vvxhqhcsd9z0qfl3"))))
5918 (build-system dune-build-system)
5919 (native-inputs
5920 (list ocaml-cppo))
5921 (propagated-inputs
5922 (list ocaml-lambda-term
5923 ocaml-logs
5924 ocaml-lwt
5925 ocaml-lwt-react
5926 ocaml-react
5927 ocaml-zed))
5928 (home-page "https://github.com/ocaml-community/utop")
5929 (synopsis "Improved interface to the OCaml toplevel")
5930 (description "UTop is an improved toplevel for OCaml. It can run in a
5931terminal or in Emacs. It supports line editing, history, real-time and context
5932sensitive completion, colors, and more.")
5933 (license license:bsd-3)))
5934
5935(define-public ocaml-ansiterminal
5936 (package
5937 (name "ocaml-ansiterminal")
5938 (version "0.8.5")
5939 (source (origin
5940 (method git-fetch)
5941 (uri (git-reference
5942 (url "https://github.com/Chris00/ANSITerminal")
5943 (commit version)
5944 (recursive? #t)))
5945 (file-name (git-file-name name version))
5946 (sha256
5947 (base32
5948 "052qnc23vmxp90yympjz9q6lhqw98gs1yvb3r15kcbi1j678l51h"))))
5949 (build-system dune-build-system)
5950 (properties `((upstream-name . "ANSITerminal")))
5951 (home-page "https://github.com/Chris00/ANSITerminal")
5952 (synopsis
5953 "Basic control of ANSI compliant terminals and the windows shell")
5954 (description
5955 "ANSITerminal is a module allowing to use the colors and cursor
5956movements on ANSI terminals.")
5957 ;; Variant of the LGPL3+ which permits
5958 ;; static and dynamic linking when producing binary files.
5959 ;; In other words, it allows one to link to the library
5960 ;; when compiling nonfree software.
5961 (license (license:non-copyleft "LICENSE.md"))))
5962
5963(define-public ocaml-ptmap
5964 (package
5965 (name "ocaml-ptmap")
5966 (version "2.0.5")
5967 (source (origin
5968 (method url-fetch)
5969 (uri
5970 (string-append "https://github.com/backtracking/ptmap/releases/download/"
5971 version "/ptmap-" version ".tbz"))
5972 (sha256
5973 (base32
5974 "1apk61fc1y1g7x3m3c91fnskvxp6i0vk5nxwvipj56k7x2pzilgb"))))
5975 (build-system dune-build-system)
5976 (arguments
5977 (list #:phases
5978 #~(modify-phases %standard-phases
5979 (replace 'check
5980 (lambda* (#:key tests? #:allow-other-keys)
5981 (when tests?
5982 (invoke "dune" "runtest")))))))
5983 (propagated-inputs (list ocaml-stdlib-shims ocaml-seq))
5984 (home-page "https://github.com/backtracking/ptmap")
5985 (synopsis "Maps of integers implemented as Patricia trees")
5986 (description
5987 "An implementation inspired by Okasaki & Gill's paper 'Fast Mergeable
5988Integer Maps.'")
5989 (license license:lgpl2.1))) ; with linking exception
5990
5991(define-public ocaml-integers
5992 (package
5993 (name "ocaml-integers")
5994 (version "0.7.0")
5995 (home-page "https://github.com/ocamllabs/ocaml-integers")
5996 (source (origin
5997 (method git-fetch)
5998 (uri (git-reference
5999 (url home-page)
6000 (commit version)))
6001 (file-name (git-file-name name version))
6002 (sha256
6003 (base32
6004 "0c0bmy53ag6504kih0cvnp4yf7mbcimb18m1mgs592ffb0zj1rff"))))
6005 (build-system dune-build-system)
6006 (arguments
6007 `(#:tests? #f)) ; no tests
6008 (propagated-inputs
6009 (list ocaml-stdlib-shims))
6010 (synopsis "Various signed and unsigned integer types for OCaml")
6011 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
6012and 64-bit signed and unsigned integer types, together with aliases such as
6013long and size_t whose sizes depend on the host platform.")
6014 (license license:expat)))
6015
6016(define-public ocaml-ctypes
6017 (package
6018 (name "ocaml-ctypes")
6019 (version "0.23.0")
6020 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
6021 (source (origin
6022 (method git-fetch)
6023 (uri (git-reference
6024 (url home-page)
6025 (commit version)))
6026 (file-name (git-file-name name version))
6027 (sha256
6028 (base32
6029 "16dxz2r070vlrkbqhza0c5y6izxpjn080vqmxj47i919wfqd75vx"))
6030 (patches (search-patches "ocaml-ctypes-test-oo.patch"))))
6031 (build-system dune-build-system)
6032 (arguments
6033 `(#:phases
6034 (modify-phases %standard-phases
6035 (add-after 'unpack 'make-writable
6036 (lambda _
6037 (for-each make-file-writable
6038 (find-files "."))))
6039 (delete 'configure))))
6040 (native-inputs
6041 `(("pkg-config" ,pkg-config)
6042 ("ounit" ,ocaml-ounit)
6043 ("lwt" ,ocaml-lwt)))
6044 (propagated-inputs
6045 `(("bigarray-compat" ,ocaml-bigarray-compat)
6046 ("integers" ,ocaml-integers)))
6047 (inputs
6048 (list libffi))
6049 (synopsis "Library for binding to C libraries using pure OCaml")
6050 (description "Ctypes is a library for binding to C libraries using pure
6051OCaml. The primary aim is to make writing C extensions as straightforward as
6052possible. The core of ctypes is a set of combinators for describing the
6053structure of C types -- numeric types, arrays, pointers, structs, unions and
6054functions. You can use these combinators to describe the types of the
6055functions that you want to call, then bind directly to those functions -- all
6056without writing or generating any C!")
6057 (license license:expat)))
6058
6059(define-public ocaml-ocb-stubblr
6060 (package
6061 (name "ocaml-ocb-stubblr")
6062 (version "0.1.1")
6063 (home-page "https://github.com/pqwy/ocb-stubblr")
6064 (source (origin
6065 (method url-fetch)
6066 (uri (string-append
6067 home-page "/releases/download/v0.1.1/ocb-stubblr-"
6068 version ".tbz"))
6069 (file-name (string-append name "-" version ".tbz"))
6070 (sha256
6071 (base32
6072 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
6073 (build-system ocaml-build-system)
6074 (arguments
6075 `(#:build-flags (list "build" "--tests" "true")
6076 #:phases
6077 (modify-phases %standard-phases
6078 (delete 'configure)
6079 (add-before 'build 'fix-for-guix
6080 (lambda _
6081 (substitute* "src/ocb_stubblr.ml"
6082 ;; Do not fail when opam is not present or initialized
6083 (("error_msgf \"error running opam\"") "\"\"")
6084 ;; Guix doesn't have cc, but it has gcc
6085 (("\"cc\"") "\"gcc\""))
6086 #t)))))
6087 (inputs (list ocaml-topkg opam-installer))
6088 (native-inputs (list ocaml-astring ocamlbuild))
6089 (synopsis "OCamlbuild plugin for C stubs")
6090 (description "Ocb-stubblr is about ten lines of code that you need to
6091repeat over, over, over and over again if you are using ocamlbuild to build
6092OCaml projects that contain C stubs.")
6093 (license license:isc)))
6094
6095(define-public ocaml-tsdl
6096 (package
6097 (name "ocaml-tsdl")
6098 (version "1.1.0")
6099 (home-page "https://erratique.ch/software/tsdl")
6100 (source (origin
6101 (method url-fetch)
6102 (uri (string-append home-page "/releases/tsdl-"
6103 version ".tbz"))
6104 (file-name (string-append name "-" version ".tar.gz"))
6105 (sha256
6106 (base32
6107 "0fw78qby010ai8apgwc66ary6zm3a5nw57228i44vccypav3xpk4"))))
6108 (build-system ocaml-build-system)
6109 (arguments
6110 `(#:build-flags '("build")
6111 #:tests? #f; tests require a display device
6112 #:phases
6113 (modify-phases %standard-phases
6114 (delete 'configure))))
6115 (native-inputs
6116 (list ocamlbuild ocaml-astring opam-installer pkg-config))
6117 (inputs
6118 `(("topkg" ,ocaml-topkg)
6119 ("sdl2" ,sdl2)
6120 ("integers" ,ocaml-integers)
6121 ("ctypes" ,ocaml-ctypes)))
6122 (synopsis "Thin bindings to SDL for OCaml")
6123 (description "Tsdl is an OCaml library providing thin bindings to the
6124cross-platform SDL C library.")
6125 (license license:isc)))
6126
6127(define-public dedukti
6128 (package
6129 (name "dedukti")
6130 (version "2.7")
6131 (home-page "https://deducteam.github.io/")
6132 (source
6133 (origin
6134 (method git-fetch)
6135 (uri (git-reference
6136 (url "https://github.com/deducteam/dedukti")
6137 (commit (string-append "v" version))))
6138 (file-name (git-file-name name version))
6139 (sha256
6140 (base32
6141 "1dsr3s88kgmcg3najhc29cwfvsxa2plvjws1127fz75kmn15np28"))))
6142 (build-system dune-build-system)
6143 (inputs (list gmp ocaml-cmdliner ocaml-z3 z3))
6144 (native-inputs (list ocaml-menhir))
6145 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
6146the λ-calculus")
6147 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
6148theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
6149dependent types. The λΠ-calculus modulo theory is itself an extension of the
6150λΠ-calculus where the context contains variable declaration as well as rewrite
6151rules. This system is not designed to develop proofs, but to check proofs
6152developed in other systems. In particular, it enjoys a minimalistic syntax.")
6153 (license license:cecill-c)))
6154
6155(define-public ocaml-jst-config
6156 (package
6157 (name "ocaml-jst-config")
6158 (version "0.16.0")
6159 (source
6160 (origin
6161 (method git-fetch)
6162 (uri (git-reference
6163 (url "https://github.com/janestreet/jst-config")
6164 (commit (string-append "v" version))))
6165 (file-name (git-file-name name version))
6166 (sha256
6167 (base32
6168 "01419gk2w2r1xqz11rw1glngi8fi6gq9sh79c06vasrk6vxriy0s"))))
6169 (build-system dune-build-system)
6170 (arguments '(#:tests? #f)) ; no tests
6171 (propagated-inputs
6172 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
6173 (home-page "https://github.com/janestreet/jst-config")
6174 (synopsis "Compile-time configuration for Jane Street libraries")
6175 (description "Defines compile-time constants used in Jane Street libraries
6176such as Base, Core, and Async. This package has an unstable interface; it is
6177intended only to share configuration between different packages from Jane
6178Street. Future updates may not be backward-compatible, and we do not
6179recommend using this package directly.")
6180 (license license:expat)))
6181
6182(define-public ocaml-jane-street-headers
6183 (package
6184 (name "ocaml-jane-street-headers")
6185 (version "0.15.0")
6186 (source
6187 (janestreet-origin
6188 "jane-street-headers" version
6189 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
6190 (build-system dune-build-system)
6191 (arguments '(#:tests? #f)) ; no tests
6192 (home-page "https://github.com/janestreet/jane-street-headers")
6193 (synopsis "Jane Street C header files")
6194 (description "C header files shared between the various Jane Street
6195packages.")
6196 (license license:expat)))
6197
6198(define-public ocaml-time-now
6199 (package
6200 (name "ocaml-time-now")
6201 (version "0.15.0")
6202 (source
6203 (janestreet-origin
6204 "time_now" version
6205 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
6206 (build-system dune-build-system)
6207 (arguments '(#:tests? #f)) ; no tests
6208 (propagated-inputs
6209 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
6210 ocaml-ppx-base ocaml-ppx-optcomp))
6211 (properties `((upstream-name . "time_now")))
6212 (home-page
6213 "https://github.com/janestreet/time_now")
6214 (synopsis "Reports the current time")
6215 (description
6216 "Provides a single function to report the current time in nanoseconds
6217since the start of the Unix epoch.")
6218 (license license:expat)))
6219
6220(define-public ocaml-ppx-inline-test
6221 (package
6222 (name "ocaml-ppx-inline-test")
6223 (version "0.15.0")
6224 (home-page "https://github.com/janestreet/ppx_inline_test")
6225 (source
6226 (origin
6227 (method git-fetch)
6228 (uri (git-reference
6229 (url (string-append home-page ".git"))
6230 (commit (string-append "v" version))))
6231 (file-name (git-file-name name version))
6232 (sha256
6233 (base32
6234 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
6235 (build-system dune-build-system)
6236 (arguments
6237 `(#:tests? #f)) ;see home page README for further information
6238 (propagated-inputs
6239 (list ocaml-base
6240 ocaml-migrate-parsetree
6241 ocaml-compiler-libs
6242 ocaml-sexplib0
6243 ocaml-stdio
6244 ocaml-ppxlib
6245 ocaml-time-now))
6246 (properties `((upstream-name . "ppx_inline_test")))
6247 (synopsis "Syntax extension for writing in-line tests in ocaml code")
6248 (description "This package contains a syntax extension for writing
6249in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
6250collection.")
6251 (license license:expat)))
6252
6253(define-public ocaml-bindlib
6254 (package
6255 (name "ocaml-bindlib")
6256 (version "6.0.0")
6257 (source
6258 (origin
6259 (method git-fetch)
6260 (uri (git-reference
6261 (url "https://github.com/rlepigre/ocaml-bindlib")
6262 (commit version)))
6263 (file-name (git-file-name name version))
6264 (sha256
6265 (base32
6266 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
6267 (build-system dune-build-system)
6268 (native-inputs
6269 (list ocamlbuild ocaml-findlib))
6270 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
6271 (synopsis "OCaml Bindlib library for bound variables")
6272 (description "Bindlib is a library allowing the manipulation of data
6273structures with bound variables. It is particularly useful when writing ASTs
6274for programming languages, but also for manipulating terms of the λ-calculus
6275or quantified formulas.")
6276 (license license:gpl3+)))
6277
6278(define-public ocaml-earley
6279 (package
6280 (name "ocaml-earley")
6281 (version "3.0.0")
6282 (home-page "https://github.com/rlepigre/ocaml-earley")
6283 (source
6284 (origin
6285 (method git-fetch)
6286 (uri (git-reference
6287 (url (string-append home-page ".git"))
6288 (commit version)))
6289 (file-name (git-file-name name version))
6290 (sha256
6291 (base32
6292 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
6293 (build-system dune-build-system)
6294 (propagated-inputs
6295 (list ocaml-stdlib-shims))
6296 (synopsis "Parsing library based on Earley Algorithm")
6297 (description "Earley is a parser combinator library base on Earley's
6298algorithm. It is intended to be used in conjunction with an OCaml syntax
6299extension which allows the definition of parsers inside the language. There
6300is also support for writing OCaml syntax extensions in a camlp4 style.")
6301 (license license:cecill-b)))
6302
6303(define-public ocaml-timed
6304 (package
6305 (name "ocaml-timed")
6306 (version "1.1")
6307 (home-page "https://github.com/rlepigre/ocaml-timed")
6308 (source (origin
6309 (method git-fetch)
6310 (uri (git-reference
6311 (url (string-append home-page ".git"))
6312 (commit version)))
6313 (sha256
6314 (base32
6315 "1aqmkpjv5jk95lc2m3qyyrhw8ra7n9wj8pv3bfc83l737zv0hjn1"))
6316 (file-name (git-file-name name version))))
6317 (build-system dune-build-system)
6318 (synopsis "Timed references for imperative state")
6319 (description "Timed references for imperative state. This module provides
6320an alternative type for references (or mutable cells) supporting undo/redo
6321operations. In particular, an abstract notion of time is used to capture the
6322state of the references at any given point, so that it can be restored. Note
6323that usual reference operations only have a constant time / memory overhead
6324(compared to those of the standard library).
6325
6326Moreover, we provide an alternative implementation based on the references
6327of the standard library (Pervasives module). However, it is less efficient
6328than the first one.")
6329 (license license:expat)))
6330
6331(define-public ocaml-biniou
6332 (package
6333 (name "ocaml-biniou")
6334 (version "1.2.2")
6335 (home-page "https://github.com/mjambon/biniou")
6336 (source
6337 (origin
6338 (method git-fetch)
6339 (uri (git-reference
6340 (url (string-append home-page ".git"))
6341 (commit version)))
6342 (file-name (git-file-name name version))
6343 (sha256
6344 (base32
6345 "1gd4nqffm9h7dzxyvpfpww24l61fqgazyh3p5f7k9jvgyv9y4vcn"))))
6346 (build-system dune-build-system)
6347 (arguments
6348 `(#:phases
6349 (modify-phases %standard-phases
6350 (add-before 'build 'make-writable
6351 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
6352 (inputs
6353 (list ocaml-easy-format ocaml-camlp-streams))
6354 (native-inputs
6355 (list which))
6356 (synopsis "Data format designed for speed, safety, ease of use and backward
6357compatibility")
6358 (description "Biniou (pronounced \"be new\" is a binary data format
6359designed for speed, safety, ease of use and backward compatibility as
6360protocols evolve. Biniou is vastly equivalent to JSON in terms of
6361functionality but allows implementations several times faster (4 times faster
6362than yojson), with 25-35% space savings.")
6363 (license license:bsd-3)))
6364
6365(define-public ocaml-yojson
6366 (package
6367 (name "ocaml-yojson")
6368 (version "2.0.2")
6369 (home-page "https://github.com/ocaml-community/yojson")
6370 (source
6371 (origin
6372 (method git-fetch)
6373 (uri (git-reference
6374 (url (string-append home-page ".git"))
6375 (commit version)))
6376 (file-name (git-file-name name version))
6377 (sha256
6378 (base32
6379 "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
6380 (build-system dune-build-system)
6381 (arguments
6382 `(#:package "yojson"))
6383 (propagated-inputs (list ocaml-seq))
6384 (native-inputs (list ocaml-alcotest ocaml-cppo))
6385 (synopsis "Low-level JSON library for OCaml")
6386 (description "Yojson is an optimized parsing and printing library for the
6387JSON format. It addresses a few shortcomings of json-wheel including 2x
6388speedup, polymorphic variants and optional syntax for tuples and variants.
6389@code{ydump} is a pretty printing command-line program provided with the
6390yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
6391serializers and deserializers from type definitions.")
6392 (license license:bsd-3)))
6393
6394(define-public ocaml-ppx-yojson-conv-lib
6395 (package
6396 (name "ocaml-ppx-yojson-conv-lib")
6397 (version "0.16.0")
6398 (home-page "https://github.com/janestreet/ppx_yojson_conv_lib")
6399 (source
6400 (origin
6401 (method git-fetch)
6402 (uri (git-reference
6403 (url home-page)
6404 (commit (string-append "v" version))))
6405 (sha256
6406 (base32
6407 "1npc1dbrcl3izi2rpf3rqz98jvsxrgzqn2vb95nf8wxgmh6gmrsc"))))
6408 (build-system dune-build-system)
6409 (propagated-inputs (list ocaml-yojson))
6410 (properties `((upstream-name . "ppx_yojson_conv_lib")))
6411 (synopsis "Runtime library used by ocaml PPX yojson converter")
6412 (description "Ppx_yojson_conv_lib is the runtime library used by
6413ppx_yojson_conv, a ppx rewriter that can be used to convert ocaml types
6414to a Yojson.Safe value.")
6415 (license license:expat)))
6416
6417(define-public ocaml-merlin-lib
6418 (package
6419 (name "ocaml-merlin-lib")
6420 (version "4.14-414")
6421 (source
6422 (origin
6423 (method git-fetch)
6424 (uri (git-reference
6425 (url "https://github.com/ocaml/merlin")
6426 (commit (string-append "v" version))))
6427 (file-name (git-file-name name version))
6428 (sha256
6429 (base32
6430 "1d9q6yl5i08j9lkmbywh5q1yfjxin5n9yp9bqwi7a9lanhwg8psi"))))
6431 (build-system dune-build-system)
6432 (arguments '(#:package "merlin-lib"
6433 #:tests? #f)) ; no tests
6434 (propagated-inputs (list ocaml-csexp ocaml-menhir))
6435 (properties `((ocaml5.0-variant . ,(delay ocaml5.0-merlin-lib))))
6436 (home-page "https://ocaml.github.io/merlin/")
6437 (synopsis "Merlin libraries")
6438 (description "These libraries provides access to low-level compiler
6439interfaces and the standard higher-level merlin protocol.")
6440 (license license:expat)))
6441
6442;; the 500 indicates that this version is for OCaml 5.0
6443(define ocaml-merlin-lib-500
6444 (package
6445 (inherit ocaml-merlin-lib)
6446 (name "ocaml-merlin-lib")
6447 (version "4.14-500")
6448 (source
6449 (origin
6450 (method git-fetch)
6451 (uri (git-reference
6452 (url "https://github.com/ocaml/merlin")
6453 (commit (string-append "v" version))))
6454 (file-name (git-file-name name version))
6455 (sha256
6456 (base32
6457 "0rx0h8a7m435jmfvpxjf4682dxgb2f74ar1k1m3c3hls6yxgw0a9"))))
6458 (properties '())))
6459
6460(define-public ocaml5.0-merlin-lib
6461 (package-with-ocaml5.0 ocaml-merlin-lib-500))
6462
6463(define-public ocaml-dot-merlin-reader
6464 (package
6465 (inherit ocaml-merlin-lib)
6466 (name "ocaml-dot-merlin-reader")
6467 (arguments '(#:package "dot-merlin-reader"
6468 #:tests? #f)) ; no tests
6469 (propagated-inputs (list ocaml-merlin-lib))
6470 (properties `((ocaml5.0-variant . ,(delay ocaml5.0-dot-merlin-reader))))
6471 (synopsis "Reads config files for @code{ocaml-merlin}")
6472 (description "@code{ocaml-dot-merlin-reader} is an external reader for
6473@code{ocaml-merlin} configurations.")))
6474
6475(define-public ocaml5.0-dot-merlin-reader
6476 (package-with-ocaml5.0
6477 (package
6478 (inherit ocaml-merlin-lib-500)
6479 (name "ocaml-dot-merlin-reader")
6480 (arguments '(#:package "dot-merlin-reader"
6481 #:tests? #f)) ; no tests
6482 (propagated-inputs (list ocaml5.0-merlin-lib))
6483 (synopsis "Reads config files for @code{ocaml-merlin}")
6484 (description "@code{ocaml-dot-merlin-reader} is an external reader for
6485@code{ocaml-merlin} configurations."))))
6486
6487(define-public ocaml-merlin
6488 (package
6489 (inherit ocaml-dot-merlin-reader)
6490 (name "ocaml-merlin")
6491 (arguments
6492 '(#:package "merlin"
6493 #:phases
6494 (modify-phases %standard-phases
6495 (replace 'check
6496 (lambda* (#:key tests? #:allow-other-keys)
6497 ;; Tests require a writable cache directory
6498 (setenv "HOME" "/tmp")
6499 (when tests?
6500 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
6501 (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
6502 (properties `((ocaml5.0-variant . ,(delay ocaml5.0-merlin))))
6503 (native-inputs
6504 (list ocaml-dot-merlin-reader ; required for tests
6505 ocaml-ppxlib
6506 ocaml-mdx
6507 jq))
6508 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
6509 (description "Merlin is an editor service that provides modern IDE
6510features for OCaml. Emacs and Vim support is provided out-of-the-box.
6511External contributors added support for Visual Studio Code, Sublime Text and
6512Atom.")
6513 (license license:expat)))
6514
6515(define-public ocaml5.0-merlin
6516 (package-with-ocaml5.0
6517 (package
6518 (inherit ocaml-merlin-lib-500)
6519 (name "ocaml-merlin")
6520 (arguments
6521 '(#:package "merlin"
6522 #:phases
6523 (modify-phases %standard-phases
6524 (replace 'check
6525 (lambda* (#:key tests? #:allow-other-keys)
6526 ;; Tests require a writable cache directory
6527 (setenv "HOME" "/tmp")
6528 (when tests?
6529 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
6530 (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
6531 (native-inputs
6532 (list ocaml-dot-merlin-reader ; required for tests
6533 ocaml-ppxlib
6534 ocaml-mdx
6535 jq))
6536 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
6537 (description "Merlin is an editor service that provides modern IDE
6538features for OCaml. Emacs and Vim support is provided out-of-the-box.
6539External contributors added support for Visual Studio Code, Sublime Text and
6540Atom.")
6541 (license license:expat))))
6542
6543(define-public ocaml-lsp-server
6544 (package
6545 (name "ocaml-lsp-server")
6546 (version "1.17.0")
6547 (home-page "https://github.com/ocaml/ocaml-lsp")
6548 (source (origin
6549 (method git-fetch)
6550 (uri (git-reference
6551 (url home-page)
6552 (commit version)))
6553 (sha256
6554 (base32
6555 "1w1m2mi7va3wcwgvgzqd3af6hrhx5zzyr3hqa228pcimp44w6f0h"))))
6556 (build-system dune-build-system)
6557 (arguments '(#:tests? #f)) ; tests are failing for v1.17
6558 (propagated-inputs (list
6559 ocaml-re
6560 ocaml-ppx-yojson-conv-lib
6561 dune-rpc
6562 ocaml-chrome-trace
6563 dune-dyn
6564 dune-stdune
6565 ocaml-fiber
6566 ocaml-xdg
6567 dune-ordering
6568 ocaml-dune-build-info
6569 ocaml-spawn
6570 ocamlc-loc
6571 ocaml-uutf
6572 ocaml-pp
6573 ocaml-csexp
6574 ocamlformat-rpc-lib
6575 ocaml-odoc
6576 ocaml-merlin-lib))
6577 (native-inputs (list ocaml-ppx-expect ocamlformat))
6578 (properties `((upstream-name . "ocaml-lsp-server")))
6579 (synopsis "LSP Server for OCaml")
6580 (description "This package implements an Ocaml language server implementation.")
6581 (license license:isc)))
6582
6583(define-public ocaml5.0-lsp-server (package-with-ocaml5.0 ocaml-lsp-server))
6584
6585(define-public ocaml-gsl
6586 (package
6587 (name "ocaml-gsl")
6588 (version "1.24.0")
6589 (source
6590 (origin
6591 (method url-fetch)
6592 (uri
6593 (string-append
6594 "https://github.com/mmottl/gsl-ocaml/releases/download/"
6595 version "/gsl-" version ".tbz"))
6596 (sha256
6597 (base32
6598 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
6599 (build-system dune-build-system)
6600 (arguments
6601 `(#:phases
6602 (modify-phases %standard-phases
6603 (add-after 'unpack 'fix-gsl-directory
6604 (lambda* (#:key inputs #:allow-other-keys)
6605 (substitute* "src/config/discover.ml"
6606 (("/usr") (assoc-ref inputs "gsl"))))))))
6607 (inputs
6608 (list gsl))
6609 (propagated-inputs
6610 (list ocaml-base ocaml-stdio))
6611 (home-page "https://mmottl.github.io/gsl-ocaml")
6612 (synopsis "Bindings to the GNU Scientific Library")
6613 (description
6614 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
6615the OCaml language.")
6616 (license license:gpl3+)))
6617
6618(define-public cubicle
6619 (package
6620 (name "cubicle")
6621 (version "1.1.2")
6622 (source (origin
6623 (method url-fetch)
6624 (uri (string-append "http://cubicle.lri.fr/cubicle-"
6625 version ".tar.gz"))
6626 (sha256
6627 (base32
6628 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
6629 (build-system gnu-build-system)
6630 (native-inputs
6631 (list automake ocaml
6632 (@@ (gnu packages base) which)))
6633 (propagated-inputs
6634 (list ocaml-num z3))
6635 (arguments
6636 `(#:configure-flags (list "--with-z3")
6637 #:make-flags (list "QUIET=")
6638 #:tests? #f
6639 #:phases
6640 (modify-phases %standard-phases
6641 (add-before 'configure 'make-deterministic
6642 (lambda _
6643 (substitute* "Makefile.in"
6644 (("`date`") "no date for reproducibility"))))
6645 (add-before 'configure 'configure-for-release
6646 (lambda _
6647 (substitute* "Makefile.in"
6648 (("SVNREV=") "#SVNREV="))
6649 #t))
6650 (add-before 'configure 'fix-/bin/sh
6651 (lambda _
6652 (substitute* "configure"
6653 (("-/bin/sh") (string-append "-" (which "sh"))))
6654 #t))
6655 (add-before 'configure 'fix-smt-z3wrapper.ml
6656 (lambda _
6657 (substitute* "Makefile.in"
6658 (("\\\\n") ""))
6659 #t))
6660 (add-before 'configure 'fix-ocaml-num
6661 (lambda* (#:key inputs #:allow-other-keys)
6662 (substitute* "Makefile.in"
6663 (("nums.cma") "num.cma num_core.cma")
6664 (("= \\$\\(FUNCTORYLIB\\)")
6665 (string-append "= -I "
6666 (assoc-ref inputs "ocaml-num")
6667 "/lib/ocaml/site-lib/num/core -I "
6668 (assoc-ref inputs "ocaml-num")
6669 "/lib/ocaml/site-lib/num"
6670 " $(FUNCTORYLIB)")))
6671 #t)))))
6672 (home-page "https://cubicle.lri.fr/")
6673 (synopsis "Model checker for array-based systems")
6674 (description "Cubicle is a model checker for verifying safety properties
6675of array-based systems. This is a syntactically restricted class of
6676parametrized transition systems with states represented as arrays indexed by
6677an arbitrary number of processes. Cache coherence protocols and mutual
6678exclusion algorithms are typical examples of such systems.")
6679 (license license:asl2.0)))
6680
6681(define-public ocaml-sexplib0
6682 (package
6683 (name "ocaml-sexplib0")
6684 (version "0.15.1")
6685 (home-page "https://github.com/janestreet/sexplib0")
6686 (source (origin
6687 (method git-fetch)
6688 (uri (git-reference
6689 (url home-page)
6690 (commit (string-append "v" version))))
6691 (file-name (git-file-name name version))
6692 (sha256
6693 (base32
6694 "05m93g4m4jhj1v8pazg3s2ydcfymr3h4476yjhdca5fm4sn35bg8"))))
6695 (build-system dune-build-system)
6696 (arguments `(#:tests? #f)) ;no tests
6697 (synopsis "Library containing the definition of S-expressions and some
6698base converters")
6699 (description "Part of Jane Street's Core library The Core suite of
6700libraries is an industrial strength alternative to OCaml's standard library
6701that was developed by Jane Street, the largest industrial user of OCaml.")
6702 (license license:expat)))
6703
6704(define-public ocaml-parsexp
6705 (package
6706 (name "ocaml-parsexp")
6707 (version "0.15.0")
6708 (home-page "https://github.com/janestreet/parsexp")
6709 (source (origin
6710 (method git-fetch)
6711 (uri (git-reference
6712 (url home-page)
6713 (commit (string-append "v" version))))
6714 (file-name (git-file-name name version))
6715 (sha256
6716 (base32
6717 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
6718 (build-system dune-build-system)
6719 (inputs
6720 (list ocaml-sexplib0 ocaml-base))
6721 (synopsis "S-expression parsing library")
6722 (description
6723 "This library provides generic parsers for parsing S-expressions from
6724strings or other medium.
6725
6726The library is focused on performances but still provide full generic
6727parsers that can be used with strings, bigstrings, lexing buffers,
6728character streams or any other sources effortlessly.
6729
6730It provides three different class of parsers:
6731@itemize
6732@item
6733the normal parsers, producing [Sexp.t] or [Sexp.t list] values
6734@item
6735the parsers with positions, building compact position sequences so
6736that one can recover original positions in order to report properly
6737located errors at little cost
6738@item
6739the Concrete Syntax Tree parsers, produce values of type
6740@code{Parsexp.Cst.t} which record the concrete layout of the s-expression
6741syntax, including comments
6742@end itemize
6743
6744This library is portable and doesn't provide IO functions. To read
6745s-expressions from files or other external sources, you should use
6746parsexp_io.")
6747 (license license:expat)))
6748
6749(define-public ocaml-sexplib
6750 (package
6751 (name "ocaml-sexplib")
6752 (version "0.16.0")
6753 (home-page "https://github.com/janestreet/sexplib")
6754 (source (origin
6755 (method git-fetch)
6756 (uri (git-reference
6757 (url home-page)
6758 (commit (string-append "v" version))))
6759 (file-name (git-file-name name version))
6760 (sha256
6761 (base32
6762 "0hl0zf2cgjivvlsrf85f5lg4xprcgbz7qg2z51k838y7k2121k78"))))
6763 (build-system dune-build-system)
6764 (propagated-inputs
6765 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
6766 (synopsis
6767 "Library for serializing OCaml values to and from S-expressions")
6768 (description
6769 "This package is part of Jane Street's Core library. Sexplib contains
6770functionality for parsing and pretty-printing s-expressions.")
6771 (license license:expat)))
6772
6773(define-public ocaml-sexp-pretty
6774 (package
6775 (name "ocaml-sexp-pretty")
6776 (version "0.15.1")
6777 (source (origin
6778 (method git-fetch)
6779 (uri (git-reference
6780 (url "https://github.com/janestreet/sexp_pretty")
6781 (commit (string-append "v" version))))
6782 (file-name (git-file-name name version))
6783 (sha256
6784 (base32
6785 "08z9jpvgag5f029ns0a06lcdymg00vwi232xsy1rdv82zvc0x4ah"))))
6786 (build-system dune-build-system)
6787 (propagated-inputs (list ocaml-base ocaml-ppx-base ocaml-sexplib ocaml-re))
6788 (properties `((upstream-name . "sexp_pretty")))
6789 (home-page "https://github.com/janestreet/sexp_pretty")
6790 (synopsis "S-expression pretty-printer")
6791 (description
6792 "Library for pretty-printing s-expressions, using better indentation
6793rules than the default pretty printer in Sexplib.")
6794 (license license:expat)))
6795
6796(define-public ocaml-base
6797 (package
6798 (name "ocaml-base")
6799 (version "0.15.0")
6800 (home-page "https://github.com/janestreet/base")
6801 (source
6802 (origin
6803 (method git-fetch)
6804 (uri (git-reference
6805 (url "https://github.com/janestreet/base")
6806 (commit (string-append "v" version))))
6807 (file-name (git-file-name name version))
6808 (sha256
6809 (base32
6810 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
6811 (build-system dune-build-system)
6812 (propagated-inputs
6813 (list ocaml-sexplib0))
6814 (properties `((ocaml5.0-variant . ,(delay ocaml5.0-base))))
6815 (synopsis
6816 "Full standard library replacement for OCaml")
6817 (description
6818 "Base is a complete and portable alternative to the OCaml standard
6819library. It provides all standard functionalities one would expect
6820from a language standard library. It uses consistent conventions
6821across all of its module.
6822
6823Base aims to be usable in any context. As a result system dependent
6824features such as I/O are not offered by Base. They are instead
6825provided by companion libraries such as
6826@url{https://github.com/janestreet/stdio, ocaml-stdio}.")
6827 (license license:expat)))
6828
6829(define-public ocaml5.0-base
6830 ;; This version contains fixes for OCaml 5.0
6831 ;; (see https://github.com/ocaml/opam-repository/pull/21851)
6832 (let ((commit "423dbad212f55506767d758b1ceb2d6e0ee8e7f5")
6833 (revision "0"))
6834 (package-with-ocaml5.0
6835 (package
6836 (inherit ocaml-base)
6837 (name "ocaml-base")
6838 (version (git-version "0.15.0" revision commit))
6839 (source
6840 (origin
6841 (method git-fetch)
6842 (uri (git-reference
6843 (url "https://github.com/kit-ty-kate/base")
6844 (commit commit)))
6845 (file-name (git-file-name "ocaml5.0-base" version))
6846 (sha256
6847 (base32
6848 "15vsiv3q53l1bzrvqgspf3lp2104s9dzw62z3nl75f53jvjvsyf6"))))
6849 (properties '())))))
6850
6851(define-public ocaml-compiler-libs
6852 (package
6853 (name "ocaml-compiler-libs")
6854 (version "0.12.4")
6855 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
6856 (source
6857 (origin
6858 (method git-fetch)
6859 (uri (git-reference
6860 (url home-page)
6861 (commit (string-append "v" version))))
6862 (file-name (git-file-name name version))
6863 (sha256
6864 (base32
6865 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
6866 (build-system dune-build-system)
6867 (arguments `(#:tests? #f)) ;no tests
6868 (properties `((upstream-name . "ocaml-compiler-libs")))
6869 (synopsis "Compiler libraries repackaged")
6870 (description "This package simply repackages the OCaml compiler libraries
6871so they don't expose everything at toplevel. For instance, @code{Ast_helper}
6872is now @code{Ocaml_common.Ast_helper}.")
6873 (license license:expat)))
6874
6875(define-public ocaml-stdio
6876 (package
6877 (name "ocaml-stdio")
6878 (version "0.15.0")
6879 (home-page "https://github.com/janestreet/stdio")
6880 (source
6881 (janestreet-origin "stdio" version
6882 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
6883 (build-system dune-build-system)
6884 (propagated-inputs
6885 (list ocaml-base ocaml-sexplib0))
6886 (arguments `(#:tests? #f)) ;no tests
6887 (synopsis "Standard IO library for OCaml")
6888 (description
6889 "Stdio implements simple input/output functionalities for OCaml. It
6890re-exports the input/output functions of the OCaml standard libraries using
6891a more consistent API.")
6892 (license license:expat)))
6893
6894(define-public ocaml-ppx-deriving
6895 (package
6896 (name "ocaml-ppx-deriving")
6897 (version "5.2.1")
6898 (source
6899 (origin
6900 (method git-fetch)
6901 (uri (git-reference
6902 (url "https://github.com/ocaml-ppx/ppx_deriving")
6903 (commit (string-append "v" version))))
6904 (file-name (git-file-name name version))
6905 (sha256
6906 (base32
6907 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
6908 (build-system dune-build-system)
6909 (propagated-inputs
6910 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
6911 (native-inputs
6912 (list ocaml-cppo ocaml-ounit2))
6913 (properties `((upstream-name . "ppx_deriving")))
6914 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
6915 (synopsis "Type-driven code generation for OCaml")
6916 (description
6917 "Ppx_deriving provides common infrastructure for generating code based
6918on type definitions, and a set of useful plugins for common tasks.")
6919 (license license:expat)))
6920
6921(define-public ocaml-ppx-derivers
6922 (package
6923 (name "ocaml-ppx-derivers")
6924 (version "1.2.1")
6925 (home-page
6926 "https://github.com/ocaml-ppx/ppx_derivers")
6927 (source
6928 (origin
6929 (method git-fetch)
6930 (uri (git-reference
6931 (url (string-append home-page ".git"))
6932 (commit version)))
6933 (file-name (git-file-name name version))
6934 (sha256
6935 (base32
6936 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
6937 (build-system dune-build-system)
6938 (arguments
6939 '(#:tests? #f)) ;no tests
6940 (properties `((upstream-name . "ppx_derivers")))
6941 (synopsis "Shared @code{@@deriving} plugin registry")
6942 (description
6943 "Ppx_derivers is a tiny package whose sole purpose is to allow
6944ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
6945as part of the same ocaml-migrate-parsetree driver.")
6946 (license license:bsd-3)))
6947
6948(define-public ocaml-ppx-deriving-yojson
6949 (package
6950 (name "ocaml-ppx-deriving-yojson")
6951 (version "3.7.0")
6952 (home-page "https://github.com/ocaml-ppx/ppx_deriving_yojson")
6953 (source
6954 (origin
6955 (method git-fetch)
6956 (uri (git-reference
6957 (url home-page)
6958 (commit (string-append "v" version))))
6959 (file-name (git-file-name name version))
6960 (sha256
6961 (base32 "1nazam6zlzm9ngyyr1q7s1vmw162fnrvsn8r6bsn5lnpaygv28ly"))))
6962 (build-system dune-build-system)
6963 (propagated-inputs
6964 (list ocaml-yojson
6965 ocaml-result
6966 ocaml-ppx-deriving
6967 ocaml-ppxlib))
6968 (native-inputs (list ocaml-ounit))
6969 (properties `((upstream-name . "ppx_deriving_yojson")))
6970 (synopsis "JSON codec generator for OCaml")
6971 (description
6972 "Ppx_deriving_yojson is a ppx_deriving plugin that provides a JSON codec
6973generator.")
6974 (license license:expat)))
6975
6976(define-public ocaml-cinaps
6977 ;; The commit removes the unused dependency of ocaml-ppx-jane. We need to
6978 ;; use this as we would otherwise have a dependency loop between
6979 ;; ocaml-ppxlib and ocaml-ppx-jane.
6980 (let ((commit "d974bb2db3ab1ab14e81f989b5bdb609462bff47")
6981 (revision "0"))
6982 (package
6983 (name "ocaml-cinaps")
6984 (version (git-version "0.15.1" revision commit))
6985 (home-page "https://github.com/ocaml-ppx/cinaps")
6986 (source
6987 (origin
6988 (method git-fetch)
6989 (uri (git-reference
6990 (url home-page)
6991 (commit commit)))
6992 (file-name (git-file-name name version))
6993 (sha256
6994 (base32
6995 "00kb04vqlnk1pynqjhna5qhn8790ab17baxf4na5py1l1h1js8qx"))))
6996 (build-system dune-build-system)
6997 (propagated-inputs (list ocaml-re))
6998 (synopsis "Trivial metaprogramming tool for OCaml")
6999 (description
7000 "Cinaps is a trivial Metaprogramming tool using the OCaml toplevel. It is based
7001on the same idea as expectation tests. The user writes some OCaml code inside
7002special comments and cinaps makes sure that what follows is what is printed by
7003the OCaml code.")
7004 (license license:expat))))
7005
7006(define-public ocaml-ppxlib
7007 (package
7008 (name "ocaml-ppxlib")
7009 (version "0.28.0")
7010 (home-page "https://github.com/ocaml-ppx/ppxlib")
7011 (source
7012 (origin
7013 (method git-fetch)
7014 (uri (git-reference
7015 (url home-page)
7016 (commit version)))
7017 (file-name (git-file-name name version))
7018 (sha256
7019 (base32
7020 "0alwn1bnc228z6ivj7dpcszrylbg1z3img8vrcihaa9crbx3xxcb"))))
7021 (build-system dune-build-system)
7022 (arguments
7023 `(#:phases
7024 (modify-phases %standard-phases
7025 (add-after 'unpack 'fix-test-format
7026 (lambda _
7027 ;; Since sexplib >= 0.15, error formatting has changed
7028 (substitute* "test/driver/exception_handling/run.t"
7029 (("\\(Failure ") "Failure("))
7030 (substitute* "test/base/test.ml"
7031 (("Invalid_argument \\((.*)\\)." _ m)
7032 (string-append "Invalid_argument " m "."))
7033 (("\\(Invalid_argument (.*)\\)" _ m)
7034 (string-append "Invalid_argument " m ".")))
7035 (substitute* "test/ppx_import_support/test.ml"
7036 (("\\(Failure") "Failure")
7037 ((" \"(Some ppx-es.*)\")" _ m)
7038 (string-append " \"" m "\".")))))
7039 (add-after 'fix-test-format 'fix-egrep
7040 (lambda _
7041 ;; egrep is obsolescent; using grep -E
7042 (substitute* "test/expansion_context/run.t"
7043 (("egrep") "grep -E")))))))
7044 (propagated-inputs
7045 (list ocaml-compiler-libs
7046 ocaml-ppx-derivers
7047 ocaml-sexplib0
7048 ocaml-stdlib-shims))
7049 (native-inputs
7050 (list ocaml-stdio
7051 ocaml-cinaps
7052 ocaml-base))
7053 (synopsis
7054 "Base library and tools for ppx rewriters")
7055 (description
7056 "A comprehensive toolbox for ppx development. It features:
7057@itemize
7058@item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
7059independent of the version of OCaml;
7060@item a library for library for ppx rewriters in general, and type-driven code
7061generators in particular;
7062@item
7063a feature-full driver for OCaml AST transformers;
7064@item a quotation mechanism allowing to write values representing the
7065OCaml AST in the OCaml syntax;
7066@item a generator of open recursion classes from type definitions.
7067@end itemize")
7068 (license license:expat)))
7069
7070(define-public ocaml-ppx-compare
7071 (package
7072 (name "ocaml-ppx-compare")
7073 (version "0.15.0")
7074 (source
7075 (janestreet-origin "ppx_compare" version
7076 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
7077 (build-system dune-build-system)
7078 (arguments
7079 ;; Tests are currently failing
7080 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
7081 '(#:tests? #f))
7082 (propagated-inputs
7083 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
7084 (properties `((upstream-name . "ppx_compare")))
7085 (home-page "https://github.com/janestreet/ppx_compare")
7086 (synopsis "Generation of comparison functions from types")
7087 (description "Generation of fast comparison functions from type expressions
7088and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
7089from type representations. The scaffolded functions are usually much faster
7090than ocaml's Pervasives.compare. Scaffolding functions also gives you more
7091flexibility by allowing you to override them for a specific type and more safety
7092by making sure that you only compare comparable values.")
7093 (license license:asl2.0)))
7094
7095(define-public ocaml-fieldslib
7096 (package
7097 (name "ocaml-fieldslib")
7098 (version "0.15.0")
7099 (source (janestreet-origin
7100 "fieldslib" version
7101 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
7102 (build-system dune-build-system)
7103 (arguments `(#:tests? #f)) ; No tests
7104 (propagated-inputs
7105 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
7106 (properties `((upstream-name . "fieldslib")))
7107 (home-page "https://github.com/janestreet/fieldslib")
7108 (synopsis "Syntax extension to record fields")
7109 (description "Syntax extension to define first class values representing
7110record fields, to get and set record fields, iterate and fold over all fields
7111of a record and create new record values.")
7112 (license license:asl2.0)))
7113
7114(define-public ocaml-variantslib
7115 (package
7116 (name "ocaml-variantslib")
7117 (version "0.15.0")
7118 (source
7119 (janestreet-origin "variantslib" version
7120 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
7121 (build-system dune-build-system)
7122 (arguments
7123 ;; No tests
7124 `(#:tests? #f))
7125 (propagated-inputs
7126 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
7127 (properties `((upstream-name . "variantslib")))
7128 (home-page "https://github.com/janestreet/variantslib")
7129 (synopsis "OCaml variants as first class values")
7130 (description "The Core suite of libraries is an alternative to OCaml's
7131standard library.")
7132 (license license:asl2.0)))
7133
7134(define-public ocaml-ppx-fields-conv
7135 (package
7136 (name "ocaml-ppx-fields-conv")
7137 (version "0.15.0")
7138 (home-page "https://github.com/janestreet/ppx_fields_conv")
7139 (source
7140 (origin
7141 (method git-fetch)
7142 (uri (git-reference
7143 (url home-page)
7144 (commit (string-append "v" version))))
7145 (file-name (git-file-name name version))
7146 (sha256
7147 (base32
7148 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
7149 (build-system dune-build-system)
7150 (propagated-inputs
7151 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
7152 ocaml-ppxlib))
7153 (properties `((upstream-name . "ppx_fields_conv")))
7154 (synopsis "Generation of accessor and iteration functions for ocaml records")
7155 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
7156first class values representing record fields, and additional routines, to get
7157and set record fields, iterate and fold over all fields of a record and create
7158new record values.")
7159 (license license:asl2.0)))
7160
7161(define-public ocaml-ppx-sexp-conv
7162 (package
7163 (name "ocaml-ppx-sexp-conv")
7164 (version "0.15.1")
7165 (home-page "https://github.com/janestreet/ppx_sexp_conv")
7166 (source
7167 (origin
7168 (method git-fetch)
7169 (uri (git-reference
7170 (url home-page)
7171 (commit (string-append "v" version))))
7172 (file-name (git-file-name name version))
7173 (sha256
7174 (base32
7175 "163kn5gv1va84s1ysa1fm40fw3hm9xm3788qsvxmm4l3gij2g29m"))))
7176 (build-system dune-build-system)
7177 (propagated-inputs
7178 (list ocaml-base ocaml-ppxlib))
7179 (properties `((upstream-name . "ppx_sexp_conv")))
7180 (synopsis "Generation of S-expression conversion functions from type definitions")
7181 (description "This package generates S-expression conversion functions from type
7182definitions.")
7183 (license license:asl2.0)))
7184
7185(define-public ocaml-ppx-variants-conv
7186 (package
7187 (name "ocaml-ppx-variants-conv")
7188 (version "0.15.0")
7189 (source
7190 (origin
7191 (method git-fetch)
7192 (uri (git-reference
7193 (url "https://github.com/janestreet/ppx_variants_conv")
7194 (commit (string-append "v" version))))
7195 (file-name (git-file-name name version))
7196 (sha256
7197 (base32
7198 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
7199 (build-system dune-build-system)
7200 (propagated-inputs
7201 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
7202 ocaml-ppxlib))
7203 (properties
7204 `((upstream-name . "ppx_variants_conv")))
7205 (home-page
7206 "https://github.com/janestreet/ppx_variants_conv")
7207 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
7208 (description
7209 "This package generates accessors and iteration functions for OCaml
7210variant types.")
7211 (license license:asl2.0)))
7212
7213(define-public ocaml-ppx-custom-printf
7214 (package
7215 (name "ocaml-ppx-custom-printf")
7216 (version "0.15.0")
7217 (home-page "https://github.com/janestreet/ppx_custom_printf")
7218 (source
7219 (origin
7220 (method git-fetch)
7221 (uri (git-reference
7222 (url home-page)
7223 (commit (string-append "v" version))))
7224 (file-name (git-file-name name version))
7225 (sha256
7226 (base32
7227 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
7228 (build-system dune-build-system)
7229 (propagated-inputs
7230 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
7231 ocaml-ppxlib))
7232 (properties `((upstream-name . "ppx_custom_printf")))
7233 (synopsis "Printf-style format-strings for user-defined string conversion")
7234 (description "Extensions to printf-style format-strings for user-defined
7235string conversion.")
7236 (license license:asl2.0)))
7237
7238(define-public ocaml-ppx-stable-witness
7239 (package
7240 (name "ocaml-ppx-stable-witness")
7241 (version "0.16.0")
7242 (source
7243 (origin
7244 (method git-fetch)
7245 (uri (git-reference
7246 (url "https://github.com/janestreet/ppx_stable_witness")
7247 (commit (string-append "v" version))))
7248 (file-name (git-file-name name version))
7249 (sha256
7250 (base32 "1ppmazy1vw0j44z1p60ln6fddz414zmyrqkpi54w6cr93giqsl2v"))))
7251 (build-system dune-build-system)
7252 (propagated-inputs (list ocaml-base ocaml-ppxlib))
7253 (properties `((upstream-name . "ppx_stable_witness")))
7254 (home-page "https://github.com/janestreet/ppx_stable_witness")
7255 (synopsis "Mark a type as stable across versions")
7256 (description "This ppx extension is used for deriving a witness that a
7257type is intended to be stable. In this context, stable means that the
7258serialization format will never change. This allows programs running at
7259different versions of the code to safely communicate.")
7260 (license license:expat)))
7261
7262(define-public ocaml-bin-prot
7263 (package
7264 (name "ocaml-bin-prot")
7265 (version "0.16.0")
7266 (source
7267 (origin
7268 (method git-fetch)
7269 (uri (git-reference
7270 (url "https://github.com/janestreet/bin_prot")
7271 (commit (string-append "v" version))))
7272 (file-name (git-file-name name version))
7273 (sha256
7274 (base32 "1ybs0152ilgr8sa1hqnc2jj0gbvg855ixl3c5b2pjbnk7blhqnd8"))))
7275 (build-system dune-build-system)
7276 (propagated-inputs
7277 (list ocaml-base
7278 ocaml-ppx-compare
7279 ocaml-ppx-custom-printf
7280 ocaml-ppx-fields-conv
7281 ocaml-ppx-optcomp
7282 ocaml-ppx-sexp-conv
7283 ocaml-ppx-stable-witness
7284 ocaml-ppx-variants-conv))
7285 (properties `((upstream-name . "bin_prot")))
7286 (home-page "https://github.com/janestreet/bin_prot")
7287 (synopsis "Binary protocol generator")
7288 (description "This library contains functionality for reading and writing
7289OCaml-values in a type-safe binary protocol. It is extremely efficient,
7290typically supporting type-safe marshalling and unmarshalling of even highly
7291structured values at speeds sufficient to saturate a gigabit connection. The
7292protocol is also heavily optimized for size, making it ideal for long-term
7293storage of large amounts of data.")
7294 (license license:expat)))
7295
7296(define-public ocaml-protocol-version-header
7297 (package
7298 (name "ocaml-protocol-version-header")
7299 (version "0.15.0")
7300 (source (origin
7301 (method git-fetch)
7302 (uri (git-reference
7303 (url
7304 "https://github.com/janestreet/protocol_version_header")
7305 (commit (string-append "v" version))))
7306 (file-name (git-file-name name version))
7307 (sha256
7308 (base32
7309 "0s638cwf1357gg754rc4306654hhrhzqaqm2lp3yv5vj3ml8p4qy"))))
7310 (build-system dune-build-system)
7311 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7312 (properties `((upstream-name . "protocol_version_header")))
7313 (home-page "https://github.com/janestreet/protocol_version_header")
7314 (synopsis "Protocol versioning")
7315 (description
7316 "This library offers a lightweight way for applications protocols to
7317version themselves. The more protocols that add themselves to
7318@code{Known_protocol}, the nicer error messages we will get when connecting to
7319a service while using the wrong protocol.")
7320 (license license:expat)))
7321
7322(define-public ocaml-octavius
7323 (package
7324 (name "ocaml-octavius")
7325 (version "1.2.2")
7326 (source (origin
7327 (method git-fetch)
7328 (uri (git-reference
7329 (url "https://github.com/ocaml-doc/octavius")
7330 (commit (string-append "v" version))))
7331 (file-name (git-file-name name version))
7332 (sha256
7333 (base32
7334 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
7335 (build-system dune-build-system)
7336 (arguments
7337 `(#:phases
7338 (modify-phases %standard-phases
7339 (add-before 'build 'make-writable
7340 (lambda _
7341 (for-each (lambda (file)
7342 (chmod file #o644))
7343 (find-files "." "."))
7344 #t)))))
7345 (properties `((upstream-name . "octavius")))
7346 (home-page "https://github.com/ocaml-doc/octavius")
7347 (synopsis "Ocamldoc comment syntax parser")
7348 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
7349 (license license:isc)))
7350
7351(define-public ocaml-sha
7352 (package
7353 (name "ocaml-sha")
7354 (version "1.15.2")
7355 (source (origin
7356 (method url-fetch)
7357 (uri (string-append "https://github.com/djs55/ocaml-sha/releases/download/"
7358 version "/sha-" version ".tbz"))
7359 (sha256
7360 (base32
7361 "1dzzhchknnbrpp5s81iqbvmqp4s0l75yrq8snj70ch3wkarmgg9z"))))
7362 (build-system dune-build-system)
7363 (propagated-inputs (list ocaml-stdlib-shims ocaml-odoc))
7364 (native-inputs (list ocaml-ounit2))
7365 (home-page "https://github.com/djs55/ocaml-sha")
7366 (synopsis "OCaml binding to the SHA cryptographic functions")
7367 (description
7368 "This is the binding for SHA interface code in OCaml, offering the same
7369interface as the MD5 digest included in the OCaml standard library. It
7370currently provides SHA1, SHA256 and SHA512 hash functions.")
7371 (license license:isc)))
7372
7373(define-public ocaml-ppx-hash
7374 (package
7375 (name "ocaml-ppx-hash")
7376 (version "0.15.0")
7377 (source
7378 (janestreet-origin "ppx_hash" version
7379 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
7380 (build-system dune-build-system)
7381 (propagated-inputs
7382 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
7383 ocaml-migrate-parsetree ocaml-ppxlib))
7384 (properties `((upstream-name . "ppx_hash")))
7385 (home-page "https://github.com/janestreet/ppx_hash")
7386 (synopsis "Generation of hash functions from type expressions and definitions")
7387 (description "This package is a collection of ppx rewriters that generate
7388hash functions from type exrpessions and definitions.")
7389 (license license:asl2.0)))
7390
7391(define-public ocaml-ppx-enumerate
7392 (package
7393 (name "ocaml-ppx-enumerate")
7394 (version "0.15.0")
7395 (source
7396 (janestreet-origin
7397 "ppx_enumerate" version
7398 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
7399 (build-system dune-build-system)
7400 (arguments
7401 `(#:tests? #f)) ; no test suite
7402 (propagated-inputs
7403 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
7404 (properties `((upstream-name . "ppx_enumerate")))
7405 (home-page "https://github.com/janestreet/ppx_enumerate")
7406 (synopsis "Generate a list containing all values of a finite type")
7407 (description "Ppx_enumerate is a ppx rewriter which generates a definition
7408for the list of all values of a type (for a type which only has finitely
7409many values).")
7410 (license license:asl2.0)))
7411
7412(define-public ocaml-ppx-bench
7413 (package
7414 (name "ocaml-ppx-bench")
7415 (version "0.16.0")
7416 (source
7417 (origin
7418 (method git-fetch)
7419 (uri (git-reference
7420 (url "https://github.com/janestreet/ppx_bench")
7421 (commit (string-append "v" version))))
7422 (file-name (git-file-name name version))
7423 (sha256
7424 (base32 "0pry0vgi1ilwdi5viqydyf9n7y289c17s8wfn16wyzzfr887769m"))))
7425 (build-system dune-build-system)
7426 (arguments
7427 ;; No tests
7428 `(#:tests? #f))
7429 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
7430 (properties `((upstream-name . "ppx_bench")))
7431 (home-page "https://github.com/janestreet/ppx_bench")
7432 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
7433 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
7434 (license license:expat)))
7435
7436(define-public ocaml-ppx-here
7437 (package
7438 (name "ocaml-ppx-here")
7439 (version "0.15.0")
7440 (source
7441 (janestreet-origin "ppx_here" version
7442 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
7443 (build-system dune-build-system)
7444 (arguments
7445 ;; broken tests
7446 `(#:tests? #f))
7447 (propagated-inputs
7448 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
7449 (properties `((upstream-name . "ppx_here")))
7450 (home-page "https://github.com/janestreet/ppx_here")
7451 (synopsis "Expands [%here] into its location")
7452 (description
7453 "Part of the Jane Street's PPX rewriters collection.")
7454 (license license:asl2.0)))
7455
7456(define-public ocaml-typerep
7457 (package
7458 (name "ocaml-typerep")
7459 (version "0.15.0")
7460 (source
7461 (origin
7462 (method git-fetch)
7463 (uri (git-reference
7464 (url "https://github.com/janestreet/typerep")
7465 (commit (string-append "v" version))))
7466 (file-name (git-file-name name version))
7467 (sha256
7468 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
7469 (build-system dune-build-system)
7470 (arguments `(#:tests? #f)); no tests
7471 (propagated-inputs (list ocaml-base))
7472 (home-page "https://github.com/janestreet/typerep")
7473 (synopsis "Typerep is a library for runtime types")
7474 (description "Typerep is a library for runtime types.")
7475 (license license:expat)))
7476
7477(define-public ocaml-ppx-sexp-value
7478 (package
7479 (name "ocaml-ppx-sexp-value")
7480 (version "0.15.0")
7481 (source
7482 (origin
7483 (method git-fetch)
7484 (uri (git-reference
7485 (url "https://github.com/janestreet/ppx_sexp_value")
7486 (commit (string-append "v" version))))
7487 (file-name (git-file-name name version))
7488 (sha256
7489 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
7490 (build-system dune-build-system)
7491 (propagated-inputs
7492 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
7493 (properties `((upstream-name . "ppx_sexp_value")))
7494 (home-page "https://github.com/janestreet/ppx_sexp_value")
7495 (synopsis "Simplify building s-expressions from ocaml values")
7496 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
7497building s-expressions from ocaml values.")
7498 (license license:expat)))
7499
7500(define-public ocaml-ppx-sexp-message
7501 (package
7502 (name "ocaml-ppx-sexp-message")
7503 (version "0.15.0")
7504 (source
7505 (origin
7506 (method git-fetch)
7507 (uri (git-reference
7508 (url "https://github.com/janestreet/ppx_sexp_message")
7509 (commit (string-append "v" version))))
7510 (file-name (git-file-name name version))
7511 (sha256
7512 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
7513 (build-system dune-build-system)
7514 (propagated-inputs
7515 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
7516 (properties `((upstream-name . "ppx_sexp_message")))
7517 (home-page "https://github.com/janestreet/ppx_sexp_message")
7518 (synopsis "Ppx rewriter for easy construction of s-expressions")
7519 (description "Ppx_sexp_message aims to ease the creation of s-expressions
7520in OCaml. This is mainly motivated by writing error and debugging messages,
7521where one needs to construct a s-expression based on various element of the
7522context such as function arguments.")
7523 (license license:expat)))
7524
7525(define-public ocaml-ppx-pipebang
7526 (package
7527 (name "ocaml-ppx-pipebang")
7528 (version "0.15.0")
7529 (source
7530 (origin
7531 (method git-fetch)
7532 (uri (git-reference
7533 (url "https://github.com/janestreet/ppx_pipebang")
7534 (commit (string-append "v" version))))
7535 (file-name (git-file-name name version))
7536 (sha256
7537 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
7538 (build-system dune-build-system)
7539 (arguments `(#:tests? #f)); no tests
7540 (propagated-inputs (list ocaml-ppxlib))
7541 (properties `((upstream-name . "ppx_pipebang")))
7542 (home-page "https://github.com/janestreet/ppx_pipebang")
7543 (synopsis "Inline reverse application operators `|>` and `|!`")
7544 (description "A ppx rewriter that inlines reverse application operators
7545@code{|>} and @code{|!}.")
7546 (license license:expat)))
7547
7548(define-public ocaml-ppx-module-timer
7549 (package
7550 (name "ocaml-ppx-module-timer")
7551 (version "0.15.0")
7552 (source
7553 (origin
7554 (method git-fetch)
7555 (uri (git-reference
7556 (url "https://github.com/janestreet/ppx_module_timer")
7557 (commit (string-append "v" version))))
7558 (file-name (git-file-name name version))
7559 (sha256
7560 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
7561 (build-system dune-build-system)
7562 (arguments
7563 `(#:tests? #f)); no tests
7564 (propagated-inputs
7565 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
7566 (properties `((upstream-name . "ppx_module_timer")))
7567 (home-page "https://github.com/janestreet/ppx_module_timer")
7568 (synopsis "Ppx rewriter that records top-level module startup times")
7569 (description "Modules using @samp{ppx_module_timer} have instrumentation
7570to record their startup time.")
7571 (license license:expat)))
7572
7573(define-public ocaml-ppx-fixed-literal
7574 (package
7575 (name "ocaml-ppx-fixed-literal")
7576 (version "0.15.0")
7577 (source
7578 (origin
7579 (method git-fetch)
7580 (uri (git-reference
7581 (url "https://github.com/janestreet/ppx_fixed_literal")
7582 (commit (string-append "v" version))))
7583 (file-name (git-file-name name version))
7584 (sha256
7585 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
7586 (build-system dune-build-system)
7587 (arguments
7588 `(#:tests? #f)); no tests
7589 (propagated-inputs (list ocaml-base ocaml-ppxlib))
7590 (properties `((upstream-name . "ppx_fixed_literal")))
7591 (home-page "https://github.com/janestreet/ppx_fixed_literal")
7592 (synopsis "Simpler notation for fixed point literals")
7593 (description
7594 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
7595literal of the form 1.0v to conversion functions currently in scope.")
7596 (license license:expat)))
7597
7598(define-public ocaml-ppx-optional
7599 (package
7600 (name "ocaml-ppx-optional")
7601 (version "0.15.0")
7602 (source
7603 (janestreet-origin
7604 "ppx_optional" version
7605 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
7606 (build-system dune-build-system)
7607 (arguments `(#:tests? #f)) ; No tests
7608 (propagated-inputs
7609 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
7610 (properties `((upstream-name . "ppx_optional")))
7611 (home-page "https://github.com/janestreet/ppx_optional")
7612 (synopsis "Pattern matching on flat options")
7613 (description
7614 "A ppx rewriter that rewrites simple match statements with an if then
7615else expression.")
7616 (license license:asl2.0)))
7617
7618(define-public ocaml-ppx-optcomp
7619 (package
7620 (name "ocaml-ppx-optcomp")
7621 (version "0.15.0")
7622 (home-page "https://github.com/janestreet/ppx_optcomp")
7623 (source
7624 (origin
7625 (method git-fetch)
7626 (uri (git-reference
7627 (url home-page)
7628 (commit (string-append "v" version))))
7629 (file-name (git-file-name name version))
7630 (sha256
7631 (base32
7632 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
7633 (build-system dune-build-system)
7634 (propagated-inputs
7635 (list ocaml-base ocaml-stdio ocaml-ppxlib))
7636 (properties `((upstream-name . "ppx_optcomp")))
7637 (synopsis "Optional compilation for OCaml")
7638 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
7639used to handle optional compilations of pieces of code depending of the word
7640size, the version of the compiler, ...")
7641 (license license:asl2.0)))
7642
7643(define-public ocaml-ppx-let
7644 (package
7645 (name "ocaml-ppx-let")
7646 (version "0.15.0")
7647 (source
7648 (janestreet-origin "ppx_let" version
7649 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
7650 (build-system dune-build-system)
7651 (propagated-inputs
7652 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
7653 (properties `((upstream-name . "ppx_let")))
7654 (home-page "https://github.com/janestreet/ppx_let")
7655 (synopsis "Monadic let-bindings")
7656 (description "A ppx rewriter for monadic and applicative let bindings,
7657match expressions, and if expressions.")
7658 (license license:asl2.0)))
7659
7660(define-public ocaml-ppx-fail
7661 (package
7662 (name "ocaml-ppx-fail")
7663 (version "0.14.0")
7664 (source
7665 (origin
7666 (method git-fetch)
7667 (uri (git-reference
7668 (url "https://github.com/janestreet/ppx_fail")
7669 (commit (string-append "v" version))))
7670 (file-name (git-file-name name version))
7671 (sha256
7672 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
7673 (build-system dune-build-system)
7674 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
7675 (properties `((upstream-name . "ppx_fail")))
7676 (home-page "https://github.com/janestreet/ppx_fail")
7677 (synopsis "Add location to calls to failwiths")
7678 (description "Syntax extension that makes [failwiths] always include a
7679position.")
7680 (license license:expat)))
7681
7682(define-public ocaml-ppx-cold
7683 (package
7684 (name "ocaml-ppx-cold")
7685 (version "0.15.0")
7686 (home-page "https://github.com/janestreet/ppx_cold")
7687 (source
7688 (janestreet-origin "ppx_cold" version
7689 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
7690 (build-system dune-build-system)
7691 (propagated-inputs
7692 (list ocaml-base ocaml-ppxlib))
7693 (properties `((upstream-name . "ppx_cold")))
7694 (synopsis "Syntax extension for indicating cold path")
7695 (description
7696 "This package contains an syntax extension to indicate that the code is
7697on the cold path and should be kept out of the way to avoid polluting the
7698instruction cache on the hot path. See also
7699https://github.com/ocaml/ocaml/issues/8563.")
7700 (license license:expat)))
7701
7702(define-public ocaml-ppx-assert
7703 (package
7704 (name "ocaml-ppx-assert")
7705 (version "0.15.0")
7706 (source
7707 (janestreet-origin "ppx_assert" version
7708 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
7709 (build-system dune-build-system)
7710 (propagated-inputs
7711 (list ocaml-base
7712 ocaml-ppx-cold
7713 ocaml-ppx-compare
7714 ocaml-ppx-here
7715 ocaml-ppx-sexp-conv
7716 ocaml-migrate-parsetree
7717 ocaml-ppxlib))
7718 (properties `((upstream-name . "ppx_assert")))
7719 (home-page "https://github.com/janestreet/ppx_assert")
7720 (synopsis "Assert-like extension nodes that raise useful errors on failure")
7721 (description "This package contains assert-like extension nodes that raise
7722useful errors on failure.")
7723 (license license:asl2.0)))
7724
7725(define-public ocaml-ppx-expect
7726 (package
7727 (name "ocaml-ppx-expect")
7728 (version "0.15.0")
7729 (source
7730 (origin
7731 (method git-fetch)
7732 (uri (git-reference
7733 (url "https://github.com/janestreet/ppx_expect")
7734 (commit (string-append "v" version))))
7735 (file-name (git-file-name name version))
7736 (sha256
7737 (base32
7738 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
7739 (build-system dune-build-system)
7740 (arguments
7741 ;; Cyclic dependency with ocaml-ppx-jane
7742 `(#:tests? #f))
7743 (propagated-inputs
7744 (list ocaml-base
7745 ocaml-ppx-here
7746 ocaml-ppx-inline-test
7747 ocaml-stdio
7748 ocaml-ppxlib
7749 ocaml-migrate-parsetree
7750 ocaml-re))
7751 (properties `((upstream-name . "ppx_expect")
7752 (ocaml5.0-variant . ,(delay ocaml5.0-ppx-expect))))
7753 (home-page "https://github.com/janestreet/ppx_expect")
7754 (synopsis "Cram like framework for OCaml")
7755 (description "Expect-test is a framework for writing tests in OCaml, similar
7756to Cram. Expect-tests mimics the existing inline tests framework with the
7757@code{let%expect_test} construct. The body of an expect-test can contain
7758output-generating code, interleaved with @code{%expect} extension expressions
7759to denote the expected output.")
7760 (license license:asl2.0)))
7761
7762(define-public ocaml5.0-ppx-expect
7763 ;; Contains fixes for OCaml 5.0
7764 ;; (https://github.com/janestreet/ppx_expect/pull/39/).
7765 (let ((commit "83edfc1ee779e8dcdd975e26715c2e688326befa")
7766 (revision "0"))
7767 (package-with-ocaml5.0
7768 (package
7769 (inherit ocaml-ppx-expect)
7770 (name "ocaml-ppx-expect")
7771 (version (git-version "0.15.0" revision commit))
7772 (source
7773 (origin
7774 (method git-fetch)
7775 (uri (git-reference
7776 (url "https://github.com/janestreet/ppx_expect")
7777 (commit commit)))
7778 (file-name (git-file-name name version))
7779 (sha256
7780 (base32
7781 "05r7wlmrhb5biwyw6bjcpmr77srglijcbf7nm7h2hiil0d0i7bkz"))))
7782 (properties '())))))
7783
7784(define-public ocaml-ppx-js-style
7785 (package
7786 (name "ocaml-ppx-js-style")
7787 (version "0.15.0")
7788 (source
7789 (origin
7790 (method git-fetch)
7791 (uri (git-reference
7792 (url "https://github.com/janestreet/ppx_js_style")
7793 (commit (string-append "v" version))))
7794 (file-name (git-file-name name version))
7795 (sha256
7796 (base32
7797 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
7798 (build-system dune-build-system)
7799 (arguments `(#:tests? #f)) ; No tests
7800 (propagated-inputs
7801 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
7802 (properties `((upstream-name . "ppx_js_style")))
7803 (home-page "https://github.com/janestreet/ppx_js_style")
7804 (synopsis "Code style checker for Jane Street Packages")
7805 (description "This package is a no-op ppx rewriter. It is used as a
7806@code{lint} tool to enforce some coding conventions across all Jane Street
7807packages.")
7808 (license license:asl2.0)))
7809
7810(define-public ocaml-ppx-typerep-conv
7811 (package
7812 (name "ocaml-ppx-typerep-conv")
7813 (version "0.15.0")
7814 (source
7815 (origin
7816 (method git-fetch)
7817 (uri (git-reference
7818 (url "https://github.com/janestreet/ppx_typerep_conv/")
7819 (commit (string-append "v" version))))
7820 (file-name (git-file-name name version))
7821 (sha256
7822 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
7823 (build-system dune-build-system)
7824 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
7825 (properties `((upstream-name . "ppx_typerep_conv")))
7826 (home-page "https://github.com/janestreet/ppx_typerep_conv")
7827 (synopsis "Generation of runtime types from type declarations")
7828 (description "This package can automatically generate runtime types
7829from type definitions.")
7830 (license license:expat)))
7831
7832(define-public ocaml-ppx-string
7833 (package
7834 (name "ocaml-ppx-string")
7835 (version "0.15.0")
7836 (source
7837 (origin
7838 (method git-fetch)
7839 (uri (git-reference
7840 (url "https://github.com/janestreet/ppx_string")
7841 (commit (string-append "v" version))))
7842 (file-name (git-file-name name version))
7843 (sha256
7844 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
7845 (build-system dune-build-system)
7846 (arguments `(#:tests? #f)); no tests
7847 (propagated-inputs
7848 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
7849 (properties `((upstream-name . "ppx_string")))
7850 (home-page "https://github.com/janestreet/ppx_string")
7851 (synopsis "Ppx extension for string interpolation")
7852 (description "This extension provides a syntax for string interpolation.")
7853 (license license:expat)))
7854
7855(define-public ocaml-ppx-stable
7856 (package
7857 (name "ocaml-ppx-stable")
7858 (version "0.15.0")
7859 (source
7860 (origin
7861 (method git-fetch)
7862 (uri (git-reference
7863 (url "https://github.com/janestreet/ppx_stable")
7864 (commit (string-append "v" version))))
7865 (file-name (git-file-name name version))
7866 (sha256
7867 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
7868 (build-system dune-build-system)
7869 (propagated-inputs (list ocaml-base ocaml-ppxlib))
7870 (properties `((upstream-name . "ppx_stable")))
7871 (home-page "https://github.com/janestreet/ppx_stable")
7872 (synopsis "Stable types conversions generator")
7873 (description "This package is a ppx extension for easier implementation of
7874conversion functions between almost identical types.")
7875 (license license:expat)))
7876
7877(define-public ocaml-ppx-base
7878 (package
7879 (name "ocaml-ppx-base")
7880 (version "0.15.0")
7881 (source
7882 (janestreet-origin
7883 "ppx_base" version
7884 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
7885 (build-system dune-build-system)
7886 (propagated-inputs
7887 (list ocaml-ppx-compare
7888 ocaml-ppx-cold
7889 ocaml-ppx-enumerate
7890 ocaml-ppx-hash
7891 ocaml-ppx-js-style
7892 ocaml-ppx-sexp-conv
7893 ocaml-migrate-parsetree
7894 ocaml-ppxlib))
7895 (properties `((upstream-name . "ppx_base")))
7896 (home-page "https://github.com/janestreet/ppx_base")
7897 (synopsis "Base set of ppx rewriters")
7898 (description "Ppx_base is the set of ppx rewriters used for Base.
7899
7900Note that Base doesn't need ppx to build, it is only used as a
7901verification tool.")
7902 (license license:asl2.0)))
7903
7904(define-public ocaml-ppx-bin-prot
7905 (package
7906 (name "ocaml-ppx-bin-prot")
7907 (version "0.16.0")
7908 (source
7909 (origin
7910 (method git-fetch)
7911 (uri (git-reference
7912 (url "https://github.com/janestreet/ppx_bin_prot")
7913 (commit (string-append "v" version))))
7914 (file-name (git-file-name name version))
7915 (sha256
7916 (base32 "091l1gvgbibrqzy9a31vz03wzfs7z5zmk5ldl5yvg742x7idmmwj"))))
7917 (build-system dune-build-system)
7918 (arguments
7919 ;; Cyclic dependency with ocaml-ppx-jane
7920 `(#:tests? #f))
7921 (propagated-inputs
7922 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
7923 (properties `((upstream-name . "ppx_bin_prot")))
7924 (home-page "https://github.com/janestreet/ppx_bin_prot")
7925 (synopsis "Generation of bin_prot readers and writers from types")
7926 (description "Generation of binary serialization and deserialization
7927functions from type definitions.")
7928 (license license:expat)))
7929
7930(define-public ocaml-ppx-ignore-instrumentation
7931 (package
7932 (name "ocaml-ppx-ignore-instrumentation")
7933 (version "0.15.0")
7934 (source
7935 (origin
7936 (method git-fetch)
7937 (uri (git-reference
7938 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
7939 (commit (string-append "v" version))))
7940 (file-name (git-file-name name version))
7941 (sha256
7942 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
7943 (build-system dune-build-system)
7944 (arguments
7945 `(#:tests? #f)) ;no tests
7946 (propagated-inputs (list ocaml-ppxlib))
7947 (properties `((upstream-name . "ppx_ignore_instrumentation")))
7948 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
7949 (synopsis "Ignore Jane Street specific instrumentation extensions")
7950 (description
7951 "Ignore Jane Street specific instrumentation extensions from internal
7952PPXs or compiler features not yet upstreamed.")
7953 (license license:expat)))
7954
7955(define-public ocaml-ppx-log
7956 (package
7957 (name "ocaml-ppx-log")
7958 (version "0.15.0")
7959 (source
7960 (origin
7961 (method git-fetch)
7962 (uri (git-reference
7963 (url "https://github.com/janestreet/ppx_log")
7964 (commit (string-append "v" version))))
7965 (file-name (git-file-name name version))
7966 (sha256
7967 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
7968 (build-system dune-build-system)
7969 (propagated-inputs
7970 (list ocaml-base
7971 ocaml-ppx-here
7972 ocaml-ppx-sexp-conv
7973 ocaml-ppx-sexp-message
7974 ocaml-sexplib
7975 ocaml-ppxlib))
7976 (properties `((upstream-name . "ppx_log")))
7977 (home-page "https://github.com/janestreet/ppx_log")
7978 (synopsis "Extension nodes for lazily rendering log messages")
7979 (description "This package provides ppx_sexp_message-like extension
7980nodes for lazily rendering log messages.")
7981 (license license:expat)))
7982
7983(define-public ocaml-ppx-disable-unused-warnings
7984 (package
7985 (name "ocaml-ppx-disable-unused-warnings")
7986 (version "0.15.0")
7987 (source
7988 (origin
7989 (method git-fetch)
7990 (uri (git-reference
7991 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
7992 (commit (string-append "v" version))))
7993 (file-name (git-file-name name version))
7994 (sha256
7995 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
7996 (build-system dune-build-system)
7997 (propagated-inputs (list ocaml-base ocaml-ppxlib))
7998 (properties `((upstream-name . "ppx_disable_unused_warnings")))
7999 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
8000 (synopsis "Simple ppx extension for commonly unused warnings")
8001 (description "This package expands @code{@@disable_unused_warnings} into
8002@code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
8003 (license license:expat)))
8004
8005(define-public ocaml-ppx-jane
8006 (package
8007 (name "ocaml-ppx-jane")
8008 (version "0.15.0")
8009 (source
8010 (origin
8011 (method git-fetch)
8012 (uri (git-reference
8013 (url "https://github.com/janestreet/ppx_jane")
8014 (commit (string-append "v" version))))
8015 (file-name (git-file-name name version))
8016 (sha256
8017 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
8018 (build-system dune-build-system)
8019 (propagated-inputs
8020 (list ocaml-base-quickcheck
8021 ocaml-ppx-assert
8022 ocaml-ppx-base
8023 ocaml-ppx-bench
8024 ocaml-ppx-bin-prot
8025 ocaml-ppx-custom-printf
8026 ocaml-ppx-disable-unused-warnings
8027 ocaml-ppx-expect
8028 ocaml-ppx-fields-conv
8029 ocaml-ppx-fixed-literal
8030 ocaml-ppx-here
8031 ocaml-ppx-ignore-instrumentation
8032 ocaml-ppx-inline-test
8033 ocaml-ppx-let
8034 ocaml-ppx-log
8035 ocaml-ppx-module-timer
8036 ocaml-ppx-optcomp
8037 ocaml-ppx-optional
8038 ocaml-ppx-pipebang
8039 ocaml-ppx-sexp-message
8040 ocaml-ppx-sexp-value
8041 ocaml-ppx-stable
8042 ocaml-ppx-string
8043 ocaml-ppx-typerep-conv
8044 ocaml-ppx-variants-conv
8045 ocaml-ppxlib))
8046 (properties `((upstream-name . "ppx_jane")))
8047 (home-page "https://github.com/janestreet/ppx_jane")
8048 (synopsis "Standard Jane Street ppx rewriters")
8049 (description "This package installs a ppx-jane executable, which is a ppx
8050driver including all standard Jane Street ppx rewriters.")
8051 (license license:expat)))
8052
8053(define-public ocaml-base-bigstring
8054 (package
8055 (name "ocaml-base-bigstring")
8056 (version "0.15.0")
8057 (source
8058 (origin
8059 (method git-fetch)
8060 (uri (git-reference
8061 (url "https://github.com/janestreet/base_bigstring")
8062 (commit (string-append "v" version))))
8063 (file-name (git-file-name name version))
8064 (sha256
8065 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
8066 (build-system dune-build-system)
8067 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
8068 (properties `((upstream-name . "base_bigstring")))
8069 (home-page "https://github.com/janestreet/base_bigstring")
8070 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
8071 (description "This package provides string type based on [Bigarray], for
8072use in I/O and C-bindings.")
8073 (license license:expat)))
8074
8075(define-public ocaml-splittable-random
8076 (package
8077 (name "ocaml-splittable-random")
8078 (version "0.15.0")
8079 (source
8080 (origin
8081 (method git-fetch)
8082 (uri (git-reference
8083 (url "https://github.com/janestreet/splittable_random")
8084 (commit (string-append "v" version))))
8085 (file-name (git-file-name name version))
8086 (sha256
8087 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
8088 (build-system dune-build-system)
8089 (propagated-inputs
8090 (list ocaml-base
8091 ocaml-ppx-assert
8092 ocaml-ppx-bench
8093 ocaml-ppx-inline-test
8094 ocaml-ppx-sexp-message))
8095 (properties `((upstream-name . "splittable_random")))
8096 (home-page "https://github.com/janestreet/splittable_random")
8097 (synopsis "PRNG that can be split into independent streams")
8098 (description "This package provides a splittable
8099@acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
8100be used as a stream of random values; it can also be split to produce a
8101second, independent stream of random values.
8102
8103This library implements a splittable pseudo-random number generator that sacrifices
8104cryptographic-quality randomness in favor of performance.")
8105 (license license:expat)))
8106
8107(define-public ocaml-base-quickcheck
8108 (package
8109 (name "ocaml-base-quickcheck")
8110 (version "0.15.0")
8111 (source
8112 (origin
8113 (method git-fetch)
8114 (uri (git-reference
8115 (url "https://github.com/janestreet/base_quickcheck")
8116 (commit (string-append "v" version))))
8117 (file-name (git-file-name name version))
8118 (sha256
8119 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
8120 (build-system dune-build-system)
8121 (propagated-inputs
8122 (list ocaml-base
8123 ocaml-ppx-base
8124 ocaml-ppx-fields-conv
8125 ocaml-ppx-let
8126 ocaml-ppx-sexp-message
8127 ocaml-ppx-sexp-value
8128 ocaml-splittable-random
8129 ocaml-ppxlib))
8130 (properties `((upstream-name . "base_quickcheck")))
8131 (home-page "https://github.com/janestreet/base_quickcheck")
8132 (synopsis
8133 "Randomized testing framework, designed for compatibility with Base")
8134 (description
8135 "@samp{base-quickcheck} provides randomized testing in the style of
8136Haskell's Quickcheck library, with support for built-in types as well as
8137types provided by Base.")
8138 (license license:expat)))
8139
8140(define-public ocaml-spawn
8141 (package
8142 (name "ocaml-spawn")
8143 (version "0.15.1")
8144 (source (origin
8145 (method git-fetch)
8146 (uri (git-reference
8147 (url "https://github.com/janestreet/spawn")
8148 (commit (string-append "v" version))))
8149 (file-name (git-file-name name version))
8150 (sha256
8151 (base32
8152 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
8153 (build-system dune-build-system)
8154 (propagated-inputs (list ocaml-odoc))
8155 (native-inputs (list ocaml-ppx-expect))
8156 (home-page "https://github.com/janestreet/spawn")
8157 (synopsis "Spawning sub-processes")
8158 (description
8159 "Spawn is a small library exposing only one functionality: spawning sub-process.
8160
8161It has three main goals:
8162
8163@itemize
8164@item provide missing features of Unix.create_process such as providing a
8165working directory,
8166@item provide better errors when a system call fails in the
8167sub-process. For instance if a command is not found, you get a proper
8168@code{Unix.Unix_error} exception,
8169@item improve performances by using vfork when available. It is often
8170claimed that nowadays fork is as fast as vfork, however in practice
8171fork takes time proportional to the process memory while vfork is
8172constant time. In application using a lot of memory, vfork can be
8173thousands of times faster than fork.
8174@end itemize")
8175 (license license:asl2.0)))
8176
8177(define-public ocaml-core
8178 (package
8179 (name "ocaml-core")
8180 (version "0.15.1")
8181 (source
8182 (origin
8183 (method git-fetch)
8184 (uri (git-reference
8185 (url "https://github.com/janestreet/core")
8186 (commit (string-append "v" version))))
8187 (file-name (git-file-name name version))
8188 (sha256
8189 (base32 "17vc2i5qb53dr0civ8pkrnnsn2nkydlq44ash7fhh93yb4sffy28"))))
8190 (build-system dune-build-system)
8191 (arguments
8192 `(#:package "core"
8193 #:tests? #f)); Require a cyclic dependency: core_extended
8194 (propagated-inputs
8195 (list ocaml-base
8196 ocaml-base-bigstring
8197 ocaml-base-quickcheck
8198 ocaml-bin-prot
8199 ocaml-fieldslib
8200 ocaml-jane-street-headers
8201 ocaml-jst-config
8202 ocaml-ppx-assert
8203 ocaml-ppx-base
8204 ocaml-ppx-hash
8205 ocaml-ppx-inline-test
8206 ocaml-ppx-jane
8207 ocaml-ppx-sexp-conv
8208 ocaml-ppx-sexp-message
8209 ocaml-sexplib
8210 ocaml-splittable-random
8211 ocaml-stdio
8212 ocaml-time-now
8213 ocaml-typerep
8214 ocaml-variantslib))
8215 (home-page "https://github.com/janestreet/core")
8216 (synopsis "Alternative to OCaml's standard library")
8217 (description "The Core suite of libraries is an alternative to OCaml's
8218standard library that was developed by Jane Street.")
8219 ;; Also contains parts of OCaml, relicensed to expat, as permitted
8220 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
8221 (license license:expat)))
8222
8223(define-public ocaml-int-repr
8224 (package
8225 (name "ocaml-int-repr")
8226 (version "0.15.0")
8227 (source
8228 (origin
8229 (method git-fetch)
8230 (uri (git-reference
8231 (url "https://github.com/janestreet/int_repr")
8232 (commit (string-append "v" version))))
8233 (file-name (git-file-name name version))
8234 (sha256
8235 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
8236 (build-system dune-build-system)
8237 (arguments
8238 `(#:tests? #f)) ;no tests
8239 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
8240 (properties `((upstream-name . "int_repr")))
8241 (home-page "https://github.com/janestreet/int_repr")
8242 (synopsis "Integers of various widths")
8243 (description "Integers of various widths.")
8244 (license license:expat)))
8245
8246(define-public ocaml-core-kernel
8247 (package
8248 (name "ocaml-core-kernel")
8249 (version "0.15.0")
8250 (source
8251 (origin
8252 (method git-fetch)
8253 (uri (git-reference
8254 (url "https://github.com/janestreet/core_kernel")
8255 (commit (string-append "v" version))))
8256 (file-name (git-file-name name version))
8257 (sha256
8258 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
8259 (build-system dune-build-system)
8260 (arguments
8261 ;; Cyclic dependency with ocaml-core
8262 `(#:tests? #f))
8263 (propagated-inputs
8264 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
8265 (properties `((upstream-name . "core_kernel")))
8266 (home-page "https://github.com/janestreet/core_kernel")
8267 (synopsis "Portable standard library for OCaml")
8268 (description "Core is an alternative to the OCaml standard library.
8269
8270Core_kernel is the system-independent part of Core. It is aimed for cases when
8271the full Core is not available, such as in Javascript.")
8272 (license license:expat)))
8273
8274(define-public ocaml-core-unix
8275 (package
8276 (name "ocaml-core-unix")
8277 (version "0.15.2")
8278 (source (origin
8279 (method git-fetch)
8280 (uri (git-reference
8281 (url "https://github.com/janestreet/core_unix")
8282 (commit (string-append "v" version))))
8283 (file-name (git-file-name name version))
8284 (sha256
8285 (base32
8286 "0h6lqaxpp4r06a63k8yr0g9y7wc8r35v2xzqgvkiiq1ypa48zzgm"))))
8287 (build-system dune-build-system)
8288 (propagated-inputs (list ocaml-core
8289 ocaml-core-kernel
8290 ocaml-expect-test-helpers-core
8291 ocaml-jane-street-headers
8292 ocaml-jst-config
8293 ocaml-intrinsics
8294 ocaml-ppx-jane
8295 ocaml-sexplib
8296 ocaml-timezone
8297 ocaml-spawn))
8298 (properties `((upstream-name . "core_unix")))
8299 (home-page "https://github.com/janestreet/core_unix")
8300 (synopsis "Unix-specific portions of Core")
8301 (description
8302 "Unix-specific extensions to some of the modules defined in core and
8303core_kernel.")
8304 (license license:expat)))
8305
8306(define-public ocaml-async-kernel
8307 (package
8308 (name "ocaml-async-kernel")
8309 (version "0.15.0")
8310 (source (origin
8311 (method git-fetch)
8312 (uri (git-reference
8313 (url "https://github.com/janestreet/async_kernel")
8314 (commit (string-append "v" version))))
8315 (file-name (git-file-name name version))
8316 (sha256
8317 (base32
8318 "01if6c8l2h64v7sk56xr8acnmj6g9whxcjrzzzvczspq88hq2bfh"))))
8319 (build-system dune-build-system)
8320 (propagated-inputs (list ocaml-core ocaml-core-kernel ocaml-ppx-jane))
8321 (properties `((upstream-name . "async_kernel")))
8322 (home-page "https://github.com/janestreet/async_kernel")
8323 (synopsis "Monadic concurrency library")
8324 (description
8325 "Contains @code{Async}'s core data structures, like
8326@code{Deferred}. @code{Async_kernel} is portable, and so can be used in
8327JavaScript using @code{Async_js}.")
8328 (license license:expat)))
8329
8330(define-public ocaml-async-unix
8331 (package
8332 (name "ocaml-async-unix")
8333 (version "0.15.0")
8334 (source (origin
8335 (method git-fetch)
8336 (uri (git-reference
8337 (url "https://github.com/janestreet/async_unix")
8338 (commit (string-append "v" version))))
8339 (file-name (git-file-name name version))
8340 (sha256
8341 (base32
8342 "0z4fgpn93iw0abd7l9kac28qgzgc5qr2x0s1n2zh49lsdn02n6ys"))))
8343 (build-system dune-build-system)
8344 (propagated-inputs (list ocaml-async-kernel ocaml-core ocaml-core-kernel
8345 ocaml-core-unix ocaml-ppx-jane))
8346 (properties `((upstream-name . "async_unix")))
8347 (home-page "https://github.com/janestreet/async_unix")
8348 (synopsis "Monadic concurrency library")
8349 (description
8350 "Unix-related dependencies for things like system calls and
8351threads. Using these, it hooks the Async_kernel scheduler up to either epoll
8352or select, depending on availability, and manages a thread pool that blocking
8353system calls run in.")
8354 (license license:expat)))
8355
8356(define-public ocaml-async-rpc-kernel
8357 (package
8358 (name "ocaml-async-rpc-kernel")
8359 (version "0.15.0")
8360 (source (origin
8361 (method git-fetch)
8362 (uri (git-reference
8363 (url "https://github.com/janestreet/async_rpc_kernel")
8364 (commit (string-append "v" version))))
8365 (file-name (git-file-name name version))
8366 (sha256
8367 (base32
8368 "1b5rp5yam03ir4f1sixpzjg1zdqmkb7lvnaa82kac4fzk80gfrfr"))))
8369 (build-system dune-build-system)
8370 (propagated-inputs (list ocaml-async-kernel ocaml-core ocaml-ppx-jane
8371 ocaml-protocol-version-header))
8372 (properties `((upstream-name . "async_rpc_kernel")))
8373 (home-page "https://github.com/janestreet/async_rpc_kernel")
8374 (synopsis "Platform-independent core of Async RPC library")
8375 (description
8376 "Library for building RPC-style protocols. This library is the portable
8377part of the Unix-oriented Async_rpc library, and is actively used in
8378JavaScript.")
8379 (license license:expat)))
8380
8381(define-public ocaml-async
8382 (package
8383 (name "ocaml-async")
8384 (version "0.15.0")
8385 (source (origin
8386 (method git-fetch)
8387 (uri (git-reference
8388 (url "https://github.com/janestreet/async")
8389 (commit (string-append "v" version))))
8390 (file-name (git-file-name name version))
8391 (sha256
8392 (base32
8393 "0pykmnsil754jsnr8gss91ykyjvivngx4ii0ih3nsg1x2jl9xmy2"))))
8394 (build-system dune-build-system)
8395 (propagated-inputs (list ocaml-async-kernel
8396 ocaml-async-rpc-kernel
8397 ocaml-async-unix
8398 ocaml-core
8399 ocaml-core-kernel
8400 ocaml-core-unix
8401 ocaml-ppx-jane
8402 ocaml-ppx-log
8403 ocaml-textutils))
8404 ;; TODO one test dependency is deprecated, the other is nowhere to be found
8405 (arguments
8406 '(#:tests? #f))
8407 ;; (native-inputs (list ocaml-netkit-sockets ocaml-qtest-deprecated))
8408 (home-page "https://github.com/janestreet/async")
8409 (synopsis "Asynchronous execution library")
8410 (description
8411 "Library for asynchronous programming, i.e., programming where some part
8412of the program must wait for things that happen at times determined by some
8413external entity (like a human or another program).")
8414 (license license:expat)))
8415
8416(define-public ocaml-textutils-kernel
8417 (package
8418 (name "ocaml-textutils-kernel")
8419 (version "0.15.0")
8420 (source (origin
8421 (method git-fetch)
8422 (uri (git-reference
8423 (url "https://github.com/janestreet/textutils_kernel")
8424 (commit (string-append "v" version))))
8425 (file-name (git-file-name name version))
8426 (sha256
8427 (base32
8428 "068g11d98wsb5a6ds0p5xybdmx5nx9bxa0k11dmh3l57kn4c169x"))))
8429 (build-system dune-build-system)
8430 (propagated-inputs (list ocaml-core ocaml-ppx-jane ocaml-uutf))
8431 (properties `((upstream-name . "textutils_kernel")))
8432 (home-page "https://github.com/janestreet/textutils_kernel")
8433 (synopsis "Text output utilities")
8434 (description
8435 "The subset of textutils using only core_kernel and working in
8436javascript.")
8437 (license license:expat)))
8438
8439(define-public ocaml-textutils
8440 (package
8441 (name "ocaml-textutils")
8442 (version "0.15.0")
8443 (source (origin
8444 (method git-fetch)
8445 (uri (git-reference
8446 (url "https://github.com/janestreet/textutils")
8447 (commit (string-append "v" version))))
8448 (file-name (git-file-name name version))
8449 (sha256
8450 (base32
8451 "1wass49h645wql9b7nck2iqlkf4648dkxvlvxixr7z80zcnb5rxr"))))
8452 (build-system dune-build-system)
8453 (propagated-inputs (list ocaml-core
8454 ocaml-core-kernel
8455 ocaml-core-unix
8456 ocaml-ppx-jane
8457 ocaml-textutils-kernel
8458 ocaml-uutf))
8459 (home-page "https://github.com/janestreet/textutils")
8460 (synopsis "Text output utilities")
8461 (description
8462 "Utilities for working with terminal output, such as color printing.")
8463 (license license:expat)))
8464
8465(define-public ocaml-timezone
8466 (package
8467 (name "ocaml-timezone")
8468 (version "0.15.0")
8469 (source
8470 (origin
8471 (method git-fetch)
8472 (uri (git-reference
8473 (url "https://github.com/janestreet/timezone")
8474 (commit (string-append "v" version))))
8475 (file-name (git-file-name name version))
8476 (sha256
8477 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
8478 (build-system dune-build-system)
8479 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
8480 (home-page "https://github.com/janestreet/timezone")
8481 (synopsis "Time-zone handling")
8482 (description
8483 "Timezone handles parsing timezone data and create @code{Timezone.t}
8484that can later be used to manipulate time in core_kernel or core.")
8485 (license license:expat)))
8486
8487(define-public ocaml-markup
8488 (package
8489 (name "ocaml-markup")
8490 (version "1.0.3")
8491 (home-page "https://github.com/aantron/markup.ml")
8492 (source
8493 (origin
8494 (method git-fetch)
8495 (uri (git-reference
8496 (url (string-append home-page ".git"))
8497 (commit version)))
8498 (file-name (git-file-name name version))
8499 (sha256
8500 (base32
8501 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
8502 (build-system dune-build-system)
8503 (arguments
8504 `(#:package "markup"))
8505 (propagated-inputs
8506 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
8507 (native-inputs
8508 (list ocaml-ounit2 pkg-config))
8509 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
8510 (description "Markup.ml provides an HTML parser and an XML parser. The
8511parsers are wrapped in a simple interface: they are functions that transform
8512byte streams to parsing signal streams. Streams can be manipulated in various
8513ways, such as processing by fold, filter, and map, assembly into DOM tree
8514structures, or serialization back to HTML or XML.
8515
8516Both parsers are based on their respective standards. The HTML parser, in
8517particular, is based on the state machines defined in HTML5.
8518
8519The parsers are error-recovering by default, and accept fragments. This makes
8520it very easy to get a best-effort parse of some input. The parsers can,
8521however, be easily configured to be strict, and to accept only full documents.
8522
8523Apart from this, the parsers are streaming (do not build up a document in
8524memory), non-blocking (can be used with threading libraries), lazy (do not
8525consume input unless the signal stream is being read), and process the input in
8526a single pass. They automatically detect the character encoding of the input
8527stream, and convert everything to UTF-8.")
8528 (license license:bsd-3)))
8529
8530(define-public ocaml-tyxml
8531 (package
8532 (name "ocaml-tyxml")
8533 (version "4.5.0")
8534 (source
8535 (origin
8536 (method git-fetch)
8537 (uri (git-reference
8538 (url "https://github.com/ocsigen/tyxml")
8539 (commit version)))
8540 (file-name (git-file-name name version))
8541 (sha256
8542 (base32
8543 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
8544 (build-system dune-build-system)
8545 (inputs
8546 (list ocaml-re ocaml-seq ocaml-uutf))
8547 (native-inputs
8548 (list ocaml-alcotest))
8549 (arguments `(#:package "tyxml"))
8550 (home-page "https://github.com/ocsigen/tyxml/")
8551 (synopsis "TyXML is a library for building correct HTML and SVG documents")
8552 (description "TyXML provides a set of convenient combinators that uses the
8553OCaml type system to ensure the validity of the generated documents. TyXML can
8554be used with any representation of HTML and SVG: the textual one, provided
8555directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
8556(@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
8557also create your own representation and use it to instantiate a new set of
8558combinators.")
8559 (license license:lgpl2.1)))
8560
8561(define-public ocaml-bisect-ppx
8562 (package
8563 (name "ocaml-bisect-ppx")
8564 (version "2.8.3")
8565 (source
8566 (origin
8567 (method git-fetch)
8568 (uri (git-reference
8569 (url "https://github.com/aantron/bisect_ppx")
8570 (commit version)))
8571 (file-name (git-file-name name version))
8572 (sha256
8573 (base32
8574 "1albx01qvr4fax4wkdmy0dd21q0fd9ixsgsvnr1z32ngj9nyi9fy"))))
8575 (build-system dune-build-system)
8576 (propagated-inputs
8577 (list ocaml-ppxlib ocaml-cmdliner))
8578 (arguments
8579 ;; Tests require ocamlformat which would lead to circular dependencies
8580 '(#:tests? #f))
8581 (properties `((upstream-name . "bisect_ppx")))
8582 (home-page "https://github.com/aantron/bisect_ppx")
8583 (synopsis "Code coverage for OCaml")
8584 (description "Bisect_ppx helps you test thoroughly. It is a small
8585preprocessor that inserts instrumentation at places in your code, such as
8586if-then-else and match expressions. After you run tests, Bisect_ppx gives a
8587nice HTML report showing which places were visited and which were missed.
8588
8589Usage is simple - add package bisect_ppx when building tests, run your tests,
8590then run the Bisect_ppx report tool on the generated visitation files.")
8591 (license license:mpl2.0)))
8592
8593(define-public ocaml-odoc
8594 (package
8595 (name "ocaml-odoc")
8596 (version "2.2.0")
8597 (source
8598 (origin
8599 (method git-fetch)
8600 (uri (git-reference
8601 (url "https://github.com/ocaml/odoc")
8602 (commit version)))
8603 (file-name (git-file-name name version))
8604 (sha256
8605 (base32 "19mww1lyrdi705aw3lwql6xc7p11fcq5gprmhyxpb4x80gnvlzrh"))))
8606 (build-system dune-build-system)
8607 (arguments
8608 `(#:tests? #f; not compatible with current version of ocaml-yojson
8609 #:phases
8610 (modify-phases %standard-phases
8611 (add-after 'unpack 'fix-test
8612 (lambda _
8613 ;; test results expects #!/bin/sh but gets a store path instead
8614 (substitute* "test/xref2/with.t/run.t"
8615 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
8616 (inputs
8617 (list ocaml-astring
8618 ocaml-bisect-ppx
8619 ocaml-cmdliner
8620 ocaml-fmt
8621 ocaml-fpath
8622 ocaml-logs
8623 ocaml-migrate-parsetree
8624 ocaml-odoc-parser
8625 ocaml-re
8626 ocaml-result
8627 ocaml-tyxml))
8628 (native-inputs
8629 (list ocaml-alcotest
8630 ocaml-bos
8631 ocaml-cppo
8632 ocaml-findlib
8633 ocaml-lwt
8634 ocaml-markup
8635 ocaml-ppx-expect
8636 ocaml-version
8637 ocaml-yojson
8638 jq))
8639 (home-page "https://github.com/ocaml/odoc")
8640 (synopsis "OCaml documentation generator")
8641 (description "Odoc is a documentation generator for OCaml. It reads
8642@emph{doc comments}, delimited with @code{(** ... *)}, and outputs
8643@acronym{HTML}.
8644
8645Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
8646advantage over ocamldoc is an accurate cross-referencer, which handles the
8647complexity of the OCaml module system.")
8648 (license license:isc)))
8649
8650(define-public ocaml-odoc-parser
8651 (package
8652 (name "ocaml-odoc-parser")
8653 (version "2.0.0")
8654 (source
8655 (origin
8656 (method git-fetch)
8657 (uri (git-reference
8658 (url "https://github.com/ocaml-doc/odoc-parser")
8659 (commit version)))
8660 (file-name (git-file-name name version))
8661 (sha256
8662 (base32
8663 "1x48kf051xs98rd6cri591bk1ccp9hyp93n1rlf6qnxic55jw683"))))
8664 (build-system dune-build-system)
8665 (propagated-inputs
8666 (list ocaml-astring ocaml-camlp-streams ocaml-result))
8667 (native-inputs
8668 (list ocaml-ppx-expect))
8669 (home-page "https://github.com/ocaml-doc/odoc-parser")
8670 (synopsis "Parser for ocaml documentation comments")
8671 (description
8672 "This package provides a library for parsing the contents of OCaml
8673documentation comments, formatted using Odoc syntax, an extension of the
8674language understood by ocamldoc.")
8675 (license license:isc)))
8676
8677(define-public ocaml-fftw3
8678 (package
8679 (name "ocaml-fftw3")
8680 (version "0.8.5")
8681 (source
8682 (origin
8683 (method git-fetch)
8684 (uri (git-reference
8685 (url "https://github.com/Chris00/fftw-ocaml")
8686 (commit version)))
8687 (file-name (git-file-name name version))
8688 (sha256
8689 (base32
8690 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
8691 (build-system dune-build-system)
8692 (propagated-inputs
8693 (list fftw fftwf))
8694 (native-inputs
8695 (list ocaml-cppo ocaml-lacaml))
8696 (home-page
8697 "https://github.com/Chris00/fftw-ocaml")
8698 (synopsis
8699 "Bindings to FFTW3")
8700 (description
8701 "Bindings providing OCaml support for the seminal Fast Fourier Transform
8702library FFTW.")
8703 (license license:lgpl2.1))) ; with static linking exception.
8704
8705(define-public ocaml-lacaml
8706 (package
8707 (name "ocaml-lacaml")
8708 (version "11.0.8")
8709 (source
8710 (origin
8711 (method git-fetch)
8712 (uri (git-reference
8713 (url "https://github.com/mmottl/lacaml")
8714 (commit version)))
8715 (file-name (git-file-name name version))
8716 (sha256
8717 (base32
8718 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
8719 (modules '((guix build utils)))
8720 (snippet '(substitute* '("src/dune" "src/config/dune")
8721 (("-march=native") "")))))
8722 (properties '((tunable? . #t)))
8723 (build-system dune-build-system)
8724 (arguments
8725 (list #:phases
8726 #~(modify-phases %standard-phases
8727 (add-after 'unpack 'find-openblas
8728 (lambda* _
8729 (setenv "LACAML_LIBS" "-lopenblas"))))
8730 #:tests? #f)) ; No test target.
8731 (native-inputs
8732 (list openblas ocaml-base ocaml-stdio))
8733 (home-page "https://mmottl.github.io/lacaml/")
8734 (synopsis
8735 "OCaml-bindings to BLAS and LAPACK")
8736 (description
8737 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
8738LAPACK-library (Linear Algebra routines). It also contains many additional
8739convenience functions for vectors and matrices.")
8740 (license license:lgpl2.1)))
8741
8742(define-public ocaml-cairo2
8743 (package
8744 (name "ocaml-cairo2")
8745 (version "0.6.4")
8746 (source (origin
8747 (method git-fetch)
8748 (uri (git-reference
8749 (url "https://github.com/Chris00/ocaml-cairo")
8750 (commit version)))
8751 (file-name (git-file-name name version))
8752 (sha256
8753 (base32
8754 "06ag9b88ihhr7yd3s9l0ac7ysig02fmlmsswybbsvz71ni0mb105"))))
8755 (build-system dune-build-system)
8756 (arguments
8757 (list #:package "cairo2"))
8758 (inputs
8759 `(("cairo" ,cairo)))
8760 (native-inputs
8761 (list pkg-config))
8762 (home-page "https://github.com/Chris00/ocaml-cairo")
8763 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
8764 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
8765with support for multiple output devices. Currently supported output targets
8766include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
8767and SVG file output.")
8768 (license license:lgpl3+)))
8769
8770(define-public ocaml-version
8771 (package
8772 (name "ocaml-version")
8773 (version "3.5.0")
8774 (source
8775 (origin
8776 (method git-fetch)
8777 (uri (git-reference
8778 (url "https://github.com/ocurrent/ocaml-version")
8779 (commit (string-append "v" version))))
8780 (file-name (git-file-name name version))
8781 (sha256
8782 (base32
8783 "1pnw2ym021j48zknhbi1kdiyfv9si8p2l04rdzbv4g51fclsqs92"))))
8784 (build-system dune-build-system)
8785 (arguments `(#:tests? #f)) ; no tests
8786 (properties '((upstream-name . "ocaml-version")))
8787 (home-page
8788 "https://github.com/ocurrent/ocaml-version")
8789 (synopsis
8790 "Manipulate, parse and generate OCaml compiler version strings")
8791 (description
8792 "This library provides facilities to parse version numbers of the OCaml
8793compiler, and enumerates the various official OCaml releases and configuration
8794variants.")
8795 (license license:isc)))
8796
8797(define-public ocaml-mdx
8798 (package
8799 (name "ocaml-mdx")
8800 (version "2.1.0")
8801 (source (origin
8802 (method git-fetch)
8803 (uri (git-reference
8804 (url "https://github.com/realworldocaml/mdx")
8805 (commit version)))
8806 (file-name (git-file-name name version))
8807 (sha256
8808 (base32
8809 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
8810 (build-system dune-build-system)
8811 (arguments
8812 `(#:phases
8813 (modify-phases %standard-phases
8814 (add-after 'unpack 'fix-test-format
8815 (lambda _
8816 ;; cmdliner changed the format and the tests fail
8817 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
8818 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
8819 (("`") "'")
8820 (("COMMAND") "[COMMAND]")
8821 (("\\.\\.\\.") "…"))))
8822 (add-after 'fix-test-format 'fix-egrep
8823 (lambda _
8824 ;; egrep is obsolescent; using grep -E
8825 (substitute* "test/bin/mdx-test/expect/padding/test-case.md"
8826 (("egrep") "grep -E")))))))
8827 (propagated-inputs
8828 (list ocaml-fmt
8829 ocaml-astring
8830 ocaml-logs
8831 ocaml-cmdliner
8832 ocaml-re
8833 ocaml-result
8834 ocaml-odoc
8835 ocaml-odoc-parser
8836 ocaml-version))
8837 (native-inputs
8838 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
8839 (home-page
8840 "https://github.com/realworldocaml/mdx")
8841 (synopsis
8842 "Executable code blocks inside markdown files")
8843 (description
8844 "@code{ocaml-mdx} executes code blocks inside markdown files.
8845There are (currently) two sub-commands, corresponding
8846to two modes of operations: pre-processing (@code{ocaml-mdx pp})
8847and tests (@code{ocaml-mdx test}]).
8848
8849The pre-processor mode allows mixing documentation and code,
8850and to practice @dfn{literate programming} using markdown and OCaml.
8851
8852The test mode ensures that shell scripts and OCaml fragments
8853in the documentation always stays up-to-date.
8854
8855@code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
8856@code{mdx} which are the same, mdx being the deprecated name, kept for now for
8857compatibility.")
8858 (license license:isc)))
8859
8860(define-public ocaml-mparser
8861 (package
8862 (name "ocaml-mparser")
8863 (version "1.3")
8864 (source
8865 (origin
8866 (method git-fetch)
8867 (uri (git-reference
8868 (url "https://github.com/murmour/mparser")
8869 (commit version)))
8870 (file-name (git-file-name name version))
8871 (sha256
8872 (base32
8873 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
8874 (build-system dune-build-system)
8875 (arguments
8876 ;; No tests.
8877 '(#:package "mparser"
8878 #:tests? #f))
8879 (home-page "https://github.com/murmour/mparser")
8880 (synopsis "Simple monadic parser combinator library")
8881 (description
8882 "This library implements a rather complete and efficient monadic parser
8883combinator library similar to the Parsec library for Haskell by Daan Leijen and
8884the FParsec library for FSharp by Stephan Tolksdorf.")
8885 ;; With static linking exception.
8886 (license license:lgpl2.1+)))
8887
8888(define-public ocaml-mparser-re
8889 (package
8890 (inherit ocaml-mparser)
8891 (name "ocaml-mparser-re")
8892 (arguments
8893 ;; No tests.
8894 '(#:package "mparser-re"
8895 #:tests? #f))
8896 (propagated-inputs
8897 (list ocaml-mparser ocaml-re))
8898 (synopsis "MParser plugin for RE-based regular expressions")
8899 (description "This package provides RE-based regular expressions
8900support for Mparser.")))
8901
8902(define-public ocaml-mparser-pcre
8903 (package
8904 (inherit ocaml-mparser)
8905 (name "ocaml-mparser-pcre")
8906 (arguments
8907 ;; No tests.
8908 '(#:package "mparser-pcre"
8909 #:tests? #f))
8910 (propagated-inputs
8911 (list ocaml-mparser ocaml-pcre))
8912 (synopsis "MParser plugin for PCRE-based regular expressions")
8913 (description "This package provides PCRE-based regular expressions
8914support for Mparser.")))
8915
8916(define-public lablgtk3
8917 (package
8918 (name "lablgtk")
8919 (version "3.1.3")
8920 (source (origin
8921 (method git-fetch)
8922 (uri (git-reference
8923 (url "https://github.com/garrigue/lablgtk")
8924 (commit version)))
8925 (file-name (git-file-name name version))
8926 (sha256
8927 (base32
8928 "0rhdr89w7yj8pkga5xc7iqmqvrs28034wb7sm7vx7faaxczwjifn"))))
8929 (build-system dune-build-system)
8930 (arguments
8931 `(#:package "lablgtk3"))
8932 (propagated-inputs
8933 (list ocaml-cairo2 ocaml-camlp-streams))
8934 (inputs
8935 (list camlp5 gtk+))
8936 (native-inputs
8937 (list pkg-config))
8938 (home-page "https://github.com/garrigue/lablgtk")
8939 (synopsis "OCaml interface to GTK+3")
8940 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
8941provides a strongly-typed object-oriented interface that is compatible with the
8942dynamic typing of GTK+. Most widgets and methods are available. LablGtk
8943also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
8944LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
8945generate OCaml code from .glade files), libpanel, librsvg and quartz.")
8946 ;; Version 2 only, with linking exception.
8947 (license license:lgpl2.0)))
8948
8949(define-public ocaml-lablgtk3-sourceview3
8950 (package
8951 (inherit lablgtk3)
8952 (name "ocaml-lablgtk3-sourceview3")
8953 (propagated-inputs (list gtksourceview-3 lablgtk3))
8954 (arguments
8955 `(#:package "lablgtk3-sourceview3"))
8956 (synopsis "OCaml interface to GTK+ gtksourceview library")
8957 (description "This package provides the lablgtk interface to the
8958GTK+ gtksourceview library.")))
8959
8960(define-public ocaml-reactivedata
8961 (package
8962 (name "ocaml-reactivedata")
8963 (version "0.3")
8964 (source (origin
8965 (method git-fetch)
8966 (uri (git-reference
8967 (url "https://github.com/ocsigen/reactiveData")
8968 (commit version)))
8969 (file-name (git-file-name name version))
8970 (sha256
8971 (base32
8972 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
8973 (arguments
8974 `(#:tests? #f)) ;no tests
8975 (build-system dune-build-system)
8976 (properties `((upstream-name . "reactiveData")))
8977 (propagated-inputs
8978 (list ocaml-react))
8979 (home-page "https://github.com/ocsigen/reactiveData")
8980 (synopsis "Declarative events and signals for OCaml")
8981 (description
8982 "React is an OCaml module for functional reactive programming (FRP). It
8983provides support to program with time varying values: declarative events and
8984 signals. React doesn't define any primitive event or signal, it lets the
8985client chooses the concrete timeline.")
8986 (license license:lgpl2.1+)))
8987
8988(define-public ocaml-uucd
8989 (package
8990 (name "ocaml-uucd")
8991 (version "15.0.0")
8992 (source
8993 (origin
8994 (method url-fetch)
8995 (uri (string-append "https://erratique.ch/software/uucd/releases/"
8996 "uucd-" version ".tbz"))
8997 (sha256
8998 (base32
8999 "1g26237yqmxr7sd1n9fg65qm5mxz66ybk7hr336zfyyzl25h6jqf"))))
9000 (build-system ocaml-build-system)
9001 (arguments
9002 '(#:build-flags '("build" "--tests" "true")
9003 #:phases
9004 (modify-phases %standard-phases
9005 (delete 'configure))))
9006 (propagated-inputs
9007 (list ocaml-xmlm))
9008 (native-inputs
9009 (list opam-installer ocaml-findlib ocamlbuild ocaml-topkg))
9010 (home-page "https://erratique.ch/software/uucd")
9011 (synopsis "Unicode character database decoder for OCaml")
9012 (description "Uucd is an OCaml module to decode the data of the Unicode
9013character database from its XML representation. It provides high-level (but
9014not necessarily efficient) access to the data so that efficient
9015representations can be extracted.")
9016 (license license:isc)))
9017
9018(define-public ocaml-uucp
9019 (package
9020 (name "ocaml-uucp")
9021 (version "15.0.0")
9022 (source
9023 (origin
9024 (method url-fetch)
9025 (uri (string-append "https://erratique.ch/software/uucp/releases/"
9026 "uucp-" version ".tbz"))
9027 (sha256
9028 (base32
9029 "0c2k9gkg442l7hnc8rn1vqzn6qh68w9fx7h3nj03n2x90ps98ixc"))))
9030 (build-system ocaml-build-system)
9031 (arguments
9032 '(#:build-flags '("build" "--tests" "true")
9033 #:phases
9034 (modify-phases %standard-phases
9035 (delete 'configure))))
9036 (native-inputs
9037 (list opam-installer
9038 ocaml-findlib
9039 ocamlbuild
9040 ocaml-topkg
9041 ocaml-uucd
9042 ocaml-uunf
9043 ocaml-uutf))
9044 (home-page "https://erratique.ch/software/uucp")
9045 (synopsis "Unicode character properties for OCaml")
9046 (description "Uucp is an OCaml library providing efficient access to a
9047selection of character properties of the Unicode character database.")
9048 (license license:isc)))
9049
9050(define-public ocaml-uuseg
9051 (package
9052 (name "ocaml-uuseg")
9053 (version "15.0.0")
9054 (source
9055 (origin
9056 (method url-fetch)
9057 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
9058 "uuseg-" version ".tbz"))
9059 (sha256
9060 (base32
9061 "1qz130wlmnvb6j7kpvgjlqmdm2jqid4wb1dmrsls4hdm4rp7gk5b"))))
9062 (build-system ocaml-build-system)
9063 (arguments
9064 '(#:build-flags '("build" "--tests" "true")
9065 #:phases
9066 (modify-phases %standard-phases
9067 (delete 'configure))))
9068 (propagated-inputs
9069 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
9070 (native-inputs
9071 (list opam-installer ocaml-findlib ocamlbuild ocaml-topkg))
9072 (home-page "https://erratique.ch/software/uuseg")
9073 (synopsis "Unicode text segmentation for OCaml")
9074 (description "Uuseg is an OCaml library for segmenting Unicode text. It
9075implements the locale independent Unicode text segmentation algorithms to
9076detect grapheme cluster, word and sentence boundaries and the Unicode line
9077breaking algorithm to detect line break opportunities.
9078
9079The library is independent from any IO mechanism or Unicode text data
9080structure and it can process text without a complete in-memory
9081representation.")
9082 (license license:isc)))
9083
9084(define-public ocaml-fix
9085 (package
9086 (name "ocaml-fix")
9087 (version "20220121")
9088 (source
9089 (origin
9090 (method git-fetch)
9091 (uri (git-reference
9092 (url "https://gitlab.inria.fr/fpottier/fix")
9093 (commit version)))
9094 (file-name (git-file-name name version))
9095 (sha256
9096 (base32
9097 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
9098 (build-system dune-build-system)
9099 (arguments
9100 ;; No tests.
9101 '(#:tests? #f))
9102 (home-page "https://gitlab.inria.fr/fpottier/fix")
9103 (synopsis "Facilities for memoization and fixed points")
9104 (description "This package provides helpers with various constructions
9105that involve memoization and recursion.")
9106 (license license:lgpl2.0)))
9107
9108(define-public ocaml-dune-build-info
9109 (package
9110 (inherit dune-ordering)
9111 (name "ocaml-dune-build-info")
9112 (build-system dune-build-system)
9113 (arguments
9114 '(#:package "dune-build-info"
9115 ;; No separate test suite from dune.
9116 #:tests? #f))
9117 (propagated-inputs
9118 (list ocaml-odoc))
9119 (synopsis "Embed build information inside an executable")
9120 (description "This package allows one to access information about how the
9121executable was built, such as the version of the project at which it was built
9122or the list of statically linked libraries with their versions. It supports
9123reporting the version from the version control system during development to
9124get an precise reference of when the executable was built.")))
9125
9126(define-public ocaml-xdg
9127 (package
9128 (inherit dune-ordering)
9129 (name "ocaml-xdg")
9130 (build-system dune-build-system)
9131 (arguments
9132 '(#:package "xdg"
9133 ;; Tests have a cyclic dependency on stdune
9134 #:tests? #f))
9135 (propagated-inputs (list ocaml-odoc))
9136 (synopsis "XDG Base Directory Specification library for ocaml")
9137 (description
9138 "This ocaml library returns user XDG directories such as XDG_CONFIG_HOME,
9139 XDG_STATE_HOME.")))
9140
9141(define-public dune-rpc
9142 (package
9143 (inherit dune-ordering)
9144 (name "dune-rpc")
9145 (build-system dune-build-system)
9146 (arguments
9147 '(#:package "dune-rpc"
9148 ;; Tests have a cyclic dependency on stdune
9149 #:tests? #f))
9150 (propagated-inputs (list ocaml-csexp
9151 dune-ordering
9152 dune-dyn
9153 ocaml-xdg
9154 dune-stdune
9155 ocaml-pp
9156 ocaml-odoc))
9157 (synopsis "Communicate with ocaml dune using rpc")
9158 (description "Library to connect and control a running dune instance.")))
9159
9160(define-public ocamlc-loc
9161 (package
9162 (inherit dune-ordering)
9163 (name "ocamlc-loc")
9164 (build-system dune-build-system)
9165 (arguments
9166 '(#:package "ocamlc-loc"
9167 ;; Tests have a cyclic dependency on stdune
9168 #:tests? #f))
9169 (propagated-inputs (list dune-dyn ocaml-odoc))
9170 (synopsis "Parse ocaml compiler output into structured form")
9171 (description
9172 "This library parses ocaml compiler output and returns it as ocaml values.
9173This library offers no backwards compatibility guarantees.")))
9174
9175(define-public ocaml-chrome-trace
9176 (package
9177 (inherit dune-ordering)
9178 (name "ocaml-chrome-trace")
9179 (build-system dune-build-system)
9180 (arguments
9181 '(#:package "chrome-trace"
9182 ;; Tests have a cyclic dependency on stdune
9183 #:tests? #f))
9184 (propagated-inputs (list ocaml-odoc))
9185 (synopsis "Chrome trace event generation library for ocaml")
9186 (description
9187 "Output trace data to a file in Chrome's trace_event format. This format is
9188 compatible with chrome trace viewer chrome://tracing.
9189 This library offers no backwards compatibility guarantees.")
9190 (license license:expat)))
9191
9192(define-public ocaml-fiber
9193 (package
9194 (name "ocaml-fiber")
9195 (home-page "https://github.com/ocaml-dune/fiber")
9196 (version "3.7.0")
9197 (source (origin
9198 (method git-fetch)
9199 (uri (git-reference
9200 (url home-page)
9201 (commit version)))
9202 (file-name (git-file-name name version))
9203 (sha256
9204 (base32
9205 "085v1dfxrb4wnkgysghj5q4vr4nx3nxr84rqmy874dr3pk30740n"))))
9206 (build-system dune-build-system)
9207 (arguments
9208 '(#:package "fiber"))
9209 (propagated-inputs (list dune-stdune dune-dyn))
9210 (native-inputs (list ocaml-odoc ocaml-ppx-expect))
9211 (synopsis "Structured concurrency library")
9212 (description
9213 "This library implements structured concurrency for ocaml.
9214 It offers no backwards compatibility guarantees.")
9215 (license license:expat)))
9216
9217(define-public ocaml-either
9218 (package
9219 (name "ocaml-either")
9220 (version "1.0.0")
9221 (source
9222 (origin
9223 (method git-fetch)
9224 (uri (git-reference
9225 (url "https://github.com/mirage/either")
9226 (commit version)))
9227 (file-name (git-file-name name version))
9228 (sha256
9229 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
9230 (build-system dune-build-system)
9231 (arguments
9232 ;; no tests
9233 `(#:tests? #f))
9234 (home-page "https://github.com/mirage/either")
9235 (synopsis "Compatibility Either module")
9236 (description "This library is a compatibility module for the Either module
9237defined in OCaml 4.12.0.")
9238 (license license:expat)))
9239
9240(define-public ocamlformat
9241 (package
9242 (name "ocamlformat")
9243 (version "0.24.1")
9244 (source
9245 (origin
9246 (method git-fetch)
9247 (uri (git-reference
9248 (url "https://github.com/ocaml-ppx/ocamlformat")
9249 (commit version)))
9250 (file-name (git-file-name name version))
9251 (sha256
9252 (base32
9253 "0y1j5mwwrliy6a78cmpi6j8gw425shghqg9ylyl3qw5fx4b088pp"))))
9254 (build-system dune-build-system)
9255 (arguments
9256 '(#:package "ocamlformat"
9257 #:phases
9258 (modify-phases %standard-phases
9259 ;; Tests related to other packages
9260 (add-after 'unpack 'remove-unrelated-tests
9261 (lambda _
9262 (delete-file-recursively "test/rpc")))
9263 (add-after 'unpack 'fix-test-format
9264 (lambda _
9265 (substitute* "test/cli/repl_file_errors.t/run.t"
9266 ((" ;;") ";;")))))))
9267 (propagated-inputs
9268 (list ocaml-version
9269 ocaml-base
9270 ocaml-cmdliner
9271 ocaml-dune-build-info
9272 ocaml-either
9273 ocaml-fix
9274 ocaml-fpath
9275 ocaml-menhir
9276 ocaml-odoc
9277 ocaml-ppxlib
9278 ocaml-re
9279 ocaml-odoc-parser
9280 ocaml-stdio
9281 ocaml-uuseg
9282 ocaml-uutf))
9283 (native-inputs
9284 (list git-minimal/pinned ;for tests
9285 ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
9286 (home-page "https://github.com/ocaml-ppx/ocamlformat")
9287 (synopsis "Auto-formatter for OCaml code")
9288 (description "OCamlFormat is a tool to automatically format OCaml code in
9289a uniform style.")
9290 (license license:expat)))
9291
9292(define-public ocamlformat-rpc-lib
9293 (package
9294 (inherit ocamlformat)
9295 (name "ocamlformat-rpc-lib")
9296 (arguments
9297 '(#:package "ocamlformat-rpc-lib"))
9298 (propagated-inputs (list ocaml-csexp ocaml-odoc))
9299 (synopsis "Auto-formatter for OCaml code in RPC mode")
9300 (description
9301 "OCamlFormat is a tool to automatically format OCaml code in a uniform style.
9302This package defines a RPC interface to OCamlFormat.")))
9303
9304(define-public ocaml-bigstringaf
9305 (package
9306 (name "ocaml-bigstringaf")
9307 (version "0.9.0")
9308 (home-page "https://github.com/inhabitedtype/bigstringaf")
9309 (source
9310 (origin
9311 (method git-fetch)
9312 (uri (git-reference
9313 (url home-page)
9314 (commit version)))
9315 (file-name (git-file-name name version))
9316 (sha256
9317 (base32
9318 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
9319 (build-system dune-build-system)
9320 (propagated-inputs
9321 (list ocaml-bigarray-compat))
9322 (native-inputs
9323 (list ocaml-alcotest pkg-config))
9324 (synopsis
9325 "Bigstring intrinsics and fast blits based on memcpy/memmove")
9326 (description
9327 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
9328not widely-known, sometimes misused, and so programs that use Bigstrings are
9329slower than they have to be. And even if a library got that part right and
9330exposed the intrinsics properly, the compiler doesn't have any fast blits
9331between Bigstrings and other string-like types. @code{bigstringaf} provides
9332these missing pieces.")
9333 (license license:bsd-3)))
9334
9335(define-public ocaml-intrinsics
9336 (package
9337 (name "ocaml-intrinsics")
9338 (version "0.15.2")
9339 (source (origin
9340 (method git-fetch)
9341 (uri (git-reference
9342 (url "https://github.com/janestreet/ocaml_intrinsics")
9343 (commit (string-append "v" version))))
9344 (file-name name)
9345 (sha256
9346 (base32
9347 "1mazr1ka2zlm2s8bw5i555cnhi1bmr9yxvpn29d3v4m8lsnfm73z"))))
9348 (build-system dune-build-system)
9349 ;; TODO figure out how to get around this error:
9350 ;; No rule found for alias test/runtime-deps-of-tests
9351 (arguments
9352 '(#:tests? #f))
9353 (propagated-inputs (list dune-configurator))
9354 (native-inputs (list ocaml-expect-test-helpers-core ocaml-core))
9355 (properties `((upstream-name . "ocaml_intrinsics")))
9356 (home-page "https://github.com/janestreet/ocaml_intrinsics")
9357 (synopsis "AMD64 intrinsics with emulated fallbacks")
9358 (description
9359 "Provides an OCaml interface to operations that have dedicated hardware
9360instructions on some micro-architectures, with default implementations using C
9361stubs for all targets.")
9362 (license license:expat)))
9363
9364(define-public ocaml-trie
9365 (package
9366 (name "ocaml-trie")
9367 (version "1.0.0")
9368 (home-page "https://github.com/kandu/trie/")
9369 (source
9370 (origin
9371 (method git-fetch)
9372 (uri (git-reference
9373 (url home-page)
9374 (commit version)))
9375 (file-name (git-file-name name version))
9376 (sha256
9377 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
9378 (build-system dune-build-system)
9379 (arguments
9380 '(#:tests? #f)) ;no tests
9381 (synopsis "Strict impure trie tree")
9382 (description
9383 "This module implements strict impure trie tree data structure for
9384OCaml.")
9385 (license license:expat)))
9386
9387(define-public ocaml-mew
9388 (package
9389 (name "ocaml-mew")
9390 (version "0.1.0")
9391 (home-page "https://github.com/kandu/mew")
9392 (source
9393 (origin
9394 (method git-fetch)
9395 (uri (git-reference
9396 (url home-page)
9397 (commit version)))
9398 (file-name (git-file-name name version))
9399 (sha256
9400 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
9401 (build-system dune-build-system)
9402 (propagated-inputs
9403 (list ocaml-result ocaml-trie))
9404 (native-inputs
9405 (list ocaml-ppx-expect))
9406 (synopsis "General modal editing engine generator")
9407 (description
9408 "This package provides the core modules of Modal Editing Witch, a general
9409modal editing engine generator.")
9410 (license license:expat)))
9411
9412(define-public ocaml-mew-vi
9413 (package
9414 (name "ocaml-mew-vi")
9415 (version "0.5.0")
9416 (home-page "https://github.com/kandu/mew_vi")
9417 (source
9418 (origin
9419 (method git-fetch)
9420 (uri (git-reference
9421 (url home-page)
9422 (commit version)))
9423 (file-name (git-file-name name version))
9424 (sha256
9425 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
9426 (build-system dune-build-system)
9427 (propagated-inputs
9428 (list ocaml-mew ocaml-react))
9429 (native-inputs
9430 (list ocaml-ppx-expect))
9431 (properties `((upstream-name . "mew_vi")))
9432 (synopsis "Modal editing VI-like editing engine generator")
9433 (description "This module provides a vi-like modal editing engine
9434generator.")
9435 (license license:expat)))
9436
9437(define-public ocaml-syntax-shims
9438 (package
9439 (name "ocaml-syntax-shims")
9440 (version "1.0.0")
9441 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
9442 (source
9443 (origin
9444 (method git-fetch)
9445 (uri (git-reference
9446 (url home-page)
9447 (commit version)))
9448 (file-name (git-file-name name version))
9449 (sha256
9450 (base32
9451 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
9452 (build-system dune-build-system)
9453 (properties
9454 `((upstream-name . "ocaml-syntax-shims")))
9455 (synopsis
9456 "Backport new syntax to older OCaml versions")
9457 (description
9458 "This package backports new language features such as @code{let+} to older
9459OCaml compilers.")
9460 (license license:expat)))
9461
9462(define-public ocaml-angstrom
9463 (package
9464 (name "ocaml-angstrom")
9465 (version "0.15.0")
9466 (home-page "https://github.com/inhabitedtype/angstrom")
9467 (source
9468 (origin
9469 (method git-fetch)
9470 (uri (git-reference
9471 (url home-page)
9472 (commit version)))
9473 (file-name (git-file-name name version))
9474 (sha256
9475 (base32
9476 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
9477 (build-system dune-build-system)
9478 (arguments
9479 ;; Only build the base angstrom package.
9480 '(#:package "angstrom"))
9481 (propagated-inputs
9482 (list ocaml-bigstringaf))
9483 (native-inputs
9484 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
9485 (synopsis "Parser combinators built for speed and memory-efficiency")
9486 (description
9487 "Angstrom is a parser-combinator library that makes it easy to write
9488efficient, expressive, and reusable parsers suitable for high-performance
9489applications. It exposes monadic and applicative interfaces for composition,
9490and supports incremental input through buffered and unbuffered interfaces.
9491Both interfaces give the user total control over the blocking behavior of
9492their application, with the unbuffered interface enabling zero-copy IO.
9493Parsers are backtracking by default and support unbounded lookahead.")
9494 (license license:bsd-3)))
9495
9496(define-public ocaml-graphics
9497 (package
9498 (name "ocaml-graphics")
9499 (version "5.1.2")
9500 (home-page "https://github.com/ocaml/graphics")
9501 (source
9502 (origin
9503 (method git-fetch)
9504 (uri (git-reference
9505 (url home-page)
9506 (commit version)))
9507 (file-name (git-file-name name version))
9508 (sha256
9509 (base32
9510 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
9511 (build-system dune-build-system)
9512 (propagated-inputs
9513 (list libx11))
9514 (synopsis "The OCaml graphics library")
9515 (description
9516 "The graphics library provides a set of portable drawing primitives.
9517Drawing takes place in a separate window that is created when
9518Graphics.open_graph is called. This library used to be distributed with OCaml
9519up to OCaml 4.08.")
9520 (license license:lgpl2.1+)))
9521
9522(define-public ocaml-uri-sexp
9523 (package
9524 (inherit ocaml-uri)
9525 (name "ocaml-uri-sexp")
9526 (arguments
9527 '(#:package "uri-sexp"))
9528 (propagated-inputs
9529 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
9530 (native-inputs (list ocaml-ounit))
9531 (synopsis "RFC3986 URI/URL parsing library")
9532 (description "This package adds S-exp support to @code{ocaml-uri}.")))
9533
9534(define-public ocaml-cohttp
9535 (package
9536 (name "ocaml-cohttp")
9537 (version "5.0.0")
9538 (source
9539 (origin
9540 (method git-fetch)
9541 (uri (git-reference
9542 (url "https://github.com/mirage/ocaml-cohttp")
9543 (commit (string-append "v" version))))
9544 (file-name (git-file-name name version))
9545 (sha256
9546 (base32
9547 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
9548 (build-system dune-build-system)
9549 (arguments '(#:package "cohttp"))
9550 (propagated-inputs
9551 (list ocaml-re
9552 ocaml-uri
9553 ocaml-uri-sexp
9554 ocaml-sexplib0
9555 ocaml-ppx-sexp-conv
9556 ocaml-stringext
9557 ocaml-base64))
9558 (native-inputs
9559 (list ocaml-fmt
9560 ocaml-jsonm
9561 ocaml-alcotest
9562 ocaml-crowbar))
9563 (home-page "https://github.com/mirage/ocaml-cohttp")
9564 (synopsis "OCaml library for HTTP clients and servers")
9565 (description
9566 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
9567HTTP parser, and implementations using various asynchronous programming
9568libraries.")
9569 (license license:isc)))
9570
9571(define-public js-of-ocaml
9572 (package
9573 (name "js-of-ocaml")
9574 (version "4.1.0")
9575 (source
9576 (origin
9577 (method git-fetch)
9578 (uri (git-reference
9579 (url "https://github.com/ocsigen/js_of_ocaml")
9580 (commit version)))
9581 (file-name (git-file-name name version))
9582 (sha256
9583 (base32 "14ig69iyc9yzniclfsc6cz9g9zqp96bs66y6dy4rzrm78s81w6i1"))))
9584 (build-system dune-build-system)
9585 (arguments
9586 ;;tests assume ocaml 4.13
9587 `(#:tests? #f))
9588 (propagated-inputs
9589 (list ocaml-ppxlib
9590 ocaml-uchar
9591 ocaml-menhir
9592 ocaml-reactivedata
9593 ocaml-cmdliner
9594 ocaml-lwt
9595 ocaml-tyxml
9596 ocaml-re
9597 ocaml-uutf
9598 ocaml-graphics
9599 ocaml-yojson))
9600 (native-inputs
9601 ;; for tests
9602 (list node-lts ocaml-ppx-expect ocaml-num))
9603 (properties `((upstream-name . "js_of_ocaml")))
9604 (home-page "https://ocsigen.org/js_of_ocaml/")
9605 (synopsis "Compiler from OCaml bytecode to Javascript")
9606 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
9607It makes it possible to run pure OCaml programs in JavaScript environment like
9608browsers and Node.js.")
9609 (license license:lgpl2.1+)))
9610
9611(define-public ocaml-afl-persistent
9612 (package
9613 (name "ocaml-afl-persistent")
9614 (version "1.3")
9615 (source
9616 (origin
9617 (method git-fetch)
9618 (uri (git-reference
9619 (url "https://github.com/stedolan/ocaml-afl-persistent")
9620 (commit (string-append "v" version))))
9621 (file-name (git-file-name name version))
9622 (sha256
9623 (base32
9624 "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
9625 (build-system ocaml-build-system)
9626 (arguments
9627 '(#:phases
9628 (modify-phases %standard-phases
9629 (delete 'configure)
9630 (replace 'build
9631 (lambda _
9632 (invoke "./build.sh")))
9633 ;; XXX: The tests are already run in the build.sh script.
9634 (delete 'check))))
9635 (native-inputs (list opam-installer))
9636 (home-page "https://github.com/stedolan/ocaml-afl-persistent")
9637 (synopsis "Use afl-fuzz in persistent mode")
9638 (description
9639 "afl-fuzz normally works by repeatedly forking the program being tested.
9640Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
9641repeated forking and is much faster.")
9642 (license license:expat)))
9643
9644(define-public ocaml-monolith
9645 (package
9646 (name "ocaml-monolith")
9647 (version "20210525")
9648 (source
9649 (origin
9650 (method git-fetch)
9651 (uri (git-reference
9652 (url "https://gitlab.inria.fr/fpottier/monolith")
9653 (commit version)))
9654 (file-name (git-file-name name version))
9655 (sha256
9656 (base32
9657 "1b6jj4ivl9ni8kba7wls4xsqdy8nm7q9mnx9347jvb99dmmlj5mc"))))
9658 (build-system dune-build-system)
9659 (propagated-inputs (list ocaml-afl-persistent ocaml-pprint ocaml-seq))
9660 (home-page "https://gitlab.inria.fr/fpottier/monolith")
9661 (synopsis "Framework for testing an OCaml library using afl-fuzz")
9662 (description "Monolith offers facilities for testing an OCaml library (for
9663instance, a data structure implementation) by comparing it against a reference
9664implementation. It can be used to perform either random testing or fuzz
9665testing by using the @code{afl-fuzz} tool.")
9666 (license license:lgpl3+)))
9667
9668(define-public ocaml-pprint
9669 (package
9670 (name "ocaml-pprint")
9671 (version "20220103")
9672 (home-page "https://github.com/fpottier/pprint")
9673 (source
9674 (origin
9675 (method git-fetch)
9676 (uri (git-reference
9677 (url home-page)
9678 (commit version)))
9679 (file-name (git-file-name name version))
9680 (sha256
9681 (base32
9682 "09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"))))
9683 (build-system dune-build-system)
9684 (synopsis "OCaml pretty-printing combinator library and rendering
9685engine")
9686 (description "This OCaml library offers a set of combinators for building
9687so-called documents as well as an efficient engine for converting documents to
9688a textual, fixed-width format. The engine takes care of indentation and line
9689breaks, while respecting the constraints imposed by the structure of the
9690document and by the text width.")
9691 (license license:lgpl2.0)))
9692
9693(define-public ocaml-crowbar
9694 (package
9695 (name "ocaml-crowbar")
9696 (version "0.2.1")
9697 (home-page "https://github.com/stedolan/crowbar")
9698 (source
9699 (origin
9700 (method git-fetch)
9701 (uri (git-reference
9702 (url home-page)
9703 (commit (string-append "v" version))))
9704 (file-name (git-file-name name version))
9705 (sha256
9706 (base32
9707 "11f3kiw58g8njx15akx16xcplzvzdw9y6c4jpyfxylkxws4g0f6j"))))
9708 (build-system dune-build-system)
9709 (propagated-inputs
9710 (list ocaml-ocplib-endian
9711 ocaml-cmdliner
9712 ocaml-afl-persistent))
9713 (native-inputs
9714 (list ocaml-calendar
9715 ocaml-fpath
9716 ocaml-uucp
9717 ocaml-uunf
9718 ocaml-uutf
9719 ocaml-pprint))
9720 (properties `((ocaml5.0-variant . ,(delay ocaml5.0-crowbar))))
9721 (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
9722 (description "Crowbar is a library for testing code, combining
9723QuickCheck-style property-based testing and the magical bug-finding powers of
9724@uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
9725 (license license:expat)))
9726
9727(define-public ocaml5.0-crowbar
9728 (package-with-ocaml5.0
9729 (package
9730 (inherit ocaml-crowbar)
9731 ;; Tests require ocaml-calendar which does not work with OCaml 5.0
9732 (arguments `(#:tests? #f))
9733 (properties '()))))
9734
9735(define-public ocaml-eqaf
9736 (package
9737 (name "ocaml-eqaf")
9738 (version "0.9")
9739 (home-page "https://github.com/mirage/eqaf")
9740 (source
9741 (origin
9742 (method git-fetch)
9743 (uri (git-reference
9744 (url home-page)
9745 (commit (string-append "v" version))))
9746 (file-name (git-file-name name version))
9747 (sha256
9748 (base32
9749 "16ics56wiqyng70dy2hqikicm8ag1mv5w1h7hkiwvydw1x2j2rsl"))))
9750 (build-system dune-build-system)
9751 (propagated-inputs (list ocaml-cstruct))
9752 (native-inputs (list ocaml-alcotest ocaml-crowbar))
9753 (synopsis "OCaml library for constant-time equal function on string")
9754 (description "This OCaml library provides an equal function on string in
9755constant-time to avoid timing-attack with crypto stuff.")
9756 (license license:expat)))
9757
9758(define-public ocaml-digestif
9759 (package
9760 (name "ocaml-digestif")
9761 (version "1.1.3")
9762 (home-page "https://github.com/mirage/digestif")
9763 (source
9764 (origin
9765 (method git-fetch)
9766 (uri (git-reference
9767 (url home-page)
9768 (commit (string-append "v" version))))
9769 (file-name (git-file-name name version))
9770 (sha256
9771 (base32
9772 "0x5iskavqkclr5mk2q6jvh5h1v81krqi4v353rj4xsmdqb33s0f1"))))
9773 (build-system dune-build-system)
9774 (propagated-inputs (list ocaml-eqaf))
9775 (native-inputs
9776 (list pkg-config
9777 ocaml-fmt
9778 ocaml-alcotest
9779 ocaml-bos
9780 ocaml-astring
9781 ocaml-fpath
9782 ocaml-rresult
9783 ocaml-findlib))
9784 (synopsis "Simple hash algorithms in OCaml")
9785 (description
9786 "Digestif is an OCaml library that provides implementations of hash
9787algorithms. Implemented hash algorithms include MD5, SHA1, SHA224, SHA256,
9788SHA384, SHA512, Blake2b, Blake2s and RIPEMD160.")
9789 (license license:expat)))
9790
9791(define-public ocaml-bibtex2html
9792 (package
9793 (name "ocaml-bibtex2html")
9794 (version "1.99")
9795 (source
9796 (origin
9797 (method url-fetch)
9798 (uri (string-append "https://www.lri.fr/~filliatr/ftp/bibtex2html/"
9799 "bibtex2html-" version ".tar.gz"))
9800 (sha256
9801 (base32
9802 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
9803 (build-system ocaml-build-system)
9804 (arguments
9805 (list
9806 #:phases
9807 #~(modify-phases %standard-phases
9808 (add-after 'unpack 'patch-/bin/sh
9809 (lambda _
9810 (substitute* "configure" (("/bin/sh") (which "bash")))
9811 ;; mktexfmt needs writable TEXMFVAR directory.
9812 (setenv "TEXMFVAR" "/tmp"))))))
9813 (native-inputs
9814 (list (texlive-local-tree
9815 (list texlive-infwarerr
9816 texlive-kvoptions
9817 texlive-pdftexcmds
9818 texlive-preprint))
9819 which))
9820 (propagated-inputs
9821 (list hevea))
9822 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
9823 (synopsis "BibTeX to HTML translator")
9824 (description "This package allows you to produce, from a set of
9825bibliography files in BibTeX format, a bibliography in HTML format.")
9826 (license license:gpl2)))
9827
9828(define-public ocaml-guile
9829 (package
9830 (name "ocaml-guile")
9831 (version "1.0")
9832 (home-page "https://github.com/gopiandcode/guile-ocaml")
9833 (source
9834 (origin
9835 (method git-fetch)
9836 (uri (git-reference
9837 (url home-page)
9838 (commit version)))
9839 (file-name (git-file-name name version))
9840 (sha256
9841 (base32
9842 "0yxdkrhrrbwvay5sn0p26rh3f11876k6kdharmpi4afxknml74ql"))))
9843 (build-system dune-build-system)
9844 (arguments
9845 `(#:tests? #f ;; no tests
9846 #:phases
9847 (modify-phases %standard-phases
9848 (add-after 'unpack 'patch-gcc-flags
9849 (lambda _
9850 (substitute* "config/discover.ml"
9851 ;; Disable a strict default added in GCC 14.
9852 (("libffi.P.cflags")
9853 "[\"-Wno-int-conversion\"] @ libffi.P.cflags")))))))
9854 (propagated-inputs
9855 (list ocaml-sexplib
9856 ocaml-ctypes
9857 ocaml-stdio
9858 ocaml-odoc))
9859 (inputs (list guile-3.0 libffi))
9860 (native-inputs
9861 (list ocaml-odoc
9862 pkg-config))
9863 (synopsis "Bindings to GNU Guile Scheme for OCaml")
9864 (description
9865 "The OCaml guile library provides high-level OCaml bindings to GNU Guile
98663.0, supporting easy interop between OCaml and GNU Guile Scheme.")
9867 (license license:gpl3+)))
9868
9869;;;
9870;;; Avoid adding new packages to the end of this file. To reduce the chances
9871;;; of a merge conflict, place them above by existing packages with similar
9872;;; functionality or similar names.
9873;;;