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