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