gnu: Add ocaml-ezjsonm.
[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.5")
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 "1i7pcv53kqplrbdx9mllrhbv4j57zf87xwq18r16cvn1lbc6mqal"))
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 ocaml-ezjsonm
3701 (package
3702 (name "ocaml-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 (native-inputs (list ocaml-alcotest))
3718 (propagated-inputs (list ocaml-hex ocaml-jsonm ocaml-sexplib))
3719 (home-page "https://github.com/mirage/ezjsonm/")
3720 (synopsis "Read and write JSON data")
3721 (description "Ezjsonm provides more convenient (but far less flexible) input
3722 and output functions that go to and from [string] values than jsonm. This avoids
3723 the need to write signal code, which is useful for quick scripts that manipulate
3724 JSON.")
3725 (license license:isc)))
3726
3727 (define-public ocaml-uri
3728 (package
3729 (name "ocaml-uri")
3730 (version "4.2.0")
3731 (home-page "https://github.com/mirage/ocaml-uri")
3732 (source
3733 (origin
3734 (method git-fetch)
3735 (uri (git-reference
3736 (url home-page)
3737 (commit (string-append "v" version))))
3738 (file-name (git-file-name name version))
3739 (sha256
3740 (base32
3741 "1bgkc66cq00mgnkz3i535srwzwc4cpdsv0mly5dzvvq33451xwf0"))))
3742 (build-system dune-build-system)
3743 (arguments '(#:package "uri"
3744 #:test-target "."))
3745 (propagated-inputs
3746 (list ocaml-stringext ocaml-angstrom))
3747 (native-inputs
3748 (list ocaml-ounit ocaml-ppx-sexp-conv))
3749 (properties `((upstream-name . "uri")
3750 (ocaml4.07-variant ,(delay ocaml4.07-uri))))
3751 (synopsis "RFC3986 URI/URL parsing library")
3752 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3753 (license license:isc)))
3754
3755 (define-public ocaml4.07-uri
3756 (package
3757 (name "ocaml4.07-uri")
3758 (version "2.2.0")
3759 (source
3760 (origin
3761 (method git-fetch)
3762 (uri (git-reference
3763 (url "https://github.com/mirage/ocaml-uri")
3764 (commit (string-append "v" version))))
3765 (file-name (git-file-name name version))
3766 (sha256
3767 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
3768 (build-system dune-build-system)
3769 (arguments
3770 `(#:test-target "."
3771 #:phases
3772 (modify-phases %standard-phases
3773 (add-before 'build 'update-deprecated
3774 (lambda _
3775 (substitute* "lib/uri.ml"
3776 (("Re.get") "Re.Group.get")))))
3777 #:ocaml ,ocaml-4.07
3778 #:findlib ,ocaml4.07-findlib
3779 #:dune ,ocaml4.07-dune))
3780 (native-inputs
3781 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
3782 ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv))))
3783 (propagated-inputs
3784 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
3785 ("ocaml-sexplib0" ,(package-with-ocaml4.07 ocaml-sexplib0))
3786 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3787 (properties `((upstream-name . "uri")))
3788 (home-page "https://github.com/mirage/ocaml-uri")
3789 (synopsis "RFC3986 URI/URL parsing library")
3790 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3791 (license license:isc)))
3792
3793 (define-public ocaml-easy-format
3794 (package
3795 (name "ocaml-easy-format")
3796 (version "1.3.4")
3797 (source (origin
3798 (method git-fetch)
3799 (uri (git-reference
3800 (url "https://github.com/mjambon/easy-format")
3801 (commit version)))
3802 (file-name (git-file-name name version))
3803 (sha256
3804 (base32
3805 "0xap6az4yyb60vb1jfs640wl3cf4njv78p538x9ihhf9f6ij3nh8"))))
3806 (build-system dune-build-system)
3807 (arguments
3808 `(#:package "easy-format"
3809 #:phases
3810 (modify-phases %standard-phases
3811 (add-before 'build 'make-writable
3812 (lambda _
3813 (for-each
3814 (lambda (file)
3815 (chmod file #o644))
3816 (find-files "." "."))
3817 #t)))))
3818 (home-page "https://github.com/mjambon/easy-format")
3819 (synopsis "Interface to the Format module")
3820 (description "Easy-format is a high-level and functional interface to the
3821 Format module of the OCaml standard library.")
3822 (license license:bsd-3)))
3823
3824 (define-public ocaml-piqilib
3825 (package
3826 (name "ocaml-piqilib")
3827 (version "0.6.15")
3828 (source
3829 (origin
3830 (method git-fetch)
3831 (uri (git-reference
3832 (url "https://github.com/alavrik/piqi")
3833 (commit (string-append "v" version))))
3834 (file-name (git-file-name name version))
3835 (sha256
3836 (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
3837 (build-system ocaml-build-system)
3838 (arguments
3839 `(#:phases
3840 (modify-phases %standard-phases
3841 (add-before 'configure 'fix-ocamlpath
3842 (lambda _
3843 (substitute* '("Makefile" "make/Makefile.ocaml")
3844 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))))
3845 (replace 'configure
3846 (lambda* (#:key outputs #:allow-other-keys)
3847 (let ((out (assoc-ref outputs "out")))
3848 (substitute* "make/OCamlMakefile"
3849 (("/bin/sh") (which "bash")))
3850 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3851 (string-append out "/lib/ocaml/site-lib")))))
3852 (add-after 'build 'build-ocaml
3853 (lambda* (#:key outputs #:allow-other-keys)
3854 (invoke "make" "ocaml")))
3855 (add-after 'install 'install-ocaml
3856 (lambda* (#:key outputs #:allow-other-keys)
3857 (invoke "make" "ocaml-install")))
3858 (add-after 'install-ocaml 'link-stubs
3859 (lambda* (#:key outputs #:allow-other-keys)
3860 (let* ((out (assoc-ref outputs "out"))
3861 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3862 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3863 (mkdir-p stubs)
3864 (symlink (string-append lib "/dllpiqilib_stubs.so")
3865 (string-append stubs "/dllpiqilib_stubs.so"))))))))
3866 (native-inputs
3867 (list which))
3868 (propagated-inputs
3869 `(("ocaml-xmlm" ,ocaml-xmlm)
3870 ("ocaml-sedlex" ,ocaml-sedlex)
3871 ("ocaml-easy-format" ,ocaml-easy-format)
3872 ("ocaml-base64" ,ocaml-base64)))
3873 (home-page "http://piqi.org")
3874 (synopsis "Data serialization and conversion library")
3875 (description "Piqilib is the common library used by the piqi command-line
3876 tool and piqi-ocaml.")
3877 (license license:asl2.0)))
3878
3879 (define-public ocaml-uuidm
3880 (package
3881 (name "ocaml-uuidm")
3882 (version "0.9.8")
3883 (source (origin
3884 (method url-fetch)
3885 (uri (string-append "http://erratique.ch/software/uuidm/"
3886 "releases/uuidm-" version ".tbz"))
3887 (sha256
3888 (base32
3889 "1cr6xlzla9fmd587lfhzac0icifspjnqi9f4cdafshj3jn85nrpw"))))
3890 (build-system ocaml-build-system)
3891 (arguments
3892 `(#:build-flags
3893 (list "build" "--tests" "true" "--with-cmdliner" "true")
3894 #:phases
3895 (modify-phases %standard-phases
3896 (delete 'configure))))
3897 (native-inputs
3898 (list ocamlbuild opam))
3899 (propagated-inputs
3900 `(("cmdliner" ,ocaml-cmdliner)
3901 ("topkg" ,ocaml-topkg)))
3902 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-uuidm))))
3903 (home-page "https://erratique.ch/software/uuidm")
3904 (synopsis "Universally unique identifiers for OCaml")
3905 (description "Uuidm is an OCaml module implementing 128 bits universally
3906 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
3907 and 4 (random based) according to RFC 4122.")
3908 (license license:isc)))
3909
3910 (define-public ocaml4.07-uuidm
3911 (package-with-ocaml4.07
3912 (package
3913 (inherit ocaml-uuidm)
3914 (version "0.9.7")
3915 (source (origin
3916 (method url-fetch)
3917 (uri (string-append "http://erratique.ch/software/uuidm/"
3918 "releases/uuidm-" version ".tbz"))
3919 (sha256
3920 (base32
3921 "1ivxb3hxn9bk62rmixx6px4fvn52s4yr1bpla7rgkcn8981v45r8"))))
3922 (properties '()))))
3923
3924 (define-public ocaml-graph
3925 (package
3926 (name "ocaml-graph")
3927 (version "1.8.8")
3928 (source (origin
3929 (method url-fetch)
3930 (uri (string-append "http://ocamlgraph.lri.fr/download/"
3931 "ocamlgraph-" version ".tar.gz"))
3932 (sha256
3933 (base32
3934 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
3935 (build-system ocaml-build-system)
3936 (arguments
3937 `(#:install-target "install-findlib"
3938 #:tests? #f
3939 #:phases
3940 (modify-phases %standard-phases
3941 (add-before 'configure 'set-shell
3942 (lambda* (#:key inputs #:allow-other-keys)
3943 (setenv "CONFIG_SHELL"
3944 (search-input-file inputs "/bin/sh")))))))
3945 (inputs (list lablgtk))
3946 (properties `((upstream-name . "ocamlgraph")))
3947 (home-page "http://ocamlgraph.lri.fr/")
3948 (synopsis "Graph library for OCaml")
3949 (description "OCamlgraph is a generic graph library for OCaml.")
3950 (license license:lgpl2.1)))
3951
3952 (define-public ocaml-piqi
3953 (package
3954 (name "ocaml-piqi")
3955 (version "0.7.7")
3956 (source (origin
3957 (method git-fetch)
3958 (uri (git-reference
3959 (url "https://github.com/alavrik/piqi-ocaml")
3960 (commit (string-append "v" version))))
3961 (file-name (git-file-name name version))
3962 (sha256
3963 (base32
3964 "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"))))
3965 (build-system ocaml-build-system)
3966 (arguments
3967 `(#:make-flags
3968 ,#~(list (string-append "DESTDIR=" #$output)
3969 (string-append "SHELL="
3970 #+(file-append (canonical-package bash-minimal)
3971 "/bin/sh")))
3972 #:phases
3973 (modify-phases %standard-phases
3974 (add-after 'unpack 'make-files-writable
3975 (lambda _
3976 (for-each make-file-writable (find-files "."))
3977 #t))
3978 (delete 'configure))))
3979 (native-inputs
3980 (list which protobuf)) ; for tests
3981 (propagated-inputs
3982 `(("ocaml-num" ,ocaml-num)
3983 ("ocaml-piqilib" ,ocaml-piqilib)
3984 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
3985 (home-page "https://github.com/alavrik/piqi-ocaml")
3986 (synopsis "Protocol serialization system for OCaml")
3987 (description "Piqi is a multi-format data serialization system for OCaml.
3988 It provides a uniform interface for serializing OCaml data structures to JSON,
3989 XML and Protocol Buffers formats.")
3990 (license license:asl2.0)))
3991
3992 (define-public bap
3993 (package
3994 (name "bap")
3995 (version "2.0.0")
3996 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
3997 (source (origin
3998 (method git-fetch)
3999 (uri (git-reference
4000 (url home-page)
4001 (commit (string-append "v" version))))
4002 (file-name (git-file-name name version))
4003 (sha256
4004 (base32
4005 "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
4006 (build-system ocaml-build-system)
4007 (native-inputs
4008 `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
4009 ("clang" ,clang-3.8)
4010 ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
4011 (propagated-inputs
4012 `(("camlzip" ,(package-with-ocaml4.07 camlzip))
4013 ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
4014 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
4015 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
4016 ("ocaml-ezjsonm" ,(package-with-ocaml4.07 ocaml-ezjsonm))
4017 ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
4018 ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
4019 ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
4020 ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
4021 ("ocaml-piqi" ,(package-with-ocaml4.07 ocaml-piqi))
4022 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
4023 ("ocaml-utop" ,ocaml4.07-utop)
4024 ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
4025 ("ocaml-uri" ,ocaml4.07-uri)
4026 ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
4027 (inputs
4028 (list gmp llvm-3.8 ncurses))
4029 (arguments
4030 `(#:use-make? #t
4031 #:phases
4032 (modify-phases %standard-phases
4033 (add-before 'configure 'fix-ncurses
4034 (lambda _
4035 (substitute* "oasis/llvm"
4036 (("-lcurses") "-lncurses"))
4037 #t))
4038 (replace 'configure
4039 (lambda* (#:key outputs inputs #:allow-other-keys)
4040 ;; add write for user, to prevent a failure in the install phase
4041 (for-each
4042 (lambda (file)
4043 (let ((stat (stat file)))
4044 (chmod file (+ #o200 (stat:mode stat)))))
4045 (find-files "." "."))
4046 (invoke "./configure" "--prefix"
4047 (assoc-ref outputs "out")
4048 "--libdir"
4049 (string-append
4050 (assoc-ref outputs "out")
4051 "/lib/ocaml/site-lib")
4052 "--with-llvm-version=3.8"
4053 "--with-llvm-config=llvm-config"
4054 "--enable-everything"))))
4055 #:ocaml ,ocaml-4.07
4056 #:findlib ,ocaml4.07-findlib))
4057 (synopsis "Binary Analysis Platform")
4058 (description "Binary Analysis Platform is a framework for writing program
4059 analysis tools, that target binary files. The framework consists of a plethora
4060 of libraries, plugins, and frontends. The libraries provide code reusability,
4061 the plugins facilitate extensibility, and the frontends serve as entry points.")
4062 (license license:expat)))
4063
4064 (define-public ocaml-camomile
4065 (package
4066 (name "ocaml-camomile")
4067 (version "1.0.2")
4068 (home-page "https://github.com/yoriyuki/Camomile")
4069 (source (origin
4070 (method url-fetch)
4071 (uri (string-append home-page "/releases/download/" version
4072 "/camomile-" version ".tbz"))
4073 (sha256
4074 (base32
4075 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
4076 (build-system dune-build-system)
4077 (arguments
4078 `(#:test-target "camomile-test"
4079 #:tests? #f ; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
4080 #:phases
4081 (modify-phases %standard-phases
4082 (add-before 'build 'fix-usr-share
4083 (lambda* (#:key outputs #:allow-other-keys)
4084 (substitute* '("Camomile/dune" "configure.ml")
4085 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
4086 #t)))))
4087 (synopsis "Comprehensive Unicode library")
4088 (description "Camomile is a Unicode library for OCaml. Camomile provides
4089 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
4090 200 encodings, collation and locale-sensitive case mappings, and more. The
4091 library is currently designed for Unicode Standard 3.2.")
4092 ;; with an exception for linked libraries to use a different license
4093 (license license:lgpl2.0+)))
4094
4095 (define-public ocaml-charinfo-width
4096 ;; Add LICENSE file and Dune tests
4097 (let ((commit "20aaaa6dca8f1e0b1ace55b6f2a8ba5e5910b620"))
4098 (package
4099 (name "ocaml-charinfo-width")
4100 (version (git-version "1.1.0" "1" commit))
4101 (home-page "https://github.com/kandu/charinfo_width/")
4102 (source (origin
4103 (method git-fetch)
4104 (uri (git-reference
4105 (url home-page)
4106 (commit commit)))
4107 (file-name (git-file-name name version))
4108 (sha256
4109 (base32
4110 "04gil5hxm2jax9paw3i24d8zyzhyl5cphzfyryvy2lcrm3c485q0"))))
4111 (build-system dune-build-system)
4112 (propagated-inputs
4113 (list ocaml-result ocaml-camomile))
4114 (native-inputs
4115 (list ocaml-ppx-expect))
4116 (properties
4117 `((upstream-name . "charInfo_width")))
4118 (synopsis "Determine column width for a character")
4119 (description "This module implements purely in OCaml a character width
4120 function that follows the prototype of POSIX's wcwidth.")
4121 (license license:expat))))
4122
4123 (define-public ocaml-zed
4124 (package
4125 (name "ocaml-zed")
4126 (version "3.1.0")
4127 (home-page "https://github.com/ocaml-community/zed")
4128 (source
4129 (origin
4130 (method git-fetch)
4131 (uri (git-reference
4132 (url home-page)
4133 (commit version)))
4134 (file-name (git-file-name name version))
4135 (sha256
4136 (base32 "04vr1a94imsghm98iigc35rhifsz0rh3qz2qm0wam2wvp6vmrx0p"))))
4137 (build-system dune-build-system)
4138 (arguments
4139 `(#:test-target "."))
4140 (propagated-inputs
4141 `(("ocaml-charInfo-width" ,ocaml-charinfo-width)
4142 ("ocaml-camomile" ,ocaml-camomile)
4143 ("ocaml-react" ,ocaml-react)))
4144 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-zed))))
4145 (synopsis "Abstract engine for text edition in OCaml")
4146 (description
4147 "This module provides an abstract engine for text edition. It can be
4148 used to write text editors, edition widgets, readlines, and more. The module
4149 Zed uses Camomile to fully support the Unicode specification, and implements
4150 an UTF-8 encoded string type with validation, and a rope datastructure to
4151 achieve efficient operations on large Unicode buffers. Zed also features a
4152 regular expression search on ropes. To support efficient text edition
4153 capabilities, Zed provides macro recording and cursor management facilities.")
4154 (license license:bsd-3)))
4155
4156 (define-public ocaml4.07-zed
4157 (package-with-ocaml4.07
4158 (package
4159 (inherit ocaml-zed)
4160 (version "2.0.3")
4161 (source (origin
4162 (method git-fetch)
4163 (uri (git-reference
4164 (url "https://github.com/ocaml-community/zed")
4165 (commit version)))
4166 (file-name (git-file-name "ocaml4.07-zed" version))
4167 (sha256
4168 (base32
4169 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
4170 (properties '()))))
4171
4172 (define-public ocaml-lambda-term
4173 (package
4174 (name "ocaml-lambda-term")
4175 (version "3.2.0")
4176 (home-page "https://github.com/ocaml-community/lambda-term")
4177 (source (origin
4178 (method git-fetch)
4179 (uri (git-reference
4180 (url home-page)
4181 (commit version)))
4182 (file-name (git-file-name name version))
4183 (sha256
4184 (base32
4185 "048k26644wq5wlwk0j179dxrxyz9nxqqq4vvhyh6pqpgxdajd44i"))))
4186 (build-system dune-build-system)
4187 (arguments
4188 `(#:test-target "."))
4189 (propagated-inputs
4190 (list ocaml-lwt
4191 ocaml-lwt-log
4192 ocaml-react
4193 ocaml-zed
4194 ocaml-camomile
4195 ocaml-lwt-react
4196 ocaml-mew-vi))
4197 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lambda-term))))
4198 (synopsis "Terminal manipulation library for OCaml")
4199 (description "Lambda-Term is a cross-platform library for manipulating the
4200 terminal. It provides an abstraction for keys, mouse events, colors, as well as
4201 a set of widgets to write curses-like applications. The main objective of
4202 Lambda-Term is to provide a higher level functional interface to terminal
4203 manipulation than, for example, ncurses, by providing a native OCaml interface
4204 instead of bindings to a C library.")
4205 (license license:bsd-3)))
4206
4207 (define-public ocaml4.07-lambda-term
4208 (package-with-ocaml4.07
4209 (package
4210 (inherit ocaml-lambda-term)
4211 (version "2.0.2")
4212 (source
4213 (origin
4214 (method git-fetch)
4215 (uri (git-reference
4216 (url "https://github.com/ocaml-community/lambda-term")
4217 (commit version)))
4218 (file-name (git-file-name "ocaml4.07-lambda-term" version))
4219 (sha256
4220 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
4221 (propagated-inputs
4222 `(("ocaml-lwt" ,ocaml-lwt)
4223 ("ocaml-lwt-log" ,ocaml-lwt-log)
4224 ("ocaml-lwt-react" ,ocaml-lwt-react)
4225 ("ocaml-zed" ,ocaml-zed)))
4226 (properties '()))))
4227
4228 (define-public ocaml-utop
4229 (package
4230 (name "ocaml-utop")
4231 (version "2.9.2")
4232 (source
4233 (origin
4234 (method git-fetch)
4235 (uri (git-reference
4236 (url "https://github.com/ocaml-community/utop")
4237 (commit version)))
4238 (file-name (git-file-name name version))
4239 (sha256
4240 (base32 "0z5anakgbndhyzbi570pfs2fy69bnmgq9jflgfbly2rhbhwa7wgj"))))
4241 (build-system dune-build-system)
4242 (arguments
4243 `(#:test-target "."))
4244 (native-inputs
4245 (list ocaml-cppo))
4246 (propagated-inputs
4247 (list ocaml-lambda-term ocaml-lwt ocaml-lwt-react ocaml-camomile
4248 ocaml-react))
4249 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-utop))))
4250 (home-page "https://github.com/ocaml-community/utop")
4251 (synopsis "Improved interface to the OCaml toplevel")
4252 (description "UTop is an improved toplevel for OCaml. It can run in a
4253 terminal or in Emacs. It supports line editing, history, real-time and context
4254 sensitive completion, colors, and more.")
4255 (license license:bsd-3)))
4256
4257 (define-public ocaml4.07-utop
4258 (package-with-ocaml4.07
4259 (package
4260 (inherit ocaml-utop)
4261 (version "2.4.3")
4262 (source
4263 (origin
4264 (method git-fetch)
4265 (uri (git-reference
4266 (url "https://github.com/ocaml-community/utop")
4267 (commit version)))
4268 (file-name (git-file-name "ocaml4.07-utop" version))
4269 (sha256
4270 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
4271 (propagated-inputs
4272 `(("ocaml-lambda-term" ,ocaml-lambda-term)
4273 ("ocaml-lwt" ,ocaml-lwt)
4274 ("ocaml-react" ,ocaml-react)
4275 ("ocaml-camomile" ,ocaml-camomile)
4276 ("ocaml-zed" ,ocaml-zed)))
4277 (properties '()))))
4278
4279 (define-public ocaml-integers
4280 (package
4281 (name "ocaml-integers")
4282 (version "0.7.0")
4283 (home-page "https://github.com/ocamllabs/ocaml-integers")
4284 (source (origin
4285 (method git-fetch)
4286 (uri (git-reference
4287 (url home-page)
4288 (commit version)))
4289 (file-name (git-file-name name version))
4290 (sha256
4291 (base32
4292 "0c0bmy53ag6504kih0cvnp4yf7mbcimb18m1mgs592ffb0zj1rff"))))
4293 (build-system dune-build-system)
4294 (arguments
4295 `(#:tests? #f)) ; no tests
4296 (propagated-inputs
4297 (list ocaml-stdlib-shims))
4298 (synopsis "Various signed and unsigned integer types for OCaml")
4299 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
4300 and 64-bit signed and unsigned integer types, together with aliases such as
4301 long and size_t whose sizes depend on the host platform.")
4302 (license license:expat)))
4303
4304 (define-public ocaml-ctypes
4305 (package
4306 (name "ocaml-ctypes")
4307 (version "0.20.1")
4308 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
4309 (source (origin
4310 (method git-fetch)
4311 (uri (git-reference
4312 (url home-page)
4313 (commit version)))
4314 (file-name (git-file-name name version))
4315 (sha256
4316 (base32
4317 "0ilzq9qzvwv9rc08cc9wchsx636zp870i7qvqmbigaa2qb812m0z"))))
4318 (build-system ocaml-build-system)
4319 (arguments
4320 `(#:phases
4321 (modify-phases %standard-phases
4322 (add-after 'unpack 'make-writable
4323 (lambda _
4324 (for-each make-file-writable
4325 (find-files "."))))
4326 (delete 'configure))))
4327 (native-inputs
4328 `(("pkg-config" ,pkg-config)
4329 ("ounit" ,ocaml-ounit)
4330 ("lwt" ,ocaml-lwt)))
4331 (propagated-inputs
4332 `(("bigarray-compat" ,ocaml-bigarray-compat)
4333 ("integers" ,ocaml-integers)))
4334 (inputs
4335 (list libffi))
4336 (synopsis "Library for binding to C libraries using pure OCaml")
4337 (description "Ctypes is a library for binding to C libraries using pure
4338 OCaml. The primary aim is to make writing C extensions as straightforward as
4339 possible. The core of ctypes is a set of combinators for describing the
4340 structure of C types -- numeric types, arrays, pointers, structs, unions and
4341 functions. You can use these combinators to describe the types of the
4342 functions that you want to call, then bind directly to those functions -- all
4343 without writing or generating any C!")
4344 (license license:expat)))
4345
4346 (define-public ocaml-ocb-stubblr
4347 (package
4348 (name "ocaml-ocb-stubblr")
4349 (version "0.1.1")
4350 (home-page "https://github.com/pqwy/ocb-stubblr")
4351 (source (origin
4352 (method url-fetch)
4353 (uri (string-append
4354 home-page "/releases/download/v0.1.1/ocb-stubblr-"
4355 version ".tbz"))
4356 (file-name (string-append name "-" version ".tbz"))
4357 (sha256
4358 (base32
4359 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
4360 (build-system ocaml-build-system)
4361 (arguments
4362 `(#:build-flags (list "build" "--tests" "true")
4363 #:phases
4364 (modify-phases %standard-phases
4365 (delete 'configure)
4366 (add-before 'build 'fix-for-guix
4367 (lambda _
4368 (substitute* "src/ocb_stubblr.ml"
4369 ;; Do not fail when opam is not present or initialized
4370 (("error_msgf \"error running opam\"") "\"\"")
4371 ;; Guix doesn't have cc, but it has gcc
4372 (("\"cc\"") "\"gcc\""))
4373 #t)))))
4374 (inputs
4375 `(("topkg" ,ocaml-topkg)
4376 ("opam" ,opam)))
4377 (native-inputs
4378 `(("astring" ,ocaml-astring)
4379 ("ocamlbuild" ,ocamlbuild)))
4380 (synopsis "OCamlbuild plugin for C stubs")
4381 (description "Ocb-stubblr is about ten lines of code that you need to
4382 repeat over, over, over and over again if you are using ocamlbuild to build
4383 OCaml projects that contain C stubs.")
4384 (license license:isc)))
4385
4386 (define-public ocaml-tsdl
4387 (package
4388 (name "ocaml-tsdl")
4389 (version "0.9.9")
4390 (home-page "https://erratique.ch/software/tsdl")
4391 (source (origin
4392 (method url-fetch)
4393 (uri (string-append home-page "/releases/tsdl-"
4394 version ".tbz"))
4395 (file-name (string-append name "-" version ".tar.gz"))
4396 (sha256
4397 (base32
4398 "1m565jgfanijjzp64c1rylahkpmrrb03ywj202j49n06nvwp788s"))))
4399 (build-system ocaml-build-system)
4400 (arguments
4401 `(#:build-flags '("build")
4402 #:tests? #f; tests require a display device
4403 #:phases
4404 (modify-phases %standard-phases
4405 (delete 'configure))))
4406 (native-inputs
4407 (list ocamlbuild ocaml-astring opam pkg-config))
4408 (inputs
4409 `(("topkg" ,ocaml-topkg)
4410 ("sdl2" ,sdl2)
4411 ("integers" ,ocaml-integers)
4412 ("ctypes" ,ocaml-ctypes)))
4413 (synopsis "Thin bindings to SDL for OCaml")
4414 (description "Tsdl is an OCaml library providing thin bindings to the
4415 cross-platform SDL C library.")
4416 (license license:isc)))
4417
4418 (define-public dedukti
4419 (package
4420 (name "dedukti")
4421 (version "2.6.0")
4422 (home-page "https://deducteam.github.io/")
4423 (source
4424 (origin
4425 (method git-fetch)
4426 (uri (git-reference
4427 (url "https://github.com/deducteam/dedukti")
4428 (commit (string-append "v" version))))
4429 (file-name (git-file-name name version))
4430 (sha256
4431 (base32
4432 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
4433 (inputs
4434 `(("menhir" ,ocaml-menhir)))
4435 (native-inputs
4436 (list ocamlbuild))
4437 (build-system ocaml-build-system)
4438 (arguments
4439 `(#:phases
4440 ,#~(modify-phases %standard-phases
4441 (delete 'configure)
4442 (replace 'build
4443 (lambda _
4444 (invoke "make")))
4445 (replace 'check
4446 (lambda _
4447 (invoke "make" "tests")))
4448 (add-before 'install 'set-binpath
4449 ;; Change binary path in the makefile
4450 (lambda _
4451 (substitute* "GNUmakefile"
4452 (("BINDIR = (.*)$")
4453 (string-append "BINDIR = " #$output "/bin")))))
4454 (replace 'install
4455 (lambda _
4456 (invoke "make" "install"))))))
4457 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
4458 the λ-calculus")
4459 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
4460 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
4461 dependent types. The λΠ-calculus modulo theory is itself an extension of the
4462 λΠ-calculus where the context contains variable declaration as well as rewrite
4463 rules. This system is not designed to develop proofs, but to check proofs
4464 developed in other systems. In particular, it enjoys a minimalistic syntax.")
4465 (license license:cecill-c)))
4466
4467 (define-public emacs-dedukti-mode
4468 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
4469 (package
4470 (name "emacs-dedukti-mode")
4471 (version (git-version "0" "0" commit))
4472 (home-page "https://github.com/rafoo/dedukti-mode")
4473 (source (origin
4474 (method git-fetch)
4475 (uri (git-reference
4476 (url home-page)
4477 (commit commit)))
4478 (sha256
4479 (base32
4480 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
4481 (file-name (git-file-name name version))))
4482 (inputs
4483 (list dedukti))
4484 (build-system emacs-build-system)
4485 (arguments
4486 '(#:phases
4487 (modify-phases %standard-phases
4488 (add-before 'install 'patch-dkpath
4489 (lambda _
4490 (let ((dkcheck-path (which "dkcheck")))
4491 (substitute* "dedukti-mode.el"
4492 (("dedukti-path \"(.*)\"")
4493 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
4494 (synopsis "Emacs major mode for Dedukti files")
4495 (description "This package provides an Emacs major mode for editing
4496 Dedukti files.")
4497 (license license:cecill-b))))
4498
4499 (define-public emacs-flycheck-dedukti
4500 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
4501 (package
4502 (name "emacs-flycheck-dedukti")
4503 (version (git-version "0" "0" commit))
4504 (home-page "https://github.com/rafoo/flycheck-dedukti")
4505 (source (origin
4506 (method git-fetch)
4507 (uri (git-reference
4508 (url home-page)
4509 (commit commit)))
4510 (sha256
4511 (base32
4512 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
4513 (file-name (git-file-name name version))))
4514 (build-system emacs-build-system)
4515 (inputs
4516 (list emacs-dedukti-mode emacs-flycheck))
4517 (synopsis "Flycheck integration for the dedukti language")
4518 (description "This package provides a frontend for Flycheck to perform
4519 syntax checking on dedukti files.")
4520 (license license:cecill-b))))
4521
4522 (define-public ocaml-jst-config
4523 (package
4524 (name "ocaml-jst-config")
4525 (version "0.15.1")
4526 (source
4527 (origin
4528 (method git-fetch)
4529 (uri (git-reference
4530 (url "https://github.com/janestreet/jst-config")
4531 (commit (string-append "v" version))))
4532 (file-name (git-file-name name version))
4533 (sha256
4534 (base32
4535 "1yp5p63clvaxmkf7vlasgyapxc31x29c154pyq63n0fvi2fpf4y3"))))
4536 (build-system dune-build-system)
4537 (arguments '(#:tests? #f)) ; no tests
4538 (propagated-inputs
4539 (list ocaml-base ocaml-ppx-assert ocaml-stdio dune-configurator))
4540 (home-page "https://github.com/janestreet/jst-config")
4541 (synopsis "Compile-time configuration for Jane Street libraries")
4542 (description "Defines compile-time constants used in Jane Street libraries
4543 such as Base, Core, and Async. This package has an unstable interface; it is
4544 intended only to share configuration between different packages from Jane
4545 Street. Future updates may not be backward-compatible, and we do not
4546 recommend using this package directly.")
4547 (license license:expat)))
4548
4549 (define-public ocaml-jane-street-headers
4550 (package
4551 (name "ocaml-jane-street-headers")
4552 (version "0.15.0")
4553 (source
4554 (janestreet-origin
4555 "jane-street-headers" version
4556 "1r27r0bxxa0iaah5rm84lwhrmh784vfpmb6056hpv0p34rxs7r1l"))
4557 (build-system dune-build-system)
4558 (arguments '(#:tests? #f)) ; no tests
4559 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-jane-street-headers))))
4560 (home-page "https://github.com/janestreet/jane-street-headers")
4561 (synopsis "Jane Street C header files")
4562 (description "C header files shared between the various Jane Street
4563 packages.")
4564 (license license:expat)))
4565
4566 (define-public ocaml-time-now
4567 (package
4568 (name "ocaml-time-now")
4569 (version "0.15.0")
4570 (source
4571 (janestreet-origin
4572 "time_now" version
4573 "1a6b1f55mwci1bd8w8vji0qn6wbs60jbwixvwgy4klx2blq57cqk"))
4574 (build-system dune-build-system)
4575 (arguments '(#:tests? #f)) ; no tests
4576 (propagated-inputs
4577 (list ocaml-base ocaml-jane-street-headers ocaml-jst-config
4578 ocaml-ppx-base ocaml-ppx-optcomp))
4579 (properties `((upstream-name . "time_now")))
4580 (home-page
4581 "https://github.com/janestreet/time_now")
4582 (synopsis "Reports the current time")
4583 (description
4584 "Provides a single function to report the current time in nanoseconds
4585 since the start of the Unix epoch.")
4586 (license license:expat)))
4587
4588 (define-public ocaml-ppx-inline-test
4589 (package
4590 (name "ocaml-ppx-inline-test")
4591 (version "0.15.0")
4592 (home-page "https://github.com/janestreet/ppx_inline_test")
4593 (source
4594 (origin
4595 (method git-fetch)
4596 (uri (git-reference
4597 (url (string-append home-page ".git"))
4598 (commit (string-append "v" version))))
4599 (file-name (git-file-name name version))
4600 (sha256
4601 (base32
4602 "1a0gaj9p6gbn5j7c258mnzr7yjlq0hqi3aqqgyj1g2dbk1sxdbjz"))))
4603 (build-system dune-build-system)
4604 (arguments
4605 `(#:tests? #f)) ;see home page README for further information
4606 (propagated-inputs
4607 (list ocaml-base
4608 ocaml-migrate-parsetree
4609 ocaml-compiler-libs
4610 ocaml-sexplib0
4611 ocaml-stdio
4612 ocaml-ppxlib
4613 ocaml-time-now))
4614 (properties `((upstream-name . "ppx_inline_test")
4615 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-inline-test))))
4616 (synopsis "Syntax extension for writing in-line tests in ocaml code")
4617 (description "This package contains a syntax extension for writing
4618 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
4619 collection.")
4620 (license license:expat)))
4621
4622 (define-public ocaml4.07-ppx-inline-test
4623 (package-with-ocaml4.07
4624 (package
4625 (inherit ocaml-ppx-inline-test)
4626 (name "ocaml-ppx-inline-test")
4627 (version "0.12.0")
4628 (home-page "https://github.com/janestreet/ppx_inline_test")
4629 (source
4630 (origin
4631 (method git-fetch)
4632 (uri (git-reference
4633 (url (string-append home-page ".git"))
4634 (commit (string-append "v" version))))
4635 (file-name (git-file-name name version))
4636 (sha256
4637 (base32
4638 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
4639 (propagated-inputs
4640 `(("ocaml-base" ,ocaml-base)
4641 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4642 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
4643 ("ocaml-sexplib0" ,ocaml-sexplib0)
4644 ("ocaml-stdio" ,ocaml-stdio)
4645 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4646 (properties `((upstream-name . "ppx_inline_test"))))))
4647
4648 (define-public ocaml-bindlib
4649 (package
4650 (name "ocaml-bindlib")
4651 (version "6.0.0")
4652 (source
4653 (origin
4654 (method git-fetch)
4655 (uri (git-reference
4656 (url "https://github.com/rlepigre/ocaml-bindlib")
4657 (commit version)))
4658 (file-name (git-file-name name version))
4659 (sha256
4660 (base32
4661 "1viyws3igy49hfaj4jaiwm4iggck9zdn7r3g6kh1n4zxphqk57yk"))))
4662 (build-system dune-build-system)
4663 (arguments
4664 `(#:test-target "."))
4665 (native-inputs
4666 (list ocamlbuild ocaml-findlib))
4667 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
4668 (synopsis "OCaml Bindlib library for bound variables")
4669 (description "Bindlib is a library allowing the manipulation of data
4670 structures with bound variables. It is particularly useful when writing ASTs
4671 for programming languages, but also for manipulating terms of the λ-calculus
4672 or quantified formulas.")
4673 (license license:gpl3+)))
4674
4675 (define-public ocaml-earley
4676 (package
4677 (name "ocaml-earley")
4678 (version "3.0.0")
4679 (home-page "https://github.com/rlepigre/ocaml-earley")
4680 (source
4681 (origin
4682 (method git-fetch)
4683 (uri (git-reference
4684 (url (string-append home-page ".git"))
4685 (commit version)))
4686 (file-name (git-file-name name version))
4687 (sha256
4688 (base32
4689 "1vi58zdxchpw6ai0bz9h2ggcmg8kv57yk6qbx82lh47s5wb3mz5y"))))
4690 (build-system dune-build-system)
4691 (arguments
4692 `(#:test-target "."))
4693 (propagated-inputs
4694 (list ocaml-stdlib-shims))
4695 (synopsis "Parsing library based on Earley Algorithm")
4696 (description "Earley is a parser combinator library base on Earley's
4697 algorithm. It is intended to be used in conjunction with an OCaml syntax
4698 extension which allows the definition of parsers inside the language. There
4699 is also support for writing OCaml syntax extensions in a camlp4 style.")
4700 (license license:cecill-b)))
4701
4702 (define-public ocaml-timed
4703 (package
4704 (name "ocaml-timed")
4705 (version "1.0")
4706 (home-page "https://github.com/rlepigre/ocaml-timed")
4707 (source (origin
4708 (method git-fetch)
4709 (uri (git-reference
4710 (url (string-append home-page ".git"))
4711 (commit (string-append name "_" version))))
4712 (sha256
4713 (base32
4714 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
4715 (file-name (git-file-name name version))))
4716 (build-system ocaml-build-system)
4717 (arguments
4718 '(#:phases
4719 (modify-phases %standard-phases
4720 (delete 'configure)
4721 (replace 'build
4722 (lambda _
4723 (invoke "make")))
4724 (replace 'install
4725 (lambda _
4726 (invoke "make" "install")))
4727 (replace 'check
4728 (lambda _
4729 (invoke "make" "tests"))))))
4730 (synopsis "Timed references for imperative state")
4731 (description "Timed references for imperative state. This module provides
4732 an alternative type for references (or mutable cells) supporting undo/redo
4733 operations. In particular, an abstract notion of time is used to capture the
4734 state of the references at any given point, so that it can be restored. Note
4735 that usual reference operations only have a constant time / memory overhead
4736 (compared to those of the standard library).
4737
4738 Moreover, we provide an alternative implementation based on the references
4739 of the standard library (Pervasives module). However, it is less efficient
4740 than the first one.")
4741 (license license:expat)))
4742
4743 (define-public ocaml-biniou
4744 (package
4745 (name "ocaml-biniou")
4746 (version "1.2.1")
4747 (home-page "https://github.com/mjambon/biniou")
4748 (source
4749 (origin
4750 (method git-fetch)
4751 (uri (git-reference
4752 (url (string-append home-page ".git"))
4753 (commit version)))
4754 (file-name (git-file-name name version))
4755 (sha256
4756 (base32
4757 "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
4758 (build-system dune-build-system)
4759 (arguments
4760 `(#:phases
4761 (modify-phases %standard-phases
4762 (add-before 'build 'make-writable
4763 (lambda _ (for-each make-file-writable (find-files "." ".")))))))
4764 (inputs
4765 (list ocaml-easy-format))
4766 (native-inputs
4767 (list which))
4768 (synopsis "Data format designed for speed, safety, ease of use and backward
4769 compatibility")
4770 (description "Biniou (pronounced \"be new\" is a binary data format
4771 designed for speed, safety, ease of use and backward compatibility as
4772 protocols evolve. Biniou is vastly equivalent to JSON in terms of
4773 functionality but allows implementations several times faster (4 times faster
4774 than yojson), with 25-35% space savings.")
4775 (license license:bsd-3)))
4776
4777 (define-public ocaml-yojson
4778 (package
4779 (name "ocaml-yojson")
4780 (version "1.7.0")
4781 (home-page "https://github.com/ocaml-community/yojson")
4782 (source
4783 (origin
4784 (method git-fetch)
4785 (uri (git-reference
4786 (url (string-append home-page ".git"))
4787 (commit version)))
4788 (file-name (git-file-name name version))
4789 (sha256
4790 (base32
4791 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
4792 (build-system dune-build-system)
4793 (arguments
4794 `(#:test-target "."))
4795 (propagated-inputs
4796 (list ocaml-biniou ocaml-easy-format))
4797 (native-inputs
4798 (list ocaml-alcotest ocaml-cppo))
4799 (synopsis "Low-level JSON library for OCaml")
4800 (description "Yojson is an optimized parsing and printing library for the
4801 JSON format. It addresses a few shortcomings of json-wheel including 2x
4802 speedup, polymorphic variants and optional syntax for tuples and variants.
4803 @code{ydump} is a pretty printing command-line program provided with the
4804 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
4805 serializers and deserializers from type definitions.")
4806 (license license:bsd-3)))
4807
4808 (define-public ocaml-craml
4809 (package
4810 (name "ocaml-craml")
4811 (version "1.0.0")
4812 (home-page "https://github.com/realworldocaml/craml")
4813 (source
4814 (origin
4815 (method git-fetch)
4816 (uri (git-reference
4817 (url (string-append home-page ".git"))
4818 (commit version)))
4819 (file-name (git-file-name name version))
4820 (sha256
4821 (base32
4822 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
4823 (build-system dune-build-system)
4824 (arguments
4825 `(#:phases
4826 (modify-phases %standard-phases
4827 (add-before 'build 'upgrade
4828 (lambda _
4829 (invoke "dune" "upgrade")
4830 #t)))))
4831 (inputs
4832 (list ocaml-fmt ocaml-astring ocaml-logs ocaml-cmdliner))
4833 (synopsis
4834 "CRAM-testing framework for testing command line applications")
4835 (description "CRAM is a is functional testing framework for command line
4836 applications. @code{craml} is freely inspired by the
4837 Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
4838 format}. @code{craml} is released as a single binary (called @code{craml}).")
4839 (license license:isc)))
4840
4841 (define-public ocaml-dot-merlin-reader
4842 (package
4843 (name "ocaml-dot-merlin-reader")
4844 (version "4.5-414")
4845 (source
4846 (origin
4847 (method git-fetch)
4848 (uri (git-reference
4849 (url "https://github.com/ocaml/merlin")
4850 (commit (string-append "v" version))))
4851 (file-name (git-file-name name version))
4852 (sha256
4853 (base32
4854 "125gyk63fg9plqkyrkl3wvpr3czjxgvshf4496fc4swldl7z587c"))))
4855 (build-system dune-build-system)
4856 (arguments '(#:package "dot-merlin-reader"
4857 #:tests? #f)) ; no tests
4858 (inputs
4859 (list ocaml-yojson ocaml-csexp ocaml-result))
4860 (home-page "https://ocaml.github.io/merlin/")
4861 (synopsis "Reads config files for @code{ocaml-merlin}")
4862 (description "@code{ocaml-dot-merlin-reader} is an external reader for
4863 @code{ocaml-merlin} configurations.")
4864 (license license:expat)))
4865
4866 (define-public ocaml-merlin
4867 (package
4868 (inherit ocaml-dot-merlin-reader)
4869 (name "ocaml-merlin")
4870 (arguments
4871 '(#:package "merlin"
4872 #:phases
4873 (modify-phases %standard-phases
4874 (replace 'check
4875 (lambda* (#:key tests? #:allow-other-keys)
4876 (when tests?
4877 (invoke "dune" "runtest" "-p" "merlin,dot-merlin-reader")))))))
4878 (inputs
4879 (list ocaml-yojson ocaml-csexp ocaml-result))
4880 (native-inputs
4881 (list ocaml-dot-merlin-reader ; required for tests
4882 ocaml-mdx jq))
4883 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
4884 (description "Merlin is an editor service that provides modern IDE
4885 features for OCaml. Emacs and Vim support is provided out-of-the-box.
4886 External contributors added support for Visual Studio Code, Sublime Text and
4887 Atom.")
4888 (license license:expat)))
4889
4890 (define-public ocaml-gsl
4891 (package
4892 (name "ocaml-gsl")
4893 (version "1.24.0")
4894 (source
4895 (origin
4896 (method url-fetch)
4897 (uri
4898 (string-append
4899 "https://github.com/mmottl/gsl-ocaml/releases/download/"
4900 version "/gsl-" version ".tbz"))
4901 (sha256
4902 (base32
4903 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
4904 (build-system dune-build-system)
4905 (arguments
4906 `(#:test-target "."
4907 #:phases
4908 (modify-phases %standard-phases
4909 (add-after 'unpack 'fix-gsl-directory
4910 (lambda* (#:key inputs #:allow-other-keys)
4911 (substitute* "src/config/discover.ml"
4912 (("/usr") (assoc-ref inputs "gsl"))))))))
4913 (inputs
4914 (list gsl))
4915 (propagated-inputs
4916 (list ocaml-base ocaml-stdio))
4917 (home-page "https://mmottl.github.io/gsl-ocaml")
4918 (synopsis "Bindings to the GNU Scientific Library")
4919 (description
4920 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4921 the OCaml language.")
4922 (license license:gpl3+)))
4923
4924 (define-public ocaml4.07-gsl-1
4925 (package-with-ocaml4.07
4926 (package
4927 (inherit ocaml-gsl)
4928 (version "1.19.3")
4929 (source (origin
4930 (method url-fetch)
4931 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
4932 "/releases/download/v"
4933 version "/gsl-ocaml-" version ".tar.gz"))
4934 (sha256
4935 (base32
4936 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
4937 (build-system ocaml-build-system)
4938 (inputs
4939 `(("gsl" ,gsl-static)))
4940 (native-inputs
4941 `(("ocamlbuild" ,ocamlbuild)))
4942 (arguments '())
4943 (propagated-inputs '()))))
4944
4945 (define-public cubicle
4946 (package
4947 (name "cubicle")
4948 (version "1.1.2")
4949 (source (origin
4950 (method url-fetch)
4951 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4952 version ".tar.gz"))
4953 (sha256
4954 (base32
4955 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4956 (build-system gnu-build-system)
4957 (native-inputs
4958 (list automake ocaml
4959 (@@ (gnu packages base) which)))
4960 (propagated-inputs
4961 (list ocaml-num z3))
4962 (arguments
4963 `(#:configure-flags (list "--with-z3")
4964 #:make-flags (list "QUIET=")
4965 #:tests? #f
4966 #:phases
4967 (modify-phases %standard-phases
4968 (add-before 'configure 'make-deterministic
4969 (lambda _
4970 (substitute* "Makefile.in"
4971 (("`date`") "no date for reproducibility"))))
4972 (add-before 'configure 'configure-for-release
4973 (lambda _
4974 (substitute* "Makefile.in"
4975 (("SVNREV=") "#SVNREV="))
4976 #t))
4977 (add-before 'configure 'fix-/bin/sh
4978 (lambda _
4979 (substitute* "configure"
4980 (("-/bin/sh") (string-append "-" (which "sh"))))
4981 #t))
4982 (add-before 'configure 'fix-smt-z3wrapper.ml
4983 (lambda _
4984 (substitute* "Makefile.in"
4985 (("\\\\n") ""))
4986 #t))
4987 (add-before 'configure 'fix-ocaml-num
4988 (lambda* (#:key inputs #:allow-other-keys)
4989 (substitute* "Makefile.in"
4990 (("nums.cma") "num.cma num_core.cma")
4991 (("= \\$\\(FUNCTORYLIB\\)")
4992 (string-append "= -I "
4993 (assoc-ref inputs "ocaml-num")
4994 "/lib/ocaml/site-lib/num/core -I "
4995 (assoc-ref inputs "ocaml-num")
4996 "/lib/ocaml/site-lib/num"
4997 " $(FUNCTORYLIB)")))
4998 #t)))))
4999 (home-page "http://cubicle.lri.fr/")
5000 (synopsis "Model checker for array-based systems")
5001 (description "Cubicle is a model checker for verifying safety properties
5002 of array-based systems. This is a syntactically restricted class of
5003 parametrized transition systems with states represented as arrays indexed by
5004 an arbitrary number of processes. Cache coherence protocols and mutual
5005 exclusion algorithms are typical examples of such systems.")
5006 (license license:asl2.0)))
5007
5008 (define-public ocaml-sexplib0
5009 (package
5010 (name "ocaml-sexplib0")
5011 (version "0.15.1")
5012 (home-page "https://github.com/janestreet/sexplib0")
5013 (source (origin
5014 (method git-fetch)
5015 (uri (git-reference
5016 (url home-page)
5017 (commit (string-append "v" version))))
5018 (file-name (git-file-name name version))
5019 (sha256
5020 (base32
5021 "05m93g4m4jhj1v8pazg3s2ydcfymr3h4476yjhdca5fm4sn35bg8"))))
5022 (build-system dune-build-system)
5023 (arguments `(#:tests? #f)) ;no tests
5024 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib0))))
5025 (synopsis "Library containing the definition of S-expressions and some
5026 base converters")
5027 (description "Part of Jane Street's Core library The Core suite of
5028 libraries is an industrial strength alternative to OCaml's standard library
5029 that was developed by Jane Street, the largest industrial user of OCaml.")
5030 (license license:expat)))
5031
5032 (define-public ocaml4.07-sexplib0
5033 (package-with-ocaml4.07
5034 (package
5035 (inherit ocaml-sexplib0)
5036 (name "ocaml-sexplib0")
5037 (version "0.11.0")
5038 (source
5039 (janestreet-origin "sexplib0" version
5040 "1p06p2s7p9xsjn0z9qicniv1ai54d8sj11k8j633di2mm7jzxpin"))
5041 (arguments `(#:tests? #f)) ; no tests
5042 (properties '()))))
5043
5044 (define-public ocaml-parsexp
5045 (package
5046 (name "ocaml-parsexp")
5047 (version "0.15.0")
5048 (home-page "https://github.com/janestreet/parsexp")
5049 (source (origin
5050 (method git-fetch)
5051 (uri (git-reference
5052 (url home-page)
5053 (commit (string-append "v" version))))
5054 (file-name (git-file-name name version))
5055 (sha256
5056 (base32
5057 "1grzpxi39318vcqhwf723hqh11k68irh59zb3dyg9lw8wjn7752a"))))
5058 (build-system dune-build-system)
5059 (inputs
5060 (list ocaml-sexplib0 ocaml-base))
5061 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-parsexp))))
5062 (synopsis "S-expression parsing library")
5063 (description
5064 "This library provides generic parsers for parsing S-expressions from
5065 strings or other medium.
5066
5067 The library is focused on performances but still provide full generic
5068 parsers that can be used with strings, bigstrings, lexing buffers,
5069 character streams or any other sources effortlessly.
5070
5071 It provides three different class of parsers:
5072 @itemize
5073 @item
5074 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
5075 @item
5076 the parsers with positions, building compact position sequences so
5077 that one can recover original positions in order to report properly
5078 located errors at little cost
5079 @item
5080 the Concrete Syntax Tree parsers, produce values of type
5081 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
5082 syntax, including comments
5083 @end itemize
5084
5085 This library is portable and doesn't provide IO functions. To read
5086 s-expressions from files or other external sources, you should use
5087 parsexp_io.")
5088 (license license:expat)))
5089
5090 (define-public ocaml4.07-parsexp
5091 (package-with-ocaml4.07
5092 (package
5093 (inherit ocaml-parsexp)
5094 (name "ocaml-parsexp")
5095 (version "0.11.0")
5096 (source
5097 (janestreet-origin "parsexp" version
5098 "11a30zkfgbi6pb4whq22k1zc8ghdp9bwxl5s5cdlmx1z8s4yxsf0"))
5099 (properties '()))))
5100
5101 (define-public ocaml-sexplib
5102 (package
5103 (name "ocaml-sexplib")
5104 (version "0.15.0")
5105 (home-page "https://github.com/janestreet/sexplib")
5106 (source
5107 (janestreet-origin "sexplib" version
5108 "1xs55f11yhscnfrzpvy1vn05j6xi9kxy097465624l615j7k8qm5"))
5109 (build-system dune-build-system)
5110 (propagated-inputs
5111 (list ocaml-base ocaml-num ocaml-parsexp ocaml-sexplib0))
5112 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sexplib))))
5113 (synopsis
5114 "Library for serializing OCaml values to and from S-expressions")
5115 (description
5116 "This package is part of Jane Street's Core library. Sexplib contains
5117 functionality for parsing and pretty-printing s-expressions.")
5118 (license license:expat)))
5119
5120 (define-public ocaml4.07-sexplib
5121 (package-with-ocaml4.07
5122 (package
5123 (inherit ocaml-sexplib)
5124 (version "0.11.0")
5125 (source
5126 (janestreet-origin "sexplib" version
5127 "0ksx62zsxhz8xmdrsn41n2hbc2qbyh3bxxc6946xisvgwh42h3q3"))
5128 (properties '()))))
5129
5130 (define-public ocaml-base
5131 (package
5132 (name "ocaml-base")
5133 (version "0.15.0")
5134 (home-page "https://github.com/janestreet/base")
5135 (source
5136 (origin
5137 (method git-fetch)
5138 (uri (git-reference
5139 (url "https://github.com/janestreet/base")
5140 (commit (string-append "v" version))))
5141 (file-name (git-file-name name version))
5142 (sha256
5143 (base32
5144 "1qyycqqr4dijvxm4hhy79c964wd91kpsfvb89kna1qwgllg0hrpj"))))
5145 (build-system dune-build-system)
5146 (propagated-inputs
5147 (list ocaml-sexplib0))
5148 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-base))))
5149 (synopsis
5150 "Full standard library replacement for OCaml")
5151 (description
5152 "Base is a complete and portable alternative to the OCaml standard
5153 library. It provides all standard functionalities one would expect
5154 from a language standard library. It uses consistent conventions
5155 across all of its module.
5156
5157 Base aims to be usable in any context. As a result system dependent
5158 features such as I/O are not offered by Base. They are instead
5159 provided by companion libraries such as
5160 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
5161 (license license:expat)))
5162
5163 (define-public ocaml4.07-base
5164 (package-with-ocaml4.07
5165 (package
5166 (inherit ocaml-base)
5167 (name "ocaml-base")
5168 (version "0.11.1")
5169 (source
5170 (origin
5171 ;; version 0.11.1 is not released on ocaml.janestreet.org.
5172 (method git-fetch)
5173 (uri (git-reference
5174 (url "https://github.com/janestreet/base.git")
5175 (commit (string-append "v" version))))
5176 (file-name (git-file-name name version))
5177 (sha256
5178 (base32
5179 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
5180 (properties '()))))
5181
5182 (define-public ocaml-compiler-libs
5183 (package
5184 (name "ocaml-compiler-libs")
5185 (version "0.12.4")
5186 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5187 (source
5188 (origin
5189 (method git-fetch)
5190 (uri (git-reference
5191 (url home-page)
5192 (commit (string-append "v" version))))
5193 (file-name (git-file-name name version))
5194 (sha256
5195 (base32
5196 "00if2f7j9d8igdkj4rck3p74y17j6b233l91mq02drzrxj199qjv"))))
5197 (build-system dune-build-system)
5198 (arguments `(#:tests? #f)) ;no tests
5199 (properties `((upstream-name . "ocaml-compiler-libs")
5200 (ocaml4.07-variant . ,(delay ocaml4.07-compiler-libs))))
5201 (synopsis "Compiler libraries repackaged")
5202 (description "This package simply repackages the OCaml compiler libraries
5203 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
5204 is now @code{Ocaml_common.Ast_helper}.")
5205 (license license:expat)))
5206
5207 (define-public ocaml4.07-compiler-libs
5208 (package-with-ocaml4.07
5209 (package
5210 (inherit ocaml-compiler-libs)
5211 (name "ocaml-compiler-libs")
5212 (version "0.11.0")
5213 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
5214 (source
5215 (origin
5216 (method git-fetch)
5217 (uri (git-reference
5218 (url home-page)
5219 (commit (string-append "v" version))))
5220 (file-name (git-file-name name version))
5221 (sha256
5222 (base32
5223 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
5224 (properties `((upstream-name . "ocaml-compiler-libs"))))))
5225
5226 (define-public ocaml-stdio
5227 (package
5228 (name "ocaml-stdio")
5229 (version "0.15.0")
5230 (home-page "https://github.com/janestreet/stdio")
5231 (source
5232 (janestreet-origin "stdio" version
5233 "0jsyg4jlp76d9gx1fngms6nfs7dcpsysdsvkywjq9a663n994wn3"))
5234 (build-system dune-build-system)
5235 (propagated-inputs
5236 (list ocaml-base ocaml-sexplib0))
5237 (arguments `(#:tests? #f)) ;no tests
5238 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-stdio))))
5239 (synopsis "Standard IO library for OCaml")
5240 (description
5241 "Stdio implements simple input/output functionalities for OCaml. It
5242 re-exports the input/output functions of the OCaml standard libraries using
5243 a more consistent API.")
5244 (license license:expat)))
5245
5246 (define-public ocaml4.07-stdio
5247 (package-with-ocaml4.07
5248 (package
5249 (inherit ocaml-stdio)
5250 (version "0.11.0")
5251 (source
5252 (janestreet-origin "stdio" version
5253 "0pqbp2wy5fgmc38irwvmj9nlcvclb1ix1mp4y7l39bgvvlz303h9"))
5254 (properties '()))))
5255
5256 (define-public ocaml-ppx-deriving
5257 (package
5258 (name "ocaml-ppx-deriving")
5259 (version "5.2.1")
5260 (source
5261 (origin
5262 (method git-fetch)
5263 (uri (git-reference
5264 (url "https://github.com/ocaml-ppx/ppx_deriving")
5265 (commit (string-append "v" version))))
5266 (file-name (git-file-name name version))
5267 (sha256
5268 (base32
5269 "1wqcnw4wi6pfjjhixpakckm03dpj990259za432804471a6spm2j"))))
5270 (build-system dune-build-system)
5271 (arguments
5272 `(#:test-target "."))
5273 (propagated-inputs
5274 (list ocaml-ppx-derivers ocaml-ppxlib ocaml-result))
5275 (native-inputs
5276 (list ocaml-cppo ocaml-ounit2))
5277 (properties `((upstream-name . "ppx_deriving")))
5278 (home-page "https://github.com/ocaml-ppx/ppx_deriving")
5279 (synopsis "Type-driven code generation for OCaml")
5280 (description
5281 "Ppx_deriving provides common infrastructure for generating code based
5282 on type definitions, and a set of useful plugins for common tasks.")
5283 (license license:expat)))
5284
5285 (define-public ocaml-ppx-derivers
5286 (package
5287 (name "ocaml-ppx-derivers")
5288 (version "1.2.1")
5289 (home-page
5290 "https://github.com/ocaml-ppx/ppx_derivers")
5291 (source
5292 (origin
5293 (method git-fetch)
5294 (uri (git-reference
5295 (url (string-append home-page ".git"))
5296 (commit version)))
5297 (file-name (git-file-name name version))
5298 (sha256
5299 (base32
5300 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
5301 (build-system dune-build-system)
5302 (arguments
5303 '(#:tests? #f)) ;no tests
5304 (properties `((upstream-name . "ppx_derivers")))
5305 (synopsis "Shared @code{@@deriving} plugin registry")
5306 (description
5307 "Ppx_derivers is a tiny package whose sole purpose is to allow
5308 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
5309 as part of the same ocaml-migrate-parsetree driver.")
5310 (license license:bsd-3)))
5311
5312 (define-public ocaml-ppxlib
5313 (package
5314 (name "ocaml-ppxlib")
5315 (version "0.25.0")
5316 (home-page "https://github.com/ocaml-ppx/ppxlib")
5317 (source
5318 (origin
5319 (method git-fetch)
5320 (uri (git-reference
5321 (url home-page)
5322 (commit version)))
5323 (file-name (git-file-name name version))
5324 (sha256
5325 (base32
5326 "0wlqvyqy9ccp7z981blv42aqwq7zfq93cakbahjyy48hiiir6vp2"))))
5327 (build-system dune-build-system)
5328 (arguments
5329 `(#:phases
5330 (modify-phases %standard-phases
5331 (add-after 'unpack 'fix-test-format
5332 (lambda _
5333 ;; Since sexplib >= 0.15, error formating has changed
5334 (substitute* "test/driver/exception_handling/run.t"
5335 (("\\(Failure ") "Failure("))
5336 (substitute* "test/base/test.ml"
5337 (("Invalid_argument \\((.*)\\)." _ m)
5338 (string-append "Invalid_argument " m "."))
5339 (("\\(Invalid_argument (.*)\\)" _ m)
5340 (string-append "Invalid_argument " m ".")))
5341 (substitute* "test/ppx_import_support/test.ml"
5342 (("\\(Failure") "Failure")
5343 ((" \"(Some ppx-es.*)\")" _ m)
5344 (string-append " \"" m "\"."))))))))
5345 (propagated-inputs
5346 (list ocaml-base
5347 ocaml-compiler-libs
5348 ocaml-migrate-parsetree
5349 ocaml-stdlib-shims
5350 ocaml-ppx-derivers
5351 ocaml-stdio
5352 ocaml-result
5353 ocaml-sexplib0))
5354 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-ppxlib))))
5355 (synopsis
5356 "Base library and tools for ppx rewriters")
5357 (description
5358 "A comprehensive toolbox for ppx development. It features:
5359 @itemize
5360 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
5361 independent of the version of OCaml;
5362 @item a library for library for ppx rewriters in general, and type-driven code
5363 generators in particular;
5364 @item
5365 a feature-full driver for OCaml AST transformers;
5366 @item a quotation mechanism allowing to write values representing the
5367 OCaml AST in the OCaml syntax;
5368 @item a generator of open recursion classes from type definitions.
5369 @end itemize")
5370 (license license:expat)))
5371
5372 (define-public ocaml4.07-ppxlib
5373 (package-with-ocaml4.07
5374 (package
5375 (inherit ocaml-ppxlib)
5376 (name "ocaml-ppxlib")
5377 (version "0.6.0")
5378 (home-page "https://github.com/ocaml-ppx/ppxlib")
5379 (source
5380 (origin
5381 (method git-fetch)
5382 (uri (git-reference
5383 (url home-page)
5384 (commit version)))
5385 (file-name (git-file-name name version))
5386 (sha256
5387 (base32
5388 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
5389 (build-system dune-build-system)
5390 (arguments
5391 `(#:phases
5392 (modify-phases %standard-phases
5393 (add-before 'check 'set-topfind
5394 (lambda* (#:key inputs #:allow-other-keys)
5395 ;; add the line #directory ".." at the top of each file
5396 ;; using #use "topfind";; to be able to find topfind
5397 (let* ((findlib-path (assoc-ref inputs "findlib"))
5398 (findlib-libdir
5399 (string-append findlib-path "/lib/ocaml/site-lib")))
5400 (substitute* '("test/base/test.ml"
5401 "test/code_path/test.ml"
5402 "test/deriving/test.ml"
5403 "test/driver/attributes/test.ml"
5404 "test/driver/non-compressible-suffix/test.ml"
5405 "test/driver/transformations/test.ml")
5406 (("#use \"topfind\";;" all)
5407 (string-append "#directory \"" findlib-libdir "\"\n"
5408 all))))
5409 #t)))))
5410 (properties '()))))
5411
5412 (define-public ocaml-ppx-compare
5413 (package
5414 (name "ocaml-ppx-compare")
5415 (version "0.15.0")
5416 (source
5417 (janestreet-origin "ppx_compare" version
5418 "11bkw7fgzfay8ws0piwphqip3y2lk2c9s2gil3zisnbvka92h1va"))
5419 (build-system dune-build-system)
5420 (arguments
5421 ;; Tests are currenlty failing
5422 ;; (see https://github.com/janestreet/ppx_compare/issues/10)
5423 '(#:tests? #f))
5424 (propagated-inputs
5425 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5426 (properties `((upstream-name . "ppx_compare")
5427 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-compare))))
5428 (home-page "https://github.com/janestreet/ppx_compare")
5429 (synopsis "Generation of comparison functions from types")
5430 (description "Generation of fast comparison functions from type expressions
5431 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
5432 from type representations. The scaffolded functions are usually much faster
5433 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
5434 flexibility by allowing you to override them for a specific type and more safety
5435 by making sure that you only compare comparable values.")
5436 (license license:asl2.0)))
5437
5438 (define-public ocaml4.07-ppx-compare
5439 (package-with-ocaml4.07
5440 (package
5441 (inherit ocaml-ppx-compare)
5442 (name "ocaml-ppx-compare")
5443 (version "0.11.1")
5444 (home-page "https://github.com/janestreet/ppx_compare")
5445 (source (origin
5446 (method git-fetch)
5447 (uri (git-reference
5448 (url home-page)
5449 (commit (string-append "v" version))))
5450 (file-name (git-file-name name version))
5451 (sha256
5452 (base32
5453 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
5454 (properties `((upstream-name . "ppx_compare"))))))
5455
5456 (define-public ocaml-fieldslib
5457 (package
5458 (name "ocaml-fieldslib")
5459 (version "0.15.0")
5460 (source (janestreet-origin
5461 "fieldslib" version
5462 "083izf854vzmi5zj63r7ipjf09y1dqf7iy8n6r4663444xrzs2h5"))
5463 (build-system dune-build-system)
5464 (arguments `(#:tests? #f)) ; No tests
5465 (propagated-inputs
5466 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5467 (properties `((upstream-name . "fieldslib")
5468 (ocaml4.07-variant . ,(delay ocaml4.07-fieldslib))))
5469 (home-page "https://github.com/janestreet/fieldslib")
5470 (synopsis "Syntax extension to record fields")
5471 (description "Syntax extension to define first class values representing
5472 record fields, to get and set record fields, iterate and fold over all fields
5473 of a record and create new record values.")
5474 (license license:asl2.0)))
5475
5476 (define-public ocaml4.07-fieldslib
5477 (package-with-ocaml4.07
5478 (package
5479 (inherit ocaml-fieldslib)
5480 (version "0.11.0")
5481 (source (janestreet-origin
5482 "fieldslib" version
5483 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))
5484 (properties `((upstream-name . "fieldslib"))))))
5485
5486 (define-public ocaml-variantslib
5487 (package
5488 (name "ocaml-variantslib")
5489 (version "0.15.0")
5490 (source
5491 (janestreet-origin "variantslib" version
5492 "12dssx4by6rgjzfrvksz83hkcpmsq0brn87dh22pv1rrwhw79n75"))
5493 (build-system dune-build-system)
5494 (arguments
5495 ;; No tests
5496 `(#:tests? #f))
5497 (propagated-inputs
5498 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5499 (properties `((upstream-name . "variantslib")
5500 (ocaml4.07-variant . ,(delay ocaml4.07-variantslib))))
5501 (home-page "https://github.com/janestreet/variantslib")
5502 (synopsis "OCaml variants as first class values")
5503 (description "The Core suite of libraries is an alternative to OCaml's
5504 standard library.")
5505 (license license:asl2.0)))
5506
5507 (define-public ocaml4.07-variantslib
5508 (package-with-ocaml4.07
5509 (package
5510 (inherit ocaml-variantslib)
5511 (name "ocaml-variantslib")
5512 (version "0.11.0")
5513 (source (origin
5514 (method url-fetch)
5515 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5516 (version-major+minor version)
5517 "/files/variantslib-v" version ".tar.gz"))
5518 (sha256
5519 (base32
5520 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
5521 (properties `((upstream-name . "variantslib"))))))
5522
5523 (define-public ocaml-ppx-fields-conv
5524 (package
5525 (name "ocaml-ppx-fields-conv")
5526 (version "0.15.0")
5527 (home-page "https://github.com/janestreet/ppx_fields_conv")
5528 (source
5529 (origin
5530 (method git-fetch)
5531 (uri (git-reference
5532 (url home-page)
5533 (commit (string-append "v" version))))
5534 (file-name (git-file-name name version))
5535 (sha256
5536 (base32
5537 "094wsnw7fcwgl9xg6vkjb0wbgpn9scsp847yhdd184sz9v1amz14"))))
5538 (build-system dune-build-system)
5539 (propagated-inputs
5540 (list ocaml-base ocaml-fieldslib ocaml-migrate-parsetree
5541 ocaml-ppxlib))
5542 (properties `((upstream-name . "ppx_fields_conv")
5543 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fields-conv))))
5544 (synopsis "Generation of accessor and iteration functions for ocaml records")
5545 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
5546 first class values representing record fields, and additional routines, to get
5547 and set record fields, iterate and fold over all fields of a record and create
5548 new record values.")
5549 (license license:asl2.0)))
5550
5551 (define-public ocaml4.07-ppx-fields-conv
5552 (package-with-ocaml4.07
5553 (package
5554 (inherit ocaml-ppx-fields-conv)
5555 (version "0.11.0")
5556 (source (janestreet-origin
5557 "ppx_fields_conv" version
5558 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))
5559 (properties `((upstream-name . "ppx_fields_conv"))))))
5560
5561 (define-public ocaml-ppx-sexp-conv
5562 (package
5563 (name "ocaml-ppx-sexp-conv")
5564 (version "0.15.0")
5565 (home-page "https://github.com/janestreet/ppx_sexp_conv")
5566 (source
5567 (origin
5568 (method git-fetch)
5569 (uri (git-reference
5570 (url home-page)
5571 (commit (string-append "v" version))))
5572 (file-name (git-file-name name version))
5573 (sha256
5574 (base32
5575 "1fyf7hgxprn7pj58rmmrfpv938a0avpzvvk6wzihpmfm6whgbdm8"))))
5576 (build-system dune-build-system)
5577 (propagated-inputs
5578 (list ocaml-base ocaml-ppxlib))
5579 (properties `((upstream-name . "ppx_sexp_conv")
5580 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-conv))))
5581 (synopsis "Generation of S-expression conversion functions from type definitions")
5582 (description "This package generates S-expression conversion functions from type
5583 definitions.")
5584 (license license:asl2.0)))
5585
5586 (define-public ocaml4.07-ppx-sexp-conv
5587 (package-with-ocaml4.07
5588 (package
5589 (inherit ocaml-ppx-sexp-conv)
5590 (name "ocaml-ppx-sexp-conv")
5591 (version "0.11.2")
5592 (source (origin
5593 (method git-fetch)
5594 (uri (git-reference
5595 (url "https://github.com/janestreet/ppx_sexp_conv")
5596 (commit (string-append "v" version))))
5597 (file-name (git-file-name name version))
5598 (sha256
5599 (base32
5600 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
5601 (properties `((upstream-name . "ppx_sexp_conv"))))))
5602
5603 (define-public ocaml-ppx-variants-conv
5604 (package
5605 (name "ocaml-ppx-variants-conv")
5606 (version "0.15.0")
5607 (source
5608 (origin
5609 (method git-fetch)
5610 (uri (git-reference
5611 (url "https://github.com/janestreet/ppx_variants_conv")
5612 (commit (string-append "v" version))))
5613 (file-name (git-file-name name version))
5614 (sha256
5615 (base32
5616 "1dh0bw9dn246k00pymf59yjkl6x6bxd76lkk9b5xpq2692wwlc3s"))))
5617 (build-system dune-build-system)
5618 (propagated-inputs
5619 (list ocaml-base ocaml-variantslib ocaml-migrate-parsetree
5620 ocaml-ppxlib))
5621 (properties
5622 `((upstream-name . "ppx_variants_conv")
5623 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv))))
5624 (home-page
5625 "https://github.com/janestreet/ppx_variants_conv")
5626 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
5627 (description
5628 "This package generates accessors and iteration functions for OCaml
5629 variant types.")
5630 (license license:asl2.0)))
5631
5632 (define-public ocaml4.07-ppx-variants-conv
5633 (package-with-ocaml4.07
5634 (package
5635 (inherit ocaml-ppx-variants-conv)
5636 (name "ocaml-ppx-variants-conv")
5637 (version "0.11.1")
5638 (source
5639 (origin
5640 (method git-fetch)
5641 (uri (git-reference
5642 (url "https://github.com/janestreet/ppx_variants_conv")
5643 (commit (string-append "v" version))))
5644 (file-name (git-file-name name version))
5645 (sha256
5646 (base32
5647 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
5648 (properties `((upstream-name . "ppx_variants_conv"))))))
5649
5650 (define-public ocaml-ppx-custom-printf
5651 (package
5652 (name "ocaml-ppx-custom-printf")
5653 (version "0.15.0")
5654 (home-page "https://github.com/janestreet/ppx_custom_printf")
5655 (source
5656 (origin
5657 (method git-fetch)
5658 (uri (git-reference
5659 (url home-page)
5660 (commit (string-append "v" version))))
5661 (file-name (git-file-name name version))
5662 (sha256
5663 (base32
5664 "1k8nmq6kwqz2wpkm9ymq749dz1vd8lxrjc711knp1wyz5935hnsv"))))
5665 (build-system dune-build-system)
5666 (propagated-inputs
5667 (list ocaml-base ocaml-ppx-sexp-conv ocaml-migrate-parsetree
5668 ocaml-ppxlib))
5669 (properties `((upstream-name . "ppx_custom_printf")
5670 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-custom-printf))))
5671 (synopsis "Printf-style format-strings for user-defined string conversion")
5672 (description "Extensions to printf-style format-strings for user-defined
5673 string conversion.")
5674 (license license:asl2.0)))
5675
5676 (define-public ocaml4.07-ppx-custom-printf
5677 (package-with-ocaml4.07
5678 (package
5679 (inherit ocaml-ppx-custom-printf)
5680 (version "0.11.0")
5681 (source
5682 (janestreet-origin
5683 "ppx_custom_printf" version
5684 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))
5685 (properties `((upstream-name . "ppx_custom_printf"))))))
5686
5687 (define-public ocaml-bin-prot
5688 (package
5689 (name "ocaml-bin-prot")
5690 (version "0.15.0")
5691 (source
5692 (origin
5693 (method git-fetch)
5694 (uri (git-reference
5695 (url "https://github.com/janestreet/bin_prot")
5696 (commit (string-append "v" version))))
5697 (file-name (git-file-name name version))
5698 (sha256
5699 (base32 "1qfqglscc25wwnjx7byqmjcnjww1msnr8940gyg8h93wdq43fjnh"))))
5700 (build-system dune-build-system)
5701 (propagated-inputs
5702 (list ocaml-base
5703 ocaml-ppx-compare
5704 ocaml-ppx-custom-printf
5705 ocaml-ppx-fields-conv
5706 ocaml-ppx-optcomp
5707 ocaml-ppx-sexp-conv
5708 ocaml-ppx-variants-conv))
5709 (properties `((upstream-name . "bin_prot")
5710 (ocaml4.07-variant . ,(delay ocaml4.07-bin-prot))))
5711 (home-page "https://github.com/janestreet/bin_prot")
5712 (synopsis "Binary protocol generator")
5713 (description "This library contains functionality for reading and writing
5714 OCaml-values in a type-safe binary protocol. It is extremely efficient,
5715 typically supporting type-safe marshalling and unmarshalling of even highly
5716 structured values at speeds sufficient to saturate a gigabit connection. The
5717 protocol is also heavily optimized for size, making it ideal for long-term
5718 storage of large amounts of data.")
5719 (license license:expat)))
5720
5721 (define-public ocaml4.07-bin-prot
5722 (package-with-ocaml4.07
5723 (package
5724 (inherit ocaml-bin-prot)
5725 (version "0.11.0")
5726 (source (origin
5727 (method url-fetch)
5728 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5729 (version-major+minor version)
5730 "/files/bin_prot-v" version ".tar.gz"))
5731 (sha256
5732 (base32
5733 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
5734 (propagated-inputs (list ocaml-base
5735 ocaml-ppx-compare
5736 ocaml-ppx-custom-printf
5737 ocaml-ppx-fields-conv
5738 ocaml-ppx-variants-conv
5739 ocaml-migrate-parsetree))
5740 (properties '())
5741 (license (list
5742 license:asl2.0
5743 license:bsd-3)))))
5744
5745 (define-public ocaml-octavius
5746 (package
5747 (name "ocaml-octavius")
5748 (version "1.2.2")
5749 (source (origin
5750 (method git-fetch)
5751 (uri (git-reference
5752 (url "https://github.com/ocaml-doc/octavius")
5753 (commit (string-append "v" version))))
5754 (file-name (git-file-name name version))
5755 (sha256
5756 (base32
5757 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
5758 (build-system dune-build-system)
5759 (arguments
5760 `(#:phases
5761 (modify-phases %standard-phases
5762 (add-before 'build 'make-writable
5763 (lambda _
5764 (for-each (lambda (file)
5765 (chmod file #o644))
5766 (find-files "." "."))
5767 #t)))))
5768 (properties `((upstream-name . "octavius")))
5769 (home-page "https://github.com/ocaml-doc/octavius")
5770 (synopsis "Ocamldoc comment syntax parser")
5771 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
5772 (license license:isc)))
5773
5774 (define-public ocaml-ppx-hash
5775 (package
5776 (name "ocaml-ppx-hash")
5777 (version "0.15.0")
5778 (source
5779 (janestreet-origin "ppx_hash" version
5780 "048pim0xicj8j9whd5lnchf62788sk3w89h12aybbalk1xm6dfs5"))
5781 (build-system dune-build-system)
5782 (propagated-inputs
5783 (list ocaml-base ocaml-ppx-compare ocaml-ppx-sexp-conv
5784 ocaml-migrate-parsetree ocaml-ppxlib))
5785 (properties `((upstream-name . "ppx_hash")
5786 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-hash))))
5787 (home-page "https://github.com/janestreet/ppx_hash")
5788 (synopsis "Generation of hash functions from type expressions and definitions")
5789 (description "This package is a collection of ppx rewriters that generate
5790 hash functions from type exrpessions and definitions.")
5791 (license license:asl2.0)))
5792
5793 (define-public ocaml4.07-ppx-hash
5794 (package-with-ocaml4.07
5795 (package
5796 (inherit ocaml-ppx-hash)
5797 (name "ocaml-ppx-hash")
5798 (home-page "https://github.com/janestreet/ppx_hash")
5799 (version "0.11.1")
5800 (source (origin
5801 (method git-fetch)
5802 (uri (git-reference
5803 (url home-page)
5804 (commit (string-append "v" version))))
5805 (file-name (git-file-name name version))
5806 (sha256
5807 (base32
5808 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
5809 (properties `((upstream-name . "ppx_hash"))))))
5810
5811 (define-public ocaml-ppx-enumerate
5812 (package
5813 (name "ocaml-ppx-enumerate")
5814 (version "0.15.0")
5815 (source
5816 (janestreet-origin
5817 "ppx_enumerate" version
5818 "16yhk3xk2hskmlspb6mikmdp60qaypyiqgq9p17kxpial6fgpdfy"))
5819 (build-system dune-build-system)
5820 (arguments
5821 `(#:tests? #f)) ; no test suite
5822 (propagated-inputs
5823 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5824 (properties `((upstream-name . "ppx_enumerate")
5825 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-enumerate))))
5826 (home-page "https://github.com/janestreet/ppx_enumerate")
5827 (synopsis "Generate a list containing all values of a finite type")
5828 (description "Ppx_enumerate is a ppx rewriter which generates a definition
5829 for the list of all values of a type (for a type which only has finitely
5830 many values).")
5831 (license license:asl2.0)))
5832
5833 (define-public ocaml4.07-ppx-enumerate
5834 (package-with-ocaml4.07
5835 (package
5836 (inherit ocaml-ppx-enumerate)
5837 (name "ocaml-ppx-enumerate")
5838 (version "0.11.1")
5839 (home-page "https://github.com/janestreet/ppx_enumerate")
5840 (source (origin
5841 (method git-fetch)
5842 (uri (git-reference
5843 (url home-page)
5844 (commit (string-append "v" version))))
5845 (file-name (git-file-name name version))
5846 (sha256
5847 (base32
5848 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
5849 (properties `((upstream-name . "ppx_enumerate"))))))
5850
5851 (define-public ocaml-ppx-bench
5852 (package
5853 (name "ocaml-ppx-bench")
5854 (version "0.15.0")
5855 (source
5856 (origin
5857 (method git-fetch)
5858 (uri (git-reference
5859 (url "https://github.com/janestreet/ppx_bench")
5860 (commit (string-append "v" version))))
5861 (file-name (git-file-name name version))
5862 (sha256
5863 (base32 "0bc0gbm922417wqisafxh35jslcp7xy1s0h0a1q32rhx0ivxx3g6"))))
5864 (build-system dune-build-system)
5865 (arguments
5866 ;; No tests
5867 `(#:tests? #f))
5868 (propagated-inputs (list ocaml-ppx-inline-test ocaml-ppxlib))
5869 (properties `((upstream-name . "ppx_bench")
5870 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bench))))
5871 (home-page "https://github.com/janestreet/ppx_bench")
5872 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
5873 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
5874 (license license:expat)))
5875
5876 (define-public ocaml4.07-ppx-bench
5877 (package-with-ocaml4.07
5878 (package
5879 (inherit ocaml-ppx-bench)
5880 (version "0.11.0")
5881 (source (origin
5882 (method url-fetch)
5883 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5884 (version-major+minor version)
5885 "/files/ppx_bench-v" version ".tar.gz"))
5886 (sha256
5887 (base32
5888 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
5889 (propagated-inputs
5890 (list ocaml-ppx-inline-test ocaml-migrate-parsetree ocaml-ppxlib))
5891 (properties '())
5892 (license license:asl2.0))))
5893
5894 (define-public ocaml-ppx-here
5895 (package
5896 (name "ocaml-ppx-here")
5897 (version "0.15.0")
5898 (source
5899 (janestreet-origin "ppx_here" version
5900 "1pyaw31j9n6r98ar947n3j2qj6rrszbdxr8jghk96j4ajdy05g65"))
5901 (build-system dune-build-system)
5902 (arguments
5903 ;; broken tests
5904 `(#:tests? #f))
5905 (propagated-inputs
5906 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
5907 (properties `((upstream-name . "ppx_here")
5908 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-here))))
5909 (home-page "https://github.com/janestreet/ppx_here")
5910 (synopsis "Expands [%here] into its location")
5911 (description
5912 "Part of the Jane Street's PPX rewriters collection.")
5913 (license license:asl2.0)))
5914
5915 (define-public ocaml4.07-ppx-here
5916 (package-with-ocaml4.07
5917 (package
5918 (inherit ocaml-ppx-here)
5919 (version "0.11.0")
5920 (source
5921 (janestreet-origin "ppx_here" version
5922 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))
5923 (properties `((upstream-name . "ppx_here"))))))
5924
5925 (define-public ocaml-typerep
5926 (package
5927 (name "ocaml-typerep")
5928 (version "0.15.0")
5929 (source
5930 (origin
5931 (method git-fetch)
5932 (uri (git-reference
5933 (url "https://github.com/janestreet/typerep")
5934 (commit (string-append "v" version))))
5935 (file-name (git-file-name name version))
5936 (sha256
5937 (base32 "1qxfi01qim0hrgd6d0bgvpxg36i99mmm8cw4wqpr9kxyqvgzv26z"))))
5938 (build-system dune-build-system)
5939 (arguments `(#:tests? #f)); no tests
5940 (propagated-inputs (list ocaml-base))
5941 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-typerep))))
5942 (home-page "https://github.com/janestreet/typerep")
5943 (synopsis "Typerep is a library for runtime types")
5944 (description "Typerep is a library for runtime types.")
5945 (license license:expat)))
5946
5947 (define-public ocaml4.07-typerep
5948 (package-with-ocaml4.07
5949 (package
5950 (inherit ocaml-typerep)
5951 (version "0.11.0")
5952 (source (origin
5953 (method url-fetch)
5954 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5955 (version-major+minor version)
5956 "/files/typerep-v" version ".tar.gz"))
5957 (sha256
5958 (base32
5959 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
5960 (properties '())
5961 (license license:asl2.0))))
5962
5963 (define-public ocaml-ppx-sexp-value
5964 (package
5965 (name "ocaml-ppx-sexp-value")
5966 (version "0.15.0")
5967 (source
5968 (origin
5969 (method git-fetch)
5970 (uri (git-reference
5971 (url "https://github.com/janestreet/ppx_sexp_value")
5972 (commit (string-append "v" version))))
5973 (file-name (git-file-name name version))
5974 (sha256
5975 (base32 "0kz83j9v6yz3v8c6vr9ilhkcci4hhjd6i6r6afnx72jh6i7d3hnv"))))
5976 (build-system dune-build-system)
5977 (propagated-inputs
5978 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
5979 (properties `((upstream-name . "ppx_sexp_value")
5980 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-value))))
5981 (home-page "https://github.com/janestreet/ppx_sexp_value")
5982 (synopsis "Simplify building s-expressions from ocaml values")
5983 (description "@samp{ppx-sexp-value} is a ppx rewriter that simplifies
5984 building s-expressions from ocaml values.")
5985 (license license:expat)))
5986
5987 (define-public ocaml4.07-ppx-sexp-value
5988 (package-with-ocaml4.07
5989 (package
5990 (inherit ocaml-ppx-sexp-value)
5991 (version "0.11.0")
5992 (source (origin
5993 (method url-fetch)
5994 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5995 (version-major+minor version)
5996 "/files/ppx_sexp_value-v" version ".tar.gz"))
5997 (sha256
5998 (base32
5999 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
6000 (propagated-inputs
6001 (list ocaml-base
6002 ocaml-ppx-here
6003 ocaml-ppx-sexp-conv
6004 ocaml-migrate-parsetree
6005 ocaml-ppxlib))
6006 (properties '())
6007 (license license:asl2.0))))
6008
6009 (define-public ocaml-ppx-sexp-message
6010 (package
6011 (name "ocaml-ppx-sexp-message")
6012 (version "0.15.0")
6013 (source
6014 (origin
6015 (method git-fetch)
6016 (uri (git-reference
6017 (url "https://github.com/janestreet/ppx_sexp_message")
6018 (commit (string-append "v" version))))
6019 (file-name (git-file-name name version))
6020 (sha256
6021 (base32 "0a7hx50bkkc5n5msc3zzc4ixnp7674x3mallknb9j31jnd8l90nj"))))
6022 (build-system dune-build-system)
6023 (propagated-inputs
6024 (list ocaml-base ocaml-ppx-here ocaml-ppx-sexp-conv ocaml-ppxlib))
6025 (properties `((upstream-name . "ppx_sexp_message")
6026 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-sexp-message))))
6027 (home-page "https://github.com/janestreet/ppx_sexp_message")
6028 (synopsis "Ppx rewriter for easy construction of s-expressions")
6029 (description "Ppx_sexp_message aims to ease the creation of s-expressions
6030 in OCaml. This is mainly motivated by writing error and debugging messages,
6031 where one needs to construct a s-expression based on various element of the
6032 context such as function arguments.")
6033 (license license:expat)))
6034
6035 (define-public ocaml4.07-ppx-sexp-message
6036 (package-with-ocaml4.07
6037 (package
6038 (inherit ocaml-ppx-sexp-message)
6039 (version "0.11.0")
6040 (source (origin
6041 (method url-fetch)
6042 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6043 (version-major+minor version)
6044 "/files/ppx_sexp_message-v" version ".tar.gz"))
6045 (sha256
6046 (base32
6047 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
6048 (propagated-inputs
6049 (list ocaml-base
6050 ocaml-ppx-here
6051 ocaml-ppx-sexp-conv
6052 ocaml-migrate-parsetree
6053 ocaml-ppxlib))
6054 (properties '())
6055 (license license:asl2.0))))
6056
6057 (define-public ocaml-ppx-pipebang
6058 (package
6059 (name "ocaml-ppx-pipebang")
6060 (version "0.15.0")
6061 (source
6062 (origin
6063 (method git-fetch)
6064 (uri (git-reference
6065 (url "https://github.com/janestreet/ppx_pipebang")
6066 (commit (string-append "v" version))))
6067 (file-name (git-file-name name version))
6068 (sha256
6069 (base32 "0sm5dghyalhws3hy1cc2ih36az1k4q02hcgj6l26gwyma3y4irvq"))))
6070 (build-system dune-build-system)
6071 (arguments `(#:tests? #f)); no tests
6072 (propagated-inputs (list ocaml-ppxlib))
6073 (properties `((upstream-name . "ppx_pipebang")
6074 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-pipebang))))
6075 (home-page "https://github.com/janestreet/ppx_pipebang")
6076 (synopsis "Inline reverse application operators `|>` and `|!`")
6077 (description "A ppx rewriter that inlines reverse application operators
6078 @code{|>} and @code{|!}.")
6079 (license license:expat)))
6080
6081 (define-public ocaml4.07-ppx-pipebang
6082 (package-with-ocaml4.07
6083 (package
6084 (inherit ocaml-ppx-pipebang)
6085 (version "0.11.0")
6086 (source (origin
6087 (method url-fetch)
6088 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6089 (version-major+minor version)
6090 "/files/ppx_pipebang-v" version ".tar.gz"))
6091 (sha256
6092 (base32
6093 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
6094 (propagated-inputs (list ocaml-migrate-parsetree ocaml-ppxlib))
6095 (properties '())
6096 (license license:asl2.0))))
6097
6098 (define-public ocaml-ppx-module-timer
6099 (package
6100 (name "ocaml-ppx-module-timer")
6101 (version "0.15.0")
6102 (source
6103 (origin
6104 (method git-fetch)
6105 (uri (git-reference
6106 (url "https://github.com/janestreet/ppx_module_timer")
6107 (commit (string-append "v" version))))
6108 (file-name (git-file-name name version))
6109 (sha256
6110 (base32 "0lzi5hxi10p89ddqbrc667267f888kqslal76gfhmszyk60n20av"))))
6111 (build-system dune-build-system)
6112 (arguments
6113 `(#:tests? #f)); no tests
6114 (propagated-inputs
6115 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-time-now ocaml-ppxlib))
6116 (properties `((upstream-name . "ppx_module_timer")))
6117 (home-page "https://github.com/janestreet/ppx_module_timer")
6118 (synopsis "Ppx rewriter that records top-level module startup times")
6119 (description "Modules using @samp{ppx_module_timer} have instrumentation
6120 to record their startup time.")
6121 (license license:expat)))
6122
6123 (define-public ocaml-ppx-fixed-literal
6124 (package
6125 (name "ocaml-ppx-fixed-literal")
6126 (version "0.15.0")
6127 (source
6128 (origin
6129 (method git-fetch)
6130 (uri (git-reference
6131 (url "https://github.com/janestreet/ppx_fixed_literal")
6132 (commit (string-append "v" version))))
6133 (file-name (git-file-name name version))
6134 (sha256
6135 (base32 "10siwcqrqa4gh0mg6fkaby0jjskc01r81pcblc67h3vmbjjh08j9"))))
6136 (build-system dune-build-system)
6137 (arguments
6138 `(#:tests? #f)); no tests
6139 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6140 (properties `((upstream-name . "ppx_fixed_literal")))
6141 (home-page "https://github.com/janestreet/ppx_fixed_literal")
6142 (synopsis "Simpler notation for fixed point literals")
6143 (description
6144 "@samp{ppx-fixed-literal} is a ppx rewriter that rewrites fixed point
6145 literal of the form 1.0v to conversion functions currently in scope.")
6146 (license license:expat)))
6147
6148 (define-public ocaml-ppx-optional
6149 (package
6150 (name "ocaml-ppx-optional")
6151 (version "0.15.0")
6152 (source
6153 (janestreet-origin
6154 "ppx_optional" version
6155 "0af7ayhfc1jc01mxs4k253gq49yss2ymkmjsy6fpcz39zhci7fvj"))
6156 (build-system dune-build-system)
6157 (arguments `(#:tests? #f)) ; No tests
6158 (propagated-inputs
6159 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib))
6160 (properties `((upstream-name . "ppx_optional")
6161 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optional))))
6162 (home-page "https://github.com/janestreet/ppx_optional")
6163 (synopsis "Pattern matching on flat options")
6164 (description
6165 "A ppx rewriter that rewrites simple match statements with an if then
6166 else expression.")
6167 (license license:asl2.0)))
6168
6169 (define-public ocaml4.07-ppx-optional
6170 (package-with-ocaml4.07
6171 (package
6172 (inherit ocaml-ppx-optional)
6173 (version "0.11.0")
6174 (source
6175 (janestreet-origin
6176 "ppx_optional" version
6177 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))
6178 (properties `((upstream-name . "ppx_optional"))))))
6179
6180 (define-public ocaml-ppx-optcomp
6181 (package
6182 (name "ocaml-ppx-optcomp")
6183 (version "0.15.0")
6184 (home-page "https://github.com/janestreet/ppx_optcomp")
6185 (source
6186 (origin
6187 (method git-fetch)
6188 (uri (git-reference
6189 (url home-page)
6190 (commit (string-append "v" version))))
6191 (file-name (git-file-name name version))
6192 (sha256
6193 (base32
6194 "0ypivfipi8fcr9pqyvl2ajpcivmr1irdwwv248i4x6mggpc2pl0b"))))
6195 (build-system dune-build-system)
6196 (propagated-inputs
6197 (list ocaml-base ocaml-stdio ocaml-ppxlib))
6198 (properties `((upstream-name . "ppx_optcomp")
6199 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-optcomp))))
6200 (synopsis "Optional compilation for OCaml")
6201 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
6202 used to handle optional compilations of pieces of code depending of the word
6203 size, the version of the compiler, ...")
6204 (license license:asl2.0)))
6205
6206 (define-public ocaml4.07-ppx-optcomp
6207 (package-with-ocaml4.07
6208 (package
6209 (inherit ocaml-ppx-optcomp)
6210 (version "0.11.0")
6211 (source
6212 (janestreet-origin
6213 "ppx_optcomp" version
6214 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))
6215 (properties `((upstream-name . "ppx_optcomp"))))))
6216
6217 (define-public ocaml-ppx-let
6218 (package
6219 (name "ocaml-ppx-let")
6220 (version "0.15.0")
6221 (source
6222 (janestreet-origin "ppx_let" version
6223 "0m9niyiiv3qzv5x8hw0ifxjjzshnmx40dchka9d93mmnx88jqx34"))
6224 (build-system dune-build-system)
6225 (propagated-inputs
6226 (list ocaml-base ocaml-migrate-parsetree ocaml-ppxlib ocaml-ppx-here))
6227 (properties `((upstream-name . "ppx_let")
6228 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-let))))
6229 (home-page "https://github.com/janestreet/ppx_let")
6230 (synopsis "Monadic let-bindings")
6231 (description "A ppx rewriter for monadic and applicative let bindings,
6232 match expressions, and if expressions.")
6233 (license license:asl2.0)))
6234
6235 (define-public ocaml4.07-ppx-let
6236 (package-with-ocaml4.07
6237 (package
6238 (inherit ocaml-ppx-let)
6239 (version "0.11.0")
6240 (source
6241 (janestreet-origin "ppx_let" version
6242 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))
6243
6244 (properties `((upstream-name . "ppx_let"))))))
6245
6246 (define-public ocaml-ppx-fail
6247 (package
6248 (name "ocaml-ppx-fail")
6249 (version "0.14.0")
6250 (source
6251 (origin
6252 (method git-fetch)
6253 (uri (git-reference
6254 (url "https://github.com/janestreet/ppx_fail")
6255 (commit (string-append "v" version))))
6256 (file-name (git-file-name name version))
6257 (sha256
6258 (base32 "012p9gv7w4sk3b4x0sdmqrmr2856w8xc424waxb6vrybid7qjs95"))))
6259 (build-system dune-build-system)
6260 (propagated-inputs (list ocaml-base ocaml-ppx-here ocaml-ppxlib))
6261 (properties `((upstream-name . "ppx_fail")
6262 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-fail))))
6263 (home-page "https://github.com/janestreet/ppx_fail")
6264 (synopsis "Add location to calls to failwiths")
6265 (description "Syntax extension that makes [failwiths] always include a
6266 position.")
6267 (license license:expat)))
6268
6269 (define-public ocaml4.07-ppx-fail
6270 (package-with-ocaml4.07
6271 (package
6272 (inherit ocaml-ppx-fail)
6273 (version "0.11.0")
6274 (source (origin
6275 (method url-fetch)
6276 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6277 (version-major+minor version)
6278 "/files/ppx_fail-v" version ".tar.gz"))
6279 (sha256
6280 (base32
6281 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
6282 (propagated-inputs
6283 (list ocaml-base ocaml-ppx-here ocaml-migrate-parsetree ocaml-ppxlib))
6284 (properties '())
6285 (license license:asl2.0))))
6286
6287 (define-public ocaml-ppx-cold
6288 (package
6289 (name "ocaml-ppx-cold")
6290 (version "0.15.0")
6291 (home-page "https://github.com/janestreet/ppx_cold")
6292 (source
6293 (janestreet-origin "ppx_cold" version
6294 "13gqmfw2sq80anag9bwpm35600l1fnfn7mh9cbj1291k84rsx7wb"))
6295 (build-system dune-build-system)
6296 (arguments `(#:test-target "tests"))
6297 (propagated-inputs
6298 (list ocaml-base ocaml-ppxlib))
6299 (properties `((upstream-name . "ppx_cold")))
6300 (synopsis "Syntax extension for indicating cold path")
6301 (description
6302 "This package contains an syntax extension to indicate that the code is
6303 on the cold path and should be kept out of the way to avoid polluting the
6304 instruction cache on the hot path. See also
6305 https://github.com/ocaml/ocaml/issues/8563.")
6306 (license license:expat)))
6307
6308 (define-public ocaml-ppx-assert
6309 (package
6310 (name "ocaml-ppx-assert")
6311 (version "0.15.0")
6312 (source
6313 (janestreet-origin "ppx_assert" version
6314 "0rsr1yz2rs12w6qw0dz09dg3k2x2pfgd014fgp6nj993hhznapsf"))
6315 (build-system dune-build-system)
6316 (propagated-inputs
6317 (list ocaml-base
6318 ocaml-ppx-cold
6319 ocaml-ppx-compare
6320 ocaml-ppx-here
6321 ocaml-ppx-sexp-conv
6322 ocaml-migrate-parsetree
6323 ocaml-ppxlib))
6324 (properties `((upstream-name . "ppx_assert")
6325 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-assert))))
6326 (home-page "https://github.com/janestreet/ppx_assert")
6327 (synopsis "Assert-like extension nodes that raise useful errors on failure")
6328 (description "This package contains assert-like extension nodes that raise
6329 useful errors on failure.")
6330 (license license:asl2.0)))
6331
6332 (define-public ocaml4.07-ppx-assert
6333 (package-with-ocaml4.07
6334 (package
6335 (inherit ocaml-ppx-assert)
6336 (version "0.11.0")
6337 (source
6338 (janestreet-origin "ppx_assert" version
6339 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))
6340 (propagated-inputs
6341 `(("ocaml-base" ,ocaml-base)
6342 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6343 ("ocaml-ppx-here" ,ocaml-ppx-here)
6344 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6345 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6346 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6347 (properties `((upstream-name . "ppx_assert"))))))
6348
6349 (define-public ocaml-ppx-expect
6350 (package
6351 (name "ocaml-ppx-expect")
6352 (version "0.15.0")
6353 (source
6354 (origin
6355 (method git-fetch)
6356 (uri (git-reference
6357 (url "https://github.com/janestreet/ppx_expect")
6358 (commit (string-append "v" version))))
6359 (file-name (git-file-name name version))
6360 (sha256
6361 (base32
6362 "134dl5qhjxsj2mcmrx9f3m0iys0n5mjfpz9flj8zn8d2jir43776"))))
6363 (build-system dune-build-system)
6364 (propagated-inputs
6365 (list ocaml-base
6366 ocaml-ppx-here
6367 ocaml-ppx-inline-test
6368 ocaml-stdio
6369 ocaml-ppxlib
6370 ocaml-migrate-parsetree
6371 ocaml-re))
6372 (properties `((upstream-name . "ppx_expect")
6373 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect))))
6374 (home-page "https://github.com/janestreet/ppx_expect")
6375 (synopsis "Cram like framework for OCaml")
6376 (description "Expect-test is a framework for writing tests in OCaml, similar
6377 to Cram. Expect-tests mimics the existing inline tests framework with the
6378 @code{let%expect_test} construct. The body of an expect-test can contain
6379 output-generating code, interleaved with @code{%expect} extension expressions
6380 to denote the expected output.")
6381 (license license:asl2.0)))
6382
6383 (define-public ocaml4.07-ppx-expect
6384 (package-with-ocaml4.07
6385 (package
6386 (inherit ocaml-ppx-expect)
6387 (version "0.12.0")
6388 (source
6389 (janestreet-origin "ppx_expect" version
6390 "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk"))
6391 (propagated-inputs
6392 `(("ocaml-base" ,ocaml-base)
6393 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
6394 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
6395 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
6396 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
6397 ("ocaml-ppx-here" ,ocaml-ppx-here)
6398 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
6399 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6400 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
6401 ("ocaml-stdio" ,ocaml-stdio)
6402 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6403 ("ocaml-ppxlib" ,ocaml-ppxlib)
6404 ("ocaml-re" ,ocaml-re)))
6405 (properties `((upstream-name . "ppx_expect"))))))
6406
6407 (define-public ocaml-ppx-js-style
6408 (package
6409 (name "ocaml-ppx-js-style")
6410 (version "0.15.0")
6411 (source
6412 (origin
6413 (method git-fetch)
6414 (uri (git-reference
6415 (url "https://github.com/janestreet/ppx_js_style")
6416 (commit (string-append "v" version))))
6417 (file-name (git-file-name name version))
6418 (sha256
6419 (base32
6420 "0q2p9pvmlncgv0hprph95xiv7s6q44ynvp4yl4dckf1qx68rb3ba"))))
6421 (build-system dune-build-system)
6422 (arguments `(#:tests? #f)) ; No tests
6423 (propagated-inputs
6424 (list ocaml-base ocaml-migrate-parsetree ocaml-octavius ocaml-ppxlib))
6425 (properties `((upstream-name . "ppx_js_style")
6426 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-js-style))))
6427 (home-page "https://github.com/janestreet/ppx_js_style")
6428 (synopsis "Code style checker for Jane Street Packages")
6429 (description "This package is a no-op ppx rewriter. It is used as a
6430 @code{lint} tool to enforce some coding conventions across all Jane Street
6431 packages.")
6432 (license license:asl2.0)))
6433
6434 (define-public ocaml4.07-ppx-js-style
6435 (package-with-ocaml4.07
6436 (package
6437 (inherit ocaml-ppx-js-style)
6438 (version "0.11.0")
6439 (source
6440 (janestreet-origin "ppx_js_style" version
6441 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))
6442 (properties `((upstream-name . "ppx_js_style"))))))
6443
6444 (define-public ocaml-ppx-typerep-conv
6445 (package
6446 (name "ocaml-ppx-typerep-conv")
6447 (version "0.15.0")
6448 (source
6449 (origin
6450 (method git-fetch)
6451 (uri (git-reference
6452 (url "https://github.com/janestreet/ppx_typerep_conv/")
6453 (commit (string-append "v" version))))
6454 (file-name (git-file-name name version))
6455 (sha256
6456 (base32 "1q1lzykpm83ra4l5jh4rfddhd3c96kx4s4rvx0w4b51z1qk56zam"))))
6457 (build-system dune-build-system)
6458 (arguments
6459 `(#:test-target "."))
6460 (propagated-inputs (list ocaml-base ocaml-typerep ocaml-ppxlib))
6461 (properties `((upstream-name . "ppx_typerep_conv")
6462 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-typerep-conv))))
6463 (home-page "https://github.com/janestreet/ppx_typerep_conv")
6464 (synopsis "Generation of runtime types from type declarations")
6465 (description "This package can automatically generate runtime types
6466 from type definitions.")
6467 (license license:expat)))
6468
6469 (define-public ocaml4.07-ppx-typerep-conv
6470 (package-with-ocaml4.07
6471 (package
6472 (inherit ocaml-ppx-typerep-conv)
6473 (version "0.11.1")
6474 (source (origin
6475 (method git-fetch)
6476 (uri (git-reference
6477 (url "https://github.com/janestreet/ppx_typerep_conv")
6478 (commit (string-append "v" version))))
6479 (file-name (git-file-name "ocaml4.07-ppx-typerep-conv" version))
6480 (sha256
6481 (base32
6482 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
6483 (properties '())
6484 (propagated-inputs
6485 (list ocaml-base ocaml-typerep ocaml-migrate-parsetree ocaml-ppxlib))
6486 (license license:asl2.0))))
6487
6488 (define-public ocaml-ppx-string
6489 (package
6490 (name "ocaml-ppx-string")
6491 (version "0.15.0")
6492 (source
6493 (origin
6494 (method git-fetch)
6495 (uri (git-reference
6496 (url "https://github.com/janestreet/ppx_string")
6497 (commit (string-append "v" version))))
6498 (file-name (git-file-name name version))
6499 (sha256
6500 (base32 "1dp5frk6cig5m3m5rrh2alw63snyf845x7zlkkaljip02pqcbw1s"))))
6501 (build-system dune-build-system)
6502 (arguments `(#:tests? #f)); no tests
6503 (propagated-inputs
6504 (list ocaml-base ocaml-ppx-base ocaml-stdio ocaml-ppxlib))
6505 (properties `((upstream-name . "ppx_string")))
6506 (home-page "https://github.com/janestreet/ppx_string")
6507 (synopsis "Ppx extension for string interpolation")
6508 (description "This extension provides a syntax for string interpolation.")
6509 (license license:expat)))
6510
6511 (define-public ocaml-ppx-stable
6512 (package
6513 (name "ocaml-ppx-stable")
6514 (version "0.15.0")
6515 (source
6516 (origin
6517 (method git-fetch)
6518 (uri (git-reference
6519 (url "https://github.com/janestreet/ppx_stable")
6520 (commit (string-append "v" version))))
6521 (file-name (git-file-name name version))
6522 (sha256
6523 (base32 "1as0v0x8c9ilyhngax55lvwyyi4a2wshyan668v0f2s1608cwb1l"))))
6524 (build-system dune-build-system)
6525 (arguments
6526 `(#:test-target "tests"))
6527 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6528 (properties `((upstream-name . "ppx_stable")))
6529 (home-page "https://github.com/janestreet/ppx_stable")
6530 (synopsis "Stable types conversions generator")
6531 (description "This package is a ppx extension for easier implementation of
6532 conversion functions between almost identical types.")
6533 (license license:expat)))
6534
6535 (define-public ocaml-ppx-base
6536 (package
6537 (name "ocaml-ppx-base")
6538 (version "0.15.0")
6539 (source
6540 (janestreet-origin
6541 "ppx_base" version
6542 "181w7y2has8jsrqdsvd08q5nhnkx523vwsk3lg0cjix55qssvfyn"))
6543 (build-system dune-build-system)
6544 (arguments
6545 `(#:test-target "."))
6546 (propagated-inputs
6547 (list ocaml-ppx-compare
6548 ocaml-ppx-cold
6549 ocaml-ppx-enumerate
6550 ocaml-ppx-hash
6551 ocaml-ppx-js-style
6552 ocaml-ppx-sexp-conv
6553 ocaml-migrate-parsetree
6554 ocaml-ppxlib))
6555 (properties `((upstream-name . "ppx_base")
6556 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-base))))
6557 (home-page "https://github.com/janestreet/ppx_base")
6558 (synopsis "Base set of ppx rewriters")
6559 (description "Ppx_base is the set of ppx rewriters used for Base.
6560
6561 Note that Base doesn't need ppx to build, it is only used as a
6562 verification tool.")
6563 (license license:asl2.0)))
6564
6565 (define-public ocaml4.07-ppx-base
6566 (package-with-ocaml4.07
6567 (package
6568 (inherit ocaml-ppx-base)
6569 (version "0.11.0")
6570 (source
6571 (janestreet-origin
6572 "ppx_base" version
6573 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))
6574 (propagated-inputs
6575 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
6576 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
6577 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
6578 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
6579 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
6580 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
6581 ("ocaml-ppxlib" ,ocaml-ppxlib)))
6582 (properties `((upstream-name . "ppx_base"))))))
6583
6584 (define-public ocaml-ppx-bin-prot
6585 (package
6586 (name "ocaml-ppx-bin-prot")
6587 (version "0.15.0")
6588 (source
6589 (origin
6590 (method git-fetch)
6591 (uri (git-reference
6592 (url "https://github.com/janestreet/ppx_bin_prot")
6593 (commit (string-append "v" version))))
6594 (file-name (git-file-name name version))
6595 (sha256
6596 (base32 "1280wsls061fmvmdysjqn3lv4mnkyg400jnjf4jyfr14s33h1ad5"))))
6597 (build-system dune-build-system)
6598 (arguments
6599 ;; Cyclic dependency with ocaml-ppx-jane
6600 `(#:tests? #f))
6601 (propagated-inputs
6602 (list ocaml-base ocaml-bin-prot ocaml-ppx-here ocaml-ppxlib))
6603 (properties `((upstream-name . "ppx_bin_prot")
6604 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-bin-prot))))
6605 (home-page "https://github.com/janestreet/ppx_bin_prot")
6606 (synopsis "Generation of bin_prot readers and writers from types")
6607 (description "Generation of binary serialization and deserialization
6608 functions from type definitions.")
6609 (license license:expat)))
6610
6611 (define-public ocaml4.07-ppx-bin-prot
6612 (package-with-ocaml4.07
6613 (package
6614 (inherit ocaml-ppx-bin-prot)
6615 (version "0.11.1")
6616 (source (origin
6617 (method git-fetch)
6618 (uri (git-reference
6619 (url "https://github.com/janestreet/ppx_bin_prot")
6620 (commit (string-append "v" version))))
6621 (file-name (git-file-name "ocaml4.07-ppx-bin-prot" version))
6622 (sha256
6623 (base32
6624 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
6625 (propagated-inputs
6626 (list ocaml-base
6627 ocaml-bin-prot
6628 ocaml-ppx-here
6629 ocaml-migrate-parsetree
6630 ocaml-ppxlib))
6631 (properties '())
6632 (license license:asl2.0))))
6633
6634 (define-public ocaml-ppx-ignore-instrumentation
6635 (package
6636 (name "ocaml-ppx-ignore-instrumentation")
6637 (version "0.15.0")
6638 (source
6639 (origin
6640 (method git-fetch)
6641 (uri (git-reference
6642 (url "https://github.com/janestreet/ppx_ignore_instrumentation")
6643 (commit (string-append "v" version))))
6644 (file-name (git-file-name name version))
6645 (sha256
6646 (base32 "16fgig88g3jr0m3i636fr52h29h1yzhi8nhnl4029zn808kcdyj2"))))
6647 (build-system dune-build-system)
6648 (arguments
6649 `(#:tests? #f)) ;no tests
6650 (propagated-inputs (list ocaml-ppxlib))
6651 (properties `((upstream-name . "ppx_ignore_instrumentation")))
6652 (home-page "https://github.com/janestreet/ppx_ignore_instrumentation")
6653 (synopsis "Ignore Jane Street specific instrumentation extensions")
6654 (description
6655 "Ignore Jane Street specific instrumentation extensions from internal
6656 PPXs or compiler features not yet upstreamed.")
6657 (license license:expat)))
6658
6659 (define-public ocaml-ppx-log
6660 (package
6661 (name "ocaml-ppx-log")
6662 (version "0.15.0")
6663 (source
6664 (origin
6665 (method git-fetch)
6666 (uri (git-reference
6667 (url "https://github.com/janestreet/ppx_log")
6668 (commit (string-append "v" version))))
6669 (file-name (git-file-name name version))
6670 (sha256
6671 (base32 "08i9gz3f4w3bmlrfdw7ja9awsfkhhldz03bnnc4hijfmn8sawzi0"))))
6672 (build-system dune-build-system)
6673 (propagated-inputs
6674 (list ocaml-base
6675 ocaml-ppx-here
6676 ocaml-ppx-sexp-conv
6677 ocaml-ppx-sexp-message
6678 ocaml-sexplib
6679 ocaml-ppxlib))
6680 (properties `((upstream-name . "ppx_log")))
6681 (home-page "https://github.com/janestreet/ppx_log")
6682 (synopsis "Extension nodes for lazily rendering log messages")
6683 (description "This package provides ppx_sexp_message-like extension
6684 nodes for lazily rendering log messages.")
6685 (license license:expat)))
6686
6687 (define-public ocaml-ppx-disable-unused-warnings
6688 (package
6689 (name "ocaml-ppx-disable-unused-warnings")
6690 (version "0.15.0")
6691 (source
6692 (origin
6693 (method git-fetch)
6694 (uri (git-reference
6695 (url "https://github.com/janestreet/ppx_disable_unused_warnings")
6696 (commit (string-append "v" version))))
6697 (file-name (git-file-name name version))
6698 (sha256
6699 (base32 "0sb5i4v7p9df2bxk66rjs30k9fqdrwsq1jgykjv6wyrx2d9bv955"))))
6700 (build-system dune-build-system)
6701 (arguments
6702 `(#:test-target "tests"))
6703 (propagated-inputs (list ocaml-base ocaml-ppxlib))
6704 (properties `((upstream-name . "ppx_disable_unused_warnings")))
6705 (home-page "https://github.com/janestreet/ppx_disable_unused_warnings")
6706 (synopsis "Simple ppx extension for commonly unused warnings")
6707 (description "This package expands @code{@@disable_unused_warnings} into
6708 @code{@@warning \"-20-26-32-33-34-35-36-37-38-39-60-66-67\"}")
6709 (license license:expat)))
6710
6711 (define-public ocaml-ppx-jane
6712 (package
6713 (name "ocaml-ppx-jane")
6714 (version "0.15.0")
6715 (source
6716 (origin
6717 (method git-fetch)
6718 (uri (git-reference
6719 (url "https://github.com/janestreet/ppx_jane")
6720 (commit (string-append "v" version))))
6721 (file-name (git-file-name name version))
6722 (sha256
6723 (base32 "1p6847gdfnnj6qpa4yh57s6wwpsl7rfgy0q7993chz24h9mhz5lk"))))
6724 (build-system dune-build-system)
6725 (arguments
6726 `(#:test-target "."))
6727 (propagated-inputs
6728 (list ocaml-base-quickcheck
6729 ocaml-ppx-assert
6730 ocaml-ppx-base
6731 ocaml-ppx-bench
6732 ocaml-ppx-bin-prot
6733 ocaml-ppx-custom-printf
6734 ocaml-ppx-disable-unused-warnings
6735 ocaml-ppx-expect
6736 ocaml-ppx-fields-conv
6737 ocaml-ppx-fixed-literal
6738 ocaml-ppx-here
6739 ocaml-ppx-ignore-instrumentation
6740 ocaml-ppx-inline-test
6741 ocaml-ppx-let
6742 ocaml-ppx-log
6743 ocaml-ppx-module-timer
6744 ocaml-ppx-optcomp
6745 ocaml-ppx-optional
6746 ocaml-ppx-pipebang
6747 ocaml-ppx-sexp-message
6748 ocaml-ppx-sexp-value
6749 ocaml-ppx-stable
6750 ocaml-ppx-string
6751 ocaml-ppx-typerep-conv
6752 ocaml-ppx-variants-conv
6753 ocaml-ppxlib))
6754 (properties `((upstream-name . "ppx_jane")
6755 (ocaml4.07-variant . ,(delay ocaml4.07-ppx-jane))))
6756 (home-page "https://github.com/janestreet/ppx_jane")
6757 (synopsis "Standard Jane Street ppx rewriters")
6758 (description "This package installs a ppx-jane executable, which is a ppx
6759 driver including all standard Jane Street ppx rewriters.")
6760 (license license:expat)))
6761
6762 (define-public ocaml4.07-ppx-jane
6763 (package-with-ocaml4.07
6764 (package
6765 (inherit ocaml-ppx-jane)
6766 (version "0.11.0")
6767 (source (origin
6768 (method url-fetch)
6769 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6770 (version-major+minor version)
6771 "/files/ppx_jane-v" version ".tar.gz"))
6772 (sha256
6773 (base32
6774 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
6775 (propagated-inputs
6776 (list ocaml-ppx-assert
6777 ocaml-ppx-base
6778 ocaml-ppx-bench
6779 ocaml-ppx-bin-prot
6780 ocaml-ppx-custom-printf
6781 ocaml-ppx-expect
6782 ocaml-ppx-fail
6783 ocaml-ppx-fields-conv
6784 ocaml-ppx-here
6785 ocaml-ppx-inline-test
6786 ocaml-ppx-let
6787 ocaml-ppx-optcomp
6788 ocaml-ppx-optional
6789 ocaml-ppx-pipebang
6790 ocaml-ppx-sexp-message
6791 ocaml-ppx-sexp-value
6792 ocaml-ppx-typerep-conv
6793 ocaml-ppx-variants-conv
6794 ocaml-migrate-parsetree
6795 ocaml-ppxlib))
6796 (properties '())
6797 (license license:asl2.0))))
6798
6799 (define-public ocaml-base-bigstring
6800 (package
6801 (name "ocaml-base-bigstring")
6802 (version "0.15.0")
6803 (source
6804 (origin
6805 (method git-fetch)
6806 (uri (git-reference
6807 (url "https://github.com/janestreet/base_bigstring")
6808 (commit (string-append "v" version))))
6809 (file-name (git-file-name name version))
6810 (sha256
6811 (base32 "1hv3hw2fwqmkrxms1g6rw3c18mmla1z5bva3anx45mnff903iv4q"))))
6812 (build-system dune-build-system)
6813 (propagated-inputs (list ocaml-base ocaml-int-repr ocaml-ppx-jane))
6814 (properties `((upstream-name . "base_bigstring")))
6815 (home-page "https://github.com/janestreet/base_bigstring")
6816 (synopsis "String type based on [Bigarray], for use in I/O and C-bindings")
6817 (description "This package provides string type based on [Bigarray], for
6818 use in I/O and C-bindings.")
6819 (license license:expat)))
6820
6821 (define-public ocaml-splittable-random
6822 (package
6823 (name "ocaml-splittable-random")
6824 (version "0.15.0")
6825 (source
6826 (origin
6827 (method git-fetch)
6828 (uri (git-reference
6829 (url "https://github.com/janestreet/splittable_random")
6830 (commit (string-append "v" version))))
6831 (file-name (git-file-name name version))
6832 (sha256
6833 (base32 "0ap5z4z1aagz4z02q9642cbl25jzws9lbc2x5xkpyjlc0qcm9v3m"))))
6834 (build-system dune-build-system)
6835 (propagated-inputs
6836 (list ocaml-base
6837 ocaml-ppx-assert
6838 ocaml-ppx-bench
6839 ocaml-ppx-inline-test
6840 ocaml-ppx-sexp-message))
6841 (properties `((upstream-name . "splittable_random")
6842 (ocaml-4.07-variant . ,(delay ocaml4.07-splittable-random))))
6843 (home-page "https://github.com/janestreet/splittable_random")
6844 (synopsis "PRNG that can be split into independent streams")
6845 (description "This package provides a splittable
6846 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
6847 be used as a stream of random values; it can also be split to produce a
6848 second, independent stream of random values.
6849
6850 This library implements a splittable pseudo-random number generator that sacrifices
6851 cryptographic-quality randomness in favor of performance.")
6852 (license license:expat)))
6853
6854 (define-public ocaml4.07-splittable-random
6855 (package-with-ocaml4.07
6856 (package
6857 (inherit ocaml-splittable-random)
6858 (version "0.11.0")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6862 (version-major+minor version)
6863 "/files/splittable_random-v" version ".tar.gz"))
6864 (sha256
6865 (base32
6866 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
6867 (propagated-inputs
6868 (list ocaml-base ocaml-ppx-jane ocaml-migrate-parsetree))
6869 (properties '())
6870 (license license:asl2.0))))
6871
6872 (define-public ocaml-base-quickcheck
6873 (package
6874 (name "ocaml-base-quickcheck")
6875 (version "0.15.0")
6876 (source
6877 (origin
6878 (method git-fetch)
6879 (uri (git-reference
6880 (url "https://github.com/janestreet/base_quickcheck")
6881 (commit (string-append "v" version))))
6882 (file-name (git-file-name name version))
6883 (sha256
6884 (base32 "0q73kfr67cz5wp4qn4rq3lpa922hqmvwdiinnans0js65fvlgqsi"))))
6885 (build-system dune-build-system)
6886 (propagated-inputs
6887 (list ocaml-base
6888 ocaml-ppx-base
6889 ocaml-ppx-fields-conv
6890 ocaml-ppx-let
6891 ocaml-ppx-sexp-message
6892 ocaml-ppx-sexp-value
6893 ocaml-splittable-random
6894 ocaml-ppxlib))
6895 (properties `((upstream-name . "base_quickcheck")))
6896 (home-page "https://github.com/janestreet/base_quickcheck")
6897 (synopsis
6898 "Randomized testing framework, designed for compatibility with Base")
6899 (description
6900 "@samp{base-quickcheck} provides randomized testing in the style of
6901 Haskell's Quickcheck library, with support for built-in types as well as
6902 types provided by Base.")
6903 (license license:expat)))
6904
6905 (define-public ocaml4.07-jane-street-headers
6906 (package
6907 (name "ocaml4.07-jane-street-headers")
6908 (version "0.11.0")
6909 (source (origin
6910 (method url-fetch)
6911 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6912 (version-major+minor version)
6913 "/files/jane-street-headers-v" version ".tar.gz"))
6914 (sha256
6915 (base32
6916 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
6917 (build-system dune-build-system)
6918 (arguments
6919 `(#:test-target "."
6920 #:ocaml ,ocaml-4.07
6921 #:findlib ,ocaml4.07-findlib
6922 #:dune ,ocaml4.07-dune))
6923 (home-page "https://github.com/janestreet/jane-street-headers")
6924 (synopsis "Jane Street C header files")
6925 (description "This package provides C header files shared between the
6926 various Jane Street packages.")
6927 (license license:asl2.0)))
6928
6929 (define-public ocaml4.07-configurator
6930 (package
6931 (name "ocaml4.07-configurator")
6932 (version "0.11.0")
6933 (source (origin
6934 (method url-fetch)
6935 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
6936 (version-major+minor version)
6937 "/files/configurator-v" version ".tar.gz"))
6938 (sha256
6939 (base32
6940 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
6941 (build-system dune-build-system)
6942 (arguments
6943 ;; No tests
6944 `(#:tests? #f
6945 #:ocaml ,ocaml-4.07
6946 #:findlib ,ocaml4.07-findlib
6947 #:dune ,ocaml4.07-dune))
6948 (propagated-inputs
6949 `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base))
6950 ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio))))
6951 (home-page "https://github.com/janestreet/configurator")
6952 (synopsis "Helper library for gathering system configuration")
6953 (description "Configurator is a small library that helps writing OCaml
6954 scripts that test features available on the system, in order to generate config.h
6955 files for instance.
6956
6957 Configurator allows one to:
6958 @itemize
6959 @item test if a C program compiles
6960 @item query pkg-config
6961 @item import #define from OCaml header files
6962 @item generate config.h file
6963 @end itemize")
6964 (license license:asl2.0)))
6965
6966 (define-public ocaml-spawn
6967 (package
6968 (name "ocaml-spawn")
6969 (version "0.15.1")
6970 (source (origin
6971 (method git-fetch)
6972 (uri (git-reference
6973 (url "https://github.com/janestreet/spawn")
6974 (commit (string-append "v" version))))
6975 (file-name (git-file-name name version))
6976 (sha256
6977 (base32
6978 "16aq5z3mq5lkpryfs4w0748b2w9v061myml0hn7nhh6r6i329w7a"))))
6979 (build-system dune-build-system)
6980 (propagated-inputs (list ocaml-odoc))
6981 (native-inputs (list ocaml-ppx-expect))
6982 (properties
6983 `((ocaml4.07-variant . ,(delay ocaml4.07-spawn))))
6984 (home-page "https://github.com/janestreet/spawn")
6985 (synopsis "Spawning sub-processes")
6986 (description
6987 "Spawn is a small library exposing only one functionality: spawning sub-process.
6988
6989 It has three main goals:
6990
6991 @itemize
6992 @item provide missing features of Unix.create_process such as providing a
6993 working directory,
6994 @item provide better errors when a system call fails in the
6995 sub-process. For instance if a command is not found, you get a proper
6996 @code{Unix.Unix_error} exception,
6997 @item improve performances by using vfork when available. It is often
6998 claimed that nowadays fork is as fast as vfork, however in practice
6999 fork takes time proportional to the process memory while vfork is
7000 constant time. In application using a lot of memory, vfork can be
7001 thousands of times faster than fork.
7002 @end itemize")
7003 (license license:asl2.0)))
7004
7005 (define-public ocaml4.07-spawn
7006 (package-with-ocaml4.07
7007 (package
7008 (inherit ocaml-spawn)
7009 (version "0.13.0")
7010 (source (origin
7011 (method git-fetch)
7012 (uri (git-reference
7013 (url "https://github.com/janestreet/spawn")
7014 (commit (string-append "v" version))))
7015 (file-name (git-file-name "ocaml4.07-spawn" version))
7016 (sha256
7017 (base32
7018 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
7019 (arguments
7020 `(#:phases
7021 (modify-phases %standard-phases
7022 (add-before 'check 'fix-tests
7023 (lambda _
7024 (substitute* "test/tests.ml"
7025 (("/bin/pwd") (which "pwd"))
7026 (("/bin/echo") (which "echo")))
7027 #t)))
7028 #:ocaml ,ocaml-4.07
7029 #:findlib ,ocaml4.07-findlib
7030 #:dune ,ocaml4.07-dune))
7031 (propagated-inputs '())
7032 (properties '()))))
7033
7034 (define-public ocaml-core
7035 (package
7036 (name "ocaml-core")
7037 (version "0.15.0")
7038 (source
7039 (origin
7040 (method git-fetch)
7041 (uri (git-reference
7042 (url "https://github.com/janestreet/core")
7043 (commit (string-append "v" version))))
7044 (file-name (git-file-name name version))
7045 (sha256
7046 (base32 "1m2ybvlz9zlb2d0jc0j7wdgd18mx9sh3ds2ylkv0cfjx1pzi0l25"))))
7047 (build-system dune-build-system)
7048 (arguments
7049 `(#:package "core"
7050 #:tests? #f)); Require a cyclic dependency: core_extended
7051 (propagated-inputs
7052 (list ocaml-base
7053 ocaml-base-bigstring
7054 ocaml-base-quickcheck
7055 ocaml-bin-prot
7056 ocaml-fieldslib
7057 ocaml-jane-street-headers
7058 ocaml-jst-config
7059 ocaml-ppx-assert
7060 ocaml-ppx-base
7061 ocaml-ppx-hash
7062 ocaml-ppx-inline-test
7063 ocaml-ppx-jane
7064 ocaml-ppx-sexp-conv
7065 ocaml-ppx-sexp-message
7066 ocaml-sexplib
7067 ocaml-splittable-random
7068 ocaml-stdio
7069 ocaml-time-now
7070 ocaml-typerep
7071 ocaml-variantslib))
7072 (home-page "https://github.com/janestreet/core")
7073 (synopsis "Alternative to OCaml's standard library")
7074 (description "The Core suite of libraries is an alternative to OCaml's
7075 standard library that was developed by Jane Street.")
7076 ;; Also contains parts of OCaml, relicensed to expat, as permitted
7077 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7078 (license license:expat)))
7079
7080 (define-public ocaml4.07-core
7081 (package-with-ocaml4.07
7082 (package
7083 (inherit ocaml-core)
7084 (version "0.11.3")
7085 (source (origin
7086 (method git-fetch)
7087 (uri (git-reference
7088 (url "https://github.com/janestreet/core")
7089 (commit (string-append "v" version))))
7090 (file-name (git-file-name "ocaml4.07-core" version))
7091 (sha256
7092 (base32
7093 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
7094 (propagated-inputs
7095 (list ocaml-base
7096 ocaml4.07-configurator
7097 ocaml-core-kernel
7098 ocaml-ppx-assert
7099 ocaml-ppx-jane
7100 ocaml-sexplib
7101 ocaml-spawn
7102 ocaml-stdio
7103 ocaml-migrate-parsetree
7104 ocaml-ppxlib))
7105 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
7106 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
7107 (license license:asl2.0))))
7108
7109 (define-public ocaml-int-repr
7110 (package
7111 (name "ocaml-int-repr")
7112 (version "0.15.0")
7113 (source
7114 (origin
7115 (method git-fetch)
7116 (uri (git-reference
7117 (url "https://github.com/janestreet/int_repr")
7118 (commit (string-append "v" version))))
7119 (file-name (git-file-name name version))
7120 (sha256
7121 (base32 "0ph88ym3s9dk30n17si2xam40sp8wv1xffw5cl3bskc2vfya1nvl"))))
7122 (build-system dune-build-system)
7123 (arguments
7124 `(#:tests? #f)) ;no tests
7125 (propagated-inputs (list ocaml-base ocaml-ppx-jane))
7126 (properties `((upstream-name . "int_repr")))
7127 (home-page "https://github.com/janestreet/int_repr")
7128 (synopsis "Integers of various widths")
7129 (description "Integers of various widths.")
7130 (license license:expat)))
7131
7132 (define-public ocaml-core-kernel
7133 (package
7134 (name "ocaml-core-kernel")
7135 (version "0.15.0")
7136 (source
7137 (origin
7138 (method git-fetch)
7139 (uri (git-reference
7140 (url "https://github.com/janestreet/core_kernel")
7141 (commit (string-append "v" version))))
7142 (file-name (git-file-name name version))
7143 (sha256
7144 (base32 "05mb4vbf293iq1xx4acyrmi9cgcw6capwrsa54ils62alby6w6yq"))))
7145 (build-system dune-build-system)
7146 (arguments
7147 ;; Cyclic dependency with ocaml-core
7148 `(#:tests? #f))
7149 (propagated-inputs
7150 (list ocaml-base ocaml-core ocaml-int-repr ocaml-ppx-jane))
7151 (properties `((upstream-name . "core_kernel")
7152 (ocaml4.07-variant . ,(delay ocaml4.07-core-kernel))))
7153 (home-page "https://github.com/janestreet/core_kernel")
7154 (synopsis "Portable standard library for OCaml")
7155 (description "Core is an alternative to the OCaml standard library.
7156
7157 Core_kernel is the system-independent part of Core. It is aimed for cases when
7158 the full Core is not available, such as in Javascript.")
7159 (license license:expat)))
7160
7161 (define-public ocaml4.07-core-kernel
7162 (package-with-ocaml4.07
7163 (package
7164 (inherit ocaml-core-kernel)
7165 (version "0.11.1")
7166 (source (origin
7167 (method git-fetch)
7168 (uri (git-reference
7169 (url "https://github.com/janestreet/core_kernel")
7170 (commit (string-append "v" version))))
7171 (file-name (git-file-name "ocaml4.07-core-kernel" version))
7172 (sha256
7173 (base32
7174 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
7175 (propagated-inputs
7176 (list ocaml-base
7177 ocaml-bin-prot
7178 ocaml4.07-configurator
7179 ocaml-fieldslib
7180 ocaml-jane-street-headers
7181 ocaml-ppx-assert
7182 ocaml-ppx-base
7183 ocaml-ppx-hash
7184 ocaml-ppx-inline-test
7185 ocaml-ppx-jane
7186 ocaml-ppx-sexp-conv
7187 ocaml-ppx-sexp-message
7188 ocaml-sexplib
7189 ocaml-splittable-random
7190 ocaml-stdio
7191 ocaml-typerep
7192 ocaml-variantslib
7193 ocaml-migrate-parsetree))
7194 (properties '())
7195 (license (list
7196 ;; this package and parts of OCaml, relicensed by janestreet
7197 license:asl2.0
7198 ;; MLton and sjs
7199 license:expat)))))
7200
7201 (define-public ocaml-timezone
7202 (package
7203 (name "ocaml-timezone")
7204 (version "0.15.0")
7205 (source
7206 (origin
7207 (method git-fetch)
7208 (uri (git-reference
7209 (url "https://github.com/janestreet/timezone")
7210 (commit (string-append "v" version))))
7211 (file-name (git-file-name name version))
7212 (sha256
7213 (base32 "00a007aji5rbz42kgbq1w90py6fm9k9akycs5abkcfll5rd0cbhx"))))
7214 (build-system dune-build-system)
7215 (propagated-inputs (list ocaml-core ocaml-ppx-jane))
7216 (home-page "https://github.com/janestreet/timezone")
7217 (synopsis "Time-zone handling")
7218 (description
7219 "Timezone handles parsing timezone data and create @code{Timezone.t}
7220 that can later be used to manipulate time in core_kernel or core.")
7221 (license license:expat)))
7222
7223 (define-public ocaml-markup
7224 (package
7225 (name "ocaml-markup")
7226 (version "1.0.3")
7227 (home-page "https://github.com/aantron/markup.ml")
7228 (source
7229 (origin
7230 (method git-fetch)
7231 (uri (git-reference
7232 (url (string-append home-page ".git"))
7233 (commit version)))
7234 (file-name (git-file-name name version))
7235 (sha256
7236 (base32
7237 "1acgcbhx4rxx92rf65lsns588d6zzfrin2pnpkx24jw5vbgz7idn"))))
7238 (build-system dune-build-system)
7239 (arguments
7240 `(#:package "markup"))
7241 (propagated-inputs
7242 (list ocaml-bisect-ppx ocaml-uchar ocaml-uutf ocaml-lwt))
7243 (native-inputs
7244 (list ocaml-ounit2 pkg-config))
7245 (properties
7246 `((ocaml4.07-variant . ,(delay (package-with-ocaml4.07 ocaml-markup0.8.0)))))
7247 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
7248 (description "Markup.ml provides an HTML parser and an XML parser. The
7249 parsers are wrapped in a simple interface: they are functions that transform
7250 byte streams to parsing signal streams. Streams can be manipulated in various
7251 ways, such as processing by fold, filter, and map, assembly into DOM tree
7252 structures, or serialization back to HTML or XML.
7253
7254 Both parsers are based on their respective standards. The HTML parser, in
7255 particular, is based on the state machines defined in HTML5.
7256
7257 The parsers are error-recovering by default, and accept fragments. This makes
7258 it very easy to get a best-effort parse of some input. The parsers can,
7259 however, be easily configured to be strict, and to accept only full documents.
7260
7261 Apart from this, the parsers are streaming (do not build up a document in
7262 memory), non-blocking (can be used with threading libraries), lazy (do not
7263 consume input unless the signal stream is being read), and process the input in
7264 a single pass. They automatically detect the character encoding of the input
7265 stream, and convert everything to UTF-8.")
7266 (license license:bsd-3)))
7267
7268 ;; ocaml-markup 1.0.0 can not be built with old version of dune used in
7269 ;; package-with-ocaml4.07
7270 (define-public ocaml-markup0.8.0
7271 (package
7272 (inherit ocaml-markup)
7273 (name "ocaml-markup")
7274 (version "0.8.0")
7275 (home-page "https://github.com/aantron/markup.ml")
7276 (source
7277 (origin
7278 (method git-fetch)
7279 (uri (git-reference
7280 (url (string-append home-page ".git"))
7281 (commit version)))
7282 (file-name (git-file-name name version))
7283 (sha256
7284 (base32
7285 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
7286 (native-inputs
7287 (list ocaml-ounit pkg-config))
7288 (properties '())))
7289
7290 (define-public ocaml-tyxml
7291 (package
7292 (name "ocaml-tyxml")
7293 (version "4.5.0")
7294 (source
7295 (origin
7296 (method git-fetch)
7297 (uri (git-reference
7298 (url "https://github.com/ocsigen/tyxml")
7299 (commit version)))
7300 (file-name (git-file-name name version))
7301 (sha256
7302 (base32
7303 "0bh66wknc7sx2r63kscp0hg6h73dkv6qpkx0cdz2qp7p28pg2ixz"))))
7304 (build-system dune-build-system)
7305 (inputs
7306 (list ocaml-re ocaml-seq ocaml-uutf))
7307 (native-inputs
7308 (list ocaml-alcotest))
7309 (arguments `(#:package "tyxml"))
7310 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-tyxml))))
7311 (home-page "https://github.com/ocsigen/tyxml/")
7312 (synopsis "TyXML is a library for building correct HTML and SVG documents")
7313 (description "TyXML provides a set of convenient combinators that uses the
7314 OCaml type system to ensure the validity of the generated documents. TyXML can
7315 be used with any representation of HTML and SVG: the textual one, provided
7316 directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
7317 (@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
7318 also create your own representation and use it to instantiate a new set of
7319 combinators.")
7320 (license license:lgpl2.1)))
7321
7322 (define-public ocaml4.07-tyxml
7323 (package-with-ocaml4.07
7324 (package
7325 (inherit ocaml-tyxml)
7326 (version "4.4.0")
7327 (source (origin
7328 (method git-fetch)
7329 (uri (git-reference
7330 (url "https://github.com/ocsigen/tyxml")
7331 (commit version)))
7332 (file-name (git-file-name "ocaml-tyxml" version))
7333 (sha256
7334 (base32
7335 "1hw4phyadcfgywgh5sj87i76gp56qwxzwlcpfdwjbf6ggag9clmd"))))
7336 (properties '()))))
7337
7338 (define-public ocaml-bisect-ppx
7339 (package
7340 (name "ocaml-bisect-ppx")
7341 (version "2.8.1")
7342 (source
7343 (origin
7344 (method git-fetch)
7345 (uri (git-reference
7346 (url "https://github.com/aantron/bisect_ppx")
7347 (commit version)))
7348 (file-name (git-file-name name version))
7349 (sha256
7350 (base32
7351 "0562rwwnhqlf5alxl1wd1n0xs0k4aamxafrh8bbmh5yl3i5rxrx4"))))
7352 (build-system dune-build-system)
7353 (propagated-inputs
7354 (list ocaml-ppxlib ocaml-cmdliner))
7355 (arguments
7356 ;; Tests require ocamlformat which would lead to circular dependencies
7357 '(#:tests? #f))
7358 (properties `((upstream-name . "bisect_ppx")
7359 (ocaml4.07-variant . ,(delay ocaml4.07-bisect-ppx))))
7360 (home-page "https://github.com/aantron/bisect_ppx")
7361 (synopsis "Code coverage for OCaml")
7362 (description "Bisect_ppx helps you test thoroughly. It is a small
7363 preprocessor that inserts instrumentation at places in your code, such as
7364 if-then-else and match expressions. After you run tests, Bisect_ppx gives a
7365 nice HTML report showing which places were visited and which were missed.
7366
7367 Usage is simple - add package bisect_ppx when building tests, run your tests,
7368 then run the Bisect_ppx report tool on the generated visitation files.")
7369 (license license:mpl2.0)))
7370
7371 (define-public ocaml4.07-bisect-ppx
7372 (package-with-ocaml4.07
7373 (package
7374 (inherit ocaml-bisect-ppx)
7375 (version "2.4.0")
7376 (source
7377 (origin
7378 (method git-fetch)
7379 (uri (git-reference
7380 (url "https://github.com/aantron/bisect_ppx")
7381 (commit version)))
7382 (file-name (git-file-name "ocaml-bisect-ppx" version))
7383 (sha256
7384 (base32
7385 "1njs8xc108rrpx5am5zhhcn6vjva7rsphm8034qp5lgyvnhfgh7q"))))
7386 (propagated-inputs
7387 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
7388 ("ocaml-ppx-tools-versioned" ,ocaml4.07-ppx-tools-versioned)
7389 ,@(package-propagated-inputs ocaml-bisect-ppx)))
7390 (native-inputs
7391 `(("ocaml-ounit2" ,ocaml-ounit2)))
7392 (arguments
7393 `(#:test-target "."
7394 ;; tests require git and network
7395 #:tests? #f))
7396 (properties '((upstream-name . "bisect_ppx"))))))
7397
7398 (define-public ocaml-odoc
7399 (package
7400 (name "ocaml-odoc")
7401 ;; 2.2.0-alpha contains fixes for Dune 3.0 compatibility
7402 ;; (https://github.com/ocaml/odoc/commit/6ac97f3148f7791ec7451785ef4dbd9ca0daf2d1)
7403 (version "2.2.0-alpha")
7404 (source
7405 (origin
7406 (method git-fetch)
7407 (uri (git-reference
7408 (url "https://github.com/ocaml/odoc")
7409 (commit version)))
7410 (file-name (git-file-name name version))
7411 (sha256
7412 (base32 "07zjkk455l51i29lcayzrc1q8j5bvbv97sscv8yhcj7x6h6q2nag"))))
7413 (build-system dune-build-system)
7414 (arguments
7415 `(#:phases
7416 (modify-phases %standard-phases
7417 (add-after 'unpack 'fix-test
7418 (lambda _
7419 ;; test results expects #!/bin/sh but gets a store path instead
7420 (substitute* "test/xref2/with.t/run.t"
7421 (("#!/bin/sh") (string-append "#!" (which "sh")))))))))
7422 (inputs
7423 (list ocaml-astring
7424 ocaml-bisect-ppx
7425 ocaml-cmdliner
7426 ocaml-fmt
7427 ocaml-fpath
7428 ocaml-logs
7429 ocaml-migrate-parsetree
7430 ocaml-odoc-parser
7431 ocaml-re
7432 ocaml-result
7433 ocaml-tyxml))
7434 (native-inputs
7435 (list ocaml-alcotest
7436 ocaml-bos
7437 ocaml-cppo
7438 ocaml-findlib
7439 ocaml-lwt
7440 ocaml-markup
7441 ocaml-ppx-expect
7442 ocaml-version
7443 ocaml-yojson
7444 jq))
7445 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-odoc))))
7446 (home-page "https://github.com/ocaml/odoc")
7447 (synopsis "OCaml documentation generator")
7448 (description "Odoc is a documentation generator for OCaml. It reads
7449 @emph{doc comments}, delimited with @code{(** ... *)}, and outputs
7450 @acronym{HTML}.
7451
7452 Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
7453 advantage over ocamldoc is an accurate cross-referencer, which handles the
7454 complexity of the OCaml module system.")
7455 (license license:isc)))
7456
7457 (define-public ocaml-odoc-parser
7458 (package
7459 (name "ocaml-odoc-parser")
7460 (version "1.0.0")
7461 (source
7462 (origin
7463 (method git-fetch)
7464 (uri (git-reference
7465 (url "https://github.com/ocaml-doc/odoc-parser")
7466 (commit version)))
7467 (file-name (git-file-name name version))
7468 (sha256
7469 (base32
7470 "0mvwbnla0wd29bc7ckwpb494qv7p616cx8hnm0zg36np7v3zwy4w"))))
7471 (build-system dune-build-system)
7472 (propagated-inputs
7473 (list ocaml-astring ocaml-result))
7474 (native-inputs
7475 (list ocaml-ppx-expect))
7476 (home-page "https://github.com/ocaml-doc/odoc-parser")
7477 (synopsis "Parser for ocaml documentation comments")
7478 (description
7479 "This package provides a library for parsing the contents of OCaml
7480 documentation comments, formatted using Odoc syntax, an extension of the
7481 language understood by ocamldoc.")
7482 (license license:isc)))
7483
7484 ;; version 1.5.2 requires ocaml-markdown 1.0.0 which does not compile
7485 ;; with old version of dune used in package-with-ocaml4.07
7486 (define-public ocaml4.07-odoc
7487 (package-with-ocaml4.07
7488 (package
7489 (inherit ocaml-odoc)
7490 (name "ocaml-odoc")
7491 (version "1.5.1")
7492 (source
7493 (origin
7494 (method git-fetch)
7495 (uri (git-reference
7496 (url "https://github.com/ocaml/odoc")
7497 (commit version)))
7498 (file-name (git-file-name name version))
7499 (sha256
7500 (base32 "0z2nisg1vb5xlk41hqw8drvj90v52wli7zvnih6a844cg6xsvvj2"))))
7501 (arguments '())
7502 (inputs
7503 `(("ocaml-alcotest" ,ocaml-alcotest)
7504 ("ocaml-markup" ,ocaml-markup)
7505 ("ocaml-sexplib" ,ocaml-sexplib)
7506 ("ocaml-re" ,ocaml-re)
7507 ("ocaml-uutf" ,ocaml-uutf)))
7508 (native-inputs
7509 `(("ocaml-astring" ,ocaml-astring)
7510 ("ocaml-cmdliner" ,ocaml-cmdliner)
7511 ("ocaml-cppo" ,ocaml-cppo)
7512 ("ocaml-fpath" ,ocaml-fpath)
7513 ("ocaml-result" ,ocaml-result)
7514 ("ocaml-tyxml" ,ocaml-tyxml)
7515 ("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
7516 ("tidy-html" ,tidy-html)))
7517 (properties '()))))
7518
7519 (define-public ocaml-fftw3
7520 (package
7521 (name "ocaml-fftw3")
7522 (version "0.8.5")
7523 (source
7524 (origin
7525 (method git-fetch)
7526 (uri (git-reference
7527 (url "https://github.com/Chris00/fftw-ocaml")
7528 (commit version)))
7529 (file-name (git-file-name name version))
7530 (sha256
7531 (base32
7532 "07ljbin9dsclsqh24p7haqjccz1w828sf5xfwlzl298d4a6zsbhs"))))
7533 (build-system dune-build-system)
7534 (arguments
7535 `(#:test-target "tests"))
7536 (propagated-inputs
7537 (list fftw fftwf))
7538 (native-inputs
7539 (list ocaml-cppo ocaml-lacaml))
7540 (home-page
7541 "https://github.com/Chris00/fftw-ocaml")
7542 (synopsis
7543 "Bindings to FFTW3")
7544 (description
7545 "Bindings providing OCaml support for the seminal Fast Fourier Transform
7546 library FFTW.")
7547 (license license:lgpl2.1))) ; with static linking exception.
7548
7549 (define-public ocaml-lacaml
7550 (package
7551 (name "ocaml-lacaml")
7552 (version "11.0.8")
7553 (source
7554 (origin
7555 (method git-fetch)
7556 (uri (git-reference
7557 (url "https://github.com/mmottl/lacaml")
7558 (commit version)))
7559 (file-name (git-file-name name version))
7560 (sha256
7561 (base32
7562 "115535kphchh2a434b48b408x9794j8zzrsdmacsgqdsrgy3rck4"))
7563 (modules '((guix build utils)))
7564 (snippet '(substitute* '("src/dune" "src/config/dune")
7565 (("-march=native") "")))))
7566 (properties '((tunable? . #t)))
7567 (build-system dune-build-system)
7568 (arguments
7569 `(#:tests? #f)) ; No test target.
7570 (native-inputs
7571 (list openblas lapack ocaml-base ocaml-stdio))
7572 (home-page "https://mmottl.github.io/lacaml/")
7573 (synopsis
7574 "OCaml-bindings to BLAS and LAPACK")
7575 (description
7576 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
7577 LAPACK-library (Linear Algebra routines). It also contains many additional
7578 convenience functions for vectors and matrices.")
7579 (license license:lgpl2.1)))
7580
7581 (define-public ocaml-cairo2
7582 (package
7583 (name "ocaml-cairo2")
7584 (version "0.6.3")
7585 (source (origin
7586 (method git-fetch)
7587 (uri (git-reference
7588 (url "https://github.com/Chris00/ocaml-cairo")
7589 (commit version)))
7590 (file-name (git-file-name name version))
7591 (sha256
7592 (base32
7593 "1m0wh0s0sqjfa3mgq99lwk0dsg0bwxipaz93hq18m0lz5fqxib1m"))))
7594 (build-system dune-build-system)
7595 (arguments
7596 `(#:test-target "tests"))
7597 (inputs
7598 `(("cairo" ,cairo)
7599 ("gtk+-2" ,gtk+-2)
7600 ("lablgtk" ,lablgtk)))
7601 (native-inputs
7602 (list pkg-config))
7603 (home-page "https://github.com/Chris00/ocaml-cairo")
7604 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
7605 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
7606 with support for multiple output devices. Currently supported output targets
7607 include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
7608 and SVG file output.")
7609 (license license:lgpl3+)))
7610
7611 (define-public ocaml-version
7612 (package
7613 (name "ocaml-version")
7614 (version "3.4.0")
7615 (source
7616 (origin
7617 (method git-fetch)
7618 (uri (git-reference
7619 (url "https://github.com/ocurrent/ocaml-version")
7620 (commit (string-append "v" version))))
7621 (file-name (git-file-name name version))
7622 (sha256
7623 (base32
7624 "1c13zk1qna59m5z9jx7da3p7cxd48scpyk7zg7gi6gc6hx5hhjx8"))))
7625 (build-system dune-build-system)
7626 (arguments `(#:tests? #f)) ; no tests
7627 (properties '((upstream-name . "ocaml-version")))
7628 (home-page
7629 "https://github.com/ocurrent/ocaml-version")
7630 (synopsis
7631 "Manipulate, parse and generate OCaml compiler version strings")
7632 (description
7633 "This library provides facilities to parse version numbers of the OCaml
7634 compiler, and enumerates the various official OCaml releases and configuration
7635 variants.")
7636 (license license:isc)))
7637
7638 (define-public ocaml-mdx
7639 (package
7640 (name "ocaml-mdx")
7641 (version "2.1.0")
7642 (source (origin
7643 (method git-fetch)
7644 (uri (git-reference
7645 (url "https://github.com/realworldocaml/mdx")
7646 (commit version)))
7647 (file-name (git-file-name name version))
7648 (sha256
7649 (base32
7650 "1w1givvhwv9jzj9zbg4mmlpb35sqi75w83r99p2z50bdr69fdf57"))))
7651 (build-system dune-build-system)
7652 (arguments
7653 `(#:phases
7654 (modify-phases %standard-phases
7655 (add-after 'unpack 'fix-test-format
7656 (lambda _
7657 ;; cmdliner changed the format and the tests fail
7658 (substitute* '("test/bin/mdx-test/misc/no-such-file/test.expected"
7659 "test/bin/mdx-test/misc/no-such-prelude/test.expected")
7660 (("`") "'")
7661 (("COMMAND") "[COMMAND]")
7662 (("\\.\\.\\.") "…")))))))
7663 (inputs
7664 (list ocaml-fmt
7665 ocaml-astring
7666 ocaml-logs
7667 ocaml-cmdliner
7668 ocaml-re
7669 ocaml-result
7670 ocaml-odoc
7671 ocaml-odoc-parser
7672 ocaml-version))
7673 (native-inputs
7674 (list ocaml-cppo ocaml-lwt ocaml-alcotest))
7675 (home-page
7676 "https://github.com/realworldocaml/mdx")
7677 (synopsis
7678 "Executable code blocks inside markdown files")
7679 (description
7680 "@code{ocaml-mdx} executes code blocks inside markdown files.
7681 There are (currently) two sub-commands, corresponding
7682 to two modes of operations: pre-processing (@code{ocaml-mdx pp})
7683 and tests (@code{ocaml-mdx test}]).
7684
7685 The pre-processor mode allows mixing documentation and code,
7686 and to practice @dfn{literate programming} using markdown and OCaml.
7687
7688 The test mode ensures that shell scripts and OCaml fragments
7689 in the documentation always stays up-to-date.
7690
7691 @code{ocaml-mdx} is released as two binaries called @code{ocaml-mdx} and
7692 @code{mdx} which are the same, mdx being the deprecated name, kept for now for
7693 compatibility.")
7694 (license license:isc)))
7695
7696 (define-public ocaml-mparser
7697 (package
7698 (name "ocaml-mparser")
7699 (version "1.3")
7700 (source
7701 (origin
7702 (method git-fetch)
7703 (uri (git-reference
7704 (url "https://github.com/murmour/mparser")
7705 (commit version)))
7706 (file-name (git-file-name name version))
7707 (sha256
7708 (base32
7709 "16j19v16r42gcsii6a337zrs5cxnf12ig0vaysxyr7sq5lplqhkx"))))
7710 (build-system dune-build-system)
7711 (arguments
7712 ;; No tests.
7713 '(#:package "mparser"
7714 #:tests? #f))
7715 (home-page "https://github.com/murmour/mparser")
7716 (synopsis "Simple monadic parser combinator library")
7717 (description
7718 "This library implements a rather complete and efficient monadic parser
7719 combinator library similar to the Parsec library for Haskell by Daan Leijen and
7720 the FParsec library for FSharp by Stephan Tolksdorf.")
7721 ;; With static linking exception.
7722 (license license:lgpl2.1+)))
7723
7724 (define-public ocaml-mparser-re
7725 (package
7726 (inherit ocaml-mparser)
7727 (name "ocaml-mparser-re")
7728 (arguments
7729 ;; No tests.
7730 '(#:package "mparser-re"
7731 #:tests? #f))
7732 (propagated-inputs
7733 (list ocaml-mparser ocaml-re))
7734 (synopsis "MParser plugin for RE-based regular expressions")
7735 (description "This package provides RE-based regular expressions
7736 support for Mparser.")))
7737
7738 (define-public ocaml-mparser-pcre
7739 (package
7740 (inherit ocaml-mparser)
7741 (name "ocaml-mparser-pcre")
7742 (arguments
7743 ;; No tests.
7744 '(#:package "mparser-pcre"
7745 #:tests? #f))
7746 (propagated-inputs
7747 (list ocaml-mparser ocaml-pcre))
7748 (synopsis "MParser plugin for PCRE-based regular expressions")
7749 (description "This package provides PCRE-based regular expressions
7750 support for Mparser.")))
7751
7752 (define-public lablgtk3
7753 (package
7754 (name "lablgtk")
7755 (version "3.1.1")
7756 (source (origin
7757 (method git-fetch)
7758 (uri (git-reference
7759 (url "https://github.com/garrigue/lablgtk")
7760 (commit version)))
7761 (file-name (git-file-name name version))
7762 (sha256
7763 (base32
7764 "11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
7765 (build-system dune-build-system)
7766 (arguments
7767 `(#:test-target "."
7768 #:phases
7769 (modify-phases %standard-phases
7770 (add-before 'build 'make-writable
7771 (lambda _
7772 (for-each (lambda (file)
7773 (chmod file #o644))
7774 (find-files "." "."))))
7775 (add-before 'build 'set-version
7776 (lambda _
7777 (substitute* "dune-project"
7778 (("\\(name lablgtk3\\)")
7779 (string-append "(name lablgtk3)\n(version " ,version ")"))))))))
7780 (propagated-inputs
7781 (list ocaml-cairo2))
7782 (inputs
7783 (list camlp5 gtk+ gtksourceview-3 gtkspell3))
7784 (native-inputs
7785 (list pkg-config))
7786 (home-page "https://github.com/garrigue/lablgtk")
7787 (synopsis "OCaml interface to GTK+3")
7788 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
7789 provides a strongly-typed object-oriented interface that is compatible with the
7790 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
7791 also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
7792 LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
7793 generate OCaml code from .glade files), libpanel, librsvg and quartz.")
7794 ;; Version 2 only, with linking exception.
7795 (license license:lgpl2.0)))
7796
7797 (define-public ocaml-reactivedata
7798 (package
7799 (name "ocaml-reactivedata")
7800 (version "0.3")
7801 (source (origin
7802 (method git-fetch)
7803 (uri (git-reference
7804 (url "https://github.com/ocsigen/reactiveData")
7805 (commit version)))
7806 (file-name (git-file-name name version))
7807 (sha256
7808 (base32
7809 "0gmpfnw08c7hx4bsgrgvp6w7pq2ghqxq3qd1cbdyscbg9n22jrca"))))
7810 (arguments
7811 `(#:tests? #f)) ;no tests
7812 (build-system dune-build-system)
7813 (properties `((upstream-name . "reactiveData")))
7814 (propagated-inputs
7815 (list ocaml-react))
7816 (home-page "https://github.com/ocsigen/reactiveData")
7817 (synopsis "Declarative events and signals for OCaml")
7818 (description
7819 "React is an OCaml module for functional reactive programming (FRP). It
7820 provides support to program with time varying values: declarative events and
7821 signals. React doesn't define any primitive event or signal, it lets the
7822 client chooses the concrete timeline.")
7823 (license license:lgpl2.1+)))
7824
7825 (define-public ocaml-uucd
7826 (package
7827 (name "ocaml-uucd")
7828 (version "14.0.0")
7829 (source
7830 (origin
7831 (method url-fetch)
7832 (uri (string-append "https://erratique.ch/software/uucd/releases/"
7833 "uucd-" version ".tbz"))
7834 (sha256
7835 (base32
7836 "0fc737v5gj3339jx4x9xr096lxrpwvp6vaiylhavcvsglcwbgm30"))))
7837 (build-system ocaml-build-system)
7838 (arguments
7839 '(#:build-flags '("build" "--tests" "true")
7840 #:phases
7841 (modify-phases %standard-phases
7842 (delete 'configure))))
7843 (propagated-inputs
7844 (list ocaml-xmlm))
7845 (native-inputs
7846 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
7847 (home-page "https://erratique.ch/software/uucd")
7848 (synopsis "Unicode character database decoder for OCaml")
7849 (description "Uucd is an OCaml module to decode the data of the Unicode
7850 character database from its XML representation. It provides high-level (but
7851 not necessarily efficient) access to the data so that efficient
7852 representations can be extracted.")
7853 (license license:isc)))
7854
7855 (define-public ocaml-uucp
7856 (package
7857 (name "ocaml-uucp")
7858 (version "14.0.0")
7859 (source
7860 (origin
7861 (method url-fetch)
7862 (uri (string-append "https://erratique.ch/software/uucp/releases/"
7863 "uucp-" version ".tbz"))
7864 (sha256
7865 (base32
7866 "1yx9nih3d9prb9zizq8fzmmqylf24a6yifhf81h33znrj5xn1mpj"))))
7867 (build-system ocaml-build-system)
7868 (arguments
7869 '(#:build-flags '("build" "--tests" "true")
7870 #:phases
7871 (modify-phases %standard-phases
7872 (delete 'configure))))
7873 (native-inputs
7874 (list opam
7875 ocaml-findlib
7876 ocamlbuild
7877 ocaml-topkg
7878 ocaml-uucd
7879 ocaml-uunf
7880 ocaml-uutf))
7881 (home-page "https://erratique.ch/software/uucp")
7882 (synopsis "Unicode character properties for OCaml")
7883 (description "Uucp is an OCaml library providing efficient access to a
7884 selection of character properties of the Unicode character database.")
7885 (license license:isc)))
7886
7887 (define-public ocaml-uuseg
7888 (package
7889 (name "ocaml-uuseg")
7890 (version "14.0.0")
7891 (source
7892 (origin
7893 (method url-fetch)
7894 (uri (string-append "https://erratique.ch/software/uuseg/releases/"
7895 "uuseg-" version ".tbz"))
7896 (sha256
7897 (base32
7898 "1g9zyzjkhqxgbb9mh3cgaawscwdazv6y8kdqvmy6yhnimmfqv25p"))))
7899 (build-system ocaml-build-system)
7900 (arguments
7901 '(#:build-flags '("build" "--tests" "true")
7902 #:phases
7903 (modify-phases %standard-phases
7904 (delete 'configure))))
7905 (propagated-inputs
7906 (list ocaml-uucp ocaml-uutf ocaml-cmdliner))
7907 (native-inputs
7908 (list opam ocaml-findlib ocamlbuild ocaml-topkg))
7909 (home-page "https://erratique.ch/software/uuseg")
7910 (synopsis "Unicode text segmentation for OCaml")
7911 (description "Uuseg is an OCaml library for segmenting Unicode text. It
7912 implements the locale independent Unicode text segmentation algorithms to
7913 detect grapheme cluster, word and sentence boundaries and the Unicode line
7914 breaking algorithm to detect line break opportunities.
7915
7916 The library is independent from any IO mechanism or Unicode text data
7917 structure and it can process text without a complete in-memory
7918 representation.")
7919 (license license:isc)))
7920
7921 (define-public ocaml-fix
7922 (package
7923 (name "ocaml-fix")
7924 (version "20220121")
7925 (source
7926 (origin
7927 (method git-fetch)
7928 (uri (git-reference
7929 (url "https://gitlab.inria.fr/fpottier/fix")
7930 (commit version)))
7931 (file-name (git-file-name name version))
7932 (sha256
7933 (base32
7934 "15785v43jcbqsw1y653cnb89alrcnbdri1h0w6zl6p7769ja9rdj"))))
7935 (build-system dune-build-system)
7936 (arguments
7937 ;; No tests.
7938 '(#:tests? #f))
7939 (home-page "https://gitlab.inria.fr/fpottier/fix")
7940 (synopsis "Facilities for memoization and fixed points")
7941 (description "This package provides helpers with various constructions
7942 that involve memoization and recursion.")
7943 (license license:lgpl2.0)))
7944
7945 (define-public ocaml-dune-build-info
7946 (package
7947 (inherit dune)
7948 (name "ocaml-dune-build-info")
7949 (build-system dune-build-system)
7950 (arguments
7951 '(#:package "dune-build-info"
7952 ;; No separate test suite from dune.
7953 #:tests? #f))
7954 (propagated-inputs
7955 (list ocaml-odoc))
7956 (synopsis "Embed build information inside an executable")
7957 (description "This package allows one to access information about how the
7958 executable was built, such as the version of the project at which it was built
7959 or the list of statically linked libraries with their versions. It supports
7960 reporting the version from the version control system during development to
7961 get an precise reference of when the executable was built.")))
7962
7963 (define-public ocaml-either
7964 (package
7965 (name "ocaml-either")
7966 (version "1.0.0")
7967 (source
7968 (origin
7969 (method git-fetch)
7970 (uri (git-reference
7971 (url "https://github.com/mirage/either")
7972 (commit version)))
7973 (file-name (git-file-name name version))
7974 (sha256
7975 (base32 "099p1m24vz5i0043zcfp88krzjsa2qbrphrm4bnx84gif5vgkxwm"))))
7976 (build-system dune-build-system)
7977 (arguments
7978 ;; no tests
7979 `(#:tests? #f))
7980 (home-page "https://github.com/mirage/either")
7981 (synopsis "Compatibility Either module")
7982 (description "This library is a compatibility module for the Either module
7983 defined in OCaml 4.12.0.")
7984 (license license:expat)))
7985
7986 (define-public ocamlformat
7987 (package
7988 (name "ocamlformat")
7989 (version "0.22.4")
7990 (source
7991 (origin
7992 (method git-fetch)
7993 (uri (git-reference
7994 (url "https://github.com/ocaml-ppx/ocamlformat")
7995 (commit version)))
7996 (file-name (git-file-name name version))
7997 (sha256
7998 (base32
7999 "171lq3vx4y8xj4by5zy93isx8nhg6ysxg1hxmkqkq16fdaiz8mnc"))))
8000 (build-system dune-build-system)
8001 (arguments
8002 '(#:package "ocamlformat"
8003 #:phases
8004 (modify-phases %standard-phases
8005 ;; Tests related to other packages
8006 (add-after 'unpack 'remove-unrelated-tests
8007 (lambda _
8008 (delete-file-recursively "test/rpc")))
8009 (add-after 'unpack 'fix-test-format
8010 (lambda _
8011 (substitute* "test/cli/repl_file_errors.t/run.t"
8012 ((" ;;") ";;")))))))
8013 (propagated-inputs
8014 (list ocaml-version
8015 ocaml-base
8016 ocaml-cmdliner
8017 ocaml-dune-build-info
8018 ocaml-either
8019 ocaml-fix
8020 ocaml-fpath
8021 ocaml-menhir
8022 ocaml-odoc
8023 ocaml-ppxlib
8024 ocaml-re
8025 ocaml-odoc-parser
8026 ocaml-stdio
8027 ocaml-uuseg
8028 ocaml-uutf))
8029 (native-inputs
8030 (list git-minimal ocaml-alcotest ocaml-ocp-indent ocaml-bisect-ppx))
8031 (home-page "https://github.com/ocaml-ppx/ocamlformat")
8032 (synopsis "Auto-formatter for OCaml code")
8033 (description "OCamlFormat is a tool to automatically format OCaml code in
8034 a uniform style.")
8035 (license license:expat)))
8036
8037 (define-public ocaml-bigstringaf
8038 (package
8039 (name "ocaml-bigstringaf")
8040 (version "0.9.0")
8041 (home-page "https://github.com/inhabitedtype/bigstringaf")
8042 (source
8043 (origin
8044 (method git-fetch)
8045 (uri (git-reference
8046 (url home-page)
8047 (commit version)))
8048 (file-name (git-file-name name version))
8049 (sha256
8050 (base32
8051 "188j9awxg99vrp2l3rqfmdxdazq5xrjmg1wf62vfqsks9sff6wqx"))))
8052 (build-system dune-build-system)
8053 (arguments
8054 '(#:test-target "."))
8055 (propagated-inputs
8056 (list ocaml-bigarray-compat))
8057 (native-inputs
8058 (list ocaml-alcotest pkg-config))
8059 (synopsis
8060 "Bigstring intrinsics and fast blits based on memcpy/memmove")
8061 (description
8062 "The OCaml compiler has a bunch of intrinsics for Bigstrings, but they're
8063 not widely-known, sometimes misused, and so programs that use Bigstrings are
8064 slower than they have to be. And even if a library got that part right and
8065 exposed the intrinsics properly, the compiler doesn't have any fast blits
8066 between Bigstrings and other string-like types. @code{bigstringaf} provides
8067 these missing pieces.")
8068 (license license:bsd-3)))
8069
8070 (define-public ocaml-trie
8071 (package
8072 (name "ocaml-trie")
8073 (version "1.0.0")
8074 (home-page "https://github.com/kandu/trie/")
8075 (source
8076 (origin
8077 (method git-fetch)
8078 (uri (git-reference
8079 (url home-page)
8080 (commit version)))
8081 (file-name (git-file-name name version))
8082 (sha256
8083 (base32 "0s7p9swjqjsqddylmgid6cv263ggq7pmb734z4k84yfcrgb6kg4g"))))
8084 (build-system dune-build-system)
8085 (arguments
8086 '(#:tests? #f)) ;no tests
8087 (synopsis "Strict impure trie tree")
8088 (description
8089 "This module implements strict impure trie tree data structure for
8090 OCaml.")
8091 (license license:expat)))
8092
8093 (define-public ocaml-mew
8094 (package
8095 (name "ocaml-mew")
8096 (version "0.1.0")
8097 (home-page "https://github.com/kandu/mew")
8098 (source
8099 (origin
8100 (method git-fetch)
8101 (uri (git-reference
8102 (url home-page)
8103 (commit version)))
8104 (file-name (git-file-name name version))
8105 (sha256
8106 (base32 "0417xsghj92v3xa5q4dk4nzf2r4mylrx2fd18i7cg3nzja65nia2"))))
8107 (build-system dune-build-system)
8108 (propagated-inputs
8109 (list ocaml-result ocaml-trie))
8110 (native-inputs
8111 (list ocaml-ppx-expect))
8112 (synopsis "General modal editing engine generator")
8113 (description
8114 "This package provides the core modules of Modal Editing Witch, a general
8115 modal editing engine generator.")
8116 (license license:expat)))
8117
8118 (define-public ocaml-mew-vi
8119 (package
8120 (name "ocaml-mew-vi")
8121 (version "0.5.0")
8122 (home-page "https://github.com/kandu/mew_vi")
8123 (source
8124 (origin
8125 (method git-fetch)
8126 (uri (git-reference
8127 (url home-page)
8128 (commit version)))
8129 (file-name (git-file-name name version))
8130 (sha256
8131 (base32 "0lihbf822k5zasl60w5mhwmdkljlq49c9saayrws7g4qc1j353r8"))))
8132 (build-system dune-build-system)
8133 (propagated-inputs
8134 (list ocaml-mew ocaml-react))
8135 (native-inputs
8136 (list ocaml-ppx-expect))
8137 (properties `((upstream-name . "mew_vi")))
8138 (synopsis "Modal editing VI-like editing engine generator")
8139 (description "This module provides a vi-like modal editing engine
8140 generator.")
8141 (license license:expat)))
8142
8143 (define-public ocaml-syntax-shims
8144 (package
8145 (name "ocaml-syntax-shims")
8146 (version "1.0.0")
8147 (home-page "https://github.com/ocaml-ppx/ocaml-syntax-shims")
8148 (source
8149 (origin
8150 (method git-fetch)
8151 (uri (git-reference
8152 (url home-page)
8153 (commit version)))
8154 (file-name (git-file-name name version))
8155 (sha256
8156 (base32
8157 "0l1i8z95qgb0lxlrv3yb5nkp391hqsiyi4r91p12k3xmggqixagf"))))
8158 (build-system dune-build-system)
8159 (properties
8160 `((upstream-name . "ocaml-syntax-shims")))
8161 (synopsis
8162 "Backport new syntax to older OCaml versions")
8163 (description
8164 "This package backports new language features such as @code{let+} to older
8165 OCaml compilers.")
8166 (license license:expat)))
8167
8168 (define-public ocaml-angstrom
8169 (package
8170 (name "ocaml-angstrom")
8171 (version "0.15.0")
8172 (home-page "https://github.com/inhabitedtype/angstrom")
8173 (source
8174 (origin
8175 (method git-fetch)
8176 (uri (git-reference
8177 (url home-page)
8178 (commit version)))
8179 (file-name (git-file-name name version))
8180 (sha256
8181 (base32
8182 "1hmrkdcdlkwy7rxhngf3cv3sa61cznnd9p5lmqhx20664gx2ibrh"))))
8183 (build-system dune-build-system)
8184 (arguments
8185 ;; Only build the base angstrom package.
8186 '(#:package "angstrom"
8187 #:test-target "."))
8188 (propagated-inputs
8189 (list ocaml-bigstringaf))
8190 (native-inputs
8191 (list ocaml-alcotest ocaml-ppx-let ocaml-syntax-shims))
8192 (synopsis "Parser combinators built for speed and memory-efficiency")
8193 (description
8194 "Angstrom is a parser-combinator library that makes it easy to write
8195 efficient, expressive, and reusable parsers suitable for high-performance
8196 applications. It exposes monadic and applicative interfaces for composition,
8197 and supports incremental input through buffered and unbuffered interfaces.
8198 Both interfaces give the user total control over the blocking behavior of
8199 their application, with the unbuffered interface enabling zero-copy IO.
8200 Parsers are backtracking by default and support unbounded lookahead.")
8201 (license license:bsd-3)))
8202
8203 (define-public ocaml-graphics
8204 (package
8205 (name "ocaml-graphics")
8206 (version "5.1.2")
8207 (home-page "https://github.com/ocaml/graphics")
8208 (source
8209 (origin
8210 (method git-fetch)
8211 (uri (git-reference
8212 (url home-page)
8213 (commit version)))
8214 (file-name (git-file-name name version))
8215 (sha256
8216 (base32
8217 "1q20f8y6ijxbvzik2ns4yl3w54q5z8kd0pby8i8c64a04hvly08m"))))
8218 (build-system dune-build-system)
8219 (propagated-inputs
8220 (list libx11))
8221 (synopsis "The OCaml graphics library")
8222 (description
8223 "The graphics library provides a set of portable drawing primitives.
8224 Drawing takes place in a separate window that is created when
8225 Graphics.open_graph is called. This library used to be distributed with OCaml
8226 up to OCaml 4.08.")
8227 (license license:lgpl2.1+)))
8228
8229 (define-public ocaml-uri-sexp
8230 (package
8231 (inherit ocaml-uri)
8232 (name "ocaml-uri-sexp")
8233 (arguments
8234 '(#:package "uri-sexp"
8235 #:test-target "."))
8236 (propagated-inputs
8237 (list ocaml-uri ocaml-ppx-sexp-conv ocaml-sexplib0))
8238 (native-inputs (list ocaml-ounit))
8239 (synopsis "RFC3986 URI/URL parsing library")
8240 (description "This package adds S-exp support to @code{ocaml-uri}.")))
8241
8242 (define-public ocaml-cohttp
8243 (package
8244 (name "ocaml-cohttp")
8245 (version "5.0.0")
8246 (source
8247 (origin
8248 (method git-fetch)
8249 (uri (git-reference
8250 (url "https://github.com/mirage/ocaml-cohttp")
8251 (commit (string-append "v" version))))
8252 (file-name (git-file-name name version))
8253 (sha256
8254 (base32
8255 "074xis3wmr76gadh1ffmfzjfx13mw4kr2s6rkwqwzcl6l85n9x2z"))))
8256 (build-system dune-build-system)
8257 (arguments
8258 '(#:package "cohttp"
8259 #:test-target "cohttp_test/src"))
8260 (propagated-inputs
8261 (list ocaml-re
8262 ocaml-uri
8263 ocaml-uri-sexp
8264 ocaml-sexplib0
8265 ocaml-ppx-sexp-conv
8266 ocaml-stringext
8267 ocaml-base64))
8268 (native-inputs
8269 (list ocaml-fmt ocaml-jsonm ocaml-alcotest))
8270 (home-page "https://github.com/mirage/ocaml-cohttp")
8271 (synopsis "OCaml library for HTTP clients and servers")
8272 (description
8273 "Cohttp is an OCaml library for creating HTTP daemons. It has a portable
8274 HTTP parser, and implementations using various asynchronous programming
8275 libraries.")
8276 (license license:isc)))
8277
8278 (define-public js-of-ocaml
8279 (package
8280 (name "js-of-ocaml")
8281 (version "4.0.0")
8282 (source
8283 (origin
8284 (method git-fetch)
8285 (uri (git-reference
8286 (url "https://github.com/ocsigen/js_of_ocaml")
8287 (commit version)))
8288 (file-name (git-file-name name version))
8289 (sha256
8290 (base32 "0iyhl9z57j53j2jvyqcwmxhbvy23l6g80aa0abmlgwam14yskspf"))))
8291 (build-system dune-build-system)
8292 (arguments
8293 `(#:tests? #f ;tests assume ocaml 4.13
8294 #:test-target "."))
8295 (propagated-inputs
8296 (list ocaml-ppxlib
8297 ocaml-uchar
8298 ocaml-menhir
8299 ocaml-reactivedata
8300 ocaml-cmdliner
8301 ocaml-lwt
8302 ocaml-tyxml
8303 ocaml-re
8304 ocaml-uutf
8305 ocaml-graphics
8306 ocaml-yojson))
8307 (native-inputs
8308 ;; for tests
8309 (list node ocaml-ppx-expect ocaml-num))
8310 (properties `((upstream-name . "js_of_ocaml")))
8311 (home-page "https://ocsigen.org/js_of_ocaml/")
8312 (synopsis "Compiler from OCaml bytecode to Javascript")
8313 (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript.
8314 It makes it possible to run pure OCaml programs in JavaScript environment like
8315 browsers and Node.js.")
8316 (license license:lgpl2.1+)))
8317
8318 (define-public ocaml-bibtex2html
8319 (package
8320 (name "ocaml-bibtex2html")
8321 (version "1.99")
8322 (source
8323 (origin
8324 (method url-fetch)
8325 (uri "https://www.lri.fr/~filliatr/ftp/bibtex2html/bibtex2html-1.99.tar.gz")
8326 (sha256 (base32 "07gzrs4lfrkvbn48cgn2gn6c7cx3jsanakkrb2irj0gmjzfxl96j"))))
8327 (build-system ocaml-build-system)
8328 (arguments
8329 `(#:phases
8330 (modify-phases %standard-phases
8331 (add-after 'unpack 'patch-/bin/sh
8332 (lambda _
8333 (substitute* "configure" (("/bin/sh") (which "bash")))
8334 (setenv "HOME" (getcwd)) ;; mktexfmt needs writable home directory
8335 #t)))))
8336 (native-inputs
8337 `(("which" ,which)
8338 ("texlive" ,(texlive-updmap.cfg
8339 (list texlive-fonts-ec texlive-preprint
8340 texlive-hyperref texlive-bibtex)))))
8341 (propagated-inputs
8342 (list hevea))
8343 (home-page "https://www.lri.fr/~filliatr/bibtex2html/")
8344 (synopsis "BibTeX to HTML translator")
8345 (description "This package allows you to produce, from a set of
8346 bibliography files in BibTeX format, a bibliography in HTML format.")
8347 (license license:gpl2)))