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