gnu: ocaml-topkg: Update to 1.0.6.
[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.6.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 "0gv851wxbv5ln20429nj7p92spzxgw8vngg9z94q39aawn6q8lx6"))))
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.6")
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 "11ycfk0prqvifm9jca2308gw8a6cjb1hqlgfslbji2cqpan09kpq"))))
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.13")
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 "1bg5vagklq6yfxsvcnj2i76xis8hb59088hkic82smyrxdjd1kjs"))))
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.4")
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 "031b3s8ppqkpw1n6h87h6jzjkmny6yig9wfimmgwnljafcc83d3b"))))
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.4")
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 "1s2az5lv52r0fig4624652zn3jj5dy30d1xlw6gzd0s086i4bvjh"))))
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.7")
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 "1dsr3s88kgmcg3najhc29cwfvsxa2plvjws1127fz75kmn15np28"))))
4690 (build-system dune-build-system)
4691 (arguments
4692 `(#:test-target "tests"))
4693 (inputs (list gmp ocaml-cmdliner ocaml-z3 z3))
4694 (native-inputs (list ocaml-menhir))
4695 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4696 the λ-calculus")
4697 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4698 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4699 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4700 λΠ-calculus where the context contains variable declaration as well as rewrite
4701 rules. This system is not designed to develop proofs, but to check proofs
4702 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4703 (license license:cecill-c)))
4704
4705 (define-public ocaml-jst-config
4706 (package
4707 (name "ocaml-jst-config")
4708 (version "0.15.1")
4709 (source
4710 (origin
4711 (method git-fetch)
4712 (uri (git-reference
4713 (url "https://github.com/janestreet/jst-config")
4714 (commit (string-append "v" version))))
4715 (file-name (git-file-name name version))
4716 (sha256
4717 (base32
4718 "1yp5p63clvaxmkf7vlasgyapxc31x29c154pyq63n0fvi2fpf4y3"))))
4719 (build-system dune-build-system)
4720 (arguments '(#:tests? #f)) ; no tests
4721 (propagated-inputs
4722 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
4723 (home-page "https://github.com/janestreet/jst-config")
4724 (synopsis "Compile-time configuration for Jane Street libraries")
4725 (description "Defines compile-time constants used in Jane Street libraries
4726 such as Base, Core, and Async. This package has an unstable interface; it is
4727 intended only to share configuration between different packages from Jane
4728 Street. Future updates may not be backward-compatible, and we do not
4729 recommend using this package directly.")
4730 (license license:expat)))
4731
4732 (define-public ocaml-jane-street-headers
4733 (package
4734 (name "ocaml-jane-street-headers")
4735 (version "0.15.0")
4736 (source
4737 (janestreet-origin
4738 "jane-street-headers" version
4739 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
4740 (build-system dune-build-system)
4741 (arguments '(#:tests? #f)) ; no tests
4742 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-jane-street-headers))))
4743 (home-page "https://github.com/janestreet/jane-street-headers")
4744 (synopsis "Jane Street C header files")
4745 (description "C header files shared between the various Jane Street
4746 packages.")
4747 (license license:expat)))
4748
4749 (define-public ocaml-time-now
4750 (package
4751 (name "ocaml-time-now")
4752 (version "0.15.0")
4753 (source
4754 (janestreet-origin
4755 "time_now" version
4756 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
4757 (build-system dune-build-system)
4758 (arguments '(#:tests? #f)) ; no tests
4759 (propagated-inputs
4760 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
4761 ocaml-ppx-base ocaml-ppx-optcomp))
4762 (properties `((upstream-name . "time_now")))
4763 (home-page
4764 "https://github.com/janestreet/time_now")
4765 (synopsis "Reports the current time")
4766 (description
4767 "Provides a single function to report the current time in nanoseconds
4768 since the start of the Unix epoch.")
4769 (license license:expat)))
4770
4771 (define-public ocaml-ppx-inline-test
4772 (package
4773 (name "ocaml-ppx-inline-test")
4774 (version "0.15.0")
4775 (home-page "https://github.com/janestreet/ppx_inline_test")
4776 (source
4777 (origin
4778 (method git-fetch)
4779 (uri (git-reference
4780 (url (string-append home-page ".git"))
4781 (commit (string-append "v" version))))
4782 (file-name (git-file-name name version))
4783 (sha256
4784 (base32
4785 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
4786 (build-system dune-build-system)
4787 (arguments
4788 `(#:tests? #f)) ;see home page README for further information
4789 (propagated-inputs
4790 (list ocaml-base
4791 ocaml-migrate-parsetree
4792 ocaml-compiler-libs
4793 ocaml-sexplib0
4794 ocaml-stdio
4795 ocaml-ppxlib
4796 ocaml-time-now))
4797 (properties `((upstream-name . "ppx_inline_test")
4798 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
4799 (synopsis "Syntax extension for writing in-line tests in ocaml code")
4800 (description "This package contains a syntax extension for writing
4801 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
4802 collection.")
4803 (license license:expat)))
4804
4805 (define-public ocaml4.07-ppx-inline-test
4806 (package-with-ocaml4.07
4807 (package
4808 (inherit ocaml-ppx-inline-test)
4809 (name "ocaml-ppx-inline-test")
4810 (version "0.12.0")
4811 (home-page "https://github.com/janestreet/ppx_inline_test")
4812 (source
4813 (origin
4814 (method git-fetch)
4815 (uri (git-reference
4816 (url (string-append home-page ".git"))
4817 (commit (string-append "v" version))))
4818 (file-name (git-file-name name version))
4819 (sha256
4820 (base32
4821 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
4822 (propagated-inputs
4823 `(("ocaml-base" ,ocaml-base)
4824 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4825 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
4826 ("ocaml-sexplib0" ,ocaml-sexplib0)
4827 ("ocaml-stdio" ,ocaml-stdio)
4828 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4829 (properties `((upstream-name . "ppx_inline_test"))))))
4830
4831 (define-public ocaml-bindlib
4832 (package
4833 (name "ocaml-bindlib")
4834 (version "6.0.0")
4835 (source
4836 (origin
4837 (method git-fetch)
4838 (uri (git-reference
4839 (url "https://github.com/rlepigre/ocaml-bindlib")
4840 (commit version)))
4841 (file-name (git-file-name name version))
4842 (sha256
4843 (base32
4844 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
4845 (build-system dune-build-system)
4846 (arguments
4847 `(#:test-target "."))
4848 (native-inputs
4849 (list ocamlbuild ocaml-findlib))
4850 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
4851 (synopsis "OCaml Bindlib library for bound variables")
4852 (description "Bindlib is a library allowing the manipulation of data
4853 structures with bound variables. It is particularly useful when writing ASTs
4854 for programming languages, but also for manipulating terms of the λ-calculus
4855 or quantified formulas.")
4856 (license license:gpl3+)))
4857
4858 (define-public ocaml-earley
4859 (package
4860 (name "ocaml-earley")
4861 (version "3.0.0")
4862 (home-page "https://github.com/rlepigre/ocaml-earley")
4863 (source
4864 (origin
4865 (method git-fetch)
4866 (uri (git-reference
4867 (url (string-append home-page ".git"))
4868 (commit version)))
4869 (file-name (git-file-name name version))
4870 (sha256
4871 (base32
4872 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
4873 (build-system dune-build-system)
4874 (arguments
4875 `(#:test-target "."))
4876 (propagated-inputs
4877 (list ocaml-stdlib-shims))
4878 (synopsis "Parsing library based on Earley Algorithm")
4879 (description "Earley is a parser combinator library base on Earley's
4880 algorithm. It is intended to be used in conjunction with an OCaml syntax
4881 extension which allows the definition of parsers inside the language. There
4882 is also support for writing OCaml syntax extensions in a camlp4 style.")
4883 (license license:cecill-b)))
4884
4885 (define-public ocaml-timed
4886 (package
4887 (name "ocaml-timed")
4888 (version "1.1")
4889 (home-page "https://github.com/rlepigre/ocaml-timed")
4890 (source (origin
4891 (method git-fetch)
4892 (uri (git-reference
4893 (url (string-append home-page ".git"))
4894 (commit version)))
4895 (sha256
4896 (base32
4897 "1aqmkpjv5jk95lc2m3qyyrhw8ra7n9wj8pv3bfc83l737zv0hjn1"))
4898 (file-name (git-file-name name version))))
4899 (build-system dune-build-system)
4900 (arguments
4901 '(#:test-target "."))
4902 (synopsis "Timed references for imperative state")
4903 (description "Timed references for imperative state. This module provides
4904 an alternative type for references (or mutable cells) supporting undo/redo
4905 operations. In particular, an abstract notion of time is used to capture the
4906 state of the references at any given point, so that it can be restored. Note
4907 that usual reference operations only have a constant time / memory overhead
4908 (compared to those of the standard library).
4909
4910 Moreover, we provide an alternative implementation based on the references
4911 of the standard library (Pervasives module). However, it is less efficient
4912 than the first one.")
4913 (license license:expat)))
4914
4915 (define-public ocaml-biniou
4916 (package
4917 (name "ocaml-biniou")
4918 (version "1.2.2")
4919 (home-page "https://github.com/mjambon/biniou")
4920 (source
4921 (origin
4922 (method git-fetch)
4923 (uri (git-reference
4924 (url (string-append home-page ".git"))
4925 (commit version)))
4926 (file-name (git-file-name name version))
4927 (sha256
4928 (base32
4929 "1gd4nqffm9h7dzxyvpfpww24l61fqgazyh3p5f7k9jvgyv9y4vcn"))))
4930 (build-system dune-build-system)
4931 (arguments
4932 `(#:phases
4933 (modify-phases %standard-phases
4934 (add-before 'build 'make-writable
4935 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
4936 (inputs
4937 (list ocaml-easy-format ocaml-camlp-streams))
4938 (native-inputs
4939 (list which))
4940 (synopsis "Data format designed for speed, safety, ease of use and backward
4941 compatibility")
4942 (description "Biniou (pronounced \"be new\" is a binary data format
4943 designed for speed, safety, ease of use and backward compatibility as
4944 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4945 functionality but allows implementations several times faster (4 times faster
4946 than yojson), with 25-35% space savings.")
4947 (license license:bsd-3)))
4948
4949 (define-public ocaml-yojson
4950 (package
4951 (name "ocaml-yojson")
4952 (version "2.0.2")
4953 (home-page "https://github.com/ocaml-community/yojson")
4954 (source
4955 (origin
4956 (method git-fetch)
4957 (uri (git-reference
4958 (url (string-append home-page ".git"))
4959 (commit version)))
4960 (file-name (git-file-name name version))
4961 (sha256
4962 (base32
4963 "1habsh00ihjhk1g1csxqg3hj8izk5zvgc7wm579wyjw35vzcmwr1"))))
4964 (build-system dune-build-system)
4965 (arguments
4966 `(#:test-target "."
4967 #:package "yojson"))
4968 (propagated-inputs (list ocaml-seq))
4969 (native-inputs (list ocaml-alcotest ocaml-cppo))
4970 (synopsis "Low-level JSON library for OCaml")
4971 (description "Yojson is an optimized parsing and printing library for the
4972 JSON format. It addresses a few shortcomings of json-wheel including 2x
4973 speedup, polymorphic variants and optional syntax for tuples and variants.
4974 @code{ydump} is a pretty printing command-line program provided with the
4975 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4976 serializers and deserializers from type definitions.")
4977 (license license:bsd-3)))
4978
4979 (define-public ocaml-merlin-lib
4980 (package
4981 (name "ocaml-merlin-lib")
4982 (version "4.6-414")
4983 (source
4984 (origin
4985 (method git-fetch)
4986 (uri (git-reference
4987 (url "https://github.com/ocaml/merlin")
4988 (commit (string-append "v" version))))
4989 (file-name (git-file-name name version))
4990 (sha256
4991 (base32
4992 "1cpa9x45w54l4mqqmc8z3s5gscggw37gb6z9i7wwss86fj1wgclh"))))
4993 (build-system dune-build-system)
4994 (arguments '(#:package "merlin-lib"
4995 #:tests? #f)) ; no tests
4996 (propagated-inputs (list ocaml-csexp ocaml-menhir))
4997 (home-page "https://ocaml.github.io/merlin/")
4998 (synopsis "Merlin libraries")
4999 (description "These libraries provides access to low-level compiler
5000 interfaces and the standard higher-level merlin protocol.")
5001 (license license:expat)))
5002
5003 (define-public ocaml-dot-merlin-reader
5004 (package
5005 (inherit ocaml-merlin-lib)
5006 (name "ocaml-dot-merlin-reader")
5007 (arguments '(#:package "dot-merlin-reader"
5008 #:tests? #f)) ; no tests
5009 (propagated-inputs (list ocaml-merlin-lib))
5010 (synopsis "Reads config files for @code{ocaml-merlin}")
5011 (description "@code{ocaml-dot-merlin-reader} is an external reader for
5012 @code{ocaml-merlin} configurations.")))
5013
5014 (define-public ocaml-merlin
5015 (package
5016 (inherit ocaml-dot-merlin-reader)
5017 (name "ocaml-merlin")
5018 (arguments
5019 '(#:package "merlin"
5020 #:phases
5021 (modify-phases %standard-phases
5022 (replace 'check
5023 (lambda* (#:key tests? #:allow-other-keys)
5024 (when tests?
5025 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
5026 (propagated-inputs (list ocaml-merlin-lib ocaml-yojson))
5027 (native-inputs
5028 (list ocaml-dot-merlin-reader ; required for tests
5029 ocaml-mdx jq))
5030 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
5031 (description "Merlin is an editor service that provides modern IDE
5032 features for OCaml. Emacs and Vim support is provided out-of-the-box.
5033 External contributors added support for Visual Studio Code, Sublime Text and
5034 Atom.")
5035 (license license:expat)))
5036
5037 (define-public ocaml-gsl
5038 (package
5039 (name "ocaml-gsl")
5040 (version "1.24.0")
5041 (source
5042 (origin
5043 (method url-fetch)
5044 (uri
5045 (string-append
5046 "https://github.com/mmottl/gsl-ocaml/releases/download/"
5047 version "/gsl-" version ".tbz"))
5048 (sha256
5049 (base32
5050 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
5051 (build-system dune-build-system)
5052 (arguments
5053 `(#:test-target "."
5054 #:phases
5055 (modify-phases %standard-phases
5056 (add-after 'unpack 'fix-gsl-directory
5057 (lambda* (#:key inputs #:allow-other-keys)
5058 (substitute* "src/config/discover.ml"
5059 (("/usr") (assoc-ref inputs "gsl"))))))))
5060 (inputs
5061 (list gsl))
5062 (propagated-inputs
5063 (list ocaml-base ocaml-stdio))
5064 (home-page "https://mmottl.github.io/gsl-ocaml")
5065 (synopsis "Bindings to the GNU Scientific Library")
5066 (description
5067 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
5068 the OCaml language.")
5069 (license license:gpl3+)))
5070
5071 (define-public ocaml4.07-gsl-1
5072 (package-with-ocaml4.07
5073 (package
5074 (inherit ocaml-gsl)
5075 (version "1.19.3")
5076 (source (origin
5077 (method url-fetch)
5078 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
5079 "/releases/download/v"
5080 version "/gsl-ocaml-" version ".tar.gz"))
5081 (sha256
5082 (base32
5083 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
5084 (build-system ocaml-build-system)
5085 (inputs
5086 `(("gsl" ,gsl-static)))
5087 (native-inputs
5088 `(("ocamlbuild" ,ocamlbuild)))
5089 (arguments '())
5090 (propagated-inputs '()))))
5091
5092 (define-public cubicle
5093 (package
5094 (name "cubicle")
5095 (version "1.1.2")
5096 (source (origin
5097 (method url-fetch)
5098 (uri (string-append "http://cubicle.lri.fr/cubicle-"
5099 version ".tar.gz"))
5100 (sha256
5101 (base32
5102 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
5103 (build-system gnu-build-system)
5104 (native-inputs
5105 (list automake ocaml
5106 (@@ (gnu packages base) which)))
5107 (propagated-inputs
5108 (list ocaml-num z3))
5109 (arguments
5110 `(#:configure-flags (list "--with-z3")
5111 #:make-flags (list "QUIET=")
5112 #:tests? #f
5113 #:phases
5114 (modify-phases %standard-phases
5115 (add-before 'configure 'make-deterministic
5116 (lambda _
5117 (substitute* "Makefile.in"
5118 (("`date`") "no date for reproducibility"))))
5119 (add-before 'configure 'configure-for-release
5120 (lambda _
5121 (substitute* "Makefile.in"
5122 (("SVNREV=") "#SVNREV="))
5123 #t))
5124 (add-before 'configure 'fix-/bin/sh
5125 (lambda _
5126 (substitute* "configure"
5127 (("-/bin/sh") (string-append "-" (which "sh"))))
5128 #t))
5129 (add-before 'configure 'fix-smt-z3wrapper.ml
5130 (lambda _
5131 (substitute* "Makefile.in"
5132 (("\\\\n") ""))
5133 #t))
5134 (add-before 'configure 'fix-ocaml-num
5135 (lambda* (#:key inputs #:allow-other-keys)
5136 (substitute* "Makefile.in"
5137 (("nums.cma") "num.cma num_core.cma")
5138 (("= \\$\\(FUNCTORYLIB\\)")
5139 (string-append "= -I "
5140 (assoc-ref inputs "ocaml-num")
5141 "/lib/ocaml/site-lib/num/core -I "
5142 (assoc-ref inputs "ocaml-num")
5143 "/lib/ocaml/site-lib/num"
5144 " $(FUNCTORYLIB)")))
5145 #t)))))
5146 (home-page "http://cubicle.lri.fr/")
5147 (synopsis "Model checker for array-based systems")
5148 (description "Cubicle is a model checker for verifying safety properties
5149 of array-based systems. This is a syntactically restricted class of
5150 parametrized transition systems with states represented as arrays indexed by
5151 an arbitrary number of processes. Cache coherence protocols and mutual
5152 exclusion algorithms are typical examples of such systems.")
5153 (license license:asl2.0)))
5154
5155 (define-public ocaml-sexplib0
5156 (package
5157 (name "ocaml-sexplib0")
5158 (version "0.15.1")
5159 (home-page "https://github.com/janestreet/sexplib0")
5160 (source (origin
5161 (method git-fetch)
5162 (uri (git-reference
5163 (url home-page)
5164 (commit (string-append "v" version))))
5165 (file-name (git-file-name name version))
5166 (sha256
5167 (base32
5168 "05m93g4m4jhj1v8pazg3s2ydcfymr3h4476yjhdca5fm4sn35bg8"))))
5169 (build-system dune-build-system)
5170 (arguments `(#:tests? #f)) ;no tests
5171 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
5172 (synopsis "Library containing the definition of S-expressions and some
5173 base converters")
5174 (description "Part of Jane Street's Core library The Core suite of
5175 libraries is an industrial strength alternative to OCaml's standard library
5176 that was developed by Jane Street, the largest industrial user of OCaml.")
5177 (license license:expat)))
5178
5179 (define-public ocaml4.07-sexplib0
5180 (package-with-ocaml4.07
5181 (package
5182 (inherit ocaml-sexplib0)
5183 (name "ocaml-sexplib0")
5184 (version "0.11.0")
5185 (source
5186 (janestreet-origin "sexplib0" version
5187 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
5188 (arguments `(#:tests? #f)) ; no tests
5189 (properties '()))))
5190
5191 (define-public ocaml-parsexp
5192 (package
5193 (name "ocaml-parsexp")
5194 (version "0.15.0")
5195 (home-page "https://github.com/janestreet/parsexp")
5196 (source (origin
5197 (method git-fetch)
5198 (uri (git-reference
5199 (url home-page)
5200 (commit (string-append "v" version))))
5201 (file-name (git-file-name name version))
5202 (sha256
5203 (base32
5204 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
5205 (build-system dune-build-system)
5206 (inputs
5207 (list ocaml-sexplib0 ocaml-base))
5208 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
5209 (synopsis "S-expression parsing library")
5210 (description
5211 "This library provides generic parsers for parsing S-expressions from
5212 strings or other medium.
5213
5214 The library is focused on performances but still provide full generic
5215 parsers that can be used with strings, bigstrings, lexing buffers,
5216 character streams or any other sources effortlessly.
5217
5218 It provides three different class of parsers:
5219 @itemize
5220 @item
5221 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
5222 @item
5223 the parsers with positions, building compact position sequences so
5224 that one can recover original positions in order to report properly
5225 located errors at little cost
5226 @item
5227 the Concrete Syntax Tree parsers, produce values of type
5228 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
5229 syntax, including comments
5230 @end itemize
5231
5232 This library is portable and doesn't provide IO functions. To read
5233 s-expressions from files or other external sources, you should use
5234 parsexp_io.")
5235 (license license:expat)))
5236
5237 (define-public ocaml4.07-parsexp
5238 (package-with-ocaml4.07
5239 (package
5240 (inherit ocaml-parsexp)
5241 (name "ocaml-parsexp")
5242 (version "0.11.0")
5243 (source
5244 (janestreet-origin "parsexp" version
5245 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
5246 (properties '()))))
5247
5248 (define-public ocaml-sexplib
5249 (package
5250 (name "ocaml-sexplib")
5251 (version "0.15.1")
5252 (home-page "https://github.com/janestreet/sexplib")
5253 (source (origin
5254 (method git-fetch)
5255 (uri (git-reference
5256 (url home-page)
5257 (commit (string-append "v" version))))
5258 (file-name (git-file-name name version))
5259 (sha256
5260 (base32
5261 "1gcvcc0jw6pb69wwfjnaqz1jk5simap2kdb7g43v7v7mksg8sh9f"))))
5262 (build-system dune-build-system)
5263 (propagated-inputs
5264 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
5265 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
5266 (synopsis
5267 "Library for serializing OCaml values to and from S-expressions")
5268 (description
5269 "This package is part of Jane Street's Core library. Sexplib contains
5270 functionality for parsing and pretty-printing s-expressions.")
5271 (license license:expat)))
5272
5273 (define-public ocaml4.07-sexplib
5274 (package-with-ocaml4.07
5275 (package
5276 (inherit ocaml-sexplib)
5277 (version "0.11.0")
5278 (source
5279 (janestreet-origin "sexplib" version
5280 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
5281 (properties '()))))
5282
5283 (define-public ocaml-base
5284 (package
5285 (name "ocaml-base")
5286 (version "0.15.0")
5287 (home-page "https://github.com/janestreet/base")
5288 (source
5289 (origin
5290 (method git-fetch)
5291 (uri (git-reference
5292 (url "https://github.com/janestreet/base")
5293 (commit (string-append "v" version))))
5294 (file-name (git-file-name name version))
5295 (sha256
5296 (base32
5297 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
5298 (build-system dune-build-system)
5299 (propagated-inputs
5300 (list ocaml-sexplib0))
5301 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
5302 (synopsis
5303 "Full standard library replacement for OCaml")
5304 (description
5305 "Base is a complete and portable alternative to the OCaml standard
5306 library. It provides all standard functionalities one would expect
5307 from a language standard library. It uses consistent conventions
5308 across all of its module.
5309
5310 Base aims to be usable in any context. As a result system dependent
5311 features such as I/O are not offered by Base. They are instead
5312 provided by companion libraries such as
5313 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5314 (license license:expat)))
5315
5316 (define-public ocaml4.07-base
5317 (package-with-ocaml4.07
5318 (package
5319 (inherit ocaml-base)
5320 (name "ocaml-base")
5321 (version "0.11.1")
5322 (source
5323 (origin
5324 ;; version 0.11.1 is not released on ocaml.janestreet.org.
5325 (method git-fetch)
5326 (uri (git-reference
5327 (url "https://github.com/janestreet/base.git")
5328 (commit (string-append "v" version))))
5329 (file-name (git-file-name name version))
5330 (sha256
5331 (base32
5332 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5333 (properties '()))))
5334
5335 (define-public ocaml-compiler-libs
5336 (package
5337 (name "ocaml-compiler-libs")
5338 (version "0.12.4")
5339 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5340 (source
5341 (origin
5342 (method git-fetch)
5343 (uri (git-reference
5344 (url home-page)
5345 (commit (string-append "v" version))))
5346 (file-name (git-file-name name version))
5347 (sha256
5348 (base32
5349 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
5350 (build-system dune-build-system)
5351 (arguments `(#:tests? #f)) ;no tests
5352 (properties `((upstream-name . "ocaml-compiler-libs")
5353 (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
5354 (synopsis "Compiler libraries repackaged")
5355 (description "This package simply repackages the OCaml compiler libraries
5356 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5357 is now @code{Ocaml_common.Ast_helper}.")
5358 (license license:expat)))
5359
5360 (define-public ocaml4.07-compiler-libs
5361 (package-with-ocaml4.07
5362 (package
5363 (inherit ocaml-compiler-libs)
5364 (name "ocaml-compiler-libs")
5365 (version "0.11.0")
5366 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5367 (source
5368 (origin
5369 (method git-fetch)
5370 (uri (git-reference
5371 (url home-page)
5372 (commit (string-append "v" version))))
5373 (file-name (git-file-name name version))
5374 (sha256
5375 (base32
5376 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5377 (properties `((upstream-name . "ocaml-compiler-libs"))))))
5378
5379 (define-public ocaml-stdio
5380 (package
5381 (name "ocaml-stdio")
5382 (version "0.15.0")
5383 (home-page "https://github.com/janestreet/stdio")
5384 (source
5385 (janestreet-origin "stdio" version
5386 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
5387 (build-system dune-build-system)
5388 (propagated-inputs
5389 (list ocaml-base ocaml-sexplib0))
5390 (arguments `(#:tests? #f)) ;no tests
5391 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
5392 (synopsis "Standard IO library for OCaml")
5393 (description
5394 "Stdio implements simple input/output functionalities for OCaml. It
5395 re-exports the input/output functions of the OCaml standard libraries using
5396 a more consistent API.")
5397 (license license:expat)))
5398
5399 (define-public ocaml4.07-stdio
5400 (package-with-ocaml4.07
5401 (package
5402 (inherit ocaml-stdio)
5403 (version "0.11.0")
5404 (source
5405 (janestreet-origin "stdio" version
5406 "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
5407 (properties '()))))
5408
5409 (define-public ocaml-ppx-deriving
5410 (package
5411 (name "ocaml-ppx-deriving")
5412 (version "5.2.1")
5413 (source
5414 (origin
5415 (method git-fetch)
5416 (uri (git-reference
5417 (url "https://github.com/ocaml-ppx/ppx_deriving")
5418 (commit (string-append "v" version))))
5419 (file-name (git-file-name name version))
5420 (sha256
5421 (base32
5422 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
5423 (build-system dune-build-system)
5424 (arguments
5425 `(#:test-target "."))
5426 (propagated-inputs
5427 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
5428 (native-inputs
5429 (list ocaml-cppo ocaml-ounit2))
5430 (properties `((upstream-name . "ppx_deriving")))
5431 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
5432 (synopsis "Type-driven code generation for OCaml")
5433 (description
5434 "Ppx_deriving provides common infrastructure for generating code based
5435 on type definitions, and a set of useful plugins for common tasks.")
5436 (license license:expat)))
5437
5438 (define-public ocaml-ppx-derivers
5439 (package
5440 (name "ocaml-ppx-derivers")
5441 (version "1.2.1")
5442 (home-page
5443 "https://github.com/ocaml-ppx/ppx_derivers")
5444 (source
5445 (origin
5446 (method git-fetch)
5447 (uri (git-reference
5448 (url (string-append home-page ".git"))
5449 (commit version)))
5450 (file-name (git-file-name name version))
5451 (sha256
5452 (base32
5453 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
5454 (build-system dune-build-system)
5455 (arguments
5456 '(#:tests? #f)) ;no tests
5457 (properties `((upstream-name . "ppx_derivers")))
5458 (synopsis "Shared @code{@@deriving} plugin registry")
5459 (description
5460 "Ppx_derivers is a tiny package whose sole purpose is to allow
5461 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5462 as part of the same ocaml-migrate-parsetree driver.")
5463 (license license:bsd-3)))
5464
5465 (define-public ocaml-ppxlib
5466 (package
5467 (name "ocaml-ppxlib")
5468 (version "0.25.0")
5469 (home-page "https://github.com/ocaml-ppx/ppxlib")
5470 (source
5471 (origin
5472 (method git-fetch)
5473 (uri (git-reference
5474 (url home-page)
5475 (commit version)))
5476 (file-name (git-file-name name version))
5477 (sha256
5478 (base32
5479 "0wlqvyqy9ccp7z981blv42aqwq7zfq93cakbahjyy48hiiir6vp2"))))
5480 (build-system dune-build-system)
5481 (arguments
5482 `(#:phases
5483 (modify-phases %standard-phases
5484 (add-after 'unpack 'fix-test-format
5485 (lambda _
5486 ;; Since sexplib >= 0.15, error formating has changed
5487 (substitute* "test/driver/exception_handling/run.t"
5488 (("\\(Failure ") "Failure("))
5489 (substitute* "test/base/test.ml"
5490 (("Invalid_argument \\((.*)\\)." _ m)
5491 (string-append "Invalid_argument " m "."))
5492 (("\\(Invalid_argument (.*)\\)" _ m)
5493 (string-append "Invalid_argument " m ".")))
5494 (substitute* "test/ppx_import_support/test.ml"
5495 (("\\(Failure") "Failure")
5496 ((" \"(Some ppx-es.*)\")" _ m)
5497 (string-append " \"" m "\"."))))))))
5498 (propagated-inputs
5499 (list ocaml-base
5500 ocaml-compiler-libs
5501 ocaml-migrate-parsetree
5502 ocaml-stdlib-shims
5503 ocaml-ppx-derivers
5504 ocaml-stdio
5505 ocaml-result
5506 ocaml-sexplib0))
5507 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
5508 (synopsis
5509 "Base library and tools for ppx rewriters")
5510 (description
5511 "A comprehensive toolbox for ppx development. It features:
5512 @itemize
5513 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5514 independent of the version of OCaml;
5515 @item a library for library for ppx rewriters in general, and type-driven code
5516 generators in particular;
5517 @item
5518 a feature-full driver for OCaml AST transformers;
5519 @item a quotation mechanism allowing to write values representing the
5520 OCaml AST in the OCaml syntax;
5521 @item a generator of open recursion classes from type definitions.
5522 @end itemize")
5523 (license license:expat)))
5524
5525 (define-public ocaml4.07-ppxlib
5526 (package-with-ocaml4.07
5527 (package
5528 (inherit ocaml-ppxlib)
5529 (name "ocaml-ppxlib")
5530 (version "0.6.0")
5531 (home-page "https://github.com/ocaml-ppx/ppxlib")
5532 (source
5533 (origin
5534 (method git-fetch)
5535 (uri (git-reference
5536 (url home-page)
5537 (commit version)))
5538 (file-name (git-file-name name version))
5539 (sha256
5540 (base32
5541 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
5542 (build-system dune-build-system)
5543 (arguments
5544 `(#:phases
5545 (modify-phases %standard-phases
5546 (add-before 'check 'set-topfind
5547 (lambda* (#:key inputs #:allow-other-keys)
5548 ;; add the line #directory ".." at the top of each file
5549 ;; using #use "topfind";; to be able to find topfind
5550 (let* ((findlib-path (assoc-ref inputs "findlib"))
5551 (findlib-libdir
5552 (string-append findlib-path "/lib/ocaml/site-lib")))
5553 (substitute* '("test/base/test.ml"
5554 "test/code_path/test.ml"
5555 "test/deriving/test.ml"
5556 "test/driver/attributes/test.ml"
5557 "test/driver/non-compressible-suffix/test.ml"
5558 "test/driver/transformations/test.ml")
5559 (("#use \"topfind\";;" all)
5560 (string-append "#directory \"" findlib-libdir "\"\n"
5561 all))))
5562 #t)))))
5563 (properties '()))))
5564
5565 (define-public ocaml-ppx-compare
5566 (package
5567 (name "ocaml-ppx-compare")
5568 (version "0.15.0")
5569 (source
5570 (janestreet-origin "ppx_compare" version
5571 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
5572 (build-system dune-build-system)
5573 (arguments
5574 ;; Tests are currenlty failing
5575 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
5576 '(#:tests? #f))
5577 (propagated-inputs
5578 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5579 (properties `((upstream-name . "ppx_compare")
5580 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
5581 (home-page "https://github.com/janestreet/ppx_compare")
5582 (synopsis "Generation of comparison functions from types")
5583 (description "Generation of fast comparison functions from type expressions
5584 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
5585 from type representations. The scaffolded functions are usually much faster
5586 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
5587 flexibility by allowing you to override them for a specific type and more safety
5588 by making sure that you only compare comparable values.")
5589 (license license:asl2.0)))
5590
5591 (define-public ocaml4.07-ppx-compare
5592 (package-with-ocaml4.07
5593 (package
5594 (inherit ocaml-ppx-compare)
5595 (name "ocaml-ppx-compare")
5596 (version "0.11.1")
5597 (home-page "https://github.com/janestreet/ppx_compare")
5598 (source (origin
5599 (method git-fetch)
5600 (uri (git-reference
5601 (url home-page)
5602 (commit (string-append "v" version))))
5603 (file-name (git-file-name name version))
5604 (sha256
5605 (base32
5606 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
5607 (properties `((upstream-name . "ppx_compare"))))))
5608
5609 (define-public ocaml-fieldslib
5610 (package
5611 (name "ocaml-fieldslib")
5612 (version "0.15.0")
5613 (source (janestreet-origin
5614 "fieldslib" version
5615 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
5616 (build-system dune-build-system)
5617 (arguments `(#:tests? #f)) ; No tests
5618 (propagated-inputs
5619 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5620 (properties `((upstream-name . "fieldslib")
5621 (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
5622 (home-page "https://github.com/janestreet/fieldslib")
5623 (synopsis "Syntax extension to record fields")
5624 (description "Syntax extension to define first class values representing
5625 record fields, to get and set record fields, iterate and fold over all fields
5626 of a record and create new record values.")
5627 (license license:asl2.0)))
5628
5629 (define-public ocaml4.07-fieldslib
5630 (package-with-ocaml4.07
5631 (package
5632 (inherit ocaml-fieldslib)
5633 (version "0.11.0")
5634 (source (janestreet-origin
5635 "fieldslib" version
5636 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
5637 (properties `((upstream-name . "fieldslib"))))))
5638
5639 (define-public ocaml-variantslib
5640 (package
5641 (name "ocaml-variantslib")
5642 (version "0.15.0")
5643 (source
5644 (janestreet-origin "variantslib" version
5645 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
5646 (build-system dune-build-system)
5647 (arguments
5648 ;; No tests
5649 `(#:tests? #f))
5650 (propagated-inputs
5651 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5652 (properties `((upstream-name . "variantslib")
5653 (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
5654 (home-page "https://github.com/janestreet/variantslib")
5655 (synopsis "OCaml variants as first class values")
5656 (description "The Core suite of libraries is an alternative to OCaml's
5657 standard library.")
5658 (license license:asl2.0)))
5659
5660 (define-public ocaml4.07-variantslib
5661 (package-with-ocaml4.07
5662 (package
5663 (inherit ocaml-variantslib)
5664 (name "ocaml-variantslib")
5665 (version "0.11.0")
5666 (source (origin
5667 (method url-fetch)
5668 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5669 (version-major+minor version)
5670 "/files/variantslib-v" version ".tar.gz"))
5671 (sha256
5672 (base32
5673 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
5674 (properties `((upstream-name . "variantslib"))))))
5675
5676 (define-public ocaml-ppx-fields-conv
5677 (package
5678 (name "ocaml-ppx-fields-conv")
5679 (version "0.15.0")
5680 (home-page "https://github.com/janestreet/ppx_fields_conv")
5681 (source
5682 (origin
5683 (method git-fetch)
5684 (uri (git-reference
5685 (url home-page)
5686 (commit (string-append "v" version))))
5687 (file-name (git-file-name name version))
5688 (sha256
5689 (base32
5690 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
5691 (build-system dune-build-system)
5692 (propagated-inputs
5693 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
5694 ocaml-ppxlib))
5695 (properties `((upstream-name . "ppx_fields_conv")
5696 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
5697 (synopsis "Generation of accessor and iteration functions for ocaml records")
5698 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
5699 first class values representing record fields, and additional routines, to get
5700 and set record fields, iterate and fold over all fields of a record and create
5701 new record values.")
5702 (license license:asl2.0)))
5703
5704 (define-public ocaml4.07-ppx-fields-conv
5705 (package-with-ocaml4.07
5706 (package
5707 (inherit ocaml-ppx-fields-conv)
5708 (version "0.11.0")
5709 (source (janestreet-origin
5710 "ppx_fields_conv" version
5711 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
5712 (properties `((upstream-name . "ppx_fields_conv"))))))
5713
5714 (define-public ocaml-ppx-sexp-conv
5715 (package
5716 (name "ocaml-ppx-sexp-conv")
5717 (version "0.15.0")
5718 (home-page "https://github.com/janestreet/ppx_sexp_conv")
5719 (source
5720 (origin
5721 (method git-fetch)
5722 (uri (git-reference
5723 (url home-page)
5724 (commit (string-append "v" version))))
5725 (file-name (git-file-name name version))
5726 (sha256
5727 (base32
5728 "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"))))
5729 (build-system dune-build-system)
5730 (propagated-inputs
5731 (list ocaml-base ocaml-ppxlib))
5732 (properties `((upstream-name . "ppx_sexp_conv")
5733 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
5734 (synopsis "Generation of S-expression conversion functions from type definitions")
5735 (description "This package generates S-expression conversion functions from type
5736 definitions.")
5737 (license license:asl2.0)))
5738
5739 (define-public ocaml4.07-ppx-sexp-conv
5740 (package-with-ocaml4.07
5741 (package
5742 (inherit ocaml-ppx-sexp-conv)
5743 (name "ocaml-ppx-sexp-conv")
5744 (version "0.11.2")
5745 (source (origin
5746 (method git-fetch)
5747 (uri (git-reference
5748 (url "https://github.com/janestreet/ppx_sexp_conv")
5749 (commit (string-append "v" version))))
5750 (file-name (git-file-name name version))
5751 (sha256
5752 (base32
5753 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
5754 (properties `((upstream-name . "ppx_sexp_conv"))))))
5755
5756 (define-public ocaml-ppx-variants-conv
5757 (package
5758 (name "ocaml-ppx-variants-conv")
5759 (version "0.15.0")
5760 (source
5761 (origin
5762 (method git-fetch)
5763 (uri (git-reference
5764 (url "https://github.com/janestreet/ppx_variants_conv")
5765 (commit (string-append "v" version))))
5766 (file-name (git-file-name name version))
5767 (sha256
5768 (base32
5769 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
5770 (build-system dune-build-system)
5771 (propagated-inputs
5772 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
5773 ocaml-ppxlib))
5774 (properties
5775 `((upstream-name . "ppx_variants_conv")
5776 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
5777 (home-page
5778 "https://github.com/janestreet/ppx_variants_conv")
5779 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
5780 (description
5781 "This package generates accessors and iteration functions for OCaml
5782 variant types.")
5783 (license license:asl2.0)))
5784
5785 (define-public ocaml4.07-ppx-variants-conv
5786 (package-with-ocaml4.07
5787 (package
5788 (inherit ocaml-ppx-variants-conv)
5789 (name "ocaml-ppx-variants-conv")
5790 (version "0.11.1")
5791 (source
5792 (origin
5793 (method git-fetch)
5794 (uri (git-reference
5795 (url "https://github.com/janestreet/ppx_variants_conv")
5796 (commit (string-append "v" version))))
5797 (file-name (git-file-name name version))
5798 (sha256
5799 (base32
5800 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
5801 (properties `((upstream-name . "ppx_variants_conv"))))))
5802
5803 (define-public ocaml-ppx-custom-printf
5804 (package
5805 (name "ocaml-ppx-custom-printf")
5806 (version "0.15.0")
5807 (home-page "https://github.com/janestreet/ppx_custom_printf")
5808 (source
5809 (origin
5810 (method git-fetch)
5811 (uri (git-reference
5812 (url home-page)
5813 (commit (string-append "v" version))))
5814 (file-name (git-file-name name version))
5815 (sha256
5816 (base32
5817 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
5818 (build-system dune-build-system)
5819 (propagated-inputs
5820 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
5821 ocaml-ppxlib))
5822 (properties `((upstream-name . "ppx_custom_printf")
5823 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
5824 (synopsis "Printf-style format-strings for user-defined string conversion")
5825 (description "Extensions to printf-style format-strings for user-defined
5826 string conversion.")
5827 (license license:asl2.0)))
5828
5829 (define-public ocaml4.07-ppx-custom-printf
5830 (package-with-ocaml4.07
5831 (package
5832 (inherit ocaml-ppx-custom-printf)
5833 (version "0.11.0")
5834 (source
5835 (janestreet-origin
5836 "ppx_custom_printf" version
5837 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
5838 (properties `((upstream-name . "ppx_custom_printf"))))))
5839
5840 (define-public ocaml-bin-prot
5841 (package
5842 (name "ocaml-bin-prot")
5843 (version "0.15.0")
5844 (source
5845 (origin
5846 (method git-fetch)
5847 (uri (git-reference
5848 (url "https://github.com/janestreet/bin_prot")
5849 (commit (string-append "v" version))))
5850 (file-name (git-file-name name version))
5851 (sha256
5852 (base32 "1qfqglscc25wwnjx7byqmjcnjww1msnr8940gyg8h93wdq43fjnh"))))
5853 (build-system dune-build-system)
5854 (propagated-inputs
5855 (list ocaml-base
5856 ocaml-ppx-compare
5857 ocaml-ppx-custom-printf
5858 ocaml-ppx-fields-conv
5859 ocaml-ppx-optcomp
5860 ocaml-ppx-sexp-conv
5861 ocaml-ppx-variants-conv))
5862 (properties `((upstream-name . "bin_prot")
5863 (ocaml4.07-variant . ,(delay ocaml4.07-bin-prot))))
5864 (home-page "https://github.com/janestreet/bin_prot")
5865 (synopsis "Binary protocol generator")
5866 (description "This library contains functionality for reading and writing
5867 OCaml-values in a type-safe binary protocol. It is extremely efficient,
5868 typically supporting type-safe marshalling and unmarshalling of even highly
5869 structured values at speeds sufficient to saturate a gigabit connection. The
5870 protocol is also heavily optimized for size, making it ideal for long-term
5871 storage of large amounts of data.")
5872 (license license:expat)))
5873
5874 (define-public ocaml4.07-bin-prot
5875 (package-with-ocaml4.07
5876 (package
5877 (inherit ocaml-bin-prot)
5878 (version "0.11.0")
5879 (source (origin
5880 (method url-fetch)
5881 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5882 (version-major+minor version)
5883 "/files/bin_prot-v" version ".tar.gz"))
5884 (sha256
5885 (base32
5886 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
5887 (propagated-inputs (list ocaml-base
5888 ocaml-ppx-compare
5889 ocaml-ppx-custom-printf
5890 ocaml-ppx-fields-conv
5891 ocaml-ppx-variants-conv
5892 ocaml-migrate-parsetree))
5893 (properties '())
5894 (license (list
5895 license:asl2.0
5896 license:bsd-3)))))
5897
5898 (define-public ocaml-octavius
5899 (package
5900 (name "ocaml-octavius")
5901 (version "1.2.2")
5902 (source (origin
5903 (method git-fetch)
5904 (uri (git-reference
5905 (url "https://github.com/ocaml-doc/octavius")
5906 (commit (string-append "v" version))))
5907 (file-name (git-file-name name version))
5908 (sha256
5909 (base32
5910 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
5911 (build-system dune-build-system)
5912 (arguments
5913 `(#:phases
5914 (modify-phases %standard-phases
5915 (add-before 'build 'make-writable
5916 (lambda _
5917 (for-each (lambda (file)
5918 (chmod file #o644))
5919 (find-files "." "."))
5920 #t)))))
5921 (properties `((upstream-name . "octavius")))
5922 (home-page "https://github.com/ocaml-doc/octavius")
5923 (synopsis "Ocamldoc comment syntax parser")
5924 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
5925 (license license:isc)))
5926
5927 (define-public ocaml-sha
5928 (package
5929 (name "ocaml-sha")
5930 (version "1.15.2")
5931 (source (origin
5932 (method url-fetch)
5933 (uri (string-append "https://github.com/djs55/ocaml-sha/releases/download/"
5934 version "/sha-" version ".tbz"))
5935 (sha256
5936 (base32
5937 "1dzzhchknnbrpp5s81iqbvmqp4s0l75yrq8snj70ch3wkarmgg9z"))))
5938 (build-system dune-build-system)
5939 (propagated-inputs (list ocaml-stdlib-shims ocaml-odoc))
5940 (native-inputs (list ocaml-ounit2))
5941 (home-page "https://github.com/djs55/ocaml-sha")
5942 (synopsis "OCaml binding to the SHA cryptographic functions")
5943 (description
5944 "This is the binding for SHA interface code in OCaml, offering the same
5945 interface as the MD5 digest included in the OCaml standard library. It
5946 currently provides SHA1, SHA256 and SHA512 hash functions.")
5947 (license license:isc)))
5948
5949 (define-public ocaml-ppx-hash
5950 (package
5951 (name "ocaml-ppx-hash")
5952 (version "0.15.0")
5953 (source
5954 (janestreet-origin "ppx_hash" version
5955 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
5956 (build-system dune-build-system)
5957 (propagated-inputs
5958 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
5959 ocaml-migrate-parsetree ocaml-ppxlib))
5960 (properties `((upstream-name . "ppx_hash")
5961 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
5962 (home-page "https://github.com/janestreet/ppx_hash")
5963 (synopsis "Generation of hash functions from type expressions and definitions")
5964 (description "This package is a collection of ppx rewriters that generate
5965 hash functions from type exrpessions and definitions.")
5966 (license license:asl2.0)))
5967
5968 (define-public ocaml4.07-ppx-hash
5969 (package-with-ocaml4.07
5970 (package
5971 (inherit ocaml-ppx-hash)
5972 (name "ocaml-ppx-hash")
5973 (home-page "https://github.com/janestreet/ppx_hash")
5974 (version "0.11.1")
5975 (source (origin
5976 (method git-fetch)
5977 (uri (git-reference
5978 (url home-page)
5979 (commit (string-append "v" version))))
5980 (file-name (git-file-name name version))
5981 (sha256
5982 (base32
5983 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
5984 (properties `((upstream-name . "ppx_hash"))))))
5985
5986 (define-public ocaml-ppx-enumerate
5987 (package
5988 (name "ocaml-ppx-enumerate")
5989 (version "0.15.0")
5990 (source
5991 (janestreet-origin
5992 "ppx_enumerate" version
5993 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
5994 (build-system dune-build-system)
5995 (arguments
5996 `(#:tests? #f)) ; no test suite
5997 (propagated-inputs
5998 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5999 (properties `((upstream-name . "ppx_enumerate")
6000 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
6001 (home-page "https://github.com/janestreet/ppx_enumerate")
6002 (synopsis "Generate a list containing all values of a finite type")
6003 (description "Ppx_enumerate is a ppx rewriter which generates a definition
6004 for the list of all values of a type (for a type which only has finitely
6005 many values).")
6006 (license license:asl2.0)))
6007
6008 (define-public ocaml4.07-ppx-enumerate
6009 (package-with-ocaml4.07
6010 (package
6011 (inherit ocaml-ppx-enumerate)
6012 (name "ocaml-ppx-enumerate")
6013 (version "0.11.1")
6014 (home-page "https://github.com/janestreet/ppx_enumerate")
6015 (source (origin
6016 (method git-fetch)
6017 (uri (git-reference
6018 (url home-page)
6019 (commit (string-append "v" version))))
6020 (file-name (git-file-name name version))
6021 (sha256
6022 (base32
6023 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
6024 (properties `((upstream-name . "ppx_enumerate"))))))
6025
6026 (define-public ocaml-ppx-bench
6027 (package
6028 (name "ocaml-ppx-bench")
6029 (version "0.15.0")
6030 (source
6031 (origin
6032 (method git-fetch)
6033 (uri (git-reference
6034 (url "https://github.com/janestreet/ppx_bench")
6035 (commit (string-append "v" version))))
6036 (file-name (git-file-name name version))
6037 (sha256
6038 (base32 "0bc0gbm922417wqisafxh35jslcp7xy1s0h0a1q32rhx0ivxx3g6"))))
6039 (build-system dune-build-system)
6040 (arguments
6041 ;; No tests
6042 `(#:tests? #f))
6043 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
6044 (properties `((upstream-name . "ppx_bench")
6045 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bench))))
6046 (home-page "https://github.com/janestreet/ppx_bench")
6047 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
6048 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
6049 (license license:expat)))
6050
6051 (define-public ocaml4.07-ppx-bench
6052 (package-with-ocaml4.07
6053 (package
6054 (inherit ocaml-ppx-bench)
6055 (version "0.11.0")
6056 (source (origin
6057 (method url-fetch)
6058 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6059 (version-major+minor version)
6060 "/files/ppx_bench-v" version ".tar.gz"))
6061 (sha256
6062 (base32
6063 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
6064 (propagated-inputs
6065 (list ocaml-ppx-inline-test ocaml-migrate-parsetree ocaml-ppxlib))
6066 (properties '())
6067 (license license:asl2.0))))
6068
6069 (define-public ocaml-ppx-here
6070 (package
6071 (name "ocaml-ppx-here")
6072 (version "0.15.0")
6073 (source
6074 (janestreet-origin "ppx_here" version
6075 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
6076 (build-system dune-build-system)
6077 (arguments
6078 ;; broken tests
6079 `(#:tests? #f))
6080 (propagated-inputs
6081 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6082 (properties `((upstream-name . "ppx_here")
6083 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
6084 (home-page "https://github.com/janestreet/ppx_here")
6085 (synopsis "Expands [%here] into its location")
6086 (description
6087 "Part of the Jane Street's PPX rewriters collection.")
6088 (license license:asl2.0)))
6089
6090 (define-public ocaml4.07-ppx-here
6091 (package-with-ocaml4.07
6092 (package
6093 (inherit ocaml-ppx-here)
6094 (version "0.11.0")
6095 (source
6096 (janestreet-origin "ppx_here" version
6097 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
6098 (properties `((upstream-name . "ppx_here"))))))
6099
6100 (define-public ocaml-typerep
6101 (package
6102 (name "ocaml-typerep")
6103 (version "0.15.0")
6104 (source
6105 (origin
6106 (method git-fetch)
6107 (uri (git-reference
6108 (url "https://github.com/janestreet/typerep")
6109 (commit (string-append "v" version))))
6110 (file-name (git-file-name name version))
6111 (sha256
6112 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
6113 (build-system dune-build-system)
6114 (arguments `(#:tests? #f)); no tests
6115 (propagated-inputs (list ocaml-base))
6116 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-typerep))))
6117 (home-page "https://github.com/janestreet/typerep")
6118 (synopsis "Typerep is a library for runtime types")
6119 (description "Typerep is a library for runtime types.")
6120 (license license:expat)))
6121
6122 (define-public ocaml4.07-typerep
6123 (package-with-ocaml4.07
6124 (package
6125 (inherit ocaml-typerep)
6126 (version "0.11.0")
6127 (source (origin
6128 (method url-fetch)
6129 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6130 (version-major+minor version)
6131 "/files/typerep-v" version ".tar.gz"))
6132 (sha256
6133 (base32
6134 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
6135 (properties '())
6136 (license license:asl2.0))))
6137
6138 (define-public ocaml-ppx-sexp-value
6139 (package
6140 (name "ocaml-ppx-sexp-value")
6141 (version "0.15.0")
6142 (source
6143 (origin
6144 (method git-fetch)
6145 (uri (git-reference
6146 (url "https://github.com/janestreet/ppx_sexp_value")
6147 (commit (string-append "v" version))))
6148 (file-name (git-file-name name version))
6149 (sha256
6150 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
6151 (build-system dune-build-system)
6152 (propagated-inputs
6153 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6154 (properties `((upstream-name . "ppx_sexp_value")
6155 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-value))))
6156 (home-page "https://github.com/janestreet/ppx_sexp_value")
6157 (synopsis "Simplify building s-expressions from ocaml values")
6158 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
6159 building s-expressions from ocaml values.")
6160 (license license:expat)))
6161
6162 (define-public ocaml4.07-ppx-sexp-value
6163 (package-with-ocaml4.07
6164 (package
6165 (inherit ocaml-ppx-sexp-value)
6166 (version "0.11.0")
6167 (source (origin
6168 (method url-fetch)
6169 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6170 (version-major+minor version)
6171 "/files/ppx_sexp_value-v" version ".tar.gz"))
6172 (sha256
6173 (base32
6174 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
6175 (propagated-inputs
6176 (list ocaml-base
6177 ocaml-ppx-here
6178 ocaml-ppx-sexp-conv
6179 ocaml-migrate-parsetree
6180 ocaml-ppxlib))
6181 (properties '())
6182 (license license:asl2.0))))
6183
6184 (define-public ocaml-ppx-sexp-message
6185 (package
6186 (name "ocaml-ppx-sexp-message")
6187 (version "0.15.0")
6188 (source
6189 (origin
6190 (method git-fetch)
6191 (uri (git-reference
6192 (url "https://github.com/janestreet/ppx_sexp_message")
6193 (commit (string-append "v" version))))
6194 (file-name (git-file-name name version))
6195 (sha256
6196 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
6197 (build-system dune-build-system)
6198 (propagated-inputs
6199 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6200 (properties `((upstream-name . "ppx_sexp_message")
6201 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-message))))
6202 (home-page "https://github.com/janestreet/ppx_sexp_message")
6203 (synopsis "Ppx rewriter for easy construction of s-expressions")
6204 (description "Ppx_sexp_message aims to ease the creation of s-expressions
6205 in OCaml. This is mainly motivated by writing error and debugging messages,
6206 where one needs to construct a s-expression based on various element of the
6207 context such as function arguments.")
6208 (license license:expat)))
6209
6210 (define-public ocaml4.07-ppx-sexp-message
6211 (package-with-ocaml4.07
6212 (package
6213 (inherit ocaml-ppx-sexp-message)
6214 (version "0.11.0")
6215 (source (origin
6216 (method url-fetch)
6217 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6218 (version-major+minor version)
6219 "/files/ppx_sexp_message-v" version ".tar.gz"))
6220 (sha256
6221 (base32
6222 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
6223 (propagated-inputs
6224 (list ocaml-base
6225 ocaml-ppx-here
6226 ocaml-ppx-sexp-conv
6227 ocaml-migrate-parsetree
6228 ocaml-ppxlib))
6229 (properties '())
6230 (license license:asl2.0))))
6231
6232 (define-public ocaml-ppx-pipebang
6233 (package
6234 (name "ocaml-ppx-pipebang")
6235 (version "0.15.0")
6236 (source
6237 (origin
6238 (method git-fetch)
6239 (uri (git-reference
6240 (url "https://github.com/janestreet/ppx_pipebang")
6241 (commit (string-append "v" version))))
6242 (file-name (git-file-name name version))
6243 (sha256
6244 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
6245 (build-system dune-build-system)
6246 (arguments `(#:tests? #f)); no tests
6247 (propagated-inputs (list ocaml-ppxlib))
6248 (properties `((upstream-name . "ppx_pipebang")
6249 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-pipebang))))
6250 (home-page "https://github.com/janestreet/ppx_pipebang")
6251 (synopsis "Inline reverse application operators `|>` and `|!`")
6252 (description "A ppx rewriter that inlines reverse application operators
6253 @code{|>} and @code{|!}.")
6254 (license license:expat)))
6255
6256 (define-public ocaml4.07-ppx-pipebang
6257 (package-with-ocaml4.07
6258 (package
6259 (inherit ocaml-ppx-pipebang)
6260 (version "0.11.0")
6261 (source (origin
6262 (method url-fetch)
6263 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6264 (version-major+minor version)
6265 "/files/ppx_pipebang-v" version ".tar.gz"))
6266 (sha256
6267 (base32
6268 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
6269 (propagated-inputs (list ocaml-migrate-parsetree ocaml-ppxlib))
6270 (properties '())
6271 (license license:asl2.0))))
6272
6273 (define-public ocaml-ppx-module-timer
6274 (package
6275 (name "ocaml-ppx-module-timer")
6276 (version "0.15.0")
6277 (source
6278 (origin
6279 (method git-fetch)
6280 (uri (git-reference
6281 (url "https://github.com/janestreet/ppx_module_timer")
6282 (commit (string-append "v" version))))
6283 (file-name (git-file-name name version))
6284 (sha256
6285 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
6286 (build-system dune-build-system)
6287 (arguments
6288 `(#:tests? #f)); no tests
6289 (propagated-inputs
6290 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
6291 (properties `((upstream-name . "ppx_module_timer")))
6292 (home-page "https://github.com/janestreet/ppx_module_timer")
6293 (synopsis "Ppx rewriter that records top-level module startup times")
6294 (description "Modules using @samp{ppx_module_timer} have instrumentation
6295 to record their startup time.")
6296 (license license:expat)))
6297
6298 (define-public ocaml-ppx-fixed-literal
6299 (package
6300 (name "ocaml-ppx-fixed-literal")
6301 (version "0.15.0")
6302 (source
6303 (origin
6304 (method git-fetch)
6305 (uri (git-reference
6306 (url "https://github.com/janestreet/ppx_fixed_literal")
6307 (commit (string-append "v" version))))
6308 (file-name (git-file-name name version))
6309 (sha256
6310 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
6311 (build-system dune-build-system)
6312 (arguments
6313 `(#:tests? #f)); no tests
6314 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6315 (properties `((upstream-name . "ppx_fixed_literal")))
6316 (home-page "https://github.com/janestreet/ppx_fixed_literal")
6317 (synopsis "Simpler notation for fixed point literals")
6318 (description
6319 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
6320 literal of the form 1.0v to conversion functions currently in scope.")
6321 (license license:expat)))
6322
6323 (define-public ocaml-ppx-optional
6324 (package
6325 (name "ocaml-ppx-optional")
6326 (version "0.15.0")
6327 (source
6328 (janestreet-origin
6329 "ppx_optional" version
6330 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
6331 (build-system dune-build-system)
6332 (arguments `(#:tests? #f)) ; No tests
6333 (propagated-inputs
6334 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6335 (properties `((upstream-name . "ppx_optional")
6336 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
6337 (home-page "https://github.com/janestreet/ppx_optional")
6338 (synopsis "Pattern matching on flat options")
6339 (description
6340 "A ppx rewriter that rewrites simple match statements with an if then
6341 else expression.")
6342 (license license:asl2.0)))
6343
6344 (define-public ocaml4.07-ppx-optional
6345 (package-with-ocaml4.07
6346 (package
6347 (inherit ocaml-ppx-optional)
6348 (version "0.11.0")
6349 (source
6350 (janestreet-origin
6351 "ppx_optional" version
6352 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
6353 (properties `((upstream-name . "ppx_optional"))))))
6354
6355 (define-public ocaml-ppx-optcomp
6356 (package
6357 (name "ocaml-ppx-optcomp")
6358 (version "0.15.0")
6359 (home-page "https://github.com/janestreet/ppx_optcomp")
6360 (source
6361 (origin
6362 (method git-fetch)
6363 (uri (git-reference
6364 (url home-page)
6365 (commit (string-append "v" version))))
6366 (file-name (git-file-name name version))
6367 (sha256
6368 (base32
6369 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
6370 (build-system dune-build-system)
6371 (propagated-inputs
6372 (list ocaml-base ocaml-stdio ocaml-ppxlib))
6373 (properties `((upstream-name . "ppx_optcomp")
6374 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
6375 (synopsis "Optional compilation for OCaml")
6376 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
6377 used to handle optional compilations of pieces of code depending of the word
6378 size, the version of the compiler, ...")
6379 (license license:asl2.0)))
6380
6381 (define-public ocaml4.07-ppx-optcomp
6382 (package-with-ocaml4.07
6383 (package
6384 (inherit ocaml-ppx-optcomp)
6385 (version "0.11.0")
6386 (source
6387 (janestreet-origin
6388 "ppx_optcomp" version
6389 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
6390 (properties `((upstream-name . "ppx_optcomp"))))))
6391
6392 (define-public ocaml-ppx-let
6393 (package
6394 (name "ocaml-ppx-let")
6395 (version "0.15.0")
6396 (source
6397 (janestreet-origin "ppx_let" version
6398 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
6399 (build-system dune-build-system)
6400 (propagated-inputs
6401 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
6402 (properties `((upstream-name . "ppx_let")
6403 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
6404 (home-page "https://github.com/janestreet/ppx_let")
6405 (synopsis "Monadic let-bindings")
6406 (description "A ppx rewriter for monadic and applicative let bindings,
6407 match expressions, and if expressions.")
6408 (license license:asl2.0)))
6409
6410 (define-public ocaml4.07-ppx-let
6411 (package-with-ocaml4.07
6412 (package
6413 (inherit ocaml-ppx-let)
6414 (version "0.11.0")
6415 (source
6416 (janestreet-origin "ppx_let" version
6417 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
6418
6419 (properties `((upstream-name . "ppx_let"))))))
6420
6421 (define-public ocaml-ppx-fail
6422 (package
6423 (name "ocaml-ppx-fail")
6424 (version "0.14.0")
6425 (source
6426 (origin
6427 (method git-fetch)
6428 (uri (git-reference
6429 (url "https://github.com/janestreet/ppx_fail")
6430 (commit (string-append "v" version))))
6431 (file-name (git-file-name name version))
6432 (sha256
6433 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
6434 (build-system dune-build-system)
6435 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
6436 (properties `((upstream-name . "ppx_fail")
6437 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fail))))
6438 (home-page "https://github.com/janestreet/ppx_fail")
6439 (synopsis "Add location to calls to failwiths")
6440 (description "Syntax extension that makes [failwiths] always include a
6441 position.")
6442 (license license:expat)))
6443
6444 (define-public ocaml4.07-ppx-fail
6445 (package-with-ocaml4.07
6446 (package
6447 (inherit ocaml-ppx-fail)
6448 (version "0.11.0")
6449 (source (origin
6450 (method url-fetch)
6451 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6452 (version-major+minor version)
6453 "/files/ppx_fail-v" version ".tar.gz"))
6454 (sha256
6455 (base32
6456 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
6457 (propagated-inputs
6458 (list ocaml-base ocaml-ppx-here ocaml-migrate-parsetree ocaml-ppxlib))
6459 (properties '())
6460 (license license:asl2.0))))
6461
6462 (define-public ocaml-ppx-cold
6463 (package
6464 (name "ocaml-ppx-cold")
6465 (version "0.15.0")
6466 (home-page "https://github.com/janestreet/ppx_cold")
6467 (source
6468 (janestreet-origin "ppx_cold" version
6469 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
6470 (build-system dune-build-system)
6471 (arguments `(#:test-target "tests"))
6472 (propagated-inputs
6473 (list ocaml-base ocaml-ppxlib))
6474 (properties `((upstream-name . "ppx_cold")))
6475 (synopsis "Syntax extension for indicating cold path")
6476 (description
6477 "This package contains an syntax extension to indicate that the code is
6478 on the cold path and should be kept out of the way to avoid polluting the
6479 instruction cache on the hot path. See also
6480 https://github.com/ocaml/ocaml/issues/8563.")
6481 (license license:expat)))
6482
6483 (define-public ocaml-ppx-assert
6484 (package
6485 (name "ocaml-ppx-assert")
6486 (version "0.15.0")
6487 (source
6488 (janestreet-origin "ppx_assert" version
6489 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
6490 (build-system dune-build-system)
6491 (propagated-inputs
6492 (list ocaml-base
6493 ocaml-ppx-cold
6494 ocaml-ppx-compare
6495 ocaml-ppx-here
6496 ocaml-ppx-sexp-conv
6497 ocaml-migrate-parsetree
6498 ocaml-ppxlib))
6499 (properties `((upstream-name . "ppx_assert")
6500 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
6501 (home-page "https://github.com/janestreet/ppx_assert")
6502 (synopsis "Assert-like extension nodes that raise useful errors on failure")
6503 (description "This package contains assert-like extension nodes that raise
6504 useful errors on failure.")
6505 (license license:asl2.0)))
6506
6507 (define-public ocaml4.07-ppx-assert
6508 (package-with-ocaml4.07
6509 (package
6510 (inherit ocaml-ppx-assert)
6511 (version "0.11.0")
6512 (source
6513 (janestreet-origin "ppx_assert" version
6514 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
6515 (propagated-inputs
6516 `(("ocaml-base" ,ocaml-base)
6517 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6518 ("ocaml-ppx-here" ,ocaml-ppx-here)
6519 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6520 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6521 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6522 (properties `((upstream-name . "ppx_assert"))))))
6523
6524 (define-public ocaml-ppx-expect
6525 (package
6526 (name "ocaml-ppx-expect")
6527 (version "0.15.0")
6528 (source
6529 (origin
6530 (method git-fetch)
6531 (uri (git-reference
6532 (url "https://github.com/janestreet/ppx_expect")
6533 (commit (string-append "v" version))))
6534 (file-name (git-file-name name version))
6535 (sha256
6536 (base32
6537 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
6538 (build-system dune-build-system)
6539 (propagated-inputs
6540 (list ocaml-base
6541 ocaml-ppx-here
6542 ocaml-ppx-inline-test
6543 ocaml-stdio
6544 ocaml-ppxlib
6545 ocaml-migrate-parsetree
6546 ocaml-re))
6547 (properties `((upstream-name . "ppx_expect")
6548 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
6549 (home-page "https://github.com/janestreet/ppx_expect")
6550 (synopsis "Cram like framework for OCaml")
6551 (description "Expect-test is a framework for writing tests in OCaml, similar
6552 to Cram. Expect-tests mimics the existing inline tests framework with the
6553 @code{let%expect_test} construct. The body of an expect-test can contain
6554 output-generating code, interleaved with @code{%expect} extension expressions
6555 to denote the expected output.")
6556 (license license:asl2.0)))
6557
6558 (define-public ocaml4.07-ppx-expect
6559 (package-with-ocaml4.07
6560 (package
6561 (inherit ocaml-ppx-expect)
6562 (version "0.12.0")
6563 (source
6564 (janestreet-origin "ppx_expect" version
6565 "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
6566 (propagated-inputs
6567 `(("ocaml-base" ,ocaml-base)
6568 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
6569 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6570 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
6571 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
6572 ("ocaml-ppx-here" ,ocaml-ppx-here)
6573 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
6574 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6575 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
6576 ("ocaml-stdio" ,ocaml-stdio)
6577 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6578 ("ocaml-ppxlib" ,ocaml-ppxlib)
6579 ("ocaml-re" ,ocaml-re)))
6580 (properties `((upstream-name . "ppx_expect"))))))
6581
6582 (define-public ocaml-ppx-js-style
6583 (package
6584 (name "ocaml-ppx-js-style")
6585 (version "0.15.0")
6586 (source
6587 (origin
6588 (method git-fetch)
6589 (uri (git-reference
6590 (url "https://github.com/janestreet/ppx_js_style")
6591 (commit (string-append "v" version))))
6592 (file-name (git-file-name name version))
6593 (sha256
6594 (base32
6595 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
6596 (build-system dune-build-system)
6597 (arguments `(#:tests? #f)) ; No tests
6598 (propagated-inputs
6599 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
6600 (properties `((upstream-name . "ppx_js_style")
6601 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
6602 (home-page "https://github.com/janestreet/ppx_js_style")
6603 (synopsis "Code style checker for Jane Street Packages")
6604 (description "This package is a no-op ppx rewriter. It is used as a
6605 @code{lint} tool to enforce some coding conventions across all Jane Street
6606 packages.")
6607 (license license:asl2.0)))
6608
6609 (define-public ocaml4.07-ppx-js-style
6610 (package-with-ocaml4.07
6611 (package
6612 (inherit ocaml-ppx-js-style)
6613 (version "0.11.0")
6614 (source
6615 (janestreet-origin "ppx_js_style" version
6616 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
6617 (properties `((upstream-name . "ppx_js_style"))))))
6618
6619 (define-public ocaml-ppx-typerep-conv
6620 (package
6621 (name "ocaml-ppx-typerep-conv")
6622 (version "0.15.0")
6623 (source
6624 (origin
6625 (method git-fetch)
6626 (uri (git-reference
6627 (url "https://github.com/janestreet/ppx_typerep_conv/")
6628 (commit (string-append "v" version))))
6629 (file-name (git-file-name name version))
6630 (sha256
6631 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
6632 (build-system dune-build-system)
6633 (arguments
6634 `(#:test-target "."))
6635 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
6636 (properties `((upstream-name . "ppx_typerep_conv")
6637 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
6638 (home-page "https://github.com/janestreet/ppx_typerep_conv")
6639 (synopsis "Generation of runtime types from type declarations")
6640 (description "This package can automatically generate runtime types
6641 from type definitions.")
6642 (license license:expat)))
6643
6644 (define-public ocaml4.07-ppx-typerep-conv
6645 (package-with-ocaml4.07
6646 (package
6647 (inherit ocaml-ppx-typerep-conv)
6648 (version "0.11.1")
6649 (source (origin
6650 (method git-fetch)
6651 (uri (git-reference
6652 (url "https://github.com/janestreet/ppx_typerep_conv")
6653 (commit (string-append "v" version))))
6654 (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
6655 (sha256
6656 (base32
6657 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
6658 (properties '())
6659 (propagated-inputs
6660 (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
6661 (license license:asl2.0))))
6662
6663 (define-public ocaml-ppx-string
6664 (package
6665 (name "ocaml-ppx-string")
6666 (version "0.15.0")
6667 (source
6668 (origin
6669 (method git-fetch)
6670 (uri (git-reference
6671 (url "https://github.com/janestreet/ppx_string")
6672 (commit (string-append "v" version))))
6673 (file-name (git-file-name name version))
6674 (sha256
6675 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
6676 (build-system dune-build-system)
6677 (arguments `(#:tests? #f)); no tests
6678 (propagated-inputs
6679 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
6680 (properties `((upstream-name . "ppx_string")))
6681 (home-page "https://github.com/janestreet/ppx_string")
6682 (synopsis "Ppx extension for string interpolation")
6683 (description "This extension provides a syntax for string interpolation.")
6684 (license license:expat)))
6685
6686 (define-public ocaml-ppx-stable
6687 (package
6688 (name "ocaml-ppx-stable")
6689 (version "0.15.0")
6690 (source
6691 (origin
6692 (method git-fetch)
6693 (uri (git-reference
6694 (url "https://github.com/janestreet/ppx_stable")
6695 (commit (string-append "v" version))))
6696 (file-name (git-file-name name version))
6697 (sha256
6698 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
6699 (build-system dune-build-system)
6700 (arguments
6701 `(#:test-target "tests"))
6702 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6703 (properties `((upstream-name . "ppx_stable")))
6704 (home-page "https://github.com/janestreet/ppx_stable")
6705 (synopsis "Stable types conversions generator")
6706 (description "This package is a ppx extension for easier implementation of
6707 conversion functions between almost identical types.")
6708 (license license:expat)))
6709
6710 (define-public ocaml-ppx-base
6711 (package
6712 (name "ocaml-ppx-base")
6713 (version "0.15.0")
6714 (source
6715 (janestreet-origin
6716 "ppx_base" version
6717 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
6718 (build-system dune-build-system)
6719 (arguments
6720 `(#:test-target "."))
6721 (propagated-inputs
6722 (list ocaml-ppx-compare
6723 ocaml-ppx-cold
6724 ocaml-ppx-enumerate
6725 ocaml-ppx-hash
6726 ocaml-ppx-js-style
6727 ocaml-ppx-sexp-conv
6728 ocaml-migrate-parsetree
6729 ocaml-ppxlib))
6730 (properties `((upstream-name . "ppx_base")
6731 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
6732 (home-page "https://github.com/janestreet/ppx_base")
6733 (synopsis "Base set of ppx rewriters")
6734 (description "Ppx_base is the set of ppx rewriters used for Base.
6735
6736 Note that Base doesn't need ppx to build, it is only used as a
6737 verification tool.")
6738 (license license:asl2.0)))
6739
6740 (define-public ocaml4.07-ppx-base
6741 (package-with-ocaml4.07
6742 (package
6743 (inherit ocaml-ppx-base)
6744 (version "0.11.0")
6745 (source
6746 (janestreet-origin
6747 "ppx_base" version
6748 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
6749 (propagated-inputs
6750 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
6751 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
6752 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
6753 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
6754 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6755 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6756 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6757 (properties `((upstream-name . "ppx_base"))))))
6758
6759 (define-public ocaml-ppx-bin-prot
6760 (package
6761 (name "ocaml-ppx-bin-prot")
6762 (version "0.15.0")
6763 (source
6764 (origin
6765 (method git-fetch)
6766 (uri (git-reference
6767 (url "https://github.com/janestreet/ppx_bin_prot")
6768 (commit (string-append "v" version))))
6769 (file-name (git-file-name name version))
6770 (sha256
6771 (base32 "1280wsls061fmvmdysjqn3lv4mnkyg400jnjf4jyfr14s33h1ad5"))))
6772 (build-system dune-build-system)
6773 (arguments
6774 ;; Cyclic dependency with ocaml-ppx-jane
6775 `(#:tests? #f))
6776 (propagated-inputs
6777 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
6778 (properties `((upstream-name . "ppx_bin_prot")
6779 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bin-prot))))
6780 (home-page "https://github.com/janestreet/ppx_bin_prot")
6781 (synopsis "Generation of bin_prot readers and writers from types")
6782 (description "Generation of binary serialization and deserialization
6783 functions from type definitions.")
6784 (license license:expat)))
6785
6786 (define-public ocaml4.07-ppx-bin-prot
6787 (package-with-ocaml4.07
6788 (package
6789 (inherit ocaml-ppx-bin-prot)
6790 (version "0.11.1")
6791 (source (origin
6792 (method git-fetch)
6793 (uri (git-reference
6794 (url "https://github.com/janestreet/ppx_bin_prot")
6795 (commit (string-append "v" version))))
6796 (file-name (git-file-name "ocaml4.07-ppx-bin-prot" version))
6797 (sha256
6798 (base32
6799 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
6800 (propagated-inputs
6801 (list ocaml-base
6802 ocaml-bin-prot
6803 ocaml-ppx-here
6804 ocaml-migrate-parsetree
6805 ocaml-ppxlib))
6806 (properties '())
6807 (license license:asl2.0))))
6808
6809 (define-public ocaml-ppx-ignore-instrumentation
6810 (package
6811 (name "ocaml-ppx-ignore-instrumentation")
6812 (version "0.15.0")
6813 (source
6814 (origin
6815 (method git-fetch)
6816 (uri (git-reference
6817 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
6818 (commit (string-append "v" version))))
6819 (file-name (git-file-name name version))
6820 (sha256
6821 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
6822 (build-system dune-build-system)
6823 (arguments
6824 `(#:tests? #f)) ;no tests
6825 (propagated-inputs (list ocaml-ppxlib))
6826 (properties `((upstream-name . "ppx_ignore_instrumentation")))
6827 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
6828 (synopsis "Ignore Jane Street specific instrumentation extensions")
6829 (description
6830 "Ignore Jane Street specific instrumentation extensions from internal
6831 PPXs or compiler features not yet upstreamed.")
6832 (license license:expat)))
6833
6834 (define-public ocaml-ppx-log
6835 (package
6836 (name "ocaml-ppx-log")
6837 (version "0.15.0")
6838 (source
6839 (origin
6840 (method git-fetch)
6841 (uri (git-reference
6842 (url "https://github.com/janestreet/ppx_log")
6843 (commit (string-append "v" version))))
6844 (file-name (git-file-name name version))
6845 (sha256
6846 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
6847 (build-system dune-build-system)
6848 (propagated-inputs
6849 (list ocaml-base
6850 ocaml-ppx-here
6851 ocaml-ppx-sexp-conv
6852 ocaml-ppx-sexp-message
6853 ocaml-sexplib
6854 ocaml-ppxlib))
6855 (properties `((upstream-name . "ppx_log")))
6856 (home-page "https://github.com/janestreet/ppx_log")
6857 (synopsis "Extension nodes for lazily rendering log messages")
6858 (description "This package provides ppx_sexp_message-like extension
6859 nodes for lazily rendering log messages.")
6860 (license license:expat)))
6861
6862 (define-public ocaml-ppx-disable-unused-warnings
6863 (package
6864 (name "ocaml-ppx-disable-unused-warnings")
6865 (version "0.15.0")
6866 (source
6867 (origin
6868 (method git-fetch)
6869 (uri (git-reference
6870 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
6871 (commit (string-append "v" version))))
6872 (file-name (git-file-name name version))
6873 (sha256
6874 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
6875 (build-system dune-build-system)
6876 (arguments
6877 `(#:test-target "tests"))
6878 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6879 (properties `((upstream-name . "ppx_disable_unused_warnings")))
6880 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
6881 (synopsis "Simple ppx extension for commonly unused warnings")
6882 (description "This package expands @code{@@disable_unused_warnings} into
6883 @code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
6884 (license license:expat)))
6885
6886 (define-public ocaml-ppx-jane
6887 (package
6888 (name "ocaml-ppx-jane")
6889 (version "0.15.0")
6890 (source
6891 (origin
6892 (method git-fetch)
6893 (uri (git-reference
6894 (url "https://github.com/janestreet/ppx_jane")
6895 (commit (string-append "v" version))))
6896 (file-name (git-file-name name version))
6897 (sha256
6898 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
6899 (build-system dune-build-system)
6900 (arguments
6901 `(#:test-target "."))
6902 (propagated-inputs
6903 (list ocaml-base-quickcheck
6904 ocaml-ppx-assert
6905 ocaml-ppx-base
6906 ocaml-ppx-bench
6907 ocaml-ppx-bin-prot
6908 ocaml-ppx-custom-printf
6909 ocaml-ppx-disable-unused-warnings
6910 ocaml-ppx-expect
6911 ocaml-ppx-fields-conv
6912 ocaml-ppx-fixed-literal
6913 ocaml-ppx-here
6914 ocaml-ppx-ignore-instrumentation
6915 ocaml-ppx-inline-test
6916 ocaml-ppx-let
6917 ocaml-ppx-log
6918 ocaml-ppx-module-timer
6919 ocaml-ppx-optcomp
6920 ocaml-ppx-optional
6921 ocaml-ppx-pipebang
6922 ocaml-ppx-sexp-message
6923 ocaml-ppx-sexp-value
6924 ocaml-ppx-stable
6925 ocaml-ppx-string
6926 ocaml-ppx-typerep-conv
6927 ocaml-ppx-variants-conv
6928 ocaml-ppxlib))
6929 (properties `((upstream-name . "ppx_jane")
6930 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-jane))))
6931 (home-page "https://github.com/janestreet/ppx_jane")
6932 (synopsis "Standard Jane Street ppx rewriters")
6933 (description "This package installs a ppx-jane executable, which is a ppx
6934 driver including all standard Jane Street ppx rewriters.")
6935 (license license:expat)))
6936
6937 (define-public ocaml4.07-ppx-jane
6938 (package-with-ocaml4.07
6939 (package
6940 (inherit ocaml-ppx-jane)
6941 (version "0.11.0")
6942 (source (origin
6943 (method url-fetch)
6944 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6945 (version-major+minor version)
6946 "/files/ppx_jane-v" version ".tar.gz"))
6947 (sha256
6948 (base32
6949 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
6950 (propagated-inputs
6951 (list ocaml-ppx-assert
6952 ocaml-ppx-base
6953 ocaml-ppx-bench
6954 ocaml-ppx-bin-prot
6955 ocaml-ppx-custom-printf
6956 ocaml-ppx-expect
6957 ocaml-ppx-fail
6958 ocaml-ppx-fields-conv
6959 ocaml-ppx-here
6960 ocaml-ppx-inline-test
6961 ocaml-ppx-let
6962 ocaml-ppx-optcomp
6963 ocaml-ppx-optional
6964 ocaml-ppx-pipebang
6965 ocaml-ppx-sexp-message
6966 ocaml-ppx-sexp-value
6967 ocaml-ppx-typerep-conv
6968 ocaml-ppx-variants-conv
6969 ocaml-migrate-parsetree
6970 ocaml-ppxlib))
6971 (properties '())
6972 (license license:asl2.0))))
6973
6974 (define-public ocaml-base-bigstring
6975 (package
6976 (name "ocaml-base-bigstring")
6977 (version "0.15.0")
6978 (source
6979 (origin
6980 (method git-fetch)
6981 (uri (git-reference
6982 (url "https://github.com/janestreet/base_bigstring")
6983 (commit (string-append "v" version))))
6984 (file-name (git-file-name name version))
6985 (sha256
6986 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
6987 (build-system dune-build-system)
6988 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
6989 (properties `((upstream-name . "base_bigstring")))
6990 (home-page "https://github.com/janestreet/base_bigstring")
6991 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
6992 (description "This package provides string type based on [Bigarray], for
6993 use in I/O and C-bindings.")
6994 (license license:expat)))
6995
6996 (define-public ocaml-splittable-random
6997 (package
6998 (name "ocaml-splittable-random")
6999 (version "0.15.0")
7000 (source
7001 (origin
7002 (method git-fetch)
7003 (uri (git-reference
7004 (url "https://github.com/janestreet/splittable_random")
7005 (commit (string-append "v" version))))
7006 (file-name (git-file-name name version))
7007 (sha256
7008 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
7009 (build-system dune-build-system)
7010 (propagated-inputs
7011 (list ocaml-base
7012 ocaml-ppx-assert
7013 ocaml-ppx-bench
7014 ocaml-ppx-inline-test
7015 ocaml-ppx-sexp-message))
7016 (properties `((upstream-name . "splittable_random")
7017 (ocaml-4.07-variant . ,(delay ocaml4.07-splittable-random))))
7018 (home-page "https://github.com/janestreet/splittable_random")
7019 (synopsis "PRNG that can be split into independent streams")
7020 (description "This package provides a splittable
7021 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
7022 be used as a stream of random values; it can also be split to produce a
7023 second, independent stream of random values.
7024
7025 This library implements a splittable pseudo-random number generator that sacrifices
7026 cryptographic-quality randomness in favor of performance.")
7027 (license license:expat)))
7028
7029 (define-public ocaml4.07-splittable-random
7030 (package-with-ocaml4.07
7031 (package
7032 (inherit ocaml-splittable-random)
7033 (version "0.11.0")
7034 (source (origin
7035 (method url-fetch)
7036 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7037 (version-major+minor version)
7038 "/files/splittable_random-v" version ".tar.gz"))
7039 (sha256
7040 (base32
7041 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
7042 (propagated-inputs
7043 (list ocaml-base ocaml-ppx-jane ocaml-migrate-parsetree))
7044 (properties '())
7045 (license license:asl2.0))))
7046
7047 (define-public ocaml-base-quickcheck
7048 (package
7049 (name "ocaml-base-quickcheck")
7050 (version "0.15.0")
7051 (source
7052 (origin
7053 (method git-fetch)
7054 (uri (git-reference
7055 (url "https://github.com/janestreet/base_quickcheck")
7056 (commit (string-append "v" version))))
7057 (file-name (git-file-name name version))
7058 (sha256
7059 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
7060 (build-system dune-build-system)
7061 (propagated-inputs
7062 (list ocaml-base
7063 ocaml-ppx-base
7064 ocaml-ppx-fields-conv
7065 ocaml-ppx-let
7066 ocaml-ppx-sexp-message
7067 ocaml-ppx-sexp-value
7068 ocaml-splittable-random
7069 ocaml-ppxlib))
7070 (properties `((upstream-name . "base_quickcheck")))
7071 (home-page "https://github.com/janestreet/base_quickcheck")
7072 (synopsis
7073 "Randomized testing framework, designed for compatibility with Base")
7074 (description
7075 "@samp{base-quickcheck} provides randomized testing in the style of
7076 Haskell's Quickcheck library, with support for built-in types as well as
7077 types provided by Base.")
7078 (license license:expat)))
7079
7080 (define-public ocaml4.07-jane-street-headers
7081 (package
7082 (name "ocaml4.07-jane-street-headers")
7083 (version "0.11.0")
7084 (source (origin
7085 (method url-fetch)
7086 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
7087 (version-major+minor version)
7088 "/files/jane-street-headers-v" version ".tar.gz"))
7089 (sha256
7090 (base32
7091 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
7092 (build-system dune-build-system)
7093 (arguments
7094 `(#:test-target "."
7095 #:ocaml ,ocaml-4.07
7096 #:findlib ,ocaml4.07-findlib
7097 #:dune ,ocaml4.07-dune))
7098 (home-page "https://github.com/janestreet/jane-street-headers")
7099 (synopsis "Jane Street C header files")
7100 (description "This package provides C header files shared between the
7101 various Jane Street packages.")
7102 (license license:asl2.0)))
7103
7104 (define-public ocaml4.07-configurator
7105 (package
7106 (name "ocaml4.07-configurator")
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/configurator-v" version ".tar.gz"))
7113 (sha256
7114 (base32
7115 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
7116 (build-system dune-build-system)
7117 (arguments
7118 ;; No tests
7119 `(#:tests? #f
7120 #:ocaml ,ocaml-4.07
7121 #:findlib ,ocaml4.07-findlib
7122 #:dune ,ocaml4.07-dune))
7123 (propagated-inputs
7124 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
7125 ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
7126 (home-page "https://github.com/janestreet/configurator")
7127 (synopsis "Helper library for gathering system configuration")
7128 (description "Configurator is a small library that helps writing OCaml
7129 scripts that test features available on the system, in order to generate config.h
7130 files for instance.
7131
7132 Configurator allows one to:
7133 @itemize
7134 @item test if a C program compiles
7135 @item query pkg-config
7136 @item import #define from OCaml header files
7137 @item generate config.h file
7138 @end itemize")
7139 (license license:asl2.0)))
7140
7141 (define-public ocaml-spawn
7142 (package
7143 (name "ocaml-spawn")
7144 (version "0.15.1")
7145 (source (origin
7146 (method git-fetch)
7147 (uri (git-reference
7148 (url "https://github.com/janestreet/spawn")
7149 (commit (string-append "v" version))))
7150 (file-name (git-file-name name version))
7151 (sha256
7152 (base32
7153 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
7154 (build-system dune-build-system)
7155 (propagated-inputs (list ocaml-odoc))
7156 (native-inputs (list ocaml-ppx-expect))
7157 (properties
7158 `((ocaml4.07-variant . ,(delay ocaml4.07-spawn))))
7159 (home-page "https://github.com/janestreet/spawn")
7160 (synopsis "Spawning sub-processes")
7161 (description
7162 "Spawn is a small library exposing only one functionality: spawning sub-process.
7163
7164 It has three main goals:
7165
7166 @itemize
7167 @item provide missing features of Unix.create_process such as providing a
7168 working directory,
7169 @item provide better errors when a system call fails in the
7170 sub-process. For instance if a command is not found, you get a proper
7171 @code{Unix.Unix_error} exception,
7172 @item improve performances by using vfork when available. It is often
7173 claimed that nowadays fork is as fast as vfork, however in practice
7174 fork takes time proportional to the process memory while vfork is
7175 constant time. In application using a lot of memory, vfork can be
7176 thousands of times faster than fork.
7177 @end itemize")
7178 (license license:asl2.0)))
7179
7180 (define-public ocaml4.07-spawn
7181 (package-with-ocaml4.07
7182 (package
7183 (inherit ocaml-spawn)
7184 (version "0.13.0")
7185 (source (origin
7186 (method git-fetch)
7187 (uri (git-reference
7188 (url "https://github.com/janestreet/spawn")
7189 (commit (string-append "v" version))))
7190 (file-name (git-file-name "ocaml4.07-spawn" version))
7191 (sha256
7192 (base32
7193 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
7194 (arguments
7195 `(#:phases
7196 (modify-phases %standard-phases
7197 (add-before 'check 'fix-tests
7198 (lambda _
7199 (substitute* "test/tests.ml"
7200 (("/bin/pwd") (which "pwd"))
7201 (("/bin/echo") (which "echo")))
7202 #t)))
7203 #:ocaml ,ocaml-4.07
7204 #:findlib ,ocaml4.07-findlib
7205 #:dune ,ocaml4.07-dune))
7206 (propagated-inputs '())
7207 (properties '()))))
7208
7209 (define-public ocaml-core
7210 (package
7211 (name "ocaml-core")
7212 (version "0.15.1")
7213 (source
7214 (origin
7215 (method git-fetch)
7216 (uri (git-reference
7217 (url "https://github.com/janestreet/core")
7218 (commit (string-append "v" version))))
7219 (file-name (git-file-name name version))
7220 (sha256
7221 (base32 "17vc2i5qb53dr0civ8pkrnnsn2nkydlq44ash7fhh93yb4sffy28"))))
7222 (build-system dune-build-system)
7223 (arguments
7224 `(#:package "core"
7225 #:tests? #f)); Require a cyclic dependency: core_extended
7226 (propagated-inputs
7227 (list ocaml-base
7228 ocaml-base-bigstring
7229 ocaml-base-quickcheck
7230 ocaml-bin-prot
7231 ocaml-fieldslib
7232 ocaml-jane-street-headers
7233 ocaml-jst-config
7234 ocaml-ppx-assert
7235 ocaml-ppx-base
7236 ocaml-ppx-hash
7237 ocaml-ppx-inline-test
7238 ocaml-ppx-jane
7239 ocaml-ppx-sexp-conv
7240 ocaml-ppx-sexp-message
7241 ocaml-sexplib
7242 ocaml-splittable-random
7243 ocaml-stdio
7244 ocaml-time-now
7245 ocaml-typerep
7246 ocaml-variantslib))
7247 (home-page "https://github.com/janestreet/core")
7248 (synopsis "Alternative to OCaml's standard library")
7249 (description "The Core suite of libraries is an alternative to OCaml's
7250 standard library that was developed by Jane Street.")
7251 ;; Also contains parts of OCaml, relicensed to expat, as permitted
7252 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7253 (license license:expat)))
7254
7255 (define-public ocaml4.07-core
7256 (package-with-ocaml4.07
7257 (package
7258 (inherit ocaml-core)
7259 (version "0.11.3")
7260 (source (origin
7261 (method git-fetch)
7262 (uri (git-reference
7263 (url "https://github.com/janestreet/core")
7264 (commit (string-append "v" version))))
7265 (file-name (git-file-name "ocaml4.07-core" version))
7266 (sha256
7267 (base32
7268 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
7269 (propagated-inputs
7270 (list ocaml-base
7271 ocaml4.07-configurator
7272 ocaml-core-kernel
7273 ocaml-ppx-assert
7274 ocaml-ppx-jane
7275 ocaml-sexplib
7276 ocaml-spawn
7277 ocaml-stdio
7278 ocaml-migrate-parsetree
7279 ocaml-ppxlib))
7280 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
7281 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7282 (license license:asl2.0))))
7283
7284 (define-public ocaml-int-repr
7285 (package
7286 (name "ocaml-int-repr")
7287 (version "0.15.0")
7288 (source
7289 (origin
7290 (method git-fetch)
7291 (uri (git-reference
7292 (url "https://github.com/janestreet/int_repr")
7293 (commit (string-append "v" version))))
7294 (file-name (git-file-name name version))
7295 (sha256
7296 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
7297 (build-system dune-build-system)
7298 (arguments
7299 `(#:tests? #f)) ;no tests
7300 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
7301 (properties `((upstream-name . "int_repr")))
7302 (home-page "https://github.com/janestreet/int_repr")
7303 (synopsis "Integers of various widths")
7304 (description "Integers of various widths.")
7305 (license license:expat)))
7306
7307 (define-public ocaml-core-kernel
7308 (package
7309 (name "ocaml-core-kernel")
7310 (version "0.15.0")
7311 (source
7312 (origin
7313 (method git-fetch)
7314 (uri (git-reference
7315 (url "https://github.com/janestreet/core_kernel")
7316 (commit (string-append "v" version))))
7317 (file-name (git-file-name name version))
7318 (sha256
7319 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
7320 (build-system dune-build-system)
7321 (arguments
7322 ;; Cyclic dependency with ocaml-core
7323 `(#:tests? #f))
7324 (propagated-inputs
7325 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
7326 (properties `((upstream-name . "core_kernel")
7327 (ocaml4.07-variant . ,(delay ocaml4.07-core-kernel))))
7328 (home-page "https://github.com/janestreet/core_kernel")
7329 (synopsis "Portable standard library for OCaml")
7330 (description "Core is an alternative to the OCaml standard library.
7331
7332 Core_kernel is the system-independent part of Core. It is aimed for cases when
7333 the full Core is not available, such as in Javascript.")
7334 (license license:expat)))
7335
7336 (define-public ocaml4.07-core-kernel
7337 (package-with-ocaml4.07
7338 (package
7339 (inherit ocaml-core-kernel)
7340 (version "0.11.1")
7341 (source (origin
7342 (method git-fetch)
7343 (uri (git-reference
7344 (url "https://github.com/janestreet/core_kernel")
7345 (commit (string-append "v" version))))
7346 (file-name (git-file-name "ocaml4.07-core-kernel" version))
7347 (sha256
7348 (base32
7349 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
7350 (propagated-inputs
7351 (list ocaml-base
7352 ocaml-bin-prot
7353 ocaml4.07-configurator
7354 ocaml-fieldslib
7355 ocaml-jane-street-headers
7356 ocaml-ppx-assert
7357 ocaml-ppx-base
7358 ocaml-ppx-hash
7359 ocaml-ppx-inline-test
7360 ocaml-ppx-jane
7361 ocaml-ppx-sexp-conv
7362 ocaml-ppx-sexp-message
7363 ocaml-sexplib
7364 ocaml-splittable-random
7365 ocaml-stdio
7366 ocaml-typerep
7367 ocaml-variantslib
7368 ocaml-migrate-parsetree))
7369 (properties '())
7370 (license (list
7371 ;; this package and parts of OCaml, relicensed by janestreet
7372 license:asl2.0
7373 ;; MLton and sjs
7374 license:expat)))))
7375
7376 (define-public ocaml-timezone
7377 (package
7378 (name "ocaml-timezone")
7379 (version "0.15.0")
7380 (source
7381 (origin
7382 (method git-fetch)
7383 (uri (git-reference
7384 (url "https://github.com/janestreet/timezone")
7385 (commit (string-append "v" version))))
7386 (file-name (git-file-name name version))
7387 (sha256
7388 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
7389 (build-system dune-build-system)
7390 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7391 (home-page "https://github.com/janestreet/timezone")
7392 (synopsis "Time-zone handling")
7393 (description
7394 "Timezone handles parsing timezone data and create @code{Timezone.t}
7395 that can later be used to manipulate time in core_kernel or core.")
7396 (license license:expat)))
7397
7398 (define-public ocaml-markup
7399 (package
7400 (name "ocaml-markup")
7401 (version "1.0.3")
7402 (home-page "https://github.com/aantron/markup.ml")
7403 (source
7404 (origin
7405 (method git-fetch)
7406 (uri (git-reference
7407 (url (string-append home-page ".git"))
7408 (commit version)))
7409 (file-name (git-file-name name version))
7410 (sha256
7411 (base32
7412 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
7413 (build-system dune-build-system)
7414 (arguments
7415 `(#:package "markup"))
7416 (propagated-inputs
7417 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
7418 (native-inputs
7419 (list ocaml-ounit2 pkg-config))
7420 (properties
7421 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
7422 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
7423 (description "Markup.ml provides an HTML parser and an XML parser. The
7424 parsers are wrapped in a simple interface: they are functions that transform
7425 byte streams to parsing signal streams. Streams can be manipulated in various
7426 ways, such as processing by fold, filter, and map, assembly into DOM tree
7427 structures, or serialization back to HTML or XML.
7428
7429 Both parsers are based on their respective standards. The HTML parser, in
7430 particular, is based on the state machines defined in HTML5.
7431
7432 The parsers are error-recovering by default, and accept fragments. This makes
7433 it very easy to get a best-effort parse of some input. The parsers can,
7434 however, be easily configured to be strict, and to accept only full documents.
7435
7436 Apart from this, the parsers are streaming (do not build up a document in
7437 memory), non-blocking (can be used with threading libraries), lazy (do not
7438 consume input unless the signal stream is being read), and process the input in
7439 a single pass. They automatically detect the character encoding of the input
7440 stream, and convert everything to UTF-8.")
7441 (license license:bsd-3)))
7442
7443 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
7444 ;; package-with-ocaml4.07
7445 (define-public ocaml-markup0.8.0
7446 (package
7447 (inherit ocaml-markup)
7448 (name "ocaml-markup")
7449 (version "0.8.0")
7450 (home-page "https://github.com/aantron/markup.ml")
7451 (source
7452 (origin
7453 (method git-fetch)
7454 (uri (git-reference
7455 (url (string-append home-page ".git"))
7456 (commit version)))
7457 (file-name (git-file-name name version))
7458 (sha256
7459 (base32
7460 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
7461 (native-inputs
7462 (list ocaml-ounit pkg-config))
7463 (properties '())))
7464
7465 (define-public ocaml-tyxml
7466 (package
7467 (name "ocaml-tyxml")
7468 (version "4.5.0")
7469 (source
7470 (origin
7471 (method git-fetch)
7472 (uri (git-reference
7473 (url "https://github.com/ocsigen/tyxml")
7474 (commit version)))
7475 (file-name (git-file-name name version))
7476 (sha256
7477 (base32
7478 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
7479 (build-system dune-build-system)
7480 (inputs
7481 (list ocaml-re ocaml-seq ocaml-uutf))
7482 (native-inputs
7483 (list ocaml-alcotest))
7484 (arguments `(#:package "tyxml"))
7485 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-tyxml))))
7486 (home-page "https://github.com/ocsigen/tyxml/")
7487 (synopsis "TyXML is a library for building correct HTML and SVG documents")
7488 (description "TyXML provides a set of convenient combinators that uses the
7489 OCaml type system to ensure the validity of the generated documents. TyXML can
7490 be used with any representation of HTML and SVG: the textual one, provided
7491 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
7492 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
7493 also create your own representation and use it to instantiate a new set of
7494 combinators.")
7495 (license license:lgpl2.1)))
7496
7497 (define-public ocaml4.07-tyxml
7498 (package-with-ocaml4.07
7499 (package
7500 (inherit ocaml-tyxml)
7501 (version "4.4.0")
7502 (source (origin
7503 (method git-fetch)
7504 (uri (git-reference
7505 (url "https://github.com/ocsigen/tyxml")
7506 (commit version)))
7507 (file-name (git-file-name "ocaml-tyxml" version))
7508 (sha256
7509 (base32
7510 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
7511 (properties '()))))
7512
7513 (define-public ocaml-bisect-ppx
7514 (package
7515 (name "ocaml-bisect-ppx")
7516 (version "2.8.1")
7517 (source
7518 (origin
7519 (method git-fetch)
7520 (uri (git-reference
7521 (url "https://github.com/aantron/bisect_ppx")
7522 (commit version)))
7523 (file-name (git-file-name name version))
7524 (sha256
7525 (base32
7526 "0562rwwnhqlf5alxl1wd1n0xs0k4aamxafrh8bbmh5yl3i5rxrx4"))))
7527 (build-system dune-build-system)
7528 (propagated-inputs
7529 (list ocaml-ppxlib ocaml-cmdliner))
7530 (arguments
7531 ;; Tests require ocamlformat which would lead to circular dependencies
7532 '(#:tests? #f))
7533 (properties `((upstream-name . "bisect_ppx")
7534 (ocaml4.07-variant . ,(delay ocaml4.07-bisect-ppx))))
7535 (home-page "https://github.com/aantron/bisect_ppx")
7536 (synopsis "Code coverage for OCaml")
7537 (description "Bisect_ppx helps you test thoroughly. It is a small
7538 preprocessor that inserts instrumentation at places in your code, such as
7539 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
7540 nice HTML report showing which places were visited and which were missed.
7541
7542 Usage is simple - add package bisect_ppx when building tests, run your tests,
7543 then run the Bisect_ppx report tool on the generated visitation files.")
7544 (license license:mpl2.0)))
7545
7546 (define-public ocaml4.07-bisect-ppx
7547 (package-with-ocaml4.07
7548 (package
7549 (inherit ocaml-bisect-ppx)
7550 (version "2.4.0")
7551 (source
7552 (origin
7553 (method git-fetch)
7554 (uri (git-reference
7555 (url "https://github.com/aantron/bisect_ppx")
7556 (commit version)))
7557 (file-name (git-file-name "ocaml-bisect-ppx" version))
7558 (sha256
7559 (base32
7560 "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
7561 (propagated-inputs
7562 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
7563 ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
7564 ,@(package-propagated-inputs ocaml-bisect-ppx)))
7565 (native-inputs
7566 `(("ocaml-ounit2" ,ocaml-ounit2)))
7567 (arguments
7568 `(#:test-target "."
7569 ;; tests require git and network
7570 #:tests? #f))
7571 (properties '((upstream-name . "bisect_ppx"))))))
7572
7573 (define-public ocaml-odoc
7574 (package
7575 (name "ocaml-odoc")
7576 ;; 2.2.0-alpha contains fixes for Dune 3.0 compatibility
7577 ;; (https://github.com/ocaml/odoc/commit/6ac97f3148f7791ec7451785ef4dbd9ca0daf2d1)
7578 (version "2.2.0-alpha")
7579 (source
7580 (origin
7581 (method git-fetch)
7582 (uri (git-reference
7583 (url "https://github.com/ocaml/odoc")
7584 (commit version)))
7585 (file-name (git-file-name name version))
7586 (sha256
7587 (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
7588 (build-system dune-build-system)
7589 (arguments
7590 `(#:tests? #f; not compatible with current version of ocaml-yojson
7591 #:phases
7592 (modify-phases %standard-phases
7593 (add-after 'unpack 'fix-test
7594 (lambda _
7595 ;; test results expects #!/bin/sh but gets a store path instead
7596 (substitute* "test/xref2/with.t/run.t"
7597 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
7598 (inputs
7599 (list ocaml-astring
7600 ocaml-bisect-ppx
7601 ocaml-cmdliner
7602 ocaml-fmt
7603 ocaml-fpath
7604 ocaml-logs
7605 ocaml-migrate-parsetree
7606 ocaml-odoc-parser
7607 ocaml-re
7608 ocaml-result
7609 ocaml-tyxml))
7610 (native-inputs
7611 (list ocaml-alcotest
7612 ocaml-bos
7613 ocaml-cppo
7614 ocaml-findlib
7615 ocaml-lwt
7616 ocaml-markup
7617 ocaml-ppx-expect
7618 ocaml-version
7619 ocaml-yojson
7620 jq))
7621 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
7622 (home-page "https://github.com/ocaml/odoc")
7623 (synopsis "OCaml documentation generator")
7624 (description "Odoc is a documentation generator for OCaml. It reads
7625 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
7626 @acronym{HTML}.
7627
7628 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
7629 advantage over ocamldoc is an accurate cross-referencer, which handles the
7630 complexity of the OCaml module system.")
7631 (license license:isc)))
7632
7633 (define-public ocaml-odoc-parser
7634 (package
7635 (name "ocaml-odoc-parser")
7636 (version "2.0.0")
7637 (source
7638 (origin
7639 (method git-fetch)
7640 (uri (git-reference
7641 (url "https://github.com/ocaml-doc/odoc-parser")
7642 (commit version)))
7643 (file-name (git-file-name name version))
7644 (sha256
7645 (base32
7646 "1x48kf051xs98rd6cri591bk1ccp9hyp93n1rlf6qnxic55jw683"))))
7647 (build-system dune-build-system)
7648 (propagated-inputs
7649 (list ocaml-astring ocaml-camlp-streams ocaml-result))
7650 (native-inputs
7651 (list ocaml-ppx-expect))
7652 (home-page "https://github.com/ocaml-doc/odoc-parser")
7653 (synopsis "Parser for ocaml documentation comments")
7654 (description
7655 "This package provides a library for parsing the contents of OCaml
7656 documentation comments, formatted using Odoc syntax, an extension of the
7657 language understood by ocamldoc.")
7658 (license license:isc)))
7659
7660 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
7661 ;; with old version of dune used in package-with-ocaml4.07
7662 (define-public ocaml4.07-odoc
7663 (package-with-ocaml4.07
7664 (package
7665 (inherit ocaml-odoc)
7666 (name "ocaml-odoc")
7667 (version "1.5.1")
7668 (source
7669 (origin
7670 (method git-fetch)
7671 (uri (git-reference
7672 (url "https://github.com/ocaml/odoc")
7673 (commit version)))
7674 (file-name (git-file-name name version))
7675 (sha256
7676 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
7677 (arguments '())
7678 (inputs
7679 `(("ocaml-alcotest" ,ocaml-alcotest)
7680 ("ocaml-markup" ,ocaml-markup)
7681 ("ocaml-sexplib" ,ocaml-sexplib)
7682 ("ocaml-re" ,ocaml-re)
7683 ("ocaml-uutf" ,ocaml-uutf)))
7684 (native-inputs
7685 `(("ocaml-astring" ,ocaml-astring)
7686 ("ocaml-cmdliner" ,ocaml-cmdliner)
7687 ("ocaml-cppo" ,ocaml-cppo)
7688 ("ocaml-fpath" ,ocaml-fpath)
7689 ("ocaml-result" ,ocaml-result)
7690 ("ocaml-tyxml" ,ocaml-tyxml)
7691 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
7692 ("tidy-html" ,tidy-html)))
7693 (properties '()))))
7694
7695 (define-public ocaml-fftw3
7696 (package
7697 (name "ocaml-fftw3")
7698 (version "0.8.5")
7699 (source
7700 (origin
7701 (method git-fetch)
7702 (uri (git-reference
7703 (url "https://github.com/Chris00/fftw-ocaml")
7704 (commit version)))
7705 (file-name (git-file-name name version))
7706 (sha256
7707 (base32
7708 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
7709 (build-system dune-build-system)
7710 (arguments
7711 `(#:test-target "tests"))
7712 (propagated-inputs
7713 (list fftw fftwf))
7714 (native-inputs
7715 (list ocaml-cppo ocaml-lacaml))
7716 (home-page
7717 "https://github.com/Chris00/fftw-ocaml")
7718 (synopsis
7719 "Bindings to FFTW3")
7720 (description
7721 "Bindings providing OCaml support for the seminal Fast Fourier Transform
7722 library FFTW.")
7723 (license license:lgpl2.1))) ; with static linking exception.
7724
7725 (define-public ocaml-lacaml
7726 (package
7727 (name "ocaml-lacaml")
7728 (version "11.0.8")
7729 (source
7730 (origin
7731 (method git-fetch)
7732 (uri (git-reference
7733 (url "https://github.com/mmottl/lacaml")
7734 (commit version)))
7735 (file-name (git-file-name name version))
7736 (sha256
7737 (base32
7738 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
7739 (modules '((guix build utils)))
7740 (snippet '(substitute* '("src/dune" "src/config/dune")
7741 (("-march=native") "")))))
7742 (properties '((tunable? . #t)))
7743 (build-system dune-build-system)
7744 (arguments
7745 `(#:tests? #f)) ; No test target.
7746 (native-inputs
7747 (list openblas lapack ocaml-base ocaml-stdio))
7748 (home-page "https://mmottl.github.io/lacaml/")
7749 (synopsis
7750 "OCaml-bindings to BLAS and LAPACK")
7751 (description
7752 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
7753 LAPACK-library (Linear Algebra routines). It also contains many additional
7754 convenience functions for vectors and matrices.")
7755 (license license:lgpl2.1)))
7756
7757 (define-public ocaml-cairo2
7758 (package
7759 (name "ocaml-cairo2")
7760 (version "0.6.4")
7761 (source (origin
7762 (method git-fetch)
7763 (uri (git-reference
7764 (url "https://github.com/Chris00/ocaml-cairo")
7765 (commit version)))
7766 (file-name (git-file-name name version))
7767 (sha256
7768 (base32
7769 "06ag9b88ihhr7yd3s9l0ac7ysig02fmlmsswybbsvz71ni0mb105"))))
7770 (build-system dune-build-system)
7771 (arguments
7772 `(#:test-target "tests"))
7773 (inputs
7774 `(("cairo" ,cairo)
7775 ("gtk+-2" ,gtk+-2)
7776 ("lablgtk" ,lablgtk)))
7777 (native-inputs
7778 (list pkg-config))
7779 (home-page "https://github.com/Chris00/ocaml-cairo")
7780 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
7781 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
7782 with support for multiple output devices. Currently supported output targets
7783 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
7784 and SVG file output.")
7785 (license license:lgpl3+)))
7786
7787 (define-public ocaml-version
7788 (package
7789 (name "ocaml-version")
7790 (version "3.5.0")
7791 (source
7792 (origin
7793 (method git-fetch)
7794 (uri (git-reference
7795 (url "https://github.com/ocurrent/ocaml-version")
7796 (commit (string-append "v" version))))
7797 (file-name (git-file-name name version))
7798 (sha256
7799 (base32
7800 "1pnw2ym021j48zknhbi1kdiyfv9si8p2l04rdzbv4g51fclsqs92"))))
7801 (build-system dune-build-system)
7802 (arguments `(#:tests? #f)) ; no tests
7803 (properties '((upstream-name . "ocaml-version")))
7804 (home-page
7805 "https://github.com/ocurrent/ocaml-version")
7806 (synopsis
7807 "Manipulate, parse and generate OCaml compiler version strings")
7808 (description
7809 "This library provides facilities to parse version numbers of the OCaml
7810 compiler, and enumerates the various official OCaml releases and configuration
7811 variants.")
7812 (license license:isc)))
7813
7814 (define-public ocaml-mdx
7815 (package
7816 (name "ocaml-mdx")
7817 (version "2.1.0")
7818 (source (origin
7819 (method git-fetch)
7820 (uri (git-reference
7821 (url "https://github.com/realworldocaml/mdx")
7822 (commit version)))
7823 (file-name (git-file-name name version))
7824 (sha256
7825 (base32
7826 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
7827 (build-system dune-build-system)
7828 (arguments
7829 `(#:phases
7830 (modify-phases %standard-phases
7831 (add-after 'unpack 'fix-test-format
7832 (lambda _
7833 ;; cmdliner changed the format and the tests fail
7834 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
7835 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
7836 (("`") "'")
7837 (("COMMAND") "[COMMAND]")
7838 (("\\.\\.\\.") "…")))))))
7839 (inputs
7840 (list ocaml-fmt
7841 ocaml-astring
7842 ocaml-logs
7843 ocaml-cmdliner
7844 ocaml-re
7845 ocaml-result
7846 ocaml-odoc
7847 ocaml-odoc-parser
7848 ocaml-version))
7849 (native-inputs
7850 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
7851 (home-page
7852 "https://github.com/realworldocaml/mdx")
7853 (synopsis
7854 "Executable code blocks inside markdown files")
7855 (description
7856 "@code{ocaml-mdx} executes code blocks inside markdown files.
7857 There are (currently) two sub-commands, corresponding
7858 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
7859 and tests (@code{ocaml-mdx test}]).
7860
7861 The pre-processor mode allows mixing documentation and code,
7862 and to practice @dfn{literate programming} using markdown and OCaml.
7863
7864 The test mode ensures that shell scripts and OCaml fragments
7865 in the documentation always stays up-to-date.
7866
7867 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
7868 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
7869 compatibility.")
7870 (license license:isc)))
7871
7872 (define-public ocaml-mparser
7873 (package
7874 (name "ocaml-mparser")
7875 (version "1.3")
7876 (source
7877 (origin
7878 (method git-fetch)
7879 (uri (git-reference
7880 (url "https://github.com/murmour/mparser")
7881 (commit version)))
7882 (file-name (git-file-name name version))
7883 (sha256
7884 (base32
7885 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
7886 (build-system dune-build-system)
7887 (arguments
7888 ;; No tests.
7889 '(#:package "mparser"
7890 #:tests? #f))
7891 (home-page "https://github.com/murmour/mparser")
7892 (synopsis "Simple monadic parser combinator library")
7893 (description
7894 "This library implements a rather complete and efficient monadic parser
7895 combinator library similar to the Parsec library for Haskell by Daan Leijen and
7896 the FParsec library for FSharp by Stephan Tolksdorf.")
7897 ;; With static linking exception.
7898 (license license:lgpl2.1+)))
7899
7900 (define-public ocaml-mparser-re
7901 (package
7902 (inherit ocaml-mparser)
7903 (name "ocaml-mparser-re")
7904 (arguments
7905 ;; No tests.
7906 '(#:package "mparser-re"
7907 #:tests? #f))
7908 (propagated-inputs
7909 (list ocaml-mparser ocaml-re))
7910 (synopsis "MParser plugin for RE-based regular expressions")
7911 (description "This package provides RE-based regular expressions
7912 support for Mparser.")))
7913
7914 (define-public ocaml-mparser-pcre
7915 (package
7916 (inherit ocaml-mparser)
7917 (name "ocaml-mparser-pcre")
7918 (arguments
7919 ;; No tests.
7920 '(#:package "mparser-pcre"
7921 #:tests? #f))
7922 (propagated-inputs
7923 (list ocaml-mparser ocaml-pcre))
7924 (synopsis "MParser plugin for PCRE-based regular expressions")
7925 (description "This package provides PCRE-based regular expressions
7926 support for Mparser.")))
7927
7928 (define-public lablgtk3
7929 (package
7930 (name "lablgtk")
7931 (version "3.1.3")
7932 (source (origin
7933 (method git-fetch)
7934 (uri (git-reference
7935 (url "https://github.com/garrigue/lablgtk")
7936 (commit version)))
7937 (file-name (git-file-name name version))
7938 (sha256
7939 (base32
7940 "0rhdr89w7yj8pkga5xc7iqmqvrs28034wb7sm7vx7faaxczwjifn"))))
7941 (build-system dune-build-system)
7942 (arguments
7943 `(#:package "lablgtk3"
7944 #:test-target "."))
7945 (propagated-inputs
7946 (list ocaml-cairo2 ocaml-camlp-streams))
7947 (inputs
7948 (list camlp5 gtk+))
7949 (native-inputs
7950 (list pkg-config))
7951 (home-page "https://github.com/garrigue/lablgtk")
7952 (synopsis "OCaml interface to GTK+3")
7953 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
7954 provides a strongly-typed object-oriented interface that is compatible with the
7955 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
7956 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
7957 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
7958 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
7959 ;; Version 2 only, with linking exception.
7960 (license license:lgpl2.0)))
7961
7962 (define-public ocaml-lablgtk3-sourceview3
7963 (package
7964 (inherit lablgtk3)
7965 (name "ocaml-lablgtk3-sourceview3")
7966 (propagated-inputs (list lablgtk3))
7967 (native-inputs (list gtksourceview-3 pkg-config))
7968 (arguments
7969 `(#:package "lablgtk3-sourceview3"
7970 #:test-target "."))
7971 (synopsis "OCaml interface to GTK+ gtksourceview library")
7972 (description "This package provides the lablgtk interface to the
7973 GTK+ gtksourceview library.")))
7974
7975 (define-public ocaml-reactivedata
7976 (package
7977 (name "ocaml-reactivedata")
7978 (version "0.3")
7979 (source (origin
7980 (method git-fetch)
7981 (uri (git-reference
7982 (url "https://github.com/ocsigen/reactiveData")
7983 (commit version)))
7984 (file-name (git-file-name name version))
7985 (sha256
7986 (base32
7987 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
7988 (arguments
7989 `(#:tests? #f)) ;no tests
7990 (build-system dune-build-system)
7991 (properties `((upstream-name . "reactiveData")))
7992 (propagated-inputs
7993 (list ocaml-react))
7994 (home-page "https://github.com/ocsigen/reactiveData")
7995 (synopsis "Declarative events and signals for OCaml")
7996 (description
7997 "React is an OCaml module for functional reactive programming (FRP). It
7998 provides support to program with time varying values: declarative events and
7999 signals. React doesn't define any primitive event or signal, it lets the
8000 client chooses the concrete timeline.")
8001 (license license:lgpl2.1+)))
8002
8003 (define-public ocaml-uucd
8004 (package
8005 (name "ocaml-uucd")
8006 (version "15.0.0")
8007 (source
8008 (origin
8009 (method url-fetch)
8010 (uri (string-append "https://erratique.ch/software/uucd/releases/"
8011 "uucd-" version ".tbz"))
8012 (sha256
8013 (base32
8014 "1g26237yqmxr7sd1n9fg65qm5mxz66ybk7hr336zfyyzl25h6jqf"))))
8015 (build-system ocaml-build-system)
8016 (arguments
8017 '(#:build-flags '("build" "--tests" "true")
8018 #:phases
8019 (modify-phases %standard-phases
8020 (delete 'configure))))
8021 (propagated-inputs
8022 (list ocaml-xmlm))
8023 (native-inputs
8024 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8025 (home-page "https://erratique.ch/software/uucd")
8026 (synopsis "Unicode character database decoder for OCaml")
8027 (description "Uucd is an OCaml module to decode the data of the Unicode
8028 character database from its XML representation. It provides high-level (but
8029 not necessarily efficient) access to the data so that efficient
8030 representations can be extracted.")
8031 (license license:isc)))
8032
8033 (define-public ocaml-uucp
8034 (package
8035 (name "ocaml-uucp")
8036 (version "15.0.0")
8037 (source
8038 (origin
8039 (method url-fetch)
8040 (uri (string-append "https://erratique.ch/software/uucp/releases/"
8041 "uucp-" version ".tbz"))
8042 (sha256
8043 (base32
8044 "0c2k9gkg442l7hnc8rn1vqzn6qh68w9fx7h3nj03n2x90ps98ixc"))))
8045 (build-system ocaml-build-system)
8046 (arguments
8047 '(#:build-flags '("build" "--tests" "true")
8048 #:phases
8049 (modify-phases %standard-phases
8050 (delete 'configure))))
8051 (native-inputs
8052 (list opam
8053 ocaml-findlib
8054 ocamlbuild
8055 ocaml-topkg
8056 ocaml-uucd
8057 ocaml-uunf
8058 ocaml-uutf))
8059 (home-page "https://erratique.ch/software/uucp")
8060 (synopsis "Unicode character properties for OCaml")
8061 (description "Uucp is an OCaml library providing efficient access to a
8062 selection of character properties of the Unicode character database.")
8063 (license license:isc)))
8064
8065 (define-public ocaml-uuseg
8066 (package
8067 (name "ocaml-uuseg")
8068 (version "15.0.0")
8069 (source
8070 (origin
8071 (method url-fetch)
8072 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
8073 "uuseg-" version ".tbz"))
8074 (sha256
8075 (base32
8076 "1qz130wlmnvb6j7kpvgjlqmdm2jqid4wb1dmrsls4hdm4rp7gk5b"))))
8077 (build-system ocaml-build-system)
8078 (arguments
8079 '(#:build-flags '("build" "--tests" "true")
8080 #:phases
8081 (modify-phases %standard-phases
8082 (delete 'configure))))
8083 (propagated-inputs
8084 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
8085 (native-inputs
8086 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
8087 (home-page "https://erratique.ch/software/uuseg")
8088 (synopsis "Unicode text segmentation for OCaml")
8089 (description "Uuseg is an OCaml library for segmenting Unicode text. It
8090 implements the locale independent Unicode text segmentation algorithms to
8091 detect grapheme cluster, word and sentence boundaries and the Unicode line
8092 breaking algorithm to detect line break opportunities.
8093
8094 The library is independent from any IO mechanism or Unicode text data
8095 structure and it can process text without a complete in-memory
8096 representation.")
8097 (license license:isc)))
8098
8099 (define-public ocaml-fix
8100 (package
8101 (name "ocaml-fix")
8102 (version "20220121")
8103 (source
8104 (origin
8105 (method git-fetch)
8106 (uri (git-reference
8107 (url "https://gitlab.inria.fr/fpottier/fix")
8108 (commit version)))
8109 (file-name (git-file-name name version))
8110 (sha256
8111 (base32
8112 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
8113 (build-system dune-build-system)
8114 (arguments
8115 ;; No tests.
8116 '(#:tests? #f))
8117 (home-page "https://gitlab.inria.fr/fpottier/fix")
8118 (synopsis "Facilities for memoization and fixed points")
8119 (description "This package provides helpers with various constructions
8120 that involve memoization and recursion.")
8121 (license license:lgpl2.0)))
8122
8123 (define-public ocaml-dune-build-info
8124 (package
8125 (inherit dune)
8126 (name "ocaml-dune-build-info")
8127 (build-system dune-build-system)
8128 (arguments
8129 '(#:package "dune-build-info"
8130 ;; No separate test suite from dune.
8131 #:tests? #f))
8132 (propagated-inputs
8133 (list ocaml-odoc))
8134 (synopsis "Embed build information inside an executable")
8135 (description "This package allows one to access information about how the
8136 executable was built, such as the version of the project at which it was built
8137 or the list of statically linked libraries with their versions. It supports
8138 reporting the version from the version control system during development to
8139 get an precise reference of when the executable was built.")))
8140
8141 (define-public ocaml-either
8142 (package
8143 (name "ocaml-either")
8144 (version "1.0.0")
8145 (source
8146 (origin
8147 (method git-fetch)
8148 (uri (git-reference
8149 (url "https://github.com/mirage/either")
8150 (commit version)))
8151 (file-name (git-file-name name version))
8152 (sha256
8153 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
8154 (build-system dune-build-system)
8155 (arguments
8156 ;; no tests
8157 `(#:tests? #f))
8158 (home-page "https://github.com/mirage/either")
8159 (synopsis "Compatibility Either module")
8160 (description "This library is a compatibility module for the Either module
8161 defined in OCaml 4.12.0.")
8162 (license license:expat)))
8163
8164 (define-public ocamlformat
8165 (package
8166 (name "ocamlformat")
8167 (version "0.24.1")
8168 (source
8169 (origin
8170 (method git-fetch)
8171 (uri (git-reference
8172 (url "https://github.com/ocaml-ppx/ocamlformat")
8173 (commit version)))
8174 (file-name (git-file-name name version))
8175 (sha256
8176 (base32
8177 "0y1j5mwwrliy6a78cmpi6j8gw425shghqg9ylyl3qw5fx4b088pp"))))
8178 (build-system dune-build-system)
8179 (arguments
8180 '(#:package "ocamlformat"
8181 #:phases
8182 (modify-phases %standard-phases
8183 ;; Tests related to other packages
8184 (add-after 'unpack 'remove-unrelated-tests
8185 (lambda _
8186 (delete-file-recursively "test/rpc")))
8187 (add-after 'unpack 'fix-test-format
8188 (lambda _
8189 (substitute* "test/cli/repl_file_errors.t/run.t"
8190 ((" ;;") ";;")))))))
8191 (propagated-inputs
8192 (list ocaml-version
8193 ocaml-base
8194 ocaml-cmdliner
8195 ocaml-dune-build-info
8196 ocaml-either
8197 ocaml-fix
8198 ocaml-fpath
8199 ocaml-menhir
8200 ocaml-odoc
8201 ocaml-ppxlib
8202 ocaml-re
8203 ocaml-odoc-parser
8204 ocaml-stdio
8205 ocaml-uuseg
8206 ocaml-uutf))
8207 (native-inputs
8208 (list git-minimal ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
8209 (home-page "https://github.com/ocaml-ppx/ocamlformat")
8210 (synopsis "Auto-formatter for OCaml code")
8211 (description "OCamlFormat is a tool to automatically format OCaml code in
8212 a uniform style.")
8213 (license license:expat)))
8214
8215 (define-public ocaml-bigstringaf
8216 (package
8217 (name "ocaml-bigstringaf")
8218 (version "0.9.0")
8219 (home-page "https://github.com/inhabitedtype/bigstringaf")
8220 (source
8221 (origin
8222 (method git-fetch)
8223 (uri (git-reference
8224 (url home-page)
8225 (commit version)))
8226 (file-name (git-file-name name version))
8227 (sha256
8228 (base32
8229 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
8230 (build-system dune-build-system)
8231 (arguments
8232 '(#:test-target "."))
8233 (propagated-inputs
8234 (list ocaml-bigarray-compat))
8235 (native-inputs
8236 (list ocaml-alcotest pkg-config))
8237 (synopsis
8238 "Bigstring intrinsics and fast blits based on memcpy/memmove")
8239 (description
8240 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
8241 not widely-known, sometimes misused, and so programs that use Bigstrings are
8242 slower than they have to be. And even if a library got that part right and
8243 exposed the intrinsics properly, the compiler doesn't have any fast blits
8244 between Bigstrings and other string-like types. @code{bigstringaf} provides
8245 these missing pieces.")
8246 (license license:bsd-3)))
8247
8248 (define-public ocaml-trie
8249 (package
8250 (name "ocaml-trie")
8251 (version "1.0.0")
8252 (home-page "https://github.com/kandu/trie/")
8253 (source
8254 (origin
8255 (method git-fetch)
8256 (uri (git-reference
8257 (url home-page)
8258 (commit version)))
8259 (file-name (git-file-name name version))
8260 (sha256
8261 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
8262 (build-system dune-build-system)
8263 (arguments
8264 '(#:tests? #f)) ;no tests
8265 (synopsis "Strict impure trie tree")
8266 (description
8267 "This module implements strict impure trie tree data structure for
8268 OCaml.")
8269 (license license:expat)))
8270
8271 (define-public ocaml-mew
8272 (package
8273 (name "ocaml-mew")
8274 (version "0.1.0")
8275 (home-page "https://github.com/kandu/mew")
8276 (source
8277 (origin
8278 (method git-fetch)
8279 (uri (git-reference
8280 (url home-page)
8281 (commit version)))
8282 (file-name (git-file-name name version))
8283 (sha256
8284 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
8285 (build-system dune-build-system)
8286 (propagated-inputs
8287 (list ocaml-result ocaml-trie))
8288 (native-inputs
8289 (list ocaml-ppx-expect))
8290 (synopsis "General modal editing engine generator")
8291 (description
8292 "This package provides the core modules of Modal Editing Witch, a general
8293 modal editing engine generator.")
8294 (license license:expat)))
8295
8296 (define-public ocaml-mew-vi
8297 (package
8298 (name "ocaml-mew-vi")
8299 (version "0.5.0")
8300 (home-page "https://github.com/kandu/mew_vi")
8301 (source
8302 (origin
8303 (method git-fetch)
8304 (uri (git-reference
8305 (url home-page)
8306 (commit version)))
8307 (file-name (git-file-name name version))
8308 (sha256
8309 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
8310 (build-system dune-build-system)
8311 (propagated-inputs
8312 (list ocaml-mew ocaml-react))
8313 (native-inputs
8314 (list ocaml-ppx-expect))
8315 (properties `((upstream-name . "mew_vi")))
8316 (synopsis "Modal editing VI-like editing engine generator")
8317 (description "This module provides a vi-like modal editing engine
8318 generator.")
8319 (license license:expat)))
8320
8321 (define-public ocaml-syntax-shims
8322 (package
8323 (name "ocaml-syntax-shims")
8324 (version "1.0.0")
8325 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
8326 (source
8327 (origin
8328 (method git-fetch)
8329 (uri (git-reference
8330 (url home-page)
8331 (commit version)))
8332 (file-name (git-file-name name version))
8333 (sha256
8334 (base32
8335 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
8336 (build-system dune-build-system)
8337 (properties
8338 `((upstream-name . "ocaml-syntax-shims")))
8339 (synopsis
8340 "Backport new syntax to older OCaml versions")
8341 (description
8342 "This package backports new language features such as @code{let+} to older
8343 OCaml compilers.")
8344 (license license:expat)))
8345
8346 (define-public ocaml-angstrom
8347 (package
8348 (name "ocaml-angstrom")
8349 (version "0.15.0")
8350 (home-page "https://github.com/inhabitedtype/angstrom")
8351 (source
8352 (origin
8353 (method git-fetch)
8354 (uri (git-reference
8355 (url home-page)
8356 (commit version)))
8357 (file-name (git-file-name name version))
8358 (sha256
8359 (base32
8360 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
8361 (build-system dune-build-system)
8362 (arguments
8363 ;; Only build the base angstrom package.
8364 '(#:package "angstrom"
8365 #:test-target "."))
8366 (propagated-inputs
8367 (list ocaml-bigstringaf))
8368 (native-inputs
8369 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
8370 (synopsis "Parser combinators built for speed and memory-efficiency")
8371 (description
8372 "Angstrom is a parser-combinator library that makes it easy to write
8373 efficient, expressive, and reusable parsers suitable for high-performance
8374 applications. It exposes monadic and applicative interfaces for composition,
8375 and supports incremental input through buffered and unbuffered interfaces.
8376 Both interfaces give the user total control over the blocking behavior of
8377 their application, with the unbuffered interface enabling zero-copy IO.
8378 Parsers are backtracking by default and support unbounded lookahead.")
8379 (license license:bsd-3)))
8380
8381 (define-public ocaml-graphics
8382 (package
8383 (name "ocaml-graphics")
8384 (version "5.1.2")
8385 (home-page "https://github.com/ocaml/graphics")
8386 (source
8387 (origin
8388 (method git-fetch)
8389 (uri (git-reference
8390 (url home-page)
8391 (commit version)))
8392 (file-name (git-file-name name version))
8393 (sha256
8394 (base32
8395 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
8396 (build-system dune-build-system)
8397 (propagated-inputs
8398 (list libx11))
8399 (synopsis "The OCaml graphics library")
8400 (description
8401 "The graphics library provides a set of portable drawing primitives.
8402 Drawing takes place in a separate window that is created when
8403 Graphics.open_graph is called. This library used to be distributed with OCaml
8404 up to OCaml 4.08.")
8405 (license license:lgpl2.1+)))
8406
8407 (define-public ocaml-uri-sexp
8408 (package
8409 (inherit ocaml-uri)
8410 (name "ocaml-uri-sexp")
8411 (arguments
8412 '(#:package "uri-sexp"
8413 #:test-target "."))
8414 (propagated-inputs
8415 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
8416 (native-inputs (list ocaml-ounit))
8417 (synopsis "RFC3986 URI/URL parsing library")
8418 (description "This package adds S-exp support to @code{ocaml-uri}.")))
8419
8420 (define-public ocaml-cohttp
8421 (package
8422 (name "ocaml-cohttp")
8423 (version "5.0.0")
8424 (source
8425 (origin
8426 (method git-fetch)
8427 (uri (git-reference
8428 (url "https://github.com/mirage/ocaml-cohttp")
8429 (commit (string-append "v" version))))
8430 (file-name (git-file-name name version))
8431 (sha256
8432 (base32
8433 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
8434 (build-system dune-build-system)
8435 (arguments
8436 '(#:package "cohttp"
8437 #:test-target "cohttp_test/src"))
8438 (propagated-inputs
8439 (list ocaml-re
8440 ocaml-uri
8441 ocaml-uri-sexp
8442 ocaml-sexplib0
8443 ocaml-ppx-sexp-conv
8444 ocaml-stringext
8445 ocaml-base64))
8446 (native-inputs
8447 (list ocaml-fmt ocaml-jsonm ocaml-alcotest))
8448 (home-page "https://github.com/mirage/ocaml-cohttp")
8449 (synopsis "OCaml library for HTTP clients and servers")
8450 (description
8451 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
8452 HTTP parser, and implementations using various asynchronous programming
8453 libraries.")
8454 (license license:isc)))
8455
8456 (define-public js-of-ocaml
8457 (package
8458 (name "js-of-ocaml")
8459 (version "4.1.0")
8460 (source
8461 (origin
8462 (method git-fetch)
8463 (uri (git-reference
8464 (url "https://github.com/ocsigen/js_of_ocaml")
8465 (commit version)))
8466 (file-name (git-file-name name version))
8467 (sha256
8468 (base32 "14ig69iyc9yzniclfsc6cz9g9zqp96bs66y6dy4rzrm78s81w6i1"))))
8469 (build-system dune-build-system)
8470 (arguments
8471 `(#:tests? #f ;tests assume ocaml 4.13
8472 #:test-target "."))
8473 (propagated-inputs
8474 (list ocaml-ppxlib
8475 ocaml-uchar
8476 ocaml-menhir
8477 ocaml-reactivedata
8478 ocaml-cmdliner
8479 ocaml-lwt
8480 ocaml-tyxml
8481 ocaml-re
8482 ocaml-uutf
8483 ocaml-graphics
8484 ocaml-yojson))
8485 (native-inputs
8486 ;; for tests
8487 (list node ocaml-ppx-expect ocaml-num))
8488 (properties `((upstream-name . "js_of_ocaml")))
8489 (home-page "https://ocsigen.org/js_of_ocaml/")
8490 (synopsis "Compiler from OCaml bytecode to Javascript")
8491 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
8492 It makes it possible to run pure OCaml programs in JavaScript environment like
8493 browsers and Node.js.")
8494 (license license:lgpl2.1+)))
8495
8496 (define-public ocaml-afl-persistent
8497 (package
8498 (name "ocaml-afl-persistent")
8499 (version "1.3")
8500 (source
8501 (origin
8502 (method git-fetch)
8503 (uri (git-reference
8504 (url "https://github.com/stedolan/ocaml-afl-persistent")
8505 (commit (string-append "v" version))))
8506 (file-name (git-file-name name version))
8507 (sha256
8508 (base32
8509 "06yyds2vcwlfr2nd3gvyrazlijjcrd1abnvkfpkaadgwdw3qam1i"))))
8510 (build-system ocaml-build-system)
8511 (arguments
8512 '(#:phases
8513 (modify-phases %standard-phases
8514 (delete 'configure)
8515 (replace 'build
8516 (lambda _
8517 (invoke "./build.sh")))
8518 ;; XXX: The tests are already run in the build.sh script.
8519 (delete 'check))))
8520 (native-inputs
8521 `(("opam" ,opam)))
8522 (home-page "https://github.com/stedolan/ocaml-afl-persistent")
8523 (synopsis "Use afl-fuzz in persistent mode")
8524 (description
8525 "afl-fuzz normally works by repeatedly forking the program being tested.
8526 Using this package, you can run afl-fuzz in ``persistent mode'', which avoids
8527 repeated forking and is much faster.")
8528 (license license:expat)))
8529
8530 (define-public ocaml-pprint
8531 (package
8532 (name "ocaml-pprint")
8533 (version "20220103")
8534 (home-page "https://github.com/fpottier/pprint")
8535 (source
8536 (origin
8537 (method git-fetch)
8538 (uri (git-reference
8539 (url home-page)
8540 (commit version)))
8541 (file-name (git-file-name name version))
8542 (sha256
8543 (base32
8544 "09y6nwnjldifm47406q1r9987njlk77g4ifqg6qs54dckhr64vax"))))
8545 (build-system dune-build-system)
8546 (synopsis "OCaml pretty-printing combinator library and rendering
8547 engine")
8548 (description "This OCaml library offers a set of combinators for building
8549 so-called documents as well as an efficient engine for converting documents to
8550 a textual, fixed-width format. The engine takes care of indentation and line
8551 breaks, while respecting the constraints imposed by the structure of the
8552 document and by the text width.")
8553 (license license:lgpl2.0)))
8554
8555 (define-public ocaml-crowbar
8556 (package
8557 (name "ocaml-crowbar")
8558 (version "0.2.1")
8559 (home-page "https://github.com/stedolan/crowbar")
8560 (source
8561 (origin
8562 (method git-fetch)
8563 (uri (git-reference
8564 (url home-page)
8565 (commit (string-append "v" version))))
8566 (file-name (git-file-name name version))
8567 (sha256
8568 (base32
8569 "11f3kiw58g8njx15akx16xcplzvzdw9y6c4jpyfxylkxws4g0f6j"))))
8570 (build-system dune-build-system)
8571 (arguments
8572 `(#:test-target "."))
8573 (propagated-inputs
8574 (list ocaml-ocplib-endian
8575 ocaml-cmdliner
8576 ocaml-afl-persistent))
8577 (native-inputs
8578 (list ocaml-calendar
8579 ocaml-fpath
8580 ocaml-uucp
8581 ocaml-uunf
8582 ocaml-uutf
8583 ocaml-pprint))
8584 (synopsis "Ocaml library for tests, let a fuzzer find failing cases")
8585 (description "Crowbar is a library for testing code, combining
8586 QuickCheck-style property-based testing and the magical bug-finding powers of
8587 @uref{http://lcamtuf.coredump.cx/afl/, afl-fuzz}.")
8588 (license license:expat)))
8589
8590 (define-public ocaml-eqaf
8591 (package
8592 (name "ocaml-eqaf")
8593 (version "0.9")
8594 (home-page "https://github.com/mirage/eqaf")
8595 (source
8596 (origin
8597 (method git-fetch)
8598 (uri (git-reference
8599 (url home-page)
8600 (commit (string-append "v" version))))
8601 (file-name (git-file-name name version))
8602 (sha256
8603 (base32
8604 "16ics56wiqyng70dy2hqikicm8ag1mv5w1h7hkiwvydw1x2j2rsl"))))
8605 (build-system dune-build-system)
8606 (propagated-inputs (list ocaml-cstruct))
8607 (native-inputs (list ocaml-alcotest ocaml-crowbar))
8608 (synopsis "OCaml library for constant-time equal function on string")
8609 (description "This OCaml library provides an equal function on string in
8610 constant-time to avoid timing-attack with crypto stuff.")
8611 (license license:expat)))
8612
8613 (define-public ocaml-digestif
8614 (package
8615 (name "ocaml-digestif")
8616 (version "1.1.3")
8617 (home-page "https://github.com/mirage/digestif")
8618 (source
8619 (origin
8620 (method git-fetch)
8621 (uri (git-reference
8622 (url home-page)
8623 (commit (string-append "v" version))))
8624 (file-name (git-file-name name version))
8625 (sha256
8626 (base32
8627 "0x5iskavqkclr5mk2q6jvh5h1v81krqi4v353rj4xsmdqb33s0f1"))))
8628 (build-system dune-build-system)
8629 (propagated-inputs (list ocaml-eqaf))
8630 (native-inputs
8631 (list pkg-config
8632 ocaml-fmt
8633 ocaml-alcotest
8634 ocaml-bos
8635 ocaml-astring
8636 ocaml-fpath
8637 ocaml-rresult
8638 ocaml-findlib))
8639 (synopsis "Simple hash algorithms in OCaml")
8640 (description
8641 "Digestif is an OCaml library that provides implementations of hash
8642 algorithms. Implemented hash algorithms include MD5, SHA1, SHA224, SHA256,
8643 SHA384, SHA512, Blake2b, Blake2s and RIPEMD160.")
8644 (license license:expat)))
8645
8646 (define-public ocaml-bibtex2html
8647 (package
8648 (name "ocaml-bibtex2html")
8649 (version "1.99")
8650 (source
8651 (origin
8652 (method url-fetch)
8653 (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
8654 (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
8655 (build-system ocaml-build-system)
8656 (arguments
8657 `(#:phases
8658 (modify-phases %standard-phases
8659 (add-after 'unpack 'patch-/bin/sh
8660 (lambda _
8661 (substitute* "configure" (("/bin/sh") (which "bash")))
8662 (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
8663 #t)))))
8664 (native-inputs
8665 `(("which" ,which)
8666 ("texlive" ,(texlive-updmap.cfg
8667 (list texlive-fonts-ec texlive-preprint
8668 texlive-hyperref texlive-bibtex)))))
8669 (propagated-inputs
8670 (list hevea))
8671 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
8672 (synopsis "BibTeX to HTML translator")
8673 (description "This package allows you to produce, from a set of
8674 bibliography files in BibTeX format, a bibliography in HTML format.")
8675 (license license:gpl2)))
8676
8677 (define-public ocaml-guile
8678 (package
8679 (name "ocaml-guile")
8680 (version "1.0")
8681 (home-page "https://github.com/gopiandcode/guile-ocaml")
8682 (source
8683 (origin
8684 (method git-fetch)
8685 (uri (git-reference
8686 (url home-page)
8687 (commit version)))
8688 (file-name (git-file-name name version))
8689 (sha256
8690 (base32
8691 "0yxdkrhrrbwvay5sn0p26rh3f11876k6kdharmpi4afxknml74ql"))))
8692 (build-system dune-build-system)
8693 (arguments
8694 `(#:tests? #f)) ; no tests
8695 (propagated-inputs
8696 (list ocaml-sexplib
8697 ocaml-ctypes
8698 ocaml-stdio
8699 ocaml-odoc))
8700 (inputs (list guile-3.0 libffi))
8701 (native-inputs
8702 (list ocaml-odoc
8703 pkg-config))
8704 (synopsis "Bindings to GNU Guile Scheme for OCaml")
8705 (description
8706 "The OCaml guile library provides high-level OCaml bindings to GNU Guile
8707 3.0, supporting easy interop between OCaml and GNU Guile Scheme.")
8708 (license license:gpl3+)))
8709
8710 ;;;
8711 ;;; Avoid adding new packages to the end of this file. To reduce the chances
8712 ;;; of a merge conflict, place them above by existing packages with similar
8713 ;;; functionality or similar names.
8714 ;;;