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