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