gnu: Add ocaml-markup.
[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 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016-2018 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
11 ;;; Copyright © 2017, 2018, 2019 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 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages ocaml)
33 #:use-module (gnu packages)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages bison)
37 #:use-module (gnu packages boost)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages curl)
40 #:use-module (gnu packages emacs)
41 #:use-module (gnu packages emacs-xyz)
42 #:use-module (gnu packages flex)
43 #:use-module (gnu packages gcc)
44 #:use-module (gnu packages ghostscript)
45 #:use-module (gnu packages glib)
46 #:use-module (gnu packages gnome)
47 #:use-module (gnu packages gtk)
48 #:use-module (gnu packages libevent)
49 #:use-module (gnu packages libffi)
50 #:use-module (gnu packages llvm)
51 #:use-module (gnu packages m4)
52 #:use-module (gnu packages maths)
53 #:use-module (gnu packages multiprecision)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages pcre)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages protobuf)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-xyz)
61 #:use-module (gnu packages sdl)
62 #:use-module (gnu packages sqlite)
63 #:use-module (gnu packages tex)
64 #:use-module (gnu packages texinfo)
65 #:use-module (gnu packages time)
66 #:use-module (gnu packages tls)
67 #:use-module (gnu packages version-control)
68 #:use-module (gnu packages virtualization)
69 #:use-module (gnu packages web-browsers)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages xorg)
72 #:use-module (guix build-system dune)
73 #:use-module (guix build-system emacs)
74 #:use-module (guix build-system gnu)
75 #:use-module (guix build-system ocaml)
76 #:use-module (guix download)
77 #:use-module (guix git-download)
78 #:use-module ((guix licenses) #:prefix license:)
79 #:use-module (guix packages)
80 #:use-module (guix svn-download)
81 #:use-module (guix utils)
82 #:use-module ((srfi srfi-1) #:hide (zip)))
83
84 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
85 ;; their number, not their name.
86 (define (ocaml-forge-uri name version file-number)
87 (string-append "https://forge.ocamlcore.org/frs/download.php/"
88 (number->string file-number) "/" name "-" version
89 ".tar.gz"))
90
91 ;; Janestreet packages are found in a similar way and all need the same patch.
92 (define (janestreet-origin name version hash)
93 (origin (method url-fetch)
94 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
95 (version-major+minor version) "/files/"
96 name "-" version ".tar.gz"))
97 (sha256 (base32 hash))
98 (modules '((guix build utils)))
99 (snippet
100 (let ((pattern (string-append "lib/" name)))
101 `(begin
102 ;; install.ml contains an invalid reference to the ppx file and
103 ;; propagates this error to the generated META file. It
104 ;; looks for it in the "lib" directory, but it is installed in
105 ;; "lib/ocaml/site-lib/package". This substitute does not change
106 ;; this file for non ppx packages.
107 (substitute* "install.ml"
108 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
109 ;; The standard Makefile would try to install janestreet modules
110 ;; in OCaml's directory in the store, which is read-only.
111 (substitute* "Makefile"
112 (("--prefix")
113 "--libdir $(LIBDIR) --prefix"))
114 #t)))))
115
116 ;; They also require almost the same set of arguments
117 (define janestreet-arguments
118 `(#:use-make? #t
119 #:make-flags
120 (list (string-append "CONFIGUREFLAGS=--prefix "
121 (assoc-ref %outputs "out")
122 " --enable-tests")
123 (string-append "LIBDIR="
124 (assoc-ref %outputs "out")
125 "/lib/ocaml/site-lib")
126 ;; for ocaml-bin-prot, otherwise ignored
127 (string-append "OCAML_TOPLEVEL_PATH="
128 (assoc-ref %build-inputs "findlib")
129 "/lib/ocaml/site-lib"))
130 #:phases (modify-phases %standard-phases (delete 'configure))))
131
132 (define-public ocaml-4.07
133 (package
134 (name "ocaml")
135 (version "4.07.1")
136 (source (origin
137 (method url-fetch)
138 (uri (string-append
139 "http://caml.inria.fr/pub/distrib/ocaml-"
140 (version-major+minor version)
141 "/ocaml-" version ".tar.xz"))
142 (sha256
143 (base32
144 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))))
145 (build-system gnu-build-system)
146 (native-search-paths
147 (list (search-path-specification
148 (variable "OCAMLPATH")
149 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
150 (search-path-specification
151 (variable "CAML_LD_LIBRARY_PATH")
152 (files (list "lib/ocaml/site-lib/stubslibs"
153 "lib/ocaml/site-lib/stublibs")))))
154 (native-inputs
155 `(("perl" ,perl)
156 ("pkg-config" ,pkg-config)))
157 (inputs
158 `(("libx11" ,libx11)
159 ;; For libiberty, needed for objdump support.
160 ("gcc:lib" ,(canonical-package gcc) "lib")
161 ("zlib" ,zlib))) ;also needed for objdump support
162 (arguments
163 `(#:modules ((guix build gnu-build-system)
164 (guix build utils)
165 (web server))
166 #:phases
167 (modify-phases %standard-phases
168 (add-after 'unpack 'patch-/bin/sh-references
169 (lambda* (#:key inputs #:allow-other-keys)
170 (let* ((sh (string-append (assoc-ref inputs "bash")
171 "/bin/sh"))
172 (quoted-sh (string-append "\"" sh "\"")))
173 (with-fluids ((%default-port-encoding #f))
174 (for-each
175 (lambda (file)
176 (substitute* file
177 (("\"/bin/sh\"")
178 (begin
179 (format (current-error-port) "\
180 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
181 file quoted-sh)
182 quoted-sh))))
183 (find-files "." "\\.ml$"))
184 #t))))
185 (replace 'configure
186 (lambda* (#:key outputs #:allow-other-keys)
187 (let* ((out (assoc-ref outputs "out"))
188 (mandir (string-append out "/share/man")))
189 ;; Custom configure script doesn't recognize
190 ;; --prefix=<PREFIX> syntax (with equals sign).
191 (invoke "./configure"
192 "--prefix" out
193 "--mandir" mandir))))
194 (replace 'build
195 (lambda _
196 (invoke "make" "-j" (number->string (parallel-job-count))
197 "world.opt")))
198 (delete 'check)
199 (add-after 'install 'check
200 (lambda _
201 (with-directory-excursion "testsuite"
202 (invoke "make" "all")))))))
203 (home-page "https://ocaml.org/")
204 (synopsis "The OCaml programming language")
205 (description
206 "OCaml is a general purpose industrial-strength programming language with
207 an emphasis on expressiveness and safety. Developed for more than 20 years at
208 Inria it benefits from one of the most advanced type systems and supports
209 functional, imperative and object-oriented styles of programming.")
210 ;; The compiler is distributed under qpl1.0 with a change to choice of
211 ;; law: the license is governed by the laws of France. The library is
212 ;; distributed under lgpl2.0.
213 (license (list license:qpl license:lgpl2.0))))
214
215 (define-public ocaml ocaml-4.07)
216
217 (define-public ocamlbuild
218 (package
219 (name "ocamlbuild")
220 (version "0.13.1")
221 (source
222 (origin
223 (method git-fetch)
224 (uri (git-reference
225 (url "https://github.com/ocaml/ocamlbuild.git")
226 (commit version)))
227 (file-name (git-file-name name version))
228 (sha256
229 (base32 "0v37vjvdqw35yvj8ipmlzmwf1jhip0hbsmcbdcn9cnj12p3mr6k7"))))
230 (build-system gnu-build-system)
231 (arguments
232 `(#:test-target "test"
233 #:tests? #f; tests require findlib
234 #:make-flags
235 (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
236 (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
237 "/bin")
238 (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
239 "/lib/ocaml/site-lib")
240 (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
241 "/share/man"))
242 #:phases
243 (modify-phases %standard-phases
244 (delete 'bootstrap)
245 (delete 'configure)
246 (add-before 'build 'findlib-environment
247 (lambda* (#:key outputs #:allow-other-keys)
248 (let* ((out (assoc-ref outputs "out")))
249 (setenv "OCAMLFIND_DESTDIR" (string-append out "/lib/ocaml/site-lib"))
250 (setenv "OCAMLFIND_LDCONF" "ignore")
251 #t))))))
252 (native-inputs
253 `(("ocaml" ,ocaml)))
254 (home-page "https://github.com/ocaml/ocamlbuild")
255 (synopsis "OCaml build tool")
256 (description "OCamlbuild is a generic build tool, that has built-in rules
257 for building OCaml library and programs.")
258 (license license:lgpl2.1+)))
259
260 (define-public ocaml-extlib
261 (package
262 (name "ocaml-extlib")
263 (version "1.7.6")
264 (source (origin
265 (method url-fetch)
266 (uri (string-append "https://ygrek.org.ua/p/release/ocaml-extlib/"
267 "extlib-" version ".tar.gz"))
268 (sha256
269 (base32
270 "0wfs20v1yj5apdbj7214wdsr17ayh0qqq7ihidndvc8nmmwfa1dz"))))
271 (build-system ocaml-build-system)
272 (arguments
273 `(#:phases
274 (modify-phases %standard-phases
275 (delete 'configure))))
276 (native-inputs
277 `(("ocaml-cppo" ,ocaml-cppo)))
278 (home-page "https://github.com/ygrek/ocaml-extlib")
279 (synopsis "Complete and small extension for OCaml standard library")
280 (description "This library adds new functions to OCaml standard library
281 modules, modifies some functions in order to get better performances or
282 safety (tail-recursive) and also provides new modules which should be useful
283 for day to day programming.")
284 ;; With static-linking exception
285 (license license:lgpl2.1+)))
286
287 (define-public ocaml-cudf
288 (package
289 (name "ocaml-cudf")
290 (version "0.9")
291 (source
292 (origin
293 (method url-fetch)
294 (uri "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz")
295 (sha256
296 (base32
297 "0771lwljqwwn3cryl0plny5a5dyyrj4z6bw66ha5n8yfbpcy8clr"))))
298 (build-system ocaml-build-system)
299 (propagated-inputs `(("ocaml-extlib" ,ocaml-extlib)))
300 (native-inputs
301 `(("perl" ,perl)
302 ("ocamlbuild" ,ocamlbuild)
303 ("ocaml-ounit" ,ocaml-ounit)))
304 (arguments
305 `(#:make-flags
306 (list
307 "all" "opt"
308 (string-append "BINDIR=" (assoc-ref %outputs "out")
309 "/bin"))
310 #:phases
311 (modify-phases %standard-phases
312 (delete 'configure))))
313 (home-page "http://www.mancoosi.org/cudf/")
314 (synopsis "CUDF library (part of the Mancoosi tools)")
315 (description "CUDF (for Common Upgradeability Description Format) is a
316 format for describing upgrade scenarios in package-based Free and Open Source
317 Software distribution.")
318 ;; With static-linking exception
319 (license license:lgpl2.1+)))
320
321 (define-public ocaml-mccs
322 (package
323 (name "ocaml-mccs")
324 (version "1.1+9")
325 (source (origin
326 (method git-fetch)
327 (uri (git-reference
328 (url "https://github.com/AltGr/ocaml-mccs")
329 (commit version)))
330 (file-name (git-file-name name version))
331 (sha256
332 (base32
333 "1i0hhkrqi7rqlainlg5pc4hibbx6b5dp3x99gmav8c3sbfvlk9mc"))))
334 (build-system dune-build-system)
335 (propagated-inputs `(("ocaml-cudf" ,ocaml-cudf)))
336 (home-page "http://www.i3s.unice.fr/~cpjm/misc/")
337 (synopsis "Upgrade path problem solver")
338 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
339 Mccs take as input a CUDF problem and computes the best solution according to
340 a set of criteria. It relies on a Integer Programming solver or a
341 Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
342 underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
343 (license (list
344 license:bsd-3
345 license:gpl3+
346 ;; With static-linking exception
347 license:lgpl2.1+))))
348
349 (define-public ocaml-dose3
350 (package
351 (name "ocaml-dose3")
352 (version "5.0.1")
353 (source (origin
354 (method url-fetch)
355 (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
356 (sha256
357 (base32
358 "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
359 (patches
360 (search-patches
361 "ocaml-dose3-add-unix-dependency.patch"
362 "ocaml-dose3-Fix-for-ocaml-4.06.patch"
363 "ocaml-dose3-dont-make-printconf.patch"
364 "ocaml-dose3-Install-mli-cmx-etc.patch"))))
365 (build-system ocaml-build-system)
366 (arguments
367 `(#:configure-flags
368 (list (string-append "SHELL="
369 (assoc-ref %build-inputs "bash")
370 "/bin/sh"))
371 #:make-flags
372 (list (string-append "LIBDIR="
373 (assoc-ref %outputs "out")
374 "/lib/ocaml/site-lib"))))
375 (propagated-inputs
376 `(("ocaml-graph" ,ocaml-graph)
377 ("ocaml-cudf" ,ocaml-cudf)
378 ("ocaml-extlib" ,ocaml-extlib)
379 ("ocaml-re" ,ocaml-re)))
380 (native-inputs
381 `(("perl" ,perl)
382 ("python" ,python-2) ; for a test script
383 ("python2-pyyaml" ,python2-pyyaml) ; for a test script
384 ("ocaml-extlib" ,ocaml-extlib)
385 ("ocamlbuild" ,ocamlbuild)
386 ("ocaml-cppo" ,ocaml-cppo)))
387 (home-page "http://www.mancoosi.org/software/")
388 (synopsis "Package distribution management framework")
389 (description "Dose3 is a framework made of several OCaml libraries for
390 managing distribution packages and their dependencies. Though not tied to
391 any particular distribution, dose3 constitutes a pool of libraries which
392 enable analyzing packages coming from various distributions. Besides basic
393 functionalities for querying and setting package properties, dose3 also
394 implements algorithms for solving more complex problems such as monitoring
395 package evolutions, correct and complete dependency resolution and
396 repository-wide uninstallability checks.")
397 ;; with static-linking exception
398 (license license:lgpl2.1+)))
399
400 (define-public ocaml-opam-file-format
401 (package
402 (name "ocaml-opam-file-format")
403 (version "2.0.0")
404 (source (origin
405 (method git-fetch)
406 (uri (git-reference
407 (url "https://github.com/ocaml/opam-file-format")
408 (commit version)))
409 (file-name (git-file-name name version))
410 (sha256
411 (base32
412 "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"))))
413 (build-system ocaml-build-system)
414 (arguments
415 `(#:tests? #f; No tests
416 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
417 "/lib/ocaml/site-lib"))
418 #:phases
419 (modify-phases %standard-phases
420 (delete 'configure))))
421 (home-page "https://opam.ocaml.org")
422 (synopsis "Parser and printer for the opam file syntax")
423 (description "This package contains a parser and a pretty-printer for
424 the opam file fomat.")
425 ;; With static-linking exception
426 (license license:lgpl2.1+)))
427
428 (define-public opam
429 (package
430 (name "opam")
431 (version "2.0.4")
432 (source (origin
433 (method git-fetch)
434 (uri (git-reference
435 (url "https://github.com/ocaml/opam")
436 (commit version)))
437 (file-name (git-file-name name version))
438 (sha256
439 (base32
440 "1yx5k8v5vnnc20fmz5zx8kqd242j48qcknlk6vmkr7rkq886ipq2"))))
441 (build-system ocaml-build-system)
442 (arguments
443 `(#:configure-flags
444 (list (string-append "SHELL="
445 (assoc-ref %build-inputs "bash")
446 "/bin/sh"))
447
448 ;; For some reason, 'ocp-build' needs $TERM to be set.
449 #:make-flags
450 (list "TERM=screen"
451 (string-append "SHELL="
452 (assoc-ref %build-inputs "bash")
453 "/bin/sh"))
454
455 #:test-target "tests"
456
457 ;; FIXME: There's an obscure test failure:
458 ;; …/_obuild/opam/opam.asm install P1' failed.
459 #:tests? #f
460
461 #:phases (modify-phases %standard-phases
462 (add-before 'build 'pre-build
463 (lambda* (#:key inputs make-flags #:allow-other-keys)
464 (let ((bash (assoc-ref inputs "bash"))
465 (bwrap (string-append (assoc-ref inputs "bubblewrap")
466 "/bin/bwrap")))
467 (substitute* "src/core/opamSystem.ml"
468 (("\"/bin/sh\"")
469 (string-append "\"" bash "/bin/sh\""))
470 (("getconf")
471 (which "getconf")))
472 ;; Use bwrap from the store directly.
473 (substitute* "src/state/shellscripts/bwrap.sh"
474 (("-v bwrap") (string-append "-v " bwrap))
475 (("exec bwrap") (string-append "exec " bwrap))
476 ;; Mount /gnu and /run/current-system in the
477 ;; isolated environment when building with opam.
478 ;; This is necessary for packages to find external
479 ;; dependencies, such as a C compiler, make, etc...
480 (("^add_sys_mounts /usr")
481 "add_sys_mounts /gnu /run/current-system /usr"))
482 (substitute* "src/client/opamInitDefaults.ml"
483 (("\"bwrap\"") (string-append "\"" bwrap "\"")))
484 #t)))
485 (add-before 'check 'pre-check
486 (lambda _
487 (setenv "HOME" (getcwd))
488 (invoke "git" "config" "--global" "user.email" "guix@gnu.org")
489 (invoke "git" "config" "--global" "user.name" "Guix")
490 #t)))))
491 (native-inputs
492 `(("dune" ,dune)
493 ("git" ,git) ;for the tests
494 ("ocaml-cppo" ,ocaml-cppo)
495 ("python" ,python) ;for the tests
496 ("camlp4" ,camlp4)))
497 (inputs
498 `(("ocaml" ,ocaml)
499 ("ncurses" ,ncurses)
500 ("curl" ,curl)
501 ("bubblewrap" ,bubblewrap)))
502 (propagated-inputs
503 `(("ocaml-cmdliner" ,ocaml-cmdliner)
504 ("ocaml-dose3" ,ocaml-dose3)
505 ("ocaml-mccs" ,ocaml-mccs)
506 ("ocaml-opam-file-format" ,ocaml-opam-file-format)
507 ("ocaml-re" ,ocaml-re)))
508 (home-page "http://opam.ocamlpro.com/")
509 (synopsis "Package manager for OCaml")
510 (description
511 "OPAM is a tool to manage OCaml packages. It supports multiple
512 simultaneous compiler installations, flexible package constraints, and a
513 Git-friendly development workflow.")
514
515 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
516 (license license:lgpl3)))
517
518 (define-public camlp4-4.07
519 (package
520 (name "camlp4")
521 (version "4.07+1")
522 (source (origin
523 (method git-fetch)
524 (uri (git-reference
525 (url "https://github.com/ocaml/camlp4.git")
526 (commit version)))
527 (file-name (git-file-name name version))
528 (sha256
529 (base32
530 "0cxl4hkqcvspvkx4f2k83217rh6051fll9i2yz7cw6m3bq57mdvl"))))
531 (build-system gnu-build-system)
532 (native-inputs
533 `(("ocaml" ,ocaml-4.07)
534 ("ocamlbuild" ,ocamlbuild)
535 ("which" ,which)))
536 (inputs `(("ocaml" ,ocaml-4.07)))
537 (arguments
538 '(#:tests? #f ;no documented test target
539 ;; a race-condition will lead byte and native targets to mkdir _build
540 ;; which fails on the second attempt.
541 #:parallel-build? #f
542 #:make-flags '("all")
543 #:phases
544 (modify-phases %standard-phases
545 (replace 'configure
546 (lambda* (#:key outputs #:allow-other-keys)
547 ;; This is a home-made 'configure' script.
548 (let ((out (assoc-ref outputs "out")))
549 (invoke "./configure"
550 (string-append "--libdir=" out
551 "/lib/ocaml/site-lib")
552 (string-append "--bindir=" out "/bin")
553 (string-append "--pkgdir=" out
554 "/lib/ocaml/site-lib")))))
555 (add-after 'install 'install-meta
556 (lambda* (#:key outputs #:allow-other-keys)
557 (let ((out (assoc-ref outputs "out")))
558 (substitute* "camlp4/META.in"
559 (("directory = .*")
560 (string-append "directory = \"" out
561 "/lib/ocaml/site-lib/camlp4\"\n")))
562 (invoke "make" "install-META")))))))
563 (home-page "https://github.com/ocaml/camlp4")
564 (synopsis "Write parsers in OCaml")
565 (description
566 "Camlp4 is a software system for writing extensible parsers for
567 programming languages. It provides a set of OCaml libraries that are used to
568 define grammars as well as loadable syntax extensions of such grammars.
569 Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most
570 important applications is the definition of domain-specific extensions of the
571 syntax of OCaml.")
572
573 ;; This is LGPLv2 with an exception that allows packages statically-linked
574 ;; against the library to be released under any terms.
575 (license license:lgpl2.0)))
576
577 (define-public camlp4 camlp4-4.07)
578
579 (define-public camlp5
580 (package
581 (name "camlp5")
582 (version "7.07")
583 (source
584 (origin
585 (method git-fetch)
586 (uri (git-reference
587 (url "https://github.com/camlp5/camlp5.git")
588 (commit (string-append "rel" (string-delete #\. version)))))
589 (file-name (git-file-name name version))
590 (sha256
591 (base32 "1c8v45553ccbqha2ypfranqlgw06rr5wjr2hlnrx5bf9jfq0h0dn"))))
592 (build-system gnu-build-system)
593 (inputs
594 `(("ocaml" ,ocaml)))
595 (arguments
596 `(#:tests? #f ; XXX TODO figure out how to run the tests
597 #:phases
598 (modify-phases %standard-phases
599 (replace 'configure
600 (lambda* (#:key outputs #:allow-other-keys)
601 (let* ((out (assoc-ref outputs "out"))
602 (mandir (string-append out "/share/man")))
603 ;; Custom configure script doesn't recognize
604 ;; --prefix=<PREFIX> syntax (with equals sign).
605 (invoke "./configure"
606 "--prefix" out
607 "--mandir" mandir))))
608 (add-before 'build 'fix-/bin-references
609 (lambda _
610 (substitute* "config/Makefile"
611 (("/bin/rm") "rm"))
612 #t))
613 (replace 'build
614 (lambda _
615 (invoke "make" "-j" (number->string
616 (parallel-job-count))
617 "world.opt")))
618 ;; Required for findlib to find camlp5's libraries
619 (add-after 'install 'install-meta
620 (lambda* (#:key outputs #:allow-other-keys)
621 (install-file "etc/META" (string-append (assoc-ref outputs "out")
622 "/lib/ocaml/camlp5/"))
623 #t)))))
624 (home-page "http://camlp5.gforge.inria.fr/")
625 (synopsis "Pre-processor Pretty Printer for OCaml")
626 (description
627 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
628 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
629 concrete syntax of the language (Quotations, Syntax Extensions).")
630 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
631 (license (list license:bsd-3 license:qpl))))
632
633 (define-public hevea
634 (package
635 (name "hevea")
636 (version "2.32")
637 (source (origin
638 (method url-fetch)
639 (uri (string-append "http://hevea.inria.fr/old/"
640 name "-" version ".tar.gz"))
641 (sha256
642 (base32
643 "1s4yqphfcr1pf5mcj5c84mvmd107k525iiym5jdwsxz0ka0ccmfy"))))
644 (build-system gnu-build-system)
645 (inputs
646 `(("ocaml" ,ocaml)))
647 (native-inputs
648 `(("ocamlbuild" ,ocamlbuild)))
649 (arguments
650 `(#:tests? #f ; no test suite
651 #:make-flags (list (string-append "PREFIX=" %output))
652 #:phases (modify-phases %standard-phases
653 (delete 'configure)
654 (add-before 'build 'patch-/bin/sh
655 (lambda _
656 (substitute* "_tags"
657 (("/bin/sh") (which "sh")))
658 #t)))))
659 (home-page "http://hevea.inria.fr/")
660 (synopsis "LaTeX to HTML translator")
661 (description
662 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
663 written in Objective Caml.")
664 (license license:qpl)))
665
666 (define-public ocaml-num
667 (package
668 (name "ocaml-num")
669 (version "1.1")
670 (source
671 (origin
672 (method git-fetch)
673 (uri (git-reference
674 (url "https://github.com/ocaml/num.git")
675 (commit (string-append "v" version))))
676 (file-name (git-file-name name version))
677 (sha256
678 (base32 "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"))))
679 (build-system ocaml-build-system)
680 (arguments
681 `(#:phases
682 (modify-phases %standard-phases
683 (delete 'configure)
684 (add-before 'build 'fix-makefile
685 (lambda* (#:key outputs #:allow-other-keys)
686 ;; This package supposes we install to the same directory as
687 ;; the ocaml package.
688 (substitute* "src/META"
689 (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
690 "/lib/ocaml/site-lib\"")))
691 (substitute* "src/Makefile"
692 (("\\) \\$\\(STDLIBDIR\\)")
693 (string-append ") " (assoc-ref outputs "out")
694 "/lib/ocaml/site-lib")))
695 #t))
696 (add-after 'install 'fix-stubslib
697 (lambda* (#:key outputs #:allow-other-keys)
698 (format #t "~a~%" (find-files "." ".*.so"))
699 (let ((stubdir (string-append (assoc-ref outputs "out")
700 "/lib/ocaml/site-lib")))
701 (mkdir-p stubdir)
702 (install-file "src/dllnums.so" stubdir))
703 #t)))))
704 (home-page "https://github.com/ocaml/num")
705 (synopsis "Arbitrary-precision integer and rational arithmetic")
706 (description "OCaml-Num contains the legacy Num library for
707 arbitrary-precision integer and rational arithmetic that used to be part of
708 the OCaml core distribution.")
709 (license license:lgpl2.1+))); with linking exception
710
711 (define-public emacs-tuareg
712 (package
713 (name "emacs-tuareg")
714 (version "2.2.0")
715 (source
716 (origin
717 (method git-fetch)
718 (uri (git-reference
719 (url "https://github.com/ocaml/tuareg.git")
720 (commit version)))
721 (file-name (git-file-name name version))
722 (sha256
723 (base32 "06zxnn85fk5087iq0zxc5l5n9fz8r0367wylmynbfhc9711vccy6"))))
724 (build-system gnu-build-system)
725 (native-inputs `(("emacs" ,emacs-minimal)
726 ("opam" ,opam)))
727 (arguments
728 `(#:phases
729 (modify-phases %standard-phases
730 (add-after 'unpack 'make-git-checkout-writable
731 (lambda _
732 (for-each make-file-writable (find-files "."))
733 #t))
734 (delete 'configure)
735 (add-before 'install 'fix-install-path
736 (lambda* (#:key outputs #:allow-other-keys)
737 (substitute* "Makefile"
738 (("/emacs/site-lisp")
739 (string-append (assoc-ref %outputs "out")
740 "/share/emacs/site-lisp/")))
741 #t))
742 (add-after 'install 'post-install
743 (lambda* (#:key outputs #:allow-other-keys)
744 (symlink "tuareg.el"
745 (string-append (assoc-ref outputs "out")
746 "/share/emacs/site-lisp/"
747 "tuareg-autoloads.el"))
748 #t)))))
749 (home-page "https://github.com/ocaml/tuareg")
750 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
751 (description "Tuareg helps editing OCaml code, to highlight important
752 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
753 Emacs.")
754 (license license:gpl2+)))
755
756 (define-public ocaml-menhir
757 (package
758 (name "ocaml-menhir")
759 (version "20181113")
760 (source
761 (origin
762 (method git-fetch)
763 (uri (git-reference
764 (url "https://gitlab.inria.fr/fpottier/menhir.git")
765 (commit version)))
766 (file-name (git-file-name name version))
767 (sha256
768 (base32 "1iqdf64ayq4s3d9jkwhs3s8wqc2s48b292hp0kcjsskfhcvwg0kr"))))
769 (build-system ocaml-build-system)
770 (inputs
771 `(("ocaml" ,ocaml)))
772 (native-inputs
773 `(("ocamlbuild" ,ocamlbuild)))
774 (arguments
775 `(#:make-flags `("USE_OCAMLFIND=true"
776 ,(string-append "PREFIX=" (assoc-ref %outputs "out")))
777 #:tests? #f ; No check target
778 #:phases
779 (modify-phases %standard-phases
780 (delete 'configure))))
781 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
782 (synopsis "Parser generator")
783 (description "Menhir is a parser generator. It turns high-level grammar
784 specifications, decorated with semantic actions expressed in the OCaml
785 programming language into parsers, again expressed in OCaml. It is based on
786 Knuth’s LR(1) parser construction technique.")
787 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
788 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
789 ;; are QPL licensed.
790 (license (list license:gpl2+ license:qpl))))
791
792 (define-public ocaml-bigarray-compat
793 (package
794 (name "ocaml-bigarray-compat")
795 (version "1.0.0")
796 (source (origin
797 (method git-fetch)
798 (uri (git-reference
799 (url "https://github.com/mirage/bigarray-compat")
800 (commit (string-append "v" version))))
801 (file-name (git-file-name name version))
802 (sha256
803 (base32
804 "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz"))))
805 (build-system dune-build-system)
806 (arguments
807 `(#:tests? #f)); no tests
808 (home-page "https://github.com/mirage/bigarray-compat")
809 (synopsis "OCaml compatibility library")
810 (description "This package contains a compatibility library for
811 @code{Stdlib.Bigarray} in OCaml.")
812 (license license:isc)))
813
814 (define-public lablgtk
815 (package
816 (name "lablgtk")
817 (version "2.18.6")
818 (source (origin
819 (method url-fetch)
820 (uri (ocaml-forge-uri name version 1726))
821 (sha256
822 (base32
823 "1y38fdvswy6hmppm65qvgdk4pb3ghhnvz7n4ialf46340r1s5p2d"))))
824 (build-system gnu-build-system)
825 (native-inputs
826 `(("camlp4" ,camlp4)
827 ("ocaml" ,ocaml)
828 ("findlib" ,ocaml-findlib)
829 ("pkg-config" ,pkg-config)))
830 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
831 ;; and gtk+-quartz-2.0 once available.
832 (inputs
833 `(("gtk+" ,gtk+-2)
834 ("gtksourceview" ,gtksourceview-2)
835 ("libgnomecanvas" ,libgnomecanvas)
836 ("libgnomeui" ,libgnomeui)
837 ("libglade" ,libglade)
838 ("librsvg" ,librsvg)))
839 (arguments
840 `(#:tests? #f ; no check target
841
842 ;; opt: also install cmxa files
843 #:make-flags (list "all" "opt"
844 (string-append "FINDLIBDIR="
845 (assoc-ref %outputs "out")
846 "/lib/ocaml"))
847 ;; Occasionally we would get "Error: Unbound module GtkThread" when
848 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
849 #:parallel-build? #f
850
851 #:phases
852 (modify-phases %standard-phases
853 (add-before 'install 'prepare-install
854 (lambda* (#:key inputs outputs #:allow-other-keys)
855 (let ((out (assoc-ref outputs "out"))
856 (ocaml (assoc-ref inputs "ocaml")))
857 ;; Install into the output and not the ocaml directory.
858 (mkdir-p (string-append out "/lib/ocaml"))
859 (substitute* "config.make"
860 ((ocaml) out))
861 #t))))))
862 (home-page "http://lablgtk.forge.ocamlcore.org/")
863 (synopsis "GTK+ bindings for OCaml")
864 (description
865 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
866 a strongly-typed object-oriented interface that is compatible with the
867 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
868 also provides bindings to
869 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
870 gnomeui, gtksourceview, gtkspell,
871 libglade (and it an generate OCaml code from .glade files),
872 libpanel, librsvg and quartz.")
873 (license license:lgpl2.1)))
874
875 (define-public unison
876 (package
877 (name "unison")
878 (version "2.51.2")
879 (source (origin
880 (method git-fetch)
881 (uri (git-reference
882 (url "https://github.com/bcpierce00/unison.git")
883 (commit (string-append "v" version))))
884 (file-name (git-file-name name version))
885 (sha256
886 (base32
887 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))))
888 (build-system gnu-build-system)
889 (outputs '("out"
890 "doc")) ; 1.9 MiB of documentation
891 (native-inputs
892 `(("ocaml" ,ocaml)
893 ;; For documentation
894 ("ghostscript" ,ghostscript)
895 ("texlive" ,texlive-tiny)
896 ("hevea" ,hevea)
897 ("lynx" ,lynx)
898 ("which" ,which)))
899 (arguments
900 `(#:parallel-build? #f
901 #:parallel-tests? #f
902 #:test-target "selftest"
903 #:tests? #f ; Tests require writing to $HOME.
904 ; If some $HOME is provided, they fail with the message
905 ; "Fatal error: Skipping some tests -- remove me!"
906 #:phases
907 (modify-phases %standard-phases
908 (delete 'configure)
909 (add-before 'install 'prepare-install
910 (lambda* (#:key outputs #:allow-other-keys)
911 (let* ((out (assoc-ref outputs "out"))
912 (bin (string-append out "/bin")))
913 (mkdir-p bin)
914 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
915 #t)))
916 (add-after 'install 'install-fsmonitor
917 (lambda* (#:key outputs #:allow-other-keys)
918 (let* ((out (assoc-ref outputs "out"))
919 (bin (string-append out "/bin")))
920 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
921 (install-file "src/unison-fsmonitor" bin)
922 #t)))
923 (add-after 'install 'install-doc
924 (lambda* (#:key outputs #:allow-other-keys)
925 (let ((doc (string-append (assoc-ref outputs "doc")
926 "/share/doc/unison")))
927 (mkdir-p doc)
928 ;; Remove an '\n' that prevents the doc to be generated
929 ;; correctly with newer hevea.
930 (substitute* "doc/local.tex"
931 (("----SNIP----.*") "----SNIP----"))
932 ;; This file needs write-permissions, because it's
933 ;; overwritten by 'docs' during documentation generation.
934 (chmod "src/strings.ml" #o600)
935 (invoke "make" "docs"
936 "TEXDIRECTIVES=\\\\draftfalse")
937 (for-each (lambda (f)
938 (install-file f doc))
939 (map (lambda (ext)
940 (string-append "doc/unison-manual." ext))
941 ;; Install only html documentation,
942 ;; since the build is currently
943 ;; non-reproducible with the ps, pdf,
944 ;; and dvi docs.
945 '(;; "ps" "pdf" "dvi"
946 "html")))
947 #t))))))
948 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
949 (synopsis "File synchronizer")
950 (description
951 "Unison is a file-synchronization tool. It allows two replicas of
952 a collection of files and directories to be stored on different hosts
953 (or different disks on the same host), modified separately, and then
954 brought up to date by propagating the changes in each replica
955 to the other.")
956 (license license:gpl3+)))
957
958 (define-public ocaml-findlib
959 (package
960 (name "ocaml-findlib")
961 (version "1.8.0")
962 (source (origin
963 (method url-fetch)
964 (uri (string-append "http://download.camlcity.org/download/"
965 "findlib" "-" version ".tar.gz"))
966 (sha256
967 (base32
968 "1b97zqjdriqd2ikgh4rmqajgxwdwn013riji5j53y3xvcmnpsyrb"))))
969 (build-system gnu-build-system)
970 (native-inputs
971 `(("camlp4" ,camlp4)
972 ("m4" ,m4)
973 ("ocaml" ,ocaml)))
974 (arguments
975 `(#:tests? #f ; no test suite
976 #:parallel-build? #f
977 #:make-flags (list "all" "opt")
978 #:phases (modify-phases %standard-phases
979 (replace
980 'configure
981 (lambda* (#:key inputs outputs #:allow-other-keys)
982 (let ((out (assoc-ref outputs "out")))
983 (invoke
984 "./configure"
985 "-bindir" (string-append out "/bin")
986 "-config" (string-append out "/etc/ocamfind.conf")
987 "-mandir" (string-append out "/share/man")
988 "-sitelib" (string-append out "/lib/ocaml/site-lib")
989 "-with-toolbox"))))
990 (replace 'install
991 (lambda* (#:key outputs #:allow-other-keys)
992 (let ((out (assoc-ref outputs "out")))
993 (invoke "make" "install"
994 (string-append "OCAML_CORE_STDLIB="
995 out "/lib/ocaml/site-lib")))))
996 (add-after 'install 'remove-camlp4
997 (lambda* (#:key outputs #:allow-other-keys)
998 (let ((out (assoc-ref outputs "out")))
999 (delete-file-recursively
1000 (string-append out "/lib/ocaml/site-lib/camlp4"))
1001 #t))))))
1002 (home-page "http://projects.camlcity.org/projects/findlib.html")
1003 (synopsis "Management tool for OCaml libraries")
1004 (description
1005 "The \"findlib\" library provides a scheme to manage reusable software
1006 components (packages), and includes tools that support this scheme. Packages
1007 are collections of OCaml modules for which metainformation can be stored. The
1008 packages are kept in the file system hierarchy, but with strict directory
1009 structure. The library contains functions to look the directory up that
1010 stores a package, to query metainformation about a package, and to retrieve
1011 dependency information about multiple packages. There is also a tool that
1012 allows the user to enter queries on the command-line. In order to simplify
1013 compilation and linkage, there are new frontends of the various OCaml
1014 compilers that can directly deal with packages.")
1015 (license license:x11)))
1016
1017 ;; note that some tests may hang for no obvious reason.
1018 (define-public ocaml-ounit
1019 (package
1020 (name "ocaml-ounit")
1021 (version "2.0.8")
1022 (source (origin
1023 (method url-fetch)
1024 (uri (ocaml-forge-uri "ounit" version 1749))
1025 (sha256
1026 (base32
1027 "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
1028 (build-system ocaml-build-system)
1029 (native-inputs
1030 `(("libxml2" ,libxml2) ; for xmllint
1031 ("ocamlbuild" ,ocamlbuild)))
1032 (arguments
1033 `(#:phases
1034 (modify-phases %standard-phases
1035 (delete 'check)))) ; tests are run during build
1036 (home-page "http://ounit.forge.ocamlcore.org")
1037 (synopsis "Unit testing framework for OCaml")
1038 (description "Unit testing framework for OCaml. It is similar to JUnit and
1039 other XUnit testing frameworks.")
1040 (license license:expat)))
1041
1042 (define-public camlzip
1043 (package
1044 (name "camlzip")
1045 (version "1.0.6")
1046 (source (origin
1047 (method url-fetch)
1048 (uri (ocaml-forge-uri name version 1616))
1049 (sha256
1050 (base32
1051 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
1052 (build-system ocaml-build-system)
1053 (inputs
1054 `(("zlib" ,zlib)))
1055 (arguments
1056 `(#:phases
1057 (modify-phases %standard-phases
1058 (delete 'configure)
1059 (add-after 'install 'install-camlzip
1060 (lambda* (#:key outputs #:allow-other-keys)
1061 (let* ((out (assoc-ref outputs "out"))
1062 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
1063 (mkdir-p dir)
1064 (call-with-output-file (string-append dir "/META")
1065 (lambda (port)
1066 (format port "version=\"1.06\"\n")
1067 (format port "requires=\"unix\"\n")
1068 (format port "archive(byte)=\"zip.cma\"\n")
1069 (format port "archive(native)=\"zip.cmxa\"\n")
1070 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
1071 (format port "directory=\"../zip\"\n")))))))
1072 #:install-target "install-findlib"
1073 #:make-flags
1074 (list "all" "allopt"
1075 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
1076 "/lib/ocaml"))))
1077 (home-page "http://forge.ocamlcore.org/projects/camlzip")
1078 (synopsis "Provides easy access to compressed files")
1079 (description "Provides easy access to compressed files in ZIP, GZIP and
1080 JAR format. It provides functions for reading from and writing to compressed
1081 files in these formats.")
1082 (license license:lgpl2.1+)))
1083
1084 (define-public ocamlmod
1085 (package
1086 (name "ocamlmod")
1087 (version "0.0.9")
1088 (source (origin
1089 (method url-fetch)
1090 (uri (ocaml-forge-uri name version 1702))
1091 (sha256
1092 (base32
1093 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
1094 (build-system ocaml-build-system)
1095 (native-inputs
1096 `(("ounit" ,ocaml-ounit)
1097 ("ocamlbuild" ,ocamlbuild)))
1098 (arguments
1099 `(#:phases
1100 (modify-phases %standard-phases
1101 ;; Tests are done during build.
1102 (delete 'check))))
1103 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1104 (synopsis "Generate modules from OCaml source files")
1105 (description "Generate modules from OCaml source files.")
1106 (license license:lgpl2.1+))) ; with an exception
1107
1108 (define-public ocaml-zarith
1109 (package
1110 (name "ocaml-zarith")
1111 (version "1.7")
1112 (source (origin
1113 (method git-fetch)
1114 (uri (git-reference
1115 (url "https://github.com/ocaml/Zarith")
1116 (commit (string-append "release-" version))))
1117 (sha256
1118 (base32
1119 "08x5xnamibhvxl50f1bb3jl9ym0hm6004hmc54xnrnrv7jxz9rvz"))))
1120 (build-system ocaml-build-system)
1121 (native-inputs
1122 `(("perl" ,perl)))
1123 (inputs
1124 `(("gmp" ,gmp)))
1125 (arguments
1126 `(#:tests? #f ; no test target
1127 #:phases
1128 (modify-phases %standard-phases
1129 (replace 'configure
1130 (lambda _ (invoke "./configure"))))))
1131 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1132 (synopsis "Implements arbitrary-precision integers")
1133 (description "Implements arithmetic and logical operations over
1134 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1135 over big integers. Small integers are represented as Caml unboxed integers,
1136 for speed and space economy.")
1137 (license license:lgpl2.1+))) ; with an exception
1138
1139 (define-public ocaml-frontc
1140 (package
1141 (name "ocaml-frontc")
1142 (version "3.4.1")
1143 (source (origin
1144 (method git-fetch)
1145 (uri (git-reference
1146 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1147 (commit (string-append
1148 "V_" (string-join (string-split version #\.) "_")))))
1149 (file-name (git-file-name name version))
1150 (sha256
1151 (base32
1152 "1dq5nks0c9gsbr1m8k39m1bniawr5hqcy1r8x5px7naa95ch06ak"))))
1153 (build-system ocaml-build-system)
1154 (arguments
1155 `(#:phases
1156 (modify-phases %standard-phases
1157 (delete 'configure)
1158 (add-after 'install 'install-meta
1159 (lambda* (#:key outputs #:allow-other-keys)
1160 (let ((out (assoc-ref outputs "out")))
1161 (with-output-to-file
1162 (string-append out "/lib/ocaml/frontc/META")
1163 (lambda _
1164 (display
1165 (string-append
1166 "description = \"Parser for the C language\"
1167 version = \"" ,version "\"
1168 requires = \"unix\"
1169 archive(byte) = \"frontc.cma\"
1170 archive(native) = \"frontc.cmxa\""))))
1171 (symlink (string-append out "/lib/ocaml/frontc")
1172 (string-append out "/lib/ocaml/FrontC"))))))
1173 #:make-flags (list (string-append "PREFIX="
1174 (assoc-ref %outputs "out"))
1175 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1176 (properties `((upstream-name . "FrontC")))
1177 (home-page "https://www.irit.fr/FrontC")
1178 (synopsis "C parser and lexer library")
1179 (description "FrontC is an OCAML library providing a C parser and lexer.
1180 The result is a syntactic tree easy to process with usual OCAML tree management.
1181 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1182 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1183 (license license:lgpl2.1)))
1184
1185 (define-public ocaml-qcheck
1186 (package
1187 (name "ocaml-qcheck")
1188 (version "0.9")
1189 (source
1190 (origin
1191 (method git-fetch)
1192 (uri (git-reference
1193 (url "https://github.com/c-cube/qcheck.git")
1194 (commit version)))
1195 (file-name (git-file-name name version))
1196 (sha256
1197 (base32 "0w83v9ylycsssyn47q8wnkfbvhn5vn10z6i35n5965i2m1r0mmcf"))))
1198 (build-system dune-build-system)
1199 (arguments
1200 `(#:test-target "."))
1201 (native-inputs
1202 `(("ocaml-alcotest" ,ocaml-alcotest)
1203 ("ocaml-ounit" ,ocaml-ounit)
1204 ("ocamlbuild" ,ocamlbuild)))
1205 (home-page "https://github.com/c-cube/qcheck")
1206 (synopsis "QuickCheck inspired property-based testing for OCaml")
1207 (description "QuickCheck inspired property-based testing for OCaml. This
1208 module allows to check invariants (properties of some types) over randomly
1209 generated instances of the type. It provides combinators for generating
1210 instances and printing them.")
1211 (license license:lgpl3+)))
1212
1213 (define-public ocaml-qtest
1214 (package
1215 (name "ocaml-qtest")
1216 (version "2.9")
1217 (source (origin
1218 (method git-fetch)
1219 (uri (git-reference
1220 (url "https://github.com/vincent-hugot/qtest/")
1221 (commit (string-append "v" version))))
1222 (file-name (git-file-name name version))
1223 (sha256
1224 (base32
1225 "1ifxc8jndwah82g5k8xaa7jskbv866j4zpd0w41f0pskg4y0z9g1"))))
1226 (build-system dune-build-system)
1227 (arguments
1228 `(#:jbuild? #t
1229 #:test-target "tests"))
1230 (propagated-inputs
1231 `(("ounit" ,ocaml-ounit)
1232 ("qcheck" ,ocaml-qcheck)))
1233 (home-page "https://github.com/vincent-hugot/qtest")
1234 (synopsis "Inline (Unit) Tests for OCaml")
1235 (description "Qtest extracts inline unit tests written using a special
1236 syntax in comments. Those tests are then run using the oUnit framework and the
1237 qcheck library. The possibilities range from trivial tests -- extremely simple
1238 to use -- to sophisticated random generation of test cases.")
1239 (license license:lgpl3+)))
1240
1241 (define-public ocaml-stringext
1242 (package
1243 (name "ocaml-stringext")
1244 (version "1.5.0")
1245 (source (origin
1246 (method git-fetch)
1247 (uri (git-reference
1248 (url "https://github.com/rgrinberg/stringext")
1249 (commit version)))
1250 (file-name (git-file-name name version))
1251 (sha256
1252 (base32
1253 "0035pyakk0r7pfhkrayvqncpv9mk6lssr455j3prmdcirh6s50d7"))))
1254 (build-system dune-build-system)
1255 (arguments
1256 `(#:test-target "."))
1257 (native-inputs
1258 `(("ocamlbuild" ,ocamlbuild)
1259 ("qtest" ,ocaml-qtest)))
1260 (home-page "https://github.com/rgrinberg/stringext")
1261 (synopsis "Extra string functions for OCaml")
1262 (description "Provides a single module named Stringext that provides a grab
1263 bag of often used but missing string functions from the stdlib. E.g, split,
1264 full_split, cut, rcut, etc..")
1265 ;; the only mention of a license in this project is in its `opam' file
1266 ;; where it says `mit'.
1267 (license license:expat)))
1268
1269 (define-public ocaml-bisect
1270 (package
1271 (name "ocaml-bisect")
1272 (version "1.3.1")
1273 (source
1274 (origin
1275 (method git-fetch)
1276 (uri (git-reference
1277 (url "https://github.com/gasche/bisect.git")
1278 (commit version)))
1279 (file-name (git-file-name name version))
1280 (sha256
1281 (base32 "0hm5za61qydda6ri3887b4zqqbqilh42x712xnclm1rr7ggga2nh"))
1282 (patches
1283 (search-patches
1284 "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
1285 (build-system ocaml-build-system)
1286 (native-inputs
1287 `(("camlp4" ,camlp4)
1288 ("libxml2" ,libxml2)
1289 ("ocamlbuild" ,ocamlbuild)
1290 ("which" ,which)))
1291 (propagated-inputs
1292 `(("camlp4" ,camlp4)))
1293 (arguments
1294 `(#:test-target "tests"
1295 #:make-flags
1296 (list "all" (string-append "CAMLP4_LIBDIR="
1297 (assoc-ref %build-inputs "camlp4")
1298 "/lib/ocaml/site-lib/camlp4"))
1299 #:phases
1300 (modify-phases %standard-phases
1301 (replace 'configure
1302 (lambda* (#:key inputs outputs #:allow-other-keys)
1303 (invoke "./configure" "-prefix" (assoc-ref outputs "out")
1304 "-ocaml-prefix" (assoc-ref inputs "ocaml")
1305 "-camlp4-prefix" (assoc-ref inputs "camlp4"))
1306 #t)))))
1307 (home-page "http://bisect.x9c.fr")
1308 (synopsis "Code coverage tool for the OCaml language")
1309 (description "Bisect is a code coverage tool for the OCaml language. It is
1310 a camlp4-based tool that allows to instrument your application before running
1311 tests. After application execution, it is possible to generate a report in HTML
1312 format that is the replica of the application source code annotated with code
1313 coverage information.")
1314 (license license:gpl3+)))
1315
1316 (define-public dune
1317 (package
1318 (name "dune")
1319 (version "1.9.3")
1320 (source (origin
1321 (method url-fetch)
1322 (uri (string-append "https://github.com/ocaml/dune/releases/"
1323 "download/" version "/dune-" version ".tbz"))
1324 (sha256
1325 (base32
1326 "1jlhnx580v6i1d451z5cl8ibfd0m9qln963y2pp5v6s2winyqyri"))))
1327 (build-system ocaml-build-system)
1328 (arguments
1329 `(#:tests? #f; require odoc
1330 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
1331 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1332 "/lib/ocaml/site-lib"))
1333 #:phases
1334 (modify-phases %standard-phases
1335 (replace 'configure
1336 (lambda* (#:key outputs #:allow-other-keys)
1337 (invoke "./configure")
1338 #t)))))
1339 (home-page "https://github.com/ocaml/dune")
1340 (synopsis "OCaml build system")
1341 (description "Dune is a build system that was designed to simplify the
1342 release of Jane Street packages. It reads metadata from @file{dune} files
1343 following a very simple s-expression syntax.")
1344 (license license:expat)))
1345
1346 (define-public ocaml-migrate-parsetree
1347 (package
1348 (name "ocaml-migrate-parsetree")
1349 (version "1.2.0")
1350 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1351 (source
1352 (origin
1353 (method git-fetch)
1354 (uri (git-reference
1355 (url (string-append home-page ".git"))
1356 (commit (string-append "v" version))))
1357 (file-name (git-file-name name version))
1358 (sha256
1359 (base32
1360 "16kas19iwm4afijv3yxd250s08absabmdcb4yj57wc8r4fmzv5dm"))))
1361 (build-system dune-build-system)
1362 (arguments
1363 `(#:tests? #f))
1364 (propagated-inputs
1365 `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
1366 ("ocamlbuild" ,ocamlbuild)
1367 ("ocaml-result" ,ocaml-result)))
1368 (properties `((upstream-name . "ocaml-migrate-parsetree")))
1369 (synopsis "OCaml parsetree convertor")
1370 (description "This library converts between parsetrees of different OCaml
1371 versions. For each version, there is a snapshot of the parsetree and conversion
1372 functions to the next and/or previous version.")
1373 (license license:lgpl2.1+)))
1374
1375 (define-public ocaml-ppx-tools-versioned
1376 (package
1377 (name "ocaml-ppx-tools-versioned")
1378 (version "5.2.1")
1379 (source (origin
1380 (method url-fetch)
1381 (uri (string-append "https://github.com/ocaml-ppx/"
1382 "ppx_tools_versioned/archive/"
1383 version ".tar.gz"))
1384 (file-name (string-append name "-" version ".tar.gz"))
1385 (sha256
1386 (base32
1387 "1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh"))))
1388 (build-system dune-build-system)
1389 (arguments
1390 `(#:test-target "."))
1391 (propagated-inputs
1392 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
1393 (properties `((upstream-name . "ppx_tools_versioned")))
1394 (home-page "https://github.com/let-def/ppx_tools_versioned")
1395 (synopsis "Variant of ppx_tools")
1396 (description "This package is a variant of ppx_tools based on
1397 ocaml-migrate-parsetree")
1398 (license license:expat)))
1399
1400 (define-public ocaml-bitstring
1401 (package
1402 (name "ocaml-bitstring")
1403 (version "3.1.0")
1404 (source (origin
1405 (method url-fetch)
1406 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1407 "get/v" version ".tar.gz"))
1408 (file-name (string-append name "-" version ".tar.gz"))
1409 (sha256
1410 (base32
1411 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
1412 (build-system dune-build-system)
1413 (native-inputs
1414 `(("camlp4" ,camlp4)
1415 ("time" ,time)
1416 ("autoconf" ,autoconf)
1417 ("automake" ,automake)
1418 ("bisect" ,ocaml-bisect)))
1419 (propagated-inputs
1420 `(("camlp4" ,camlp4)
1421 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
1422 (arguments
1423 `(#:tests? #f; Tests fail to build
1424 #:jbuild? #t))
1425 (home-page "https://github.com/xguerin/bitstring")
1426 (synopsis "Bitstrings and bitstring matching for OCaml")
1427 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1428 a syntax extension and library for OCaml. You can use this module to both parse
1429 and generate binary formats, files and protocols. Bitstring handling is added
1430 as primitives to the language, making it exceptionally simple to use and very
1431 powerful.")
1432 (license license:isc)))
1433
1434 (define-public ocaml-result
1435 (package
1436 (name "ocaml-result")
1437 (version "1.3")
1438 (source (origin
1439 (method git-fetch)
1440 (uri (git-reference
1441 (url "https://github.com/janestreet/result")
1442 (commit version)))
1443 (file-name (git-file-name name version))
1444 (sha256
1445 (base32
1446 "081ayblszn9pj2rqcif40x6cz2zda48vi45gy49rc2qfc4gszry3"))))
1447 (build-system dune-build-system)
1448 (arguments
1449 `(#:test-target "."))
1450 (home-page "https://github.com/janestreet/result")
1451 (synopsis "Compatibility Result module")
1452 (description "Uses the new result type defined in OCaml >= 4.03 while
1453 staying compatible with older version of OCaml should use the Result module
1454 defined in this library.")
1455 (license license:bsd-3)))
1456
1457 (define-public ocaml-topkg
1458 (package
1459 (name "ocaml-topkg")
1460 (version "1.0.0")
1461 (source (origin
1462 (method url-fetch)
1463 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1464 "topkg-" version ".tbz"))
1465 (sha256
1466 (base32
1467 "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"))))
1468 (build-system ocaml-build-system)
1469 (native-inputs
1470 `(("opam" ,opam)
1471 ("ocamlbuild" ,ocamlbuild)))
1472 (propagated-inputs
1473 `(("result" ,ocaml-result)))
1474 (arguments
1475 `(#:tests? #f
1476 #:build-flags '("build")
1477 #:phases
1478 (modify-phases %standard-phases
1479 (delete 'configure))))
1480 (home-page "http://erratique.ch/software/topkg")
1481 (synopsis "Transitory OCaml software packager")
1482 (description "Topkg is a packager for distributing OCaml software. It
1483 provides an API to describe the files a package installs in a given build
1484 configuration and to specify information about the package's distribution,
1485 creation and publication procedures.")
1486 (license license:isc)))
1487
1488 (define-public ocaml-rresult
1489 (package
1490 (name "ocaml-rresult")
1491 (version "0.5.0")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1495 "rresult-" version ".tbz"))
1496 (sha256
1497 (base32
1498 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1499 (build-system ocaml-build-system)
1500 (native-inputs
1501 `(("opam" ,opam)
1502 ("ocamlbuild" ,ocamlbuild)))
1503 (propagated-inputs
1504 `(("topkg" ,ocaml-topkg)))
1505 (arguments
1506 `(#:tests? #f
1507 #:build-flags '("build")
1508 #:phases
1509 (modify-phases %standard-phases
1510 (delete 'configure))))
1511 (home-page "http://erratique.ch/software/rresult")
1512 (synopsis "Result value combinators for OCaml")
1513 (description "Handle computation results and errors in an explicit and
1514 declarative manner, without resorting to exceptions. It defines combinators
1515 to operate on the result type available from OCaml 4.03 in the standard
1516 library.")
1517 (license license:isc)))
1518
1519 (define-public ocaml-sqlite3
1520 (package
1521 (name "ocaml-sqlite3")
1522 (version "4.4.1")
1523 (source
1524 (origin
1525 (method git-fetch)
1526 (uri (git-reference
1527 (url "https://github.com/mmottl/sqlite3-ocaml")
1528 (commit version)))
1529 (file-name (git-file-name name version))
1530 (sha256
1531 (base32
1532 "1536agm5fgcqysszhpd3kmw7lkc5n5ni7gmlyglrbvmnmrwf3av2"))))
1533 (build-system dune-build-system)
1534 (native-inputs
1535 `(("ocaml-base" ,ocaml-base)
1536 ("ocaml-stdio" ,ocaml-stdio)
1537 ("pkg-config" ,pkg-config)))
1538 (inputs
1539 `(("sqlite" ,sqlite)))
1540 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1541 (synopsis "SQLite3 Bindings for OCaml")
1542 (description
1543 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1544 API. Sqlite3 is a self-contained, serverless, zero-configuration,
1545 transactional SQL database engine with outstanding performance for many use
1546 cases. These bindings are written in a way that enables a friendly
1547 coexistence with the old (version 2) SQLite and its OCaml wrapper
1548 @code{ocaml-sqlite}.")
1549 (license license:expat)))
1550
1551 (define-public ocaml-csv
1552 (package
1553 (name "ocaml-csv")
1554 (version "2.2")
1555 (source
1556 (origin
1557 (method git-fetch)
1558 (uri (git-reference
1559 (url "https://github.com/Chris00/ocaml-csv")
1560 (commit version)))
1561 (file-name (git-file-name name version))
1562 (sha256
1563 (base32
1564 "07qdw8bbvprk78x96pnm807rhs82ks6sxis1cf5nyng8b5nvm2mv"))))
1565 (build-system dune-build-system)
1566 (arguments
1567 `(#:package "csv"
1568 #:test-target "."))
1569 (home-page "https://github.com/Chris00/ocaml-csv")
1570 (synopsis "Pure OCaml functions to read and write CSV")
1571 (description
1572 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1573 by all major spreadsheets. This library implements pure OCaml functions to
1574 read and write files in this format as well as some convenience functions to
1575 manipulate such data.")
1576 (license (package-license camlp4))))
1577
1578 (define-public ocaml-mtime
1579 (package
1580 (name "ocaml-mtime")
1581 (version "1.1.0")
1582 (source (origin
1583 (method url-fetch)
1584 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1585 "mtime-" version ".tbz"))
1586 (sha256
1587 (base32
1588 "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3"))))
1589 (build-system ocaml-build-system)
1590 (native-inputs
1591 `(("ocamlbuild" ,ocamlbuild)
1592 ("opam" ,opam)))
1593 (propagated-inputs
1594 `(("topkg" ,ocaml-topkg)))
1595 (arguments
1596 `(#:tests? #f
1597 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1598 #:phases
1599 (modify-phases %standard-phases
1600 (delete 'configure))))
1601 (home-page "http://erratique.ch/software/mtime")
1602 (synopsis "Monotonic wall-clock time for OCaml")
1603 (description "Access monotonic wall-clock time. It allows to measure time
1604 spans without being subject to operating system calendar time adjustments.")
1605 (license license:isc)))
1606
1607 (define-public ocaml-cmdliner
1608 (package
1609 (name "ocaml-cmdliner")
1610 (version "1.0.3")
1611 (source (origin
1612 (method url-fetch)
1613 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1614 "cmdliner-" version ".tbz"))
1615 (sha256
1616 (base32
1617 "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"))))
1618 (build-system ocaml-build-system)
1619 (inputs
1620 `(("ocaml-result" ,ocaml-result)))
1621 (native-inputs
1622 `(("ocamlbuild" ,ocamlbuild)))
1623 (arguments
1624 `(#:tests? #f
1625 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
1626 "/lib/ocaml/site-lib/cmdliner"))
1627 #:phases
1628 (modify-phases %standard-phases
1629 (delete 'configure))))
1630 (home-page "http://erratique.ch/software/cmdliner")
1631 (synopsis "Declarative definition of command line interfaces for OCaml")
1632 (description "Cmdliner is a module for the declarative definition of command
1633 line interfaces. It provides a simple and compositional mechanism to convert
1634 command line arguments to OCaml values and pass them to your functions. The
1635 module automatically handles syntax errors, help messages and UNIX man page
1636 generation. It supports programs with single or multiple commands and respects
1637 most of the POSIX and GNU conventions.")
1638 (license license:bsd-3)))
1639
1640 (define-public ocaml-fmt
1641 (package
1642 (name "ocaml-fmt")
1643 (version "0.8.5")
1644 (source
1645 (origin
1646 (method url-fetch)
1647 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1648 version ".tbz"))
1649 (sha256 (base32
1650 "1zj9azcxcn6skmb69ykgmi9z8c50yskwg03wqgh87lypgjdcz060"))))
1651 (build-system ocaml-build-system)
1652 (native-inputs
1653 `(("ocamlbuild" ,ocamlbuild)
1654 ("opam" ,opam)
1655 ("topkg" ,ocaml-topkg)))
1656 (propagated-inputs
1657 `(("result" ,ocaml-result)
1658 ("ocaml-uchar" ,ocaml-uchar)
1659 ("cmdliner" ,ocaml-cmdliner)))
1660 (arguments `(#:tests? #f
1661 #:build-flags (list "build" "--with-base-unix" "true"
1662 "--with-cmdliner" "true")
1663 #:phases
1664 (modify-phases %standard-phases
1665 (delete 'configure))))
1666 (home-page "http://erratique.ch/software/fmt")
1667 (synopsis "OCaml Format pretty-printer combinators")
1668 (description "Fmt exposes combinators to devise Format pretty-printing
1669 functions.")
1670 (license license:isc)))
1671
1672 (define-public ocaml-astring
1673 (package
1674 (name "ocaml-astring")
1675 (version "0.8.3")
1676 (source
1677 (origin
1678 (method url-fetch)
1679 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1680 version ".tbz"))
1681 (sha256 (base32
1682 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1683 (build-system ocaml-build-system)
1684 (native-inputs
1685 `(("ocamlbuild" ,ocamlbuild)
1686 ("opam" ,opam)
1687 ("topkg" ,ocaml-topkg)))
1688 (arguments
1689 `(#:tests? #f
1690 #:build-flags (list "build")
1691 #:phases
1692 (modify-phases %standard-phases
1693 (delete 'configure))))
1694 (home-page "http://erratique.ch/software/astring")
1695 (synopsis "Alternative String module for OCaml")
1696 (description "Astring exposes an alternative String module for OCaml. This
1697 module balances minimality and expressiveness for basic, index-free, string
1698 processing and provides types and functions for substrings, string sets and
1699 string maps. The String module exposed by Astring has exception safe functions,
1700 removes deprecated and rarely used functions, alters some signatures and names,
1701 adds a few missing functions and fully exploits OCaml's newfound string
1702 immutability.")
1703 (license license:isc)))
1704
1705 (define-public ocaml-alcotest
1706 (package
1707 (name "ocaml-alcotest")
1708 (version "0.8.5")
1709 (source (origin
1710 (method url-fetch)
1711 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1712 "download/" version "/alcotest-" version ".tbz"))
1713 (sha256
1714 (base32
1715 "0szwjxvaahgynsx0apj81jxj3ki6yz4is9mh2wkcbx66qy7n6fvb"))))
1716 (build-system dune-build-system)
1717 (arguments
1718 `(#:package "alcotest"
1719 #:test-target "."))
1720 (native-inputs
1721 `(("ocamlbuild" ,ocamlbuild)))
1722 (propagated-inputs
1723 `(("ocaml-astring" ,ocaml-astring)
1724 ("ocaml-cmdliner" ,ocaml-cmdliner)
1725 ("ocaml-fmt" ,ocaml-fmt)
1726 ("ocaml-result" ,ocaml-result)
1727 ("ocaml-uuidm" ,ocaml-uuidm)))
1728 (home-page "https://github.com/mirage/alcotest")
1729 (synopsis "Lightweight OCaml test framework")
1730 (description "Alcotest exposes simple interface to perform unit tests. It
1731 exposes a simple TESTABLE module type, a check function to assert test
1732 predicates and a run function to perform a list of unit -> unit test callbacks.
1733 Alcotest provides a quiet and colorful output where only faulty runs are fully
1734 displayed at the end of the run (with the full logs ready to inspect), with a
1735 simple (yet expressive) query language to select the tests to run.")
1736 (license license:isc)))
1737
1738 (define-public ocaml-ppx-tools
1739 (package
1740 (name "ocaml-ppx-tools")
1741 (version "5.1+4.06.0")
1742 (source
1743 (origin
1744 (method git-fetch)
1745 (uri (git-reference
1746 (url "https://github.com/alainfrisch/ppx_tools.git")
1747 (commit version)))
1748 (file-name (git-file-name name version))
1749 (sha256 (base32
1750 "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"))))
1751 (build-system ocaml-build-system)
1752 (arguments
1753 `(#:phases (modify-phases %standard-phases (delete 'configure))
1754 #:tests? #f))
1755 (properties `((upstream-name . "ppx_tools")))
1756 (home-page "https://github.com/alainfrisch/ppx_tools")
1757 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1758 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1759 (license license:expat)))
1760
1761 (define-public ocaml-react
1762 (package
1763 (name "ocaml-react")
1764 (version "1.2.1")
1765 (source
1766 (origin
1767 (method url-fetch)
1768 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1769 version ".tbz"))
1770 (sha256 (base32
1771 "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"))))
1772 (build-system ocaml-build-system)
1773 (native-inputs
1774 `(("ocamlbuild" ,ocamlbuild)
1775 ("opam" ,opam)
1776 ("ocaml-topkg" ,ocaml-topkg)))
1777 (arguments
1778 `(#:tests? #f
1779 #:build-flags (list "build")
1780 #:phases
1781 (modify-phases %standard-phases
1782 (delete 'configure))))
1783 (home-page "http://erratique.ch/software/react")
1784 (synopsis "Declarative events and signals for OCaml")
1785 (description "React is an OCaml module for functional reactive programming
1786 (FRP). It provides support to program with time varying values: declarative
1787 events and signals. React doesn't define any primitive event or signal, it
1788 lets the client choose the concrete timeline.")
1789 (license license:bsd-3)))
1790
1791 (define-public ocaml-ssl
1792 (package
1793 (name "ocaml-ssl")
1794 (version "0.5.7")
1795 (source
1796 (origin
1797 (method git-fetch)
1798 (uri (git-reference
1799 (url "https://github.com/savonet/ocaml-ssl.git")
1800 (commit version)))
1801 (file-name (git-file-name name version))
1802 (sha256 (base32
1803 "06zxqnwqkvf7pmj5s44jflkknv01czgbi4nbaac0ys1p7rv99y3x"))))
1804 (build-system dune-build-system)
1805 (arguments
1806 `(#:test-target "."))
1807 (native-inputs
1808 `(("autoconf" ,autoconf)
1809 ("automake" ,automake)
1810 ("which" ,which)))
1811 (propagated-inputs `(("openssl" ,openssl)))
1812 (home-page "https://github.com/savonet/ocaml-ssl/")
1813 (synopsis "OCaml bindings for OpenSSL")
1814 (description
1815 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
1816 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
1817 (license license:lgpl2.1)))
1818
1819 (define-public ocaml-lwt
1820 (package
1821 (name "ocaml-lwt")
1822 (version "4.1.0")
1823 (source
1824 (origin
1825 (method url-fetch)
1826 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
1827 ".tar.gz"))
1828 (file-name (string-append name "-" version ".tar.gz"))
1829 (sha256 (base32
1830 "0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp"))))
1831 (build-system dune-build-system)
1832 (arguments
1833 `(#:tests? #f; require lwt_ppx
1834 #:jbuild? #t
1835 #:phases
1836 (modify-phases %standard-phases
1837 (add-before 'build 'configure
1838 (lambda _
1839 (invoke "ocaml" "src/util/configure.ml" "-use-libev" "true")
1840 #t)))))
1841 (native-inputs
1842 `(("ocaml-cppo" ,ocaml-cppo)
1843 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
1844 ("pkg-config" ,pkg-config)
1845 ("ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
1846 (inputs
1847 `(("libev" ,libev)
1848 ("glib" ,glib)))
1849 (propagated-inputs
1850 `(("result" ,ocaml-result)
1851 ("ocaml-ssl" ,ocaml-ssl)
1852 ("ocaml-react" ,ocaml-react)))
1853 (home-page "https://github.com/ocsigen/lwt")
1854 (synopsis "Cooperative threads and I/O in monadic style")
1855 (description "Lwt provides typed, composable cooperative threads. These
1856 make it easy to run normally-blocking I/O operations concurrently in a single
1857 process. Also, in many cases, Lwt threads can interact without the need for
1858 locks or other synchronization primitives.")
1859 (license license:lgpl2.1)))
1860
1861 (define-public ocaml-lwt-log
1862 (package
1863 (name "ocaml-lwt-log")
1864 (version "1.1.0")
1865 (source
1866 (origin
1867 (method url-fetch)
1868 (uri (string-append "https://github.com/aantron/lwt_log/archive/" version
1869 ".tar.gz"))
1870 (file-name (string-append name "-" version ".tar.gz"))
1871 (sha256 (base32
1872 "1lr62j2266pbsi54xmzsfvl2z7fi7smhak7fp1ybl8hssxwi6in2"))))
1873 (build-system dune-build-system)
1874 (arguments
1875 `(#:tests? #f; require lwt_ppx
1876 #:jbuild? #t))
1877 (propagated-inputs
1878 `(("lwt" ,ocaml-lwt)))
1879 (properties `((upstream-name . "lwt_log")))
1880 (home-page "https://github.com/aantron/lwt_log")
1881 (synopsis "Logging library")
1882 (description "This package provides a deprecated logging component for
1883 ocaml lwt.")
1884 (license license:lgpl2.1)))
1885
1886 (define-public ocaml-logs
1887 (package
1888 (name "ocaml-logs")
1889 (version "0.6.2")
1890 (source (origin
1891 (method url-fetch)
1892 (uri (string-append "http://erratique.ch/software/logs/releases/"
1893 "logs-" version ".tbz"))
1894 (sha256
1895 (base32
1896 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
1897 (build-system ocaml-build-system)
1898 (arguments
1899 `(#:tests? #f
1900 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1901 #:phases
1902 (modify-phases %standard-phases
1903 (delete 'configure))))
1904 (native-inputs
1905 `(("ocamlbuild" ,ocamlbuild)
1906 ("opam" ,opam)))
1907 (propagated-inputs
1908 `(("fmt" ,ocaml-fmt)
1909 ("lwt" ,ocaml-lwt)
1910 ("mtime" ,ocaml-mtime)
1911 ("result" ,ocaml-result)
1912 ("cmdliner" ,ocaml-cmdliner)
1913 ("topkg" ,ocaml-topkg)))
1914 (home-page "http://erratique.ch/software/logs")
1915 (synopsis "Logging infrastructure for OCaml")
1916 (description "Logs provides a logging infrastructure for OCaml. Logging is
1917 performed on sources whose reporting level can be set independently. Log
1918 message report is decoupled from logging and is handled by a reporter.")
1919 (license license:isc)))
1920
1921 (define-public ocaml-fpath
1922 (package
1923 (name "ocaml-fpath")
1924 (version "0.7.2")
1925 (source (origin
1926 (method url-fetch)
1927 (uri (string-append "http://erratique.ch/software/fpath/releases/"
1928 "fpath-" version ".tbz"))
1929 (sha256
1930 (base32
1931 "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
1932 (build-system ocaml-build-system)
1933 (arguments
1934 `(#:tests? #f
1935 #:build-flags (list "build")
1936 #:phases
1937 (modify-phases %standard-phases
1938 (delete 'configure))))
1939 (native-inputs
1940 `(("ocamlbuild" ,ocamlbuild)
1941 ("opam" ,opam)))
1942 (propagated-inputs
1943 `(("topkg" ,ocaml-topkg)
1944 ("astring" ,ocaml-astring)))
1945 (home-page "http://erratique.ch/software/fpath")
1946 (synopsis "File system paths for OCaml")
1947 (description "Fpath is an OCaml module for handling file system paths with
1948 POSIX or Windows conventions. Fpath processes paths without accessing the
1949 file system and is independent from any system library.")
1950 (license license:isc)))
1951
1952 (define-public ocaml-bos
1953 (package
1954 (name "ocaml-bos")
1955 (version "0.2.0")
1956 (source (origin
1957 (method url-fetch)
1958 (uri (string-append "http://erratique.ch/software/bos/releases/"
1959 "bos-" version ".tbz"))
1960 (sha256
1961 (base32
1962 "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"))))
1963 (build-system ocaml-build-system)
1964 (arguments
1965 `(#:tests? #f
1966 #:build-flags (list "build")
1967 #:phases
1968 (modify-phases %standard-phases
1969 (delete 'configure))))
1970 (native-inputs
1971 `(("ocamlbuild" ,ocamlbuild)
1972 ("opam" ,opam)))
1973 (propagated-inputs
1974 `(("topkg" ,ocaml-topkg)
1975 ("astring" ,ocaml-astring)
1976 ("fmt" ,ocaml-fmt)
1977 ("fpath" ,ocaml-fpath)
1978 ("logs" ,ocaml-logs)
1979 ("rresult" ,ocaml-rresult)))
1980 (home-page "http://erratique.ch/software/bos")
1981 (synopsis "Basic OS interaction for OCaml")
1982 (description "Bos provides support for basic and robust interaction with
1983 the operating system in OCaml. It has functions to access the process
1984 environment, parse command line arguments, interact with the file system and
1985 run command line programs.")
1986 (license license:isc)))
1987
1988 (define-public ocaml-xmlm
1989 (package
1990 (name "ocaml-xmlm")
1991 (version "1.3.0")
1992 (source (origin
1993 (method url-fetch)
1994 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
1995 "xmlm-" version ".tbz"))
1996 (sha256
1997 (base32
1998 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
1999 (build-system ocaml-build-system)
2000 (arguments
2001 `(#:tests? #f
2002 #:build-flags (list "build")
2003 #:phases
2004 (modify-phases %standard-phases
2005 (delete 'configure))))
2006 (native-inputs
2007 `(("ocamlbuild" ,ocamlbuild)
2008 ("ocaml-topkg" ,ocaml-topkg)
2009 ("opam" ,opam)))
2010 (home-page "http://erratique.ch/software/xmlm")
2011 (synopsis "Streaming XML codec for OCaml")
2012 (description "Xmlm is a streaming codec to decode and encode the XML data
2013 format. It can process XML documents without a complete in-memory
2014 representation of the data.")
2015 (license license:isc)))
2016
2017 (define-public ocaml-ulex
2018 (package
2019 (name "ocaml-ulex")
2020 (version "1.2")
2021 (source
2022 (origin
2023 (method git-fetch)
2024 (uri (git-reference
2025 (url "https://github.com/whitequark/ulex.git")
2026 (commit (string-append "v" version))))
2027 (file-name (git-file-name name version))
2028 (sha256
2029 (base32 "08yf2x9a52l2y4savjqfjd2xy4pjd1rpla2ylrr9qrz1drpfw4ic"))))
2030 (build-system ocaml-build-system)
2031 (arguments
2032 `(#:phases (modify-phases %standard-phases (delete 'configure))
2033 #:tests? #f
2034 #:make-flags
2035 (list "all.opt"
2036 (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
2037 "-cflags -I," (assoc-ref %build-inputs "camlp4")
2038 "/lib/ocaml/site-lib/camlp4"))))
2039 (native-inputs
2040 `(("camlp4" ,camlp4)
2041 ("ocamlbuild" ,ocamlbuild)))
2042 (home-page "http://www.cduce.org/download.html#side")
2043 (synopsis "Lexer generator for Unicode and OCaml")
2044 (description "Lexer generator for Unicode and OCaml.")
2045 (license license:expat)))
2046
2047 (define-public ocaml-uchar
2048 (package
2049 (name "ocaml-uchar")
2050 (version "0.0.2")
2051 (source
2052 (origin
2053 (method url-fetch)
2054 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2055 version "/uchar-" version ".tbz"))
2056 (sha256 (base32
2057 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
2058 (build-system ocaml-build-system)
2059 (arguments
2060 `(#:tests? #f
2061 #:build-flags (list "native=true" "native-dynlink=true")
2062 #:phases
2063 (modify-phases %standard-phases
2064 (delete 'configure))))
2065 (native-inputs
2066 `(("ocamlbuild" ,ocamlbuild)
2067 ("opam" ,opam)))
2068 (home-page "https://github.com/ocaml/uchar")
2069 (synopsis "Compatibility library for OCaml's Uchar module")
2070 (description "The uchar package provides a compatibility library for the
2071 `Uchar` module introduced in OCaml 4.03.")
2072 (license license:lgpl2.1)))
2073
2074 (define-public ocaml-uutf
2075 (package
2076 (name "ocaml-uutf")
2077 (version "1.0.1")
2078 (source (origin
2079 (method url-fetch)
2080 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2081 "uutf-" version ".tbz"))
2082 (sha256
2083 (base32
2084 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
2085 (build-system ocaml-build-system)
2086 (arguments
2087 `(#:tests? #f
2088 #:build-flags (list "build")
2089 #:phases
2090 (modify-phases %standard-phases
2091 (delete 'configure))))
2092 (native-inputs
2093 `(("ocamlbuild" ,ocamlbuild)
2094 ("opam" ,opam)
2095 ("topkg" ,ocaml-topkg)))
2096 (propagated-inputs
2097 `(("uchar" ,ocaml-uchar)
2098 ("cmdliner" ,ocaml-cmdliner)))
2099 (home-page "http://erratique.ch/software/uutf")
2100 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2101 (description "Uutf is a non-blocking streaming codec to decode and encode
2102 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2103 work character by character without blocking on IO. Decoders perform character
2104 position tracking and support newline normalization.
2105
2106 Functions are also provided to fold over the characters of UTF encoded OCaml
2107 string values and to directly encode characters in OCaml Buffer.t values.")
2108 (license license:isc)))
2109
2110 (define-public ocaml-jsonm
2111 (package
2112 (name "ocaml-jsonm")
2113 (version "1.0.1")
2114 (source (origin
2115 (method url-fetch)
2116 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2117 "jsonm-" version ".tbz"))
2118 (sha256
2119 (base32
2120 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
2121 (build-system ocaml-build-system)
2122 (arguments
2123 `(#:tests? #f
2124 #:build-flags (list "build")
2125 #:phases
2126 (modify-phases %standard-phases
2127 (delete 'configure))))
2128 (native-inputs
2129 `(("ocamlbuild" ,ocamlbuild)
2130 ("opam" ,opam)
2131 ("topkg" ,ocaml-topkg)))
2132 (propagated-inputs
2133 `(("uutf" ,ocaml-uutf)
2134 ("cmdliner" ,ocaml-cmdliner)))
2135 (home-page "http://erratique.ch/software/jsonm")
2136 (synopsis "Non-blocking streaming JSON codec for OCaml")
2137 (description "Jsonm is a non-blocking streaming codec to decode and encode
2138 the JSON data format. It can process JSON text without blocking on IO and
2139 without a complete in-memory representation of the data.")
2140 (license license:isc)))
2141
2142 (define-public ocaml-ocurl
2143 (package
2144 (name "ocaml-ocurl")
2145 (version "0.8.2")
2146 (source (origin
2147 (method url-fetch)
2148 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2149 version ".tar.gz"))
2150 (sha256
2151 (base32
2152 "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"))))
2153 (build-system ocaml-build-system)
2154 (arguments
2155 `(#:phases
2156 (modify-phases %standard-phases
2157 (add-before 'configure 'fix-/bin/sh
2158 (lambda* (#:key inputs #:allow-other-keys)
2159 (substitute* "configure"
2160 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2161 (native-inputs
2162 `(("pkg-config" ,pkg-config)))
2163 (inputs `(("curl" ,curl)))
2164 (home-page "http://ocurl.forge.ocamlcore.org/")
2165 (synopsis "OCaml bindings for libcurl")
2166 (description "Client-side URL transfer library, supporting HTTP and a
2167 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2168 (license license:isc)))
2169
2170 (define-public ocaml-base64
2171 (package
2172 (name "ocaml-base64")
2173 (version "3.2.0")
2174 (source (origin
2175 (method git-fetch)
2176 (uri (git-reference
2177 (url "https://github.com/mirage/ocaml-base64")
2178 (commit (string-append "v" version))))
2179 (file-name (git-file-name name version))
2180 (sha256
2181 (base32
2182 "1ilw3zj0w6cq7i4pvr8m2kv5l5f2y9aldmv72drlwwns013b1gwy"))))
2183 (build-system dune-build-system)
2184 (native-inputs
2185 `(("ocaml-alcotest" ,ocaml-alcotest)
2186 ("ocaml-bos" ,ocaml-bos)
2187 ("ocaml-rresult" ,ocaml-rresult)))
2188 (home-page "https://github.com/mirage/ocaml-base64")
2189 (synopsis "Base64 encoding for OCaml")
2190 (description "Base64 is a group of similar binary-to-text encoding schemes
2191 that represent binary data in an ASCII string format by translating it into a
2192 radix-64 representation. It is specified in RFC 4648.")
2193 (license license:isc)))
2194
2195 (define-public ocamlify
2196 (package
2197 (name "ocamlify")
2198 (version "0.0.1")
2199 (source (origin
2200 (method url-fetch)
2201 (uri "https://download.ocamlcore.org/ocamlify/ocamlify/0.0.1/ocamlify-0.0.1.tar.gz")
2202 (sha256
2203 (base32
2204 "1j9nb3vjqbdsx3d6jazixgrh776051zkrc06nsc5q5ilp1jhrwkm"))))
2205 (build-system ocaml-build-system)
2206 ; tests are done during build
2207 (arguments
2208 `(#:phases
2209 (modify-phases %standard-phases
2210 (delete 'check)
2211 (replace 'configure
2212 (lambda* (#:key outputs #:allow-other-keys)
2213 (invoke "ocaml" "setup.ml" "-configure" "--prefix"
2214 (assoc-ref outputs "out")))))))
2215 (native-inputs
2216 `(("ocamlbuild" ,ocamlbuild)))
2217 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2218 (synopsis "Include files in OCaml code")
2219 (description "OCamlify allows to create OCaml source code by including
2220 whole files into OCaml string or string list. The code generated can be
2221 compiled as a standard OCaml file. It allows embedding external resources as
2222 OCaml code.")
2223 (license license:lgpl2.1+))); with the OCaml static compilation exception
2224
2225 (define-public omake
2226 (package
2227 (name "omake")
2228 (version "0.10.3")
2229 (source (origin
2230 (method url-fetch)
2231 (uri (string-append "http://download.camlcity.org/download/"
2232 "omake-" version ".tar.gz"))
2233 (sha256
2234 (base32
2235 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
2236 (patches (search-patches "omake-fix-non-determinism.patch"))))
2237 (build-system ocaml-build-system)
2238 (arguments
2239 `(#:make-flags
2240 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2241 #:tests? #f ; no test target
2242 #:phases
2243 (modify-phases %standard-phases
2244 (add-before 'configure 'fix-makefile
2245 (lambda* (#:key outputs #:allow-other-keys)
2246 (substitute* "mk/osconfig_unix.mk"
2247 (("CC = cc") "CC = gcc")))))))
2248 (native-inputs `(("hevea" ,hevea)))
2249 (home-page "http://projects.camlcity.org/projects/omake.html")
2250 (synopsis "Build system designed for scalability and portability")
2251 (description "Similar to make utilities you may have used, but it features
2252 many additional enhancements, including:
2253
2254 @enumerate
2255 @item Support for projects spanning several directories or directory hierarchies.
2256 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2257 with full support for incremental builds.
2258 @item Dependency analysis takes the command lines into account — whenever the
2259 command line used to build a target changes, the target is considered
2260 out-of-date.
2261 @item Fully scriptable, includes a library that providing support for standard
2262 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2263 @end enumerate")
2264 (license (list license:lgpl2.1 ; libmojave
2265 license:expat ; OMake scripts
2266 license:gpl2)))) ; OMake itself, with ocaml linking exception
2267 ; see LICENSE.OMake
2268
2269 (define-public ocaml-batteries
2270 (package
2271 (name "ocaml-batteries")
2272 (version "2.9.0")
2273 (source (origin
2274 (method url-fetch)
2275 (uri (string-append "https://github.com/ocaml-batteries-team/"
2276 "batteries-included/releases/download/v"
2277 version "/batteries-" version ".tar.gz"))
2278 (sha256
2279 (base32
2280 "0lkdmv2my5hirkswmci2cch341n6wkkj2q8apjhs83sg6528caxi"))))
2281 (build-system ocaml-build-system)
2282 (native-inputs
2283 `(("ocamlbuild" ,ocamlbuild)
2284 ("qtest" ,ocaml-qtest)
2285 ("bisect" ,ocaml-bisect)
2286 ("ounit" ,ocaml-ounit)))
2287 (propagated-inputs
2288 `(("ocaml-num" ,ocaml-num)))
2289 (arguments
2290 `(#:phases
2291 (modify-phases %standard-phases
2292 (delete 'check) ; tests are run by the build phase
2293 (replace 'build
2294 (lambda* (#:key inputs outputs #:allow-other-keys)
2295 (let ((files
2296 (map (lambda (str)
2297 (substring str 0 (- (string-length str) 1)))
2298 (append
2299 (find-files "src" ".*.mliv")
2300 (find-files "src" ".*.mlv")
2301 (find-files "src" ".*.mlp")))))
2302 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2303 "-lflag" "-dllpath-all" files)
2304 (for-each (lambda (file)
2305 (copy-file (string-append "_build/" file) file))
2306 files))
2307 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2308 "-lflag" "-dllpath-all" "build/mkconf.byte")
2309 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2310 (invoke "make" "all")
2311 #t)))))
2312 (home-page "http://batteries.forge.ocamlcore.org/")
2313 (synopsis "Development platform for the OCaml programming language")
2314 (description "Define a standard set of libraries which may be expected on
2315 every compliant installation of OCaml and organize these libraries into a
2316 hierarchy of modules.")
2317 (license license:lgpl2.1+)))
2318
2319 (define-public ocaml-pcre
2320 (package
2321 (name "ocaml-pcre")
2322 (version "7.4.1")
2323 (source (origin
2324 (method git-fetch)
2325 (uri (git-reference
2326 (url "https://github.com/mmottl/pcre-ocaml")
2327 (commit version)))
2328 (file-name (git-file-name name version))
2329 (sha256
2330 (base32
2331 "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
2332 (build-system dune-build-system)
2333 (arguments
2334 `(#:test-target "."))
2335 (native-inputs
2336 `(("ocaml-base" ,ocaml-base)
2337 ("pcre:bin" ,pcre "bin")))
2338 (propagated-inputs `(("pcre" ,pcre)))
2339 (home-page "https://mmottl.github.io/pcre-ocaml")
2340 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2341 (description "Pcre-ocaml offers library functions for string pattern
2342 matching and substitution, similar to the functionality offered by the Perl
2343 language.")
2344 (license license:lgpl2.1+))); with the OCaml link exception
2345
2346 (define-public ocaml-expect
2347 (package
2348 (name "ocaml-expect")
2349 (version "0.0.6")
2350 (source (origin
2351 (method url-fetch)
2352 (uri (ocaml-forge-uri name version 1736))
2353 (sha256
2354 (base32
2355 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2356 (arguments
2357 `(#:tests? #f))
2358 (build-system ocaml-build-system)
2359 (native-inputs
2360 `(("ocamlbuild" ,ocamlbuild)
2361 ("ocaml-num" ,ocaml-num)
2362 ("ocaml-pcre" ,ocaml-pcre)
2363 ("ounit" ,ocaml-ounit)))
2364 (propagated-inputs `(("batteries" ,ocaml-batteries)))
2365 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2366 (synopsis "Simple implementation of expect")
2367 (description "Help building unitary testing of interactive program. You
2368 can match the question using a regular expression or a timeout.")
2369 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2370
2371 (define-public ocaml-fileutils
2372 (package
2373 (name "ocaml-fileutils")
2374 (version "0.5.3")
2375 (source (origin
2376 (method url-fetch)
2377 (uri (ocaml-forge-uri name version 1728))
2378 (sha256
2379 (base32
2380 "1rc4cqlvdhbs55i85zfbfhz938fsy4fj6kwlkfm3ra7bpwn8bmpd"))))
2381 (build-system ocaml-build-system)
2382 (native-inputs
2383 `(("ocamlbuild" ,ocamlbuild)
2384 ("ounit" ,ocaml-ounit)))
2385 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2386 (synopsis "Pure OCaml functions to manipulate real file and filename")
2387 (description "Library to provide pure OCaml functions to manipulate real
2388 file (POSIX like) and filename.")
2389 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2390
2391 (define-public ocaml-oasis
2392 (package
2393 (name "ocaml-oasis")
2394 (version "0.4.11")
2395 (source (origin
2396 (method url-fetch)
2397 (uri (ocaml-forge-uri name version 1757))
2398 (sha256
2399 (base32
2400 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
2401 (modules '((guix build utils)))
2402 (snippet
2403 '(begin
2404 (substitute* "test/test-main/Test.ml"
2405 ;; most of these tests fail because ld cannot find crti.o, but according
2406 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
2407 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
2408 (("TestBaseCompat.tests;") "")
2409 (("TestExamples.tests;") "")
2410 (("TestFull.tests;") "")
2411 (("TestPluginDevFiles.tests;") "")
2412 (("TestPluginInternal.tests;") "")
2413 (("TestPluginOCamlbuild.tests;") "")
2414 (("TestPluginOMake.tests;") ""))
2415 #t))))
2416 (build-system ocaml-build-system)
2417 (arguments
2418 `(#:tests? #f))
2419 (native-inputs
2420 `(("ocamlbuild" ,ocamlbuild)
2421 ("ocamlify" ,ocamlify)
2422 ("ocamlmod" ,ocamlmod)))
2423 (home-page "https://oasis.forge.ocamlcore.org")
2424 (synopsis "Integrates a configure, build, install system in OCaml projects")
2425 (description "OASIS is a tool to integrate a configure, build and install
2426 system in your OCaml projects. It helps to create standard entry points in your
2427 build system and allows external tools to analyse your project easily.")
2428 (license license:lgpl2.1+))) ; with ocaml static compilation exception
2429
2430 (define-public ocaml-js-build-tools
2431 (package
2432 (name "ocaml-js-build-tools")
2433 (version "113.33.06")
2434 (source (janestreet-origin "js-build-tools" version
2435 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2436 (native-inputs
2437 `(("oasis" ,ocaml-oasis)
2438 ("ocamlbuild" ,ocamlbuild)
2439 ("opam" ,opam)))
2440 (build-system ocaml-build-system)
2441 (arguments janestreet-arguments)
2442 (home-page "https://github.com/janestreet/js-build-tools")
2443 (synopsis "Collection of tools to help building Jane Street Packages")
2444 (description "This package contains tools to help building Jane Street
2445 packages, but can be used for other purposes. It contains:
2446 @enumerate
2447 @item an @command{oasis2opam-install} tool to produce a @file{.install} file
2448 from the oasis build log
2449 @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2450 @end enumerate")
2451 (license license:asl2.0)))
2452
2453 (define-public ocaml-cppo
2454 (package
2455 (name "ocaml-cppo")
2456 (version "1.6.5")
2457 (source
2458 (origin
2459 (method url-fetch)
2460 (uri (string-append "https://github.com/mjambon/cppo/archive/v" version
2461 ".tar.gz"))
2462 (sha256 (base32
2463 "1dkm3d5h6h56y937gcdk2wixlpzl59vv5pmiafglr89p20kf7gqf"))
2464 (file-name (string-append name "-" version ".tar.gz"))))
2465 (build-system dune-build-system)
2466 (arguments
2467 `(#:tests? #f
2468 #:build-flags (list "--profile" "release")))
2469 (native-inputs
2470 `(("ocamlbuild" ,ocamlbuild)))
2471 (home-page "https://github.com/mjambon/cppo")
2472 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2473 (description "Cppo is an equivalent of the C preprocessor for OCaml
2474 programs. It allows the definition of simple macros and file inclusion. Cpp ois:
2475 @enumerate
2476 @item more OCaml-friendly than cpp
2477 @item easy to learn without consulting a manual
2478 @item reasonably fast
2479 @item simple to install and to maintain.
2480 @end enumerate")
2481 (license license:bsd-3)))
2482
2483 (define-public ocaml-seq
2484 (package
2485 (name "ocaml-seq")
2486 (version "0.1")
2487 (source
2488 (origin
2489 (method git-fetch)
2490 (uri (git-reference
2491 (url "https://github.com/c-cube/seq.git")
2492 (commit version)))
2493 (file-name (git-file-name name version))
2494 (sha256
2495 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
2496 (build-system ocaml-build-system)
2497 (arguments
2498 `(#:tests? #f
2499 #:phases
2500 (modify-phases %standard-phases
2501 (delete 'configure)
2502 (delete 'build)
2503 (replace 'install
2504 (lambda* (#:key outputs #:allow-other-keys)
2505 (let ((install-dir (string-append (assoc-ref outputs "out")
2506 "/lib/ocaml/site-lib/seq")))
2507 (mkdir-p install-dir)
2508 (with-output-to-file (string-append install-dir "/META")
2509 (lambda _
2510 (display "name=\"seq\"
2511 version=\"[distributed with ocaml]\"
2512 description=\"dummy package for compatibility\"
2513 requires=\"\"")))
2514 #t))))))
2515 (home-page "https://github.com/c-cube/seq")
2516 (synopsis "OCaml's standard iterator type")
2517 (description "This package is a compatibility package for OCaml's
2518 standard iterator type starting from 4.07.")
2519 (license license:lgpl2.1+)))
2520
2521 (define-public ocaml-re
2522 (package
2523 (name "ocaml-re")
2524 (version "1.9.0")
2525 (source
2526 (origin
2527 (method git-fetch)
2528 (uri (git-reference
2529 (url "https://github.com/ocaml/ocaml-re.git")
2530 (commit version)))
2531 (file-name (git-file-name name version))
2532 (sha256
2533 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
2534 (build-system dune-build-system)
2535 (arguments
2536 `(#:tests? #f
2537 #:build-flags (list "--profile" "release")))
2538 (propagated-inputs
2539 `(("ocaml-seq" ,ocaml-seq)))
2540 (native-inputs
2541 `(("ounit" ,ocaml-ounit)))
2542 (home-page "https://github.com/ocaml/ocaml-re/")
2543 (synopsis "Regular expression library for OCaml")
2544 (description "Pure OCaml regular expressions with:
2545 @enumerate
2546 @item Perl-style regular expressions (module Re_perl)
2547 @item Posix extended regular expressions (module Re_posix)
2548 @item Emacs-style regular expressions (module Re_emacs)
2549 @item Shell-style file globbing (module Re_glob)
2550 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
2551 @end enumerate")
2552 (license license:expat)))
2553
2554 (define-public ocaml-ocplib-endian
2555 (package
2556 (name "ocaml-ocplib-endian")
2557 (version "1.0")
2558 (source (origin
2559 (method url-fetch)
2560 (uri (string-append "https://github.com/OCamlPro/ocplib-endian/"
2561 "archive/" version ".tar.gz"))
2562 (sha256
2563 (base32
2564 "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))
2565 (file-name (string-append name "-" version ".tar.gz"))))
2566 (build-system ocaml-build-system)
2567 (native-inputs
2568 `(("cppo" ,ocaml-cppo)
2569 ("ocamlbuild" ,ocamlbuild)))
2570 (home-page "https://github.com/OCamlPro/ocplib-endian")
2571 (synopsis "Optimised functions to read and write int16/32/64 from strings
2572 and bigarrays")
2573 (description "Optimised functions to read and write int16/32/64 from strings
2574 and bigarrays, based on new primitives added in version 4.01. It works on
2575 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
2576 big- and little-endian, with their unsafe counter-parts.")
2577 (license license:lgpl2.1)))
2578
2579 (define-public ocaml-cstruct
2580 (package
2581 (name "ocaml-cstruct")
2582 (version "4.0.0")
2583 (source (origin
2584 (method git-fetch)
2585 (uri (git-reference
2586 (url "https://github.com/mirage/ocaml-cstruct")
2587 (commit (string-append "v" version))))
2588 (sha256
2589 (base32
2590 "0m4bz0digcsc8l2msfikwcbi1y371kccx6xnkwrz212mf5mp98bv"))))
2591 (build-system dune-build-system)
2592 (arguments
2593 `(#:package "cstruct"
2594 #:test-target "."))
2595 (native-inputs
2596 `(("ocaml-alcotest" ,ocaml-alcotest)))
2597 (home-page "https://github.com/mirage/ocaml-cstruct")
2598 (synopsis "Access C structures via a camlp4 extension")
2599 (description "Cstruct is a library and syntax extension to make it easier
2600 to access C-like structures directly from OCaml. It supports both reading and
2601 writing to these structures, and they are accessed via the Bigarray module.")
2602 (license license:isc)))
2603
2604 (define-public ocaml-hex
2605 (package
2606 (name "ocaml-hex")
2607 (version "1.4.0")
2608 (source (origin
2609 (method git-fetch)
2610 (uri (git-reference
2611 (url "https://github.com/mirage/ocaml-hex")
2612 (commit (string-append "v" version))))
2613 (file-name (git-file-name name version))
2614 (sha256
2615 (base32
2616 "0c8nhibcwy0ykzca4jn3gqb8ylq21ff88y82gl60wyzijr64rn0q"))))
2617 (build-system dune-build-system)
2618 (arguments
2619 `(#:test-target "."))
2620 (propagated-inputs
2621 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
2622 ("cstruct" ,ocaml-cstruct)))
2623 (home-page "https://github.com/mirage/ocaml-hex/")
2624 (synopsis "Minimal library providing hexadecimal converters")
2625 (description "Hex is a minimal library providing hexadecimal converters.")
2626 (license license:isc)))
2627
2628 (define-public ocaml-ezjsonm
2629 (package
2630 (name "ocaml-ezjsonm")
2631 (version "1.1.0")
2632 (source
2633 (origin
2634 (method git-fetch)
2635 (uri (git-reference
2636 (url "https://github.com/mirage/ezjsonm.git")
2637 (commit (string-append "v" version))))
2638 (file-name (git-file-name name version))
2639 (sha256
2640 (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
2641 (build-system dune-build-system)
2642 (arguments
2643 `(#:package "ezjsonm"
2644 #:test-target "."))
2645 (native-inputs
2646 `(("ocaml-alcotest" ,ocaml-alcotest)))
2647 (propagated-inputs
2648 `(("ocaml-hex" ,ocaml-hex)
2649 ("ocaml-jsonm" ,ocaml-jsonm)
2650 ("ocaml-sexplib" ,ocaml-sexplib)))
2651 (home-page "https://github.com/mirage/ezjsonm/")
2652 (synopsis "Read and write JSON data")
2653 (description "Ezjsonm provides more convenient (but far less flexible) input
2654 and output functions that go to and from [string] values than jsonm. This avoids
2655 the need to write signal code, which is useful for quick scripts that manipulate
2656 JSON.")
2657 (license license:isc)))
2658
2659 (define-public ocaml-uri
2660 (package
2661 (name "ocaml-uri")
2662 (version "2.2.0")
2663 (source
2664 (origin
2665 (method git-fetch)
2666 (uri (git-reference
2667 (url "https://github.com/mirage/ocaml-uri.git")
2668 (commit (string-append "v" version))))
2669 (file-name (git-file-name name version))
2670 (sha256
2671 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
2672 (build-system dune-build-system)
2673 (arguments
2674 `(#:test-target "."
2675 #:phases
2676 (modify-phases %standard-phases
2677 (add-before 'build 'update-deprecated
2678 (lambda _
2679 (substitute* "lib/uri.ml"
2680 (("Re.get") "Re.Group.get")))))))
2681 (native-inputs
2682 `(("ocaml-ounit" ,ocaml-ounit)
2683 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)))
2684 (propagated-inputs
2685 `(("ocaml-re" ,ocaml-re)
2686 ("ocaml-sexplib0" ,ocaml-sexplib0)
2687 ("ocaml-stringext" ,ocaml-stringext)))
2688 (home-page "https://github.com/mirage/ocaml-uri")
2689 (synopsis "RFC3986 URI/URL parsing library")
2690 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
2691 (license license:isc)))
2692
2693 (define-public ocaml-easy-format
2694 (package
2695 (name "ocaml-easy-format")
2696 (version "1.3.1")
2697 (source (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/mjambon/easy-format")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
2704 (base32
2705 "0jfncci15b8sf1y72yrxfjlsmhs9aavcd14vwz4d7kj8k9w9c4qk"))))
2706 (build-system dune-build-system)
2707 (arguments
2708 `(#:jbuild? #t))
2709 (home-page "https://github.com/mjambon/easy-format")
2710 (synopsis "Interface to the Format module")
2711 (description "Easy-format is a high-level and functional interface to the
2712 Format module of the OCaml standard library.")
2713 (license license:bsd-3)))
2714
2715 (define-public ocaml-piqilib
2716 (package
2717 (name "ocaml-piqilib")
2718 (version "0.6.14")
2719 (source
2720 (origin
2721 (method git-fetch)
2722 (uri (git-reference
2723 (url "https://github.com/alavrik/piqi.git")
2724 (commit (string-append "v" version))))
2725 (file-name (git-file-name name version))
2726 (sha256
2727 (base32 "0lyqllmfsxmwlg7qidy92kvxi9n39lvachmydcyi81f8p07ykd2d"))
2728 (patches
2729 (search-patches "ocaml-piqilib-Update-base64.patch"))))
2730 (build-system ocaml-build-system)
2731 (arguments
2732 `(#:phases
2733 (modify-phases %standard-phases
2734 (add-before 'configure 'fix-ocamlpath
2735 (lambda _
2736 (substitute* '("Makefile" "make/Makefile.ocaml")
2737 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
2738 #t))
2739 (replace 'configure
2740 (lambda* (#:key outputs #:allow-other-keys)
2741 (let ((out (assoc-ref outputs "out")))
2742 (substitute* "make/OCamlMakefile"
2743 (("/bin/sh") (which "bash")))
2744 (invoke "./configure" "--prefix" out "--ocaml-libdir"
2745 (string-append out "/lib/ocaml/site-lib")))
2746 #t))
2747 (add-after 'build 'build-ocaml
2748 (lambda* (#:key outputs #:allow-other-keys)
2749 (invoke "make" "ocaml")
2750 #t))
2751 (add-after 'install 'install-ocaml
2752 (lambda* (#:key outputs #:allow-other-keys)
2753 (invoke "make" "ocaml-install")
2754 #t))
2755 (add-after 'install-ocaml 'link-stubs
2756 (lambda* (#:key outputs #:allow-other-keys)
2757 (let* ((out (assoc-ref outputs "out"))
2758 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
2759 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
2760 (mkdir-p stubs)
2761 (symlink (string-append lib "/dllpiqilib_stubs.so")
2762 (string-append stubs "/dllpiqilib_stubs.so"))
2763 #t))))))
2764 (native-inputs
2765 `(("which" ,which)
2766 ("camlp4" ,camlp4)))
2767 (propagated-inputs
2768 `(("xmlm" ,ocaml-xmlm)
2769 ("ulex" ,ocaml-ulex)
2770 ("easy-format" ,ocaml-easy-format)
2771 ("base64" ,ocaml-base64)))
2772 (home-page "http://piqi.org")
2773 (synopsis "Data serialization and conversion library")
2774 (description "Piqilib is the common library used by the piqi command-line
2775 tool and piqi-ocaml.")
2776 (license license:asl2.0)))
2777
2778 (define-public ocaml-uuidm
2779 (package
2780 (name "ocaml-uuidm")
2781 (version "0.9.6")
2782 (source (origin
2783 (method url-fetch)
2784 (uri (string-append "http://erratique.ch/software/uuidm/"
2785 "releases/uuidm-" version ".tbz"))
2786 (sha256
2787 (base32
2788 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
2789 (build-system ocaml-build-system)
2790 (arguments
2791 `(#:build-flags
2792 (list "build" "--tests" "true" "--with-cmdliner" "true")
2793 #:phases
2794 (modify-phases %standard-phases
2795 (delete 'configure))))
2796 (native-inputs
2797 `(("ocamlbuild" ,ocamlbuild)
2798 ("opam" ,opam)))
2799 (propagated-inputs
2800 `(("cmdliner" ,ocaml-cmdliner)
2801 ("topkg" ,ocaml-topkg)))
2802 (home-page "http://erratique.ch/software/uuidm")
2803 (synopsis "Universally unique identifiers for OCaml")
2804 (description "Uuidm is an OCaml module implementing 128 bits universally
2805 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
2806 and 4 (random based) according to RFC 4122.")
2807 (license license:isc)))
2808
2809 (define-public ocaml-graph
2810 (package
2811 (name "ocaml-graph")
2812 (version "1.8.8")
2813 (source (origin
2814 (method url-fetch)
2815 (uri (string-append "http://ocamlgraph.lri.fr/download/"
2816 "ocamlgraph-" version ".tar.gz"))
2817 (sha256
2818 (base32
2819 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
2820 (build-system ocaml-build-system)
2821 (arguments
2822 `(#:install-target "install-findlib"
2823 #:tests? #f
2824 #:phases
2825 (modify-phases %standard-phases
2826 (add-before 'configure 'set-shell
2827 (lambda* (#:key inputs #:allow-other-keys)
2828 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
2829 "/bin/sh")))))))
2830 (inputs `(("lablgtk" ,lablgtk)))
2831 (properties `((upstream-name . "ocamlgraph")))
2832 (home-page "http://ocamlgraph.lri.fr/")
2833 (synopsis "Graph library for OCaml")
2834 (description "OCamlgraph is a generic graph library for OCaml.")
2835 (license license:lgpl2.1)))
2836
2837 (define-public ocaml-piqi
2838 (package
2839 (name "ocaml-piqi")
2840 (version "0.7.6")
2841 (source (origin
2842 (method url-fetch)
2843 (uri (string-append "https://github.com/alavrik/piqi-ocaml/"
2844 "archive/v" version ".tar.gz"))
2845 (file-name (string-append name "-" version ".tar.gz"))
2846 (sha256
2847 (base32
2848 "0da0v2v28aj65b0cwpvvmcqyrfvz94pp3j5zgfdr1jrl5s37c21g"))))
2849 (build-system ocaml-build-system)
2850 (arguments
2851 `(#:make-flags
2852 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
2853 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
2854 "/bin/sh"))
2855 #:phases
2856 (modify-phases %standard-phases
2857 (delete 'configure))))
2858 (native-inputs
2859 `(("which" ,which)
2860 ("camlp4" ,camlp4)
2861 ("protobuf" ,protobuf))) ; for tests
2862 (propagated-inputs
2863 `(("num" ,ocaml-num)
2864 ("piqilib" ,ocaml-piqilib)))
2865 (home-page "https://github.com/alavrik/piqi-ocaml")
2866 (synopsis "Protocol serialization system for OCaml")
2867 (description "Piqi is a multi-format data serialization system for OCaml.
2868 It provides a uniform interface for serializing OCaml data structures to JSON,
2869 XML and Protocol Buffers formats.")
2870 (license license:asl2.0)))
2871
2872 (define-public bap
2873 (package
2874 (name "bap")
2875 (version "1.6.0")
2876 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
2877 (source (origin
2878 (method git-fetch)
2879 (uri (git-reference
2880 (url home-page)
2881 (commit (string-append "v" version))))
2882 (file-name (git-file-name name version))
2883 (sha256
2884 (base32
2885 "0ryf2xb37pj2f9mc3p5prqgqrylph9qgq7q9jnbx8b03nzzpa6h6"))))
2886 (build-system ocaml-build-system)
2887 (native-inputs
2888 `(("ocaml-oasis" ,ocaml-oasis)
2889 ("clang" ,clang-3.8)
2890 ("ocaml-ounit" ,ocaml-ounit)))
2891 (propagated-inputs
2892 `(("camlzip" ,camlzip)
2893 ("ocaml-bitstring" ,ocaml-bitstring)
2894 ("ocaml-cmdliner" ,ocaml-cmdliner)
2895 ("ocaml-core-kernel" ,ocaml-core-kernel)
2896 ("ocaml-ezjsonm" ,ocaml-ezjsonm)
2897 ("ocaml-fileutils" ,ocaml-fileutils)
2898 ("ocaml-frontc" ,ocaml-frontc)
2899 ("ocaml-graph" ,ocaml-graph)
2900 ("ocaml-ocurl" ,ocaml-ocurl)
2901 ("ocaml-piqi" ,ocaml-piqi)
2902 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
2903 ("ocaml-uuidm" ,ocaml-uuidm)
2904 ("ocaml-uri" ,ocaml-uri)
2905 ("ocaml-zarith" ,ocaml-zarith)))
2906 (inputs
2907 `(("llvm" ,llvm-3.8)
2908 ("gmp" ,gmp)))
2909 (arguments
2910 `(#:use-make? #t
2911 #:phases
2912 (modify-phases %standard-phases
2913 (replace 'configure
2914 (lambda* (#:key outputs inputs #:allow-other-keys)
2915 ;; add write for user, to prevent a failure in the install phase
2916 (for-each
2917 (lambda (file)
2918 (let ((stat (stat file)))
2919 (chmod file (+ #o200 (stat:mode stat)))))
2920 (find-files "." "."))
2921 (invoke "./configure" "--prefix"
2922 (assoc-ref outputs "out")
2923 "--libdir"
2924 (string-append
2925 (assoc-ref outputs "out")
2926 "/lib/ocaml/site-lib")
2927 "--with-llvm-version=3.8"
2928 "--with-llvm-config=llvm-config"
2929 "--enable-everything"))))))
2930 (synopsis "Binary Analysis Platform")
2931 (description "Binary Analysis Platform is a framework for writing program
2932 analysis tools, that target binary files. The framework consists of a plethora
2933 of libraries, plugins, and frontends. The libraries provide code reusability,
2934 the plugins facilitate extensibility, and the frontends serve as entry points.")
2935 (license license:expat)))
2936
2937 (define-public ocaml-camomile
2938 (package
2939 (name "ocaml-camomile")
2940 (version "1.0.1")
2941 (home-page "https://github.com/yoriyuki/Camomile")
2942 (source (origin
2943 (method url-fetch)
2944 (uri (string-append home-page "/releases/download/" version
2945 "/camomile-" version ".tbz"))
2946 (sha256
2947 (base32
2948 "01ssjrqz41jvrqh27jxnh9cx7ywi9b5sgsykd00i7z9nrcwhlfy2"))))
2949 (build-system dune-build-system)
2950 (native-inputs
2951 `(("camlp4" ,camlp4)))
2952 (arguments
2953 `(#:build-flags (list "--profile" "realease")
2954 #:test-target "camomile-test"
2955 #:phases
2956 (modify-phases %standard-phases
2957 (add-before 'build 'fix-usr-share
2958 (lambda* (#:key outputs #:allow-other-keys)
2959 (substitute* '("Camomile/jbuild" "configure.ml")
2960 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
2961 #t)))))
2962 (synopsis "Comprehensive Unicode library")
2963 (description "Camomile is a Unicode library for OCaml. Camomile provides
2964 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
2965 200 encodings, collation and locale-sensitive case mappings, and more. The
2966 library is currently designed for Unicode Standard 3.2.")
2967 ;; with an exception for linked libraries to use a different license
2968 (license license:lgpl2.0+)))
2969
2970 (define-public ocaml-zed
2971 (package
2972 (name "ocaml-zed")
2973 (version "1.6")
2974 (source
2975 (origin
2976 (method git-fetch)
2977 (uri (git-reference
2978 (url "https://github.com/diml/zed.git")
2979 (commit version)))
2980 (file-name (git-file-name name version))
2981 (sha256
2982 (base32 "00hhxcjf3bj3w2qm8nzs9x6vrqkadf4i0277s5whzy2rmiknj63v"))))
2983 (build-system dune-build-system)
2984 (arguments
2985 `(#:jbuild? #t
2986 #:test-target "."))
2987 (propagated-inputs
2988 `(("camomile" ,ocaml-camomile)
2989 ("react" ,ocaml-react)))
2990 (home-page "https://github.com/diml/zed")
2991 (synopsis "Abstract engine for text editing in OCaml")
2992 (description "Zed is an abstract engine for text edition. It can be used
2993 to write text editors, edition widgets, readlines, etc. You just have to
2994 connect an engine to your inputs and rendering functions to get an editor.")
2995 (license license:bsd-3)))
2996
2997 (define-public ocaml-lambda-term
2998 (package
2999 (name "ocaml-lambda-term")
3000 (version "1.13")
3001 (source
3002 (origin
3003 (method git-fetch)
3004 (uri (git-reference
3005 (url "https://github.com/diml/lambda-term.git")
3006 (commit version)))
3007 (file-name (git-file-name name version))
3008 (sha256
3009 (base32 "0wwib20b2ir3h2g9zwhzn04cv160psb805skp8v23wqgyn5cnbh8"))))
3010 (build-system dune-build-system)
3011 (arguments
3012 `(#:build-flags (list "--profile" "release")
3013 #:tests? #f))
3014 (propagated-inputs
3015 `(("lwt" ,ocaml-lwt)
3016 ("lwt-log" ,ocaml-lwt-log)
3017 ("zed" ,ocaml-zed)))
3018 (home-page "https://github.com/diml/lambda-term")
3019 (synopsis "Terminal manipulation library for OCaml")
3020 (description "Lambda-Term is a cross-platform library for manipulating the
3021 terminal. It provides an abstraction for keys, mouse events, colors, as well as
3022 a set of widgets to write curses-like applications. The main objective of
3023 Lambda-Term is to provide a higher level functional interface to terminal
3024 manipulation than, for example, ncurses, by providing a native OCaml interface
3025 instead of bindings to a C library.")
3026 (license license:bsd-3)))
3027
3028 (define-public ocaml-utop
3029 (package
3030 (name "ocaml-utop")
3031 (version "2.3.0")
3032 (source
3033 (origin
3034 (method git-fetch)
3035 (uri (git-reference
3036 (url "https://github.com/ocaml-community/utop.git")
3037 (commit version)))
3038 (file-name (git-file-name name version))
3039 (sha256
3040 (base32 "0xvibb97vzzh7yabr5ajhilriwz8cg4c506lxq0bd7ss3aci9han"))))
3041 (build-system dune-build-system)
3042 (arguments
3043 `(#:jbuild? #t
3044 #:test-target "."))
3045 (native-inputs
3046 `(("cppo" ,ocaml-cppo)))
3047 (propagated-inputs
3048 `(("lambda-term" ,ocaml-lambda-term)
3049 ("lwt" ,ocaml-lwt)
3050 ("react" ,ocaml-react)
3051 ("camomile" ,ocaml-camomile)
3052 ("zed" ,ocaml-zed)))
3053 (home-page "https://github.com/diml/utop")
3054 (synopsis "Improved interface to the OCaml toplevel")
3055 (description "UTop is an improved toplevel for OCaml. It can run in a
3056 terminal or in Emacs. It supports line editing, history, real-time and context
3057 sensitive completion, colors, and more.")
3058 (license license:bsd-3)))
3059
3060 (define-public ocaml-integers
3061 (package
3062 (name "ocaml-integers")
3063 (version "0.3.0")
3064 (home-page "https://github.com/ocamllabs/ocaml-integers")
3065 (source (origin
3066 (method url-fetch)
3067 (uri (string-append home-page
3068 "/releases/download/v0.2.2/integers-"
3069 version ".tbz"))
3070 (file-name (string-append name "-" version ".tbz"))
3071 (sha256
3072 (base32
3073 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
3074 (build-system ocaml-build-system)
3075 (arguments
3076 `(#:tests? #f; no tests
3077 #:build-flags (list "build")
3078 #:phases
3079 (modify-phases %standard-phases
3080 (delete 'configure))))
3081 (native-inputs
3082 `(("ocamlbuild" ,ocamlbuild)))
3083 (inputs
3084 `(("topkg" ,ocaml-topkg)
3085 ("opam" ,opam)))
3086 (synopsis "Various signed and unsigned integer types for OCaml")
3087 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
3088 and 64-bit signed and unsigned integer types, together with aliases such as
3089 long and size_t whose sizes depend on the host platform.")
3090 (license license:expat)))
3091
3092 (define-public ocaml-ctypes
3093 (package
3094 (name "ocaml-ctypes")
3095 (version "0.14.0")
3096 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
3097 (source (origin
3098 (method url-fetch)
3099 (uri (string-append home-page "/archive/" version ".tar.gz"))
3100 (file-name (string-append name "-" version ".tar.gz"))
3101 (sha256
3102 (base32
3103 "0zrsd42q2nciyg9375g2kydqax6ay299rhyfgms59qiw7d9ylyp9"))))
3104 (build-system ocaml-build-system)
3105 (arguments
3106 `(#:tests? #f; require an old lwt
3107 #:make-flags
3108 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
3109 #:phases
3110 (modify-phases %standard-phases
3111 (delete 'configure))))
3112 (native-inputs
3113 `(("pkg-config" ,pkg-config)))
3114 (inputs
3115 `(("libffi" ,libffi)
3116 ("ounit" ,ocaml-ounit)
3117 ("integers" ,ocaml-integers)
3118 ("lwt" ,ocaml-lwt)
3119 ("topkg" ,ocaml-topkg)
3120 ("opam" ,opam)))
3121 (synopsis "Library for binding to C libraries using pure OCaml")
3122 (description "Ctypes is a library for binding to C libraries using pure
3123 OCaml. The primary aim is to make writing C extensions as straightforward as
3124 possible. The core of ctypes is a set of combinators for describing the
3125 structure of C types -- numeric types, arrays, pointers, structs, unions and
3126 functions. You can use these combinators to describe the types of the
3127 functions that you want to call, then bind directly to those functions -- all
3128 without writing or generating any C!")
3129 (license license:expat)))
3130
3131 (define-public ocaml-ocb-stubblr
3132 (package
3133 (name "ocaml-ocb-stubblr")
3134 (version "0.1.1")
3135 (home-page "https://github.com/pqwy/ocb-stubblr")
3136 (source (origin
3137 (method url-fetch)
3138 (uri (string-append
3139 home-page "/releases/download/v0.1.1/ocb-stubblr-"
3140 version ".tbz"))
3141 (file-name (string-append name "-" version ".tbz"))
3142 (sha256
3143 (base32
3144 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
3145 (build-system ocaml-build-system)
3146 (arguments
3147 `(#:build-flags (list "build" "--tests" "true")
3148 #:phases
3149 (modify-phases %standard-phases
3150 (delete 'configure)
3151 (add-before 'build 'fix-for-guix
3152 (lambda _
3153 (substitute* "src/ocb_stubblr.ml"
3154 ;; Do not fail when opam is not present or initialized
3155 (("error_msgf \"error running opam\"") "\"\"")
3156 ;; Guix doesn't have cc, but it has gcc
3157 (("\"cc\"") "\"gcc\""))
3158 #t)))))
3159 (inputs
3160 `(("topkg" ,ocaml-topkg)
3161 ("opam" ,opam)))
3162 (native-inputs
3163 `(("astring" ,ocaml-astring)
3164 ("ocamlbuild" ,ocamlbuild)))
3165 (synopsis "OCamlbuild plugin for C stubs")
3166 (description "Ocb-stubblr is about ten lines of code that you need to
3167 repeat over, over, over and over again if you are using ocamlbuild to build
3168 OCaml projects that contain C stubs.")
3169 (license license:isc)))
3170
3171 (define-public ocaml-tsdl
3172 (package
3173 (name "ocaml-tsdl")
3174 (version "0.9.6")
3175 (home-page "http://erratique.ch/software/tsdl")
3176 (source (origin
3177 (method url-fetch)
3178 (uri (string-append home-page "/releases/tsdl-"
3179 version ".tbz"))
3180 (file-name (string-append name "-" version ".tar.gz"))
3181 (sha256
3182 (base32
3183 "00krjhmnchsnz33h9zhh0v69xbvi86l0xf0dvy7iivylb7f7x3n4"))))
3184 (build-system ocaml-build-system)
3185 (arguments
3186 `(#:build-flags '("build")
3187 #:tests? #f; tests require a display device
3188 #:phases
3189 (modify-phases %standard-phases
3190 (delete 'configure))))
3191 (native-inputs
3192 `(("ocamlbuild" ,ocamlbuild)
3193 ("ocaml-astring" ,ocaml-astring)
3194 ("ocaml-ocb-stubblr" ,ocaml-ocb-stubblr)
3195 ("opam" ,opam)
3196 ("pkg-config" ,pkg-config)))
3197 (inputs
3198 `(("topkg" ,ocaml-topkg)
3199 ("result" ,ocaml-result)
3200 ("sdl2" ,sdl2)
3201 ("integers" ,ocaml-integers)
3202 ("ctypes" ,ocaml-ctypes)))
3203 (synopsis "Thin bindings to SDL for OCaml")
3204 (description "Tsdl is an OCaml library providing thin bindings to the
3205 cross-platform SDL C library.")
3206 (license license:isc)))
3207
3208 (define-public dedukti
3209 (package
3210 (name "dedukti")
3211 (version "2.6.0")
3212 (home-page "https://deducteam.github.io/")
3213 (source
3214 (origin
3215 (method git-fetch)
3216 (uri (git-reference
3217 (url "https://github.com/deducteam/dedukti.git")
3218 (commit (string-append "v" version))))
3219 (file-name (git-file-name name version))
3220 (sha256
3221 (base32
3222 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
3223 (inputs
3224 `(("menhir" ,ocaml-menhir)))
3225 (native-inputs
3226 `(("ocamlbuild" ,ocamlbuild)))
3227 (build-system ocaml-build-system)
3228 (arguments
3229 `(#:phases
3230 (modify-phases %standard-phases
3231 (delete 'configure)
3232 (replace 'build
3233 (lambda _
3234 (invoke "make")
3235 #t))
3236 (replace 'check
3237 (lambda _
3238 (invoke "make" "tests")
3239 #t))
3240 (add-before 'install 'set-binpath
3241 ;; Change binary path in the makefile
3242 (lambda _
3243 (let ((out (assoc-ref %outputs "out")))
3244 (substitute* "GNUmakefile"
3245 (("BINDIR = (.*)$")
3246 (string-append "BINDIR = " out "/bin"))))
3247 #t))
3248 (replace 'install
3249 (lambda _
3250 (invoke "make" "install")
3251 #t)))))
3252 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
3253 the λ-calculus")
3254 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
3255 theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
3256 dependent types. The λΠ-calculus modulo theory is itself an extension of the
3257 λΠ-calculus where the context contains variable declaration as well as rewrite
3258 rules. This system is not designed to develop proofs, but to check proofs
3259 developed in other systems. In particular, it enjoys a minimalistic syntax.")
3260 (license license:cecill-c)))
3261
3262 (define-public emacs-dedukti-mode
3263 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
3264 (package
3265 (name "emacs-dedukti-mode")
3266 (version (git-version "0" "0" commit))
3267 (home-page "https://github.com/rafoo/dedukti-mode")
3268 (source (origin
3269 (method git-fetch)
3270 (uri (git-reference
3271 (url home-page)
3272 (commit commit)))
3273 (sha256
3274 (base32
3275 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
3276 (file-name (git-file-name name version))))
3277 (inputs
3278 `(("dedukti" ,dedukti)))
3279 (build-system emacs-build-system)
3280 (arguments
3281 '(#:phases
3282 (modify-phases %standard-phases
3283 (add-before 'install 'patch-dkpath
3284 (lambda _
3285 (let ((dkcheck-path (which "dkcheck")))
3286 (substitute* "dedukti-mode.el"
3287 (("dedukti-path \"(.*)\"")
3288 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
3289 (synopsis "Emacs major mode for Dedukti files")
3290 (description "This package provides an Emacs major mode for editing
3291 Dedukti files.")
3292 (license license:cecill-b))))
3293
3294 (define-public emacs-flycheck-dedukti
3295 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
3296 (package
3297 (name "emacs-flycheck-dedukti")
3298 (version (git-version "0" "0" commit))
3299 (home-page "https://github.com/rafoo/flycheck-dedukti")
3300 (source (origin
3301 (method git-fetch)
3302 (uri (git-reference
3303 (url home-page)
3304 (commit commit)))
3305 (sha256
3306 (base32
3307 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
3308 (file-name (git-file-name name version))))
3309 (build-system emacs-build-system)
3310 (inputs
3311 `(("dedukti-mode" ,emacs-dedukti-mode)
3312 ("flycheck-mode" ,emacs-flycheck)))
3313 (synopsis "Flycheck integration for the dedukti language")
3314 (description "This package provides a frontend for Flycheck to perform
3315 syntax checking on dedukti files.")
3316 (license license:cecill-b))))
3317
3318 (define-public ocaml-ppx-inline-test
3319 (package
3320 (name "ocaml-ppx-inline-test")
3321 (version "0.12.0")
3322 (home-page "https://github.com/janestreet/ppx_inline_test")
3323 (source
3324 (origin
3325 (method git-fetch)
3326 (uri (git-reference
3327 (url (string-append home-page ".git"))
3328 (commit (string-append "v" version))))
3329 (file-name (git-file-name name version))
3330 (sha256
3331 (base32
3332 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
3333 (build-system dune-build-system)
3334 (arguments
3335 ;see home page README for further information
3336 `(#:tests? #f))
3337 (inputs
3338 `(("ocaml-base" ,ocaml-base)
3339 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
3340 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
3341 ("ocaml-sexplib0" ,ocaml-sexplib0)
3342 ("ocaml-stdio" ,ocaml-stdio)
3343 ("ocaml-ppxlib" ,ocaml-ppxlib)))
3344 (properties `((upstream-name . "ppx_inline_test")))
3345 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3346 (description "This package contains a syntax extension for writing
3347 in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
3348 collection.")
3349 (license license:expat)))
3350
3351 (define-public ocaml-bindlib
3352 (package
3353 (name "ocaml-bindlib")
3354 (version "5.0.1")
3355 (source
3356 (origin
3357 (method git-fetch)
3358 (uri (git-reference
3359 (url "https://github.com/rlepigre/ocaml-bindlib.git")
3360 (commit (string-append "ocaml-bindlib_" version))))
3361 (file-name (git-file-name name version))
3362 (sha256
3363 (base32
3364 "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
3365 (build-system ocaml-build-system)
3366 (arguments
3367 `(#:tests? #f ;no tests
3368 #:use-make? #t
3369 #:phases
3370 (modify-phases %standard-phases
3371 (delete 'configure)
3372 (replace 'build
3373 (lambda _
3374 (invoke "make")))
3375 (replace 'install
3376 (lambda _
3377 (invoke "make" "install"))))))
3378 (native-inputs
3379 `(("ocamlbuild" ,ocamlbuild)
3380 ("ocaml-findlib" ,ocaml-findlib)))
3381 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
3382 (synopsis "OCaml Bindlib library for bound variables")
3383 (description "Bindlib is a library allowing the manipulation of data
3384 structures with bound variables. It is particularly useful when writing ASTs
3385 for programming languages, but also for manipulating terms of the λ-calculus
3386 or quantified formulas.")
3387 (license license:gpl3+)))
3388
3389 (define-public ocaml-earley
3390 (package
3391 (name "ocaml-earley")
3392 (version "2.0.0")
3393 (home-page "https://github.com/rlepigre/ocaml-earley")
3394 (source
3395 (origin
3396 (method git-fetch)
3397 (uri (git-reference
3398 (url (string-append home-page ".git"))
3399 (commit version)))
3400 (file-name (git-file-name name version))
3401 (sha256
3402 (base32
3403 "18k7bi7krc4bvqnhijz1q0pfr0nfahghfjifci8rh1q4i5zd0xz5"))))
3404 (build-system dune-build-system)
3405 (arguments
3406 `(#:test-target "."))
3407 (synopsis "Parsing library based on Earley Algorithm")
3408 (description "Earley is a parser combinator library base on Earley's
3409 algorithm. It is intended to be used in conjunction with an OCaml syntax
3410 extension which allows the definition of parsers inside the language. There
3411 is also support for writing OCaml syntax extensions in a camlp4 style.")
3412 (license license:cecill-b)))
3413
3414 (define-public ocaml-timed
3415 (package
3416 (name "ocaml-timed")
3417 (version "1.0")
3418 (home-page "https://github.com/rlepigre/ocaml-timed")
3419 (source (origin
3420 (method git-fetch)
3421 (uri (git-reference
3422 (url (string-append home-page ".git"))
3423 (commit (string-append name "_" version))))
3424 (sha256
3425 (base32
3426 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
3427 (file-name (git-file-name name version))))
3428 (build-system ocaml-build-system)
3429 (arguments
3430 '(#:phases
3431 (modify-phases %standard-phases
3432 (delete 'configure)
3433 (replace 'build
3434 (lambda _
3435 (invoke "make")))
3436 (replace 'install
3437 (lambda _
3438 (invoke "make" "install")))
3439 (replace 'check
3440 (lambda _
3441 (invoke "make" "tests"))))))
3442 (synopsis "Timed references for imperative state")
3443 (description "Timed references for imperative state. This module provides
3444 an alternative type for references (or mutable cells) supporting undo/redo
3445 operations. In particular, an abstract notion of time is used to capture the
3446 state of the references at any given point, so that it can be restored. Note
3447 that usual reference operations only have a constant time / memory overhead
3448 (compared to those of the standard library).
3449
3450 Moreover, we provide an alternative implementation based on the references
3451 of the standard library (Pervasives module). However, it is less efficient
3452 than the first one.")
3453 (license license:expat)))
3454
3455 (define-public ocaml-biniou
3456 (package
3457 (name "ocaml-biniou")
3458 (version "1.2.0")
3459 (home-page "https://github.com/mjambon/biniou")
3460 (source
3461 (origin
3462 (method git-fetch)
3463 (uri (git-reference
3464 (url (string-append home-page ".git"))
3465 (commit (string-append "v" version))))
3466 (file-name (git-file-name name version))
3467 (sha256
3468 (base32
3469 "0mjpgwyfq2b2izjw0flmlpvdjgqpq8shs89hxj1np2r50csr8dcb"))))
3470 (build-system dune-build-system)
3471 (inputs
3472 `(("ocaml-easy-format" ,ocaml-easy-format)))
3473 (native-inputs
3474 `(("which" ,which)))
3475 (synopsis "Data format designed for speed, safety, ease of use and backward
3476 compatibility")
3477 (description "Biniou (pronounced \"be new\" is a binary data format
3478 designed for speed, safety, ease of use and backward compatibility as
3479 protocols evolve. Biniou is vastly equivalent to JSON in terms of
3480 functionality but allows implementations several times faster (4 times faster
3481 than yojson), with 25-35% space savings.")
3482 (license license:bsd-3)))
3483
3484 (define-public ocaml-yojson
3485 (package
3486 (name "ocaml-yojson")
3487 (version "1.7.0")
3488 (home-page "https://github.com/ocaml-community/yojson")
3489 (source
3490 (origin
3491 (method git-fetch)
3492 (uri (git-reference
3493 (url (string-append home-page ".git"))
3494 (commit version)))
3495 (file-name (git-file-name name version))
3496 (sha256
3497 (base32
3498 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
3499 (build-system dune-build-system)
3500 (arguments
3501 `(#:test-target "."))
3502 (inputs
3503 `(("ocaml-biniou" ,ocaml-biniou)
3504 ("ocaml-easy-format" ,ocaml-easy-format)))
3505 (native-inputs
3506 `(("ocaml-alcotest" ,ocaml-alcotest)
3507 ("ocaml-cppo" ,ocaml-cppo)))
3508 (synopsis "Low-level JSON library for OCaml")
3509 (description "Yojson is an optimized parsing and printing library for the
3510 JSON format. It addresses a few shortcomings of json-wheel including 2x
3511 speedup, polymorphic variants and optional syntax for tuples and variants.
3512 @code{ydump} is a pretty printing command-line program provided with the
3513 yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
3514 serializers and deserializers from type definitions.")
3515 (license license:bsd-3)))
3516
3517 (define-public ocaml-craml
3518 (package
3519 (name "ocaml-craml")
3520 (version "1.0.0")
3521 (home-page "https://github.com/realworldocaml/craml")
3522 (source
3523 (origin
3524 (method git-fetch)
3525 (uri (git-reference
3526 (url (string-append home-page ".git"))
3527 (commit version)))
3528 (file-name (git-file-name name version))
3529 (sha256
3530 (base32
3531 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
3532 (build-system dune-build-system)
3533 (inputs
3534 `(("ocaml-fmt" ,ocaml-fmt)
3535 ("ocaml-astring" ,ocaml-astring)
3536 ("ocaml-logs" ,ocaml-logs)
3537 ("ocaml-cmdliner" ,ocaml-cmdliner)))
3538 (synopsis
3539 "CRAM-testing framework for testing command line applications")
3540 (description "CRAM is a is functional testing framework for command line
3541 applications. @code{craml} is freely inspired by the
3542 Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
3543 format}. @code{craml} is released as a single binary (called @code{craml}).")
3544 (license license:isc)))
3545
3546 (define-public ocaml-merlin
3547 (package
3548 (name "ocaml-merlin")
3549 (version "3.2.2")
3550 (home-page "https://ocaml.github.io/merlin/")
3551 (source
3552 (origin
3553 (method git-fetch)
3554 (uri (git-reference
3555 (url "https://github.com/ocaml/merlin.git")
3556 (commit (string-append "v" version))))
3557 (file-name (git-file-name name version))
3558 (sha256
3559 (base32
3560 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
3561 (build-system dune-build-system)
3562 (inputs
3563 `(("ocaml-biniou" ,ocaml-biniou)
3564 ("ocaml-yojson" ,ocaml-yojson)
3565 ("ocaml-easy-format" ,ocaml-easy-format)))
3566 (native-inputs
3567 `(("ocaml-findlib" ,ocaml-findlib)))
3568 (arguments
3569 '(#:jbuild? #t
3570 #:tests? #f)) ;; Errors in tests in version 3.2.2
3571 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
3572 (description "Merlin is an editor service that provides modern IDE
3573 features for OCaml. Emacs and Vim support is provided out-of-the-box.
3574 External contributors added support for Visual Studio Code, Sublime Text and
3575 Atom.")
3576 (license license:expat)))
3577
3578 (define-public ocaml-gsl
3579 (package
3580 (name "ocaml-gsl")
3581 (version "1.24.0")
3582 (source
3583 (origin
3584 (method url-fetch)
3585 (uri
3586 (string-append
3587 "https://github.com/mmottl/gsl-ocaml/releases/download/"
3588 version "/gsl-" version ".tbz"))
3589 (sha256
3590 (base32
3591 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
3592 (build-system dune-build-system)
3593 (arguments
3594 `(#:test-target "."
3595 #:phases
3596 (modify-phases %standard-phases
3597 (add-after 'unpack 'fix-gsl-directory
3598 (lambda* (#:key inputs #:allow-other-keys)
3599 (substitute* "src/config/discover.ml"
3600 (("/usr") (assoc-ref inputs "gsl")))
3601 #t)))))
3602 (inputs
3603 `(("gsl" ,gsl)))
3604 (propagated-inputs
3605 `(("ocaml-base" ,ocaml-base)
3606 ("ocaml-stdio" ,ocaml-stdio)))
3607 (home-page "https://mmottl.github.io/gsl-ocaml")
3608 (synopsis "Bindings to the GNU Scientific Library")
3609 (description
3610 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
3611 the OCaml language.")
3612 (license license:gpl3+)))
3613
3614 (define-public ocaml-gsl-1
3615 (package
3616 (inherit ocaml-gsl)
3617 (version "1.19.3")
3618 (source (origin
3619 (method url-fetch)
3620 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
3621 "/releases/download/v"
3622 version "/gsl-ocaml-" version ".tar.gz"))
3623 (sha256
3624 (base32
3625 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
3626 (build-system ocaml-build-system)
3627 (inputs
3628 `(("gsl" ,gsl)))
3629 (native-inputs
3630 `(("ocamlbuild" ,ocamlbuild)))
3631 (arguments '())
3632 (propagated-inputs '())))
3633
3634 (define-public cubicle
3635 (package
3636 (name "cubicle")
3637 (version "1.1.2")
3638 (source (origin
3639 (method url-fetch)
3640 (uri (string-append "http://cubicle.lri.fr/cubicle-"
3641 version ".tar.gz"))
3642 (sha256
3643 (base32
3644 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
3645 (build-system gnu-build-system)
3646 (native-inputs
3647 `(("automake" ,automake)
3648 ("ocaml" ,ocaml)
3649 ("which" ,(@@ (gnu packages base) which))))
3650 (propagated-inputs
3651 `(("ocaml-num" ,ocaml-num)
3652 ("z3" ,z3)))
3653 (arguments
3654 `(#:configure-flags (list "--with-z3")
3655 #:make-flags (list "QUIET=")
3656 #:tests? #f
3657 #:phases
3658 (modify-phases %standard-phases
3659 (add-before 'configure 'configure-for-release
3660 (lambda _
3661 (substitute* "Makefile.in"
3662 (("SVNREV=") "#SVNREV="))
3663 #t))
3664 (add-before 'configure 'fix-/bin/sh
3665 (lambda _
3666 (substitute* "configure"
3667 (("-/bin/sh") (string-append "-" (which "sh"))))
3668 #t))
3669 (add-before 'configure 'fix-smt-z3wrapper.ml
3670 (lambda _
3671 (substitute* "Makefile.in"
3672 (("\\\\n") ""))
3673 #t))
3674 (add-before 'configure 'fix-ocaml-num
3675 (lambda* (#:key inputs #:allow-other-keys)
3676 (substitute* "Makefile.in"
3677 (("= \\$\\(FUNCTORYLIB\\)")
3678 (string-append "= -I "
3679 (assoc-ref inputs "ocaml-num")
3680 "/lib/ocaml/site-lib"
3681 " $(FUNCTORYLIB)")))
3682 #t)))))
3683 (home-page "http://cubicle.lri.fr/")
3684 (synopsis "Model checker for array-based systems")
3685 (description "Cubicle is a model checker for verifying safety properties
3686 of array-based systems. This is a syntactically restricted class of
3687 parametrized transition systems with states represented as arrays indexed by
3688 an arbitrary number of processes. Cache coherence protocols and mutual
3689 exclusion algorithms are typical examples of such systems.")
3690 (license license:asl2.0)))
3691
3692 (define-public ocaml-sexplib0
3693 (package
3694 (name "ocaml-sexplib0")
3695 (version "0.11.0")
3696 (home-page "https://github.com/janestreet/sexplib0")
3697 (source
3698 (origin
3699 (method git-fetch)
3700 (uri (git-reference
3701 (url (string-append home-page ".git"))
3702 (commit (string-append "v" version))))
3703 (file-name (git-file-name name version))
3704 (sha256
3705 (base32
3706 "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
3707 (build-system dune-build-system)
3708 (arguments
3709 '(#:tests? #f)) ;no tests
3710 (synopsis "Library containing the definition of S-expressions and some
3711 base converters")
3712 (description "Part of Jane Street's Core library The Core suite of
3713 libraries is an industrial strength alternative to OCaml's standard library
3714 that was developed by Jane Street, the largest industrial user of OCaml.")
3715 (license license:expat)))
3716
3717 (define-public ocaml-parsexp
3718 (package
3719 (name "ocaml-parsexp")
3720 (version "0.11.0")
3721 (home-page "https://github.com/janestreet/parsexp")
3722 (source
3723 (origin
3724 (method git-fetch)
3725 (uri (git-reference
3726 (url (string-append home-page ".git"))
3727 (commit (string-append "v" version))))
3728 (file-name (git-file-name name version))
3729 (sha256
3730 (base32
3731 "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
3732 (build-system dune-build-system)
3733 (inputs
3734 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
3735 (synopsis "S-expression parsing library")
3736 (description
3737 "This library provides generic parsers for parsing S-expressions from
3738 strings or other medium.
3739
3740 The library is focused on performances but still provide full generic
3741 parsers that can be used with strings, bigstrings, lexing buffers,
3742 character streams or any other sources effortlessly.
3743
3744 It provides three different class of parsers:
3745 @itemize
3746 @item
3747 the normal parsers, producing [Sexp.t] or [Sexp.t list] values
3748 @item
3749 the parsers with positions, building compact position sequences so
3750 that one can recover original positions in order to report properly
3751 located errors at little cost
3752 @item
3753 the Concrete Syntax Tree parsers, produce values of type
3754 @code{Parsexp.Cst.t} which record the concrete layout of the s-expression
3755 syntax, including comments
3756 @end itemize
3757
3758 This library is portable and doesn't provide IO functions. To read
3759 s-expressions from files or other external sources, you should use
3760 parsexp_io.")
3761 (license license:expat)))
3762
3763 (define-public ocaml-sexplib
3764 (package
3765 (name "ocaml-sexplib")
3766 (version "0.11.0")
3767 (home-page "https://github.com/janestreet/sexplib")
3768 (source
3769 (origin
3770 (method git-fetch)
3771 (uri (git-reference
3772 (url (string-append home-page ".git"))
3773 (commit (string-append "v" version))))
3774 (file-name (git-file-name name version))
3775 (sha256
3776 (base32
3777 "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
3778 (build-system dune-build-system)
3779 (propagated-inputs
3780 `(("ocaml-num" ,ocaml-num)
3781 ("ocaml-parsexp" ,ocaml-parsexp)
3782 ("ocaml-sexplib0" ,ocaml-sexplib0)))
3783 (synopsis
3784 "Library for serializing OCaml values to and from S-expressions")
3785 (description
3786 "This package is part of Jane Street's Core library. Sexplib contains
3787 functionality for parsing and pretty-printing s-expressions.")
3788 (license license:expat)))
3789
3790 (define-public ocaml-base
3791 (package
3792 (name "ocaml-base")
3793 (version "0.11.1")
3794 (home-page "https://github.com/janestreet/base")
3795 (source
3796 (origin
3797 (method git-fetch)
3798 (uri (git-reference
3799 (url (string-append home-page ".git"))
3800 (commit (string-append "v" version))))
3801 (file-name (git-file-name name version))
3802 (sha256
3803 (base32
3804 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
3805 (build-system dune-build-system)
3806 (propagated-inputs
3807 `(("ocaml-sexplib0" ,ocaml-sexplib0)))
3808 (arguments
3809 `(#:phases
3810 (modify-phases %standard-phases
3811 (replace 'build
3812 ;; make warnings non fatal (jbuilder behaviour)
3813 (lambda _
3814 (invoke "dune" "build" "@install" "--profile=release"))))))
3815 (synopsis
3816 "Full standard library replacement for OCaml")
3817 (description
3818 "Base is a complete and portable alternative to the OCaml standard
3819 library. It provides all standard functionalities one would expect
3820 from a language standard library. It uses consistent conventions
3821 across all of its module.
3822
3823 Base aims to be usable in any context. As a result system dependent
3824 features such as I/O are not offered by Base. They are instead
3825 provided by companion libraries such as
3826 @url{https://github.com/janestreet/stdio, ocaml-stdio}.")
3827 (license license:expat)))
3828
3829 (define-public ocaml-compiler-libs
3830 (package
3831 (name "ocaml-compiler-libs")
3832 (version "0.11.0")
3833 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
3834 (source
3835 (origin
3836 (method git-fetch)
3837 (uri (git-reference
3838 (url (string-append home-page ".git"))
3839 (commit (string-append "v" version))))
3840 (file-name (git-file-name name version))
3841 (sha256
3842 (base32
3843 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
3844 (build-system dune-build-system)
3845 (arguments
3846 '(#:tests? #f)) ;no tests
3847 (properties `((upstream-name . "ocaml-compiler-libs")))
3848 (synopsis "Compiler libraries repackaged")
3849 (description "This packaeg simply repackages the OCaml compiler libraries
3850 so they don't expose everything at toplevel. For instance, @code{Ast_helper}
3851 is now @code{Ocaml_common.Ast_helper}.")
3852 (license license:expat)))
3853
3854 (define-public ocaml-stdio
3855 (package
3856 (name "ocaml-stdio")
3857 (version "0.11.0")
3858 (home-page "https://github.com/janestreet/stdio")
3859 (source
3860 (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url (string-append home-page ".git"))
3864 (commit (string-append "v" version))))
3865 (file-name (git-file-name name version))
3866 (sha256
3867 (base32
3868 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
3869 (build-system dune-build-system)
3870 (propagated-inputs
3871 `(("ocaml-base" ,ocaml-base)
3872 ("ocaml-sexplib0" ,ocaml-sexplib0)))
3873 (arguments
3874 '(#:tests? #f)) ;no tests
3875 (synopsis "Standard IO library for OCaml")
3876 (description
3877 "Stdio implements simple input/output functionalities for OCaml. It
3878 re-exports the input/output functions of the OCaml standard libraries using
3879 a more consistent API.")
3880 (license license:expat)))
3881
3882 (define-public ocaml-ppx-derivers
3883 (package
3884 (name "ocaml-ppx-derivers")
3885 (version "1.2.1")
3886 (home-page
3887 "https://github.com/ocaml-ppx/ppx_derivers")
3888 (source
3889 (origin
3890 (method git-fetch)
3891 (uri (git-reference
3892 (url (string-append home-page ".git"))
3893 (commit version)))
3894 (file-name (git-file-name name version))
3895 (sha256
3896 (base32
3897 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
3898 (build-system dune-build-system)
3899 (arguments
3900 '(#:tests? #f)) ;no tests
3901 (properties `((upstream-name . "ppx_derivers")))
3902 (synopsis "Shared @code{@@deriving} plugin registry")
3903 (description
3904 "Ppx_derivers is a tiny package whose sole purpose is to allow
3905 ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
3906 as part of the same ocaml-migrate-parsetree driver.")
3907 (license license:bsd-3)))
3908
3909 (define-public ocaml-ppxlib
3910 (package
3911 (name "ocaml-ppxlib")
3912 (version "0.6.0")
3913 (home-page "https://github.com/ocaml-ppx/ppxlib")
3914 (source
3915 (origin
3916 (method git-fetch)
3917 (uri (git-reference
3918 (url (string-append home-page ".git"))
3919 (commit version)))
3920 (file-name (git-file-name name version))
3921 (sha256
3922 (base32
3923 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
3924 (build-system dune-build-system)
3925 (propagated-inputs
3926 `(("ocaml-base" ,ocaml-base)
3927 ("ocaml-compiler-libs" ,ocaml-compiler-libs)
3928 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
3929 ("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
3930 ("ocaml-stdio" ,ocaml-stdio)
3931 ("ocaml-result" ,ocaml-result)
3932 ("ocaml-sexplib0" ,ocaml-sexplib0)))
3933 (arguments
3934 '(#:phases
3935 (modify-phases %standard-phases
3936 (add-before 'check 'set-topfind
3937 (lambda* (#:key inputs #:allow-other-keys)
3938 ;; add the line #directory ".." at the top of each file
3939 ;; using #use "topfind";; to be able to find topfind
3940 (let* ((findlib-path (assoc-ref inputs "findlib"))
3941 (findlib-libdir
3942 (string-append findlib-path "/lib/ocaml/site-lib")))
3943 (substitute* '("test/base/test.ml"
3944 "test/code_path/test.ml"
3945 "test/deriving/test.ml"
3946 "test/driver/attributes/test.ml"
3947 "test/driver/non-compressible-suffix/test.ml"
3948 "test/driver/transformations/test.ml")
3949 (("#use \"topfind\";;" all)
3950 (string-append "#directory \"" findlib-libdir "\"\n"
3951 all))))
3952 #t)))))
3953 (synopsis
3954 "Base library and tools for ppx rewriters")
3955 (description
3956 "A comprehensive toolbox for ppx development. It features:
3957 @itemize
3958 @item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
3959 independent of the version of OCaml;
3960 @item a library for library for ppx rewriters in general, and type-driven code
3961 generators in particular;
3962 @item
3963 a feature-full driver for OCaml AST transformers;
3964 @item a quotation mechanism allowing to write values representing the
3965 OCaml AST in the OCaml syntax;
3966 @item a generator of open recursion classes from type definitions.
3967 @end itemize")
3968 (license license:expat)))
3969
3970 (define-public ocaml-ppx-compare
3971 (package
3972 (name "ocaml-ppx-compare")
3973 (version "0.11.1")
3974 (source (origin
3975 (method git-fetch)
3976 (uri (git-reference
3977 (url "https://github.com/janestreet/ppx_compare.git")
3978 (commit (string-append "v" version))))
3979 (file-name (git-file-name name version))
3980 (sha256
3981 (base32
3982 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
3983 (build-system dune-build-system)
3984 (propagated-inputs
3985 `(("ocaml-base" ,ocaml-base)
3986 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
3987 ("ocaml-ppxlib" ,ocaml-ppxlib)))
3988 (properties `((upstream-name . "ppx_compare")))
3989 (home-page "https://github.com/janestreet/ppx_compare")
3990 (synopsis "Generation of comparison functions from types")
3991 (description "Generation of fast comparison functions from type expressions
3992 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
3993 from type representations. The scaffolded functions are usually much faster
3994 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
3995 flexibility by allowing you to override them for a specific type and more safety
3996 by making sure that you only compare comparable values.")
3997 (license license:asl2.0)))
3998
3999 (define-public ocaml-fieldslib
4000 (package
4001 (name "ocaml-fieldslib")
4002 (version "0.11.0")
4003 (source (origin
4004 (method url-fetch)
4005 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4006 (version-major+minor version) "/files/"
4007 "fieldslib-v" version ".tar.gz"))
4008 (sha256
4009 (base32
4010 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))))
4011 (build-system dune-build-system)
4012 (arguments
4013 ;; No tests
4014 `(#:tests? #f))
4015 (propagated-inputs
4016 `(("ocaml-base" ,ocaml-base)
4017 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4018 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4019 (properties `((upstream-name . "fieldslib")))
4020 (home-page "https://github.com/janestreet/fieldslib")
4021 (synopsis "Syntax extension to record fields")
4022 (description "Syntax extension to define first class values representing
4023 record fields, to get and set record fields, iterate and fold over all fields
4024 of a record and create new record values.")
4025 (license license:asl2.0)))
4026
4027 (define-public ocaml-variantslib
4028 (package
4029 (name "ocaml-variantslib")
4030 (version "0.11.0")
4031 (source (origin
4032 (method url-fetch)
4033 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4034 (version-major+minor version)
4035 "/files/variantslib-v" version ".tar.gz"))
4036 (sha256
4037 (base32
4038 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
4039 (build-system dune-build-system)
4040 (arguments
4041 ;; No tests
4042 `(#:tests? #f))
4043 (propagated-inputs
4044 `(("ocaml-base" ,ocaml-base)
4045 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4046 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4047 (properties `((upstream-name . "variantslib")))
4048 (home-page "https://github.com/janestreet/variantslib")
4049 (synopsis "OCaml variants as first class values")
4050 (description "The Core suite of libraries is an alternative to OCaml's
4051 standard library.")
4052 (license license:asl2.0)))
4053
4054 (define-public ocaml-ppx-fields-conv
4055 (package
4056 (name "ocaml-ppx-fields-conv")
4057 (version "0.11.0")
4058 (source (origin
4059 (method url-fetch)
4060 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4061 (version-major+minor version)
4062 "/files/ppx_fields_conv-v" version ".tar.gz"))
4063 (sha256
4064 (base32
4065 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
4066 (build-system dune-build-system)
4067 (propagated-inputs
4068 `(("ocaml-base" ,ocaml-base)
4069 ("ocaml-fieldslib" ,ocaml-fieldslib)
4070 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4071 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4072 (properties `((upstream-name . "ppx_fields_conv")))
4073 (home-page "https://github.com/janestreet/ppx_fields_conv")
4074 (synopsis "Generation of accessor and iteration functions for ocaml records")
4075 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
4076 first class values representing record fields, and additional routines, to get
4077 and set record fields, iterate and fold over all fields of a record and create
4078 new record values.")
4079 (license license:asl2.0)))
4080
4081 (define-public ocaml-ppx-sexp-conv
4082 (package
4083 (name "ocaml-ppx-sexp-conv")
4084 (version "0.11.2")
4085 (source (origin
4086 (method git-fetch)
4087 (uri (git-reference
4088 (url "https://github.com/janestreet/ppx_sexp_conv.git")
4089 (commit (string-append "v" version))))
4090 (file-name (git-file-name name version))
4091 (sha256
4092 (base32
4093 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
4094 (build-system dune-build-system)
4095 (propagated-inputs
4096 `(("ocaml-base" ,ocaml-base)
4097 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4098 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4099 (properties `((upstream-name . "ppx_sexp_conv")))
4100 (home-page "https://github.com/janestreet/ppx_sexp_conv")
4101 (synopsis "Generation of S-expression conversion functions from type definitions")
4102 (description "This package generates S-expression conversion functions from type
4103 definitions.")
4104 (license license:asl2.0)))
4105
4106 (define-public ocaml-ppx-variants-conv
4107 (package
4108 (name "ocaml-ppx-variants-conv")
4109 (version "0.11.1")
4110 (source (origin
4111 (method git-fetch)
4112 (uri (git-reference
4113 (url "https://github.com/janestreet/ppx_variants_conv.git")
4114 (commit (string-append "v" version))))
4115 (file-name (git-file-name name version))
4116 (sha256
4117 (base32
4118 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
4119 (build-system dune-build-system)
4120 (propagated-inputs
4121 `(("ocaml-base" ,ocaml-base)
4122 ("ocaml-variantslib" ,ocaml-variantslib)
4123 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4124 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4125 (properties
4126 `((upstream-name . "ppx_variants_conv")))
4127 (home-page
4128 "https://github.com/janestreet/ppx_variants_conv")
4129 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
4130 (description
4131 "This package generates accessors and interation functions for OCaml
4132 variant types.")
4133 (license license:asl2.0)))
4134
4135 (define-public ocaml-ppx-custom-printf
4136 (package
4137 (name "ocaml-ppx-custom-printf")
4138 (version "0.11.0")
4139 (source (origin
4140 (method url-fetch)
4141 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4142 (version-major+minor version)
4143 "/files/ppx_custom_printf-v" version ".tar.gz"))
4144 (sha256
4145 (base32
4146 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
4147 (build-system dune-build-system)
4148 (propagated-inputs
4149 `(("ocaml-base" ,ocaml-base)
4150 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4151 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4152 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4153 (properties `((upstream-name . "ppx_custom_printf")))
4154 (home-page "https://github.com/janestreet/ppx_custom_printf")
4155 (synopsis "Printf-style format-strings for user-defined string conversion")
4156 (description "Extensions to printf-style format-strings for user-defined
4157 string conversion.")
4158 (license license:asl2.0)))
4159
4160 (define-public ocaml-bin-prot
4161 (package
4162 (name "ocaml-bin-prot")
4163 (version "0.11.0")
4164 (source (origin
4165 (method url-fetch)
4166 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4167 (version-major+minor version)
4168 "/files/bin_prot-v" version ".tar.gz"))
4169 (sha256
4170 (base32
4171 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
4172 (build-system dune-build-system)
4173 (inputs
4174 `(("ocaml-base" ,ocaml-base)
4175 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4176 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
4177 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
4178 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4179 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
4180 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
4181 (properties `((upstream-name . "bin_prot")))
4182 (home-page "https://github.com/janestreet/bin_prot")
4183 (synopsis "Binary protocol generator")
4184 (description "This library contains functionality for reading and writing
4185 OCaml-values in a type-safe binary protocol. It is extremely efficient,
4186 typically supporting type-safe marshalling and unmarshalling of even highly
4187 structured values at speeds sufficient to saturate a gigabit connection. The
4188 protocol is also heavily optimized for size, making it ideal for long-term
4189 storage of large amounts of data.")
4190 (license (list
4191 license:asl2.0
4192 license:bsd-3))))
4193
4194 (define-public ocaml-octavius
4195 (package
4196 (name "ocaml-octavius")
4197 (version "1.2.1")
4198 (source (origin
4199 (method git-fetch)
4200 (uri (git-reference
4201 (url "https://github.com/ocaml-doc/octavius")
4202 (commit (string-append "v" version))))
4203 (file-name (git-file-name name version))
4204 (sha256
4205 (base32
4206 "1ck6yj6z5rvqyl39rz87ca1bnk0f1dpgvlk115631hjh8bwpfvfq"))))
4207 (build-system dune-build-system)
4208 (properties `((upstream-name . "octavius")))
4209 (home-page "https://github.com/ocaml-doc/octavius")
4210 (synopsis "Ocamldoc comment syntax parser")
4211 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
4212 (license license:isc)))
4213
4214 (define-public ocaml-ppx-hash
4215 (package
4216 (name "ocaml-ppx-hash")
4217 (version "0.11.1")
4218 (source (origin
4219 (method git-fetch)
4220 (uri (git-reference
4221 (url "https://github.com/janestreet/ppx_hash.git")
4222 (commit (string-append "v" version))))
4223 (file-name (git-file-name name version))
4224 (sha256
4225 (base32
4226 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
4227 (build-system dune-build-system)
4228 (propagated-inputs
4229 `(("ocaml-base" ,ocaml-base)
4230 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4231 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4232 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4233 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4234 (properties `((upstream-name . "ppx_hash")))
4235 (home-page "https://github.com/janestreet/ppx_hash")
4236 (synopsis "Generation of hash functions from type expressions and definitions")
4237 (description "This package is a collection of ppx rewriters that generate
4238 hash functions from type exrpessions and definitions.")
4239 (license license:asl2.0)))
4240
4241 (define-public ocaml-ppx-enumerate
4242 (package
4243 (name "ocaml-ppx-enumerate")
4244 (version "0.11.1")
4245 (source (origin
4246 (method git-fetch)
4247 (uri (git-reference
4248 (url "https://github.com/janestreet/ppx_enumerate.git")
4249 (commit (string-append "v" version))))
4250 (file-name (git-file-name name version))
4251 (sha256
4252 (base32
4253 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
4254 (build-system dune-build-system)
4255 (arguments
4256 `(#:tests? #f)) ; no test suite
4257 (propagated-inputs
4258 `(("ocaml-base" ,ocaml-base)
4259 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4260 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4261 (properties `((upstream-name . "ppx_enumerate")))
4262 (home-page "https://github.com/janestreet/ppx_enumerate")
4263 (synopsis "Generate a list containing all values of a finite type")
4264 (description "Ppx_enumerate is a ppx rewriter which generates a definition
4265 for the list of all values of a type (for a type which only has finitely
4266 many values).")
4267 (license license:asl2.0)))
4268
4269 (define-public ocaml-ppx-bench
4270 (package
4271 (name "ocaml-ppx-bench")
4272 (version "0.11.0")
4273 (source (origin
4274 (method url-fetch)
4275 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4276 (version-major+minor version)
4277 "/files/ppx_bench-v" version ".tar.gz"))
4278 (sha256
4279 (base32
4280 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
4281 (build-system dune-build-system)
4282 (arguments
4283 ;; No tests
4284 `(#:tests? #f))
4285 (propagated-inputs
4286 `(("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4287 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4288 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4289 (properties `((upstream-name . "ppx_bench")))
4290 (home-page "https://github.com/janestreet/ppx_bench")
4291 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
4292 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
4293 (license license:asl2.0)))
4294
4295 (define-public ocaml-ppx-here
4296 (package
4297 (name "ocaml-ppx-here")
4298 (version "0.11.0")
4299 (source (origin
4300 (method url-fetch)
4301 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4302 (version-major+minor version)
4303 "/files/ppx_here-v" version ".tar.gz"))
4304 (sha256
4305 (base32
4306 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))))
4307 (build-system dune-build-system)
4308 (arguments
4309 ;; broken tests
4310 `(#:tests? #f))
4311 (propagated-inputs
4312 `(("ocaml-base" ,ocaml-base)
4313 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4314 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4315 (properties `((upstream-name . "ppx_here")))
4316 (home-page "https://github.com/janestreet/ppx_here")
4317 (synopsis "Expands [%here] into its location")
4318 (description
4319 "Part of the Jane Street's PPX rewriters collection.")
4320 (license license:asl2.0)))
4321
4322 (define-public ocaml-typerep
4323 (package
4324 (name "ocaml-typerep")
4325 (version "0.11.0")
4326 (source (origin
4327 (method url-fetch)
4328 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4329 (version-major+minor version)
4330 "/files/typerep-v" version ".tar.gz"))
4331 (sha256
4332 (base32
4333 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
4334 (build-system dune-build-system)
4335 (arguments
4336 `(#:tests? #f))
4337 (propagated-inputs `(("ocaml-base" ,ocaml-base)))
4338 (home-page "https://github.com/janestreet/typerep")
4339 (synopsis "Typerep is a library for runtime types")
4340 (description "Typerep is a library for runtime types.")
4341 (license license:asl2.0)))
4342
4343 (define-public ocaml-ppx-sexp-value
4344 (package
4345 (name "ocaml-ppx-sexp-value")
4346 (version "0.11.0")
4347 (source (origin
4348 (method url-fetch)
4349 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4350 (version-major+minor version)
4351 "/files/ppx_sexp_value-v" version ".tar.gz"))
4352 (sha256
4353 (base32
4354 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
4355 (build-system dune-build-system)
4356 (propagated-inputs
4357 `(("ocaml-base" ,ocaml-base)
4358 ("ocaml-ppx-here" ,ocaml-ppx-here)
4359 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4360 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4361 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4362 (properties `((upstream-name . "ppx_sexp_value")))
4363 (home-page "https://github.com/janestreet/ppx_sexp_value")
4364 (synopsis "Simplify building s-expressions from ocaml values")
4365 (description "A ppx rewriter that simplifies building s-expressions from
4366 ocaml values.")
4367 (license license:asl2.0)))
4368
4369 (define-public ocaml-ppx-sexp-message
4370 (package
4371 (name "ocaml-ppx-sexp-message")
4372 (version "0.11.0")
4373 (source (origin
4374 (method url-fetch)
4375 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4376 (version-major+minor version)
4377 "/files/ppx_sexp_message-v" version ".tar.gz"))
4378 (sha256
4379 (base32
4380 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
4381 (build-system dune-build-system)
4382 (propagated-inputs
4383 `(("ocaml-base" ,ocaml-base)
4384 ("ocaml-ppx-here" ,ocaml-ppx-here)
4385 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4386 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4387 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4388 (properties `((upstream-name . "ppx_sexp_message")))
4389 (home-page "https://github.com/janestreet/ppx_sexp_message")
4390 (synopsis "A ppx rewriter for easy construction of s-expressions")
4391 (description "Ppx_sexp_message aims to ease the creation of s-expressions
4392 in OCaml. This is mainly motivated by writing error and debugging messages,
4393 where one needs to construct a s-expression based on various element of the
4394 context such as function arguments.")
4395 (license license:asl2.0)))
4396
4397 (define-public ocaml-ppx-pipebang
4398 (package
4399 (name "ocaml-ppx-pipebang")
4400 (version "0.11.0")
4401 (source (origin
4402 (method url-fetch)
4403 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4404 (version-major+minor version)
4405 "/files/ppx_pipebang-v" version ".tar.gz"))
4406 (sha256
4407 (base32
4408 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
4409 (build-system dune-build-system)
4410 (arguments
4411 ;; No tests
4412 `(#:tests? #f))
4413 (propagated-inputs
4414 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4415 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4416 (properties `((upstream-name . "ppx_pipebang")))
4417 (home-page "https://github.com/janestreet/ppx_pipebang")
4418 (synopsis "Inline reverse application operators `|>` and `|!`")
4419 (description "A ppx rewriter that inlines reverse application operators
4420 @code{|>} and @code{|!}.")
4421 (license license:asl2.0)))
4422
4423 (define-public ocaml-ppx-optional
4424 (package
4425 (name "ocaml-ppx-optional")
4426 (version "0.11.0")
4427 (source (origin
4428 (method url-fetch)
4429 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4430 (version-major+minor version)
4431 "/files/ppx_optional-v" version ".tar.gz"))
4432 (sha256
4433 (base32
4434 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))))
4435 (build-system dune-build-system)
4436 (arguments
4437 ;; No tests
4438 `(#:tests? #f))
4439 (propagated-inputs
4440 `(("ocaml-base" ,ocaml-base)
4441 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4442 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4443 (properties `((upstream-name . "ppx_optional")))
4444 (home-page "https://github.com/janestreet/ppx_optional")
4445 (synopsis "Pattern matching on flat options")
4446 (description
4447 "A ppx rewriter that rewrites simple match statements with an if then
4448 else expression.")
4449 (license license:asl2.0)))
4450
4451 (define-public ocaml-ppx-optcomp
4452 (package
4453 (name "ocaml-ppx-optcomp")
4454 (version "0.11.0")
4455 (source (origin
4456 (method url-fetch)
4457 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4458 (version-major+minor version)
4459 "/files/ppx_optcomp-v" version ".tar.gz"))
4460 (sha256
4461 (base32
4462 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))))
4463 (build-system dune-build-system)
4464 (propagated-inputs
4465 `(("ocaml-base" ,ocaml-base)
4466 ("ocaml-stdio" ,ocaml-stdio)
4467 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4468 (properties `((upstream-name . "ppx_optcomp")))
4469 (home-page "https://github.com/janestreet/ppx_optcomp")
4470 (synopsis "Optional compilation for OCaml")
4471 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
4472 used to handle optional compilations of pieces of code depending of the word
4473 size, the version of the compiler, ...")
4474 (license license:asl2.0)))
4475
4476 (define-public ocaml-ppx-let
4477 (package
4478 (name "ocaml-ppx-let")
4479 (version "0.11.0")
4480 (source (origin
4481 (method url-fetch)
4482 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4483 (version-major+minor version)
4484 "/files/ppx_let-v" version ".tar.gz"))
4485 (sha256
4486 (base32
4487 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))))
4488 (build-system dune-build-system)
4489 (propagated-inputs
4490 `(("ocaml-base" ,ocaml-base)
4491 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4492 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4493 (properties `((upstream-name . "ppx_let")))
4494 (home-page "https://github.com/janestreet/ppx_let")
4495 (synopsis "Monadic let-bindings")
4496 (description "A ppx rewriter for monadic and applicative let bindings,
4497 match expressions, and if expressions.")
4498 (license license:asl2.0)))
4499
4500 (define-public ocaml-ppx-fail
4501 (package
4502 (name "ocaml-ppx-fail")
4503 (version "0.11.0")
4504 (source (origin
4505 (method url-fetch)
4506 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4507 (version-major+minor version)
4508 "/files/ppx_fail-v" version ".tar.gz"))
4509 (sha256
4510 (base32
4511 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
4512 (build-system dune-build-system)
4513 (propagated-inputs
4514 `(("ocaml-base" ,ocaml-base)
4515 ("ocaml-ppx-here" ,ocaml-ppx-here)
4516 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4517 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4518 (properties `((upstream-name . "ppx_fail")))
4519 (home-page "https://github.com/janestreet/ppx_fail")
4520 (synopsis "Add location to calls to failwiths")
4521 (description "Syntax extension that makes [failwiths] always include a
4522 position.")
4523 (license license:asl2.0)))
4524
4525 (define-public ocaml-ppx-assert
4526 (package
4527 (name "ocaml-ppx-assert")
4528 (version "0.11.0")
4529 (source (origin
4530 (method url-fetch)
4531 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4532 (version-major+minor version)
4533 "/files/ppx_assert-v" version ".tar.gz"))
4534 (sha256
4535 (base32
4536 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))))
4537 (build-system dune-build-system)
4538 (propagated-inputs
4539 `(("ocaml-base" ,ocaml-base)
4540 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4541 ("ocaml-ppx-here" ,ocaml-ppx-here)
4542 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4543 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4544 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4545 (properties `((upstream-name . "ppx_assert")))
4546 (home-page "https://github.com/janestreet/ppx_assert")
4547 (synopsis "Assert-like extension nodes that raise useful errors on failure")
4548 (description "This package contains assert-like extension nodes that raise
4549 useful errors on failure.")
4550 (license license:asl2.0)))
4551
4552 (define-public ocaml-ppx-expect
4553 (package
4554 (name "ocaml-ppx-expect")
4555 (version "0.12.0")
4556 (source (origin
4557 (method git-fetch)
4558 (uri (git-reference
4559 (url "https://github.com/janestreet/ppx_expect.git")
4560 (commit (string-append "v" version))))
4561 (file-name (git-file-name name version))
4562 (sha256
4563 (base32
4564 "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"))))
4565 (build-system dune-build-system)
4566 (arguments
4567 `(#:jbuild? #t))
4568 (propagated-inputs
4569 `(("ocaml-base" ,ocaml-base)
4570 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
4571 ("ocaml-ppx-compare" ,ocaml-ppx-compare)
4572 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
4573 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
4574 ("ocaml-ppx-here" ,ocaml-ppx-here)
4575 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4576 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4577 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
4578 ("ocaml-stdio" ,ocaml-stdio)
4579 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4580 ("ocaml-ppxlib" ,ocaml-ppxlib)
4581 ("ocaml-re" ,ocaml-re)))
4582 (properties `((upstream-name . "ppx_expect")))
4583 (home-page "https://github.com/janestreet/ppx_expect")
4584 (synopsis "Cram like framework for OCaml")
4585 (description "Expect-test is a framework for writing tests in OCaml, similar
4586 to Cram. Expect-tests mimics the existing inline tests framework with the
4587 @code{let%expect_test} construct. The body of an expect-test can contain
4588 output-generating code, interleaved with @code{%expect} extension expressions
4589 to denote the expected output.")
4590 (license license:asl2.0)))
4591
4592 (define-public ocaml-ppx-js-style
4593 (package
4594 (name "ocaml-ppx-js-style")
4595 (version "0.11.0")
4596 (source (origin
4597 (method url-fetch)
4598 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4599 (version-major+minor version)
4600 "/files/ppx_js_style-v" version ".tar.gz"))
4601 (sha256
4602 (base32
4603 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))))
4604 (build-system dune-build-system)
4605 (arguments
4606 ;; No tests
4607 `(#:tests? #f))
4608 (propagated-inputs
4609 `(("ocaml-base" ,ocaml-base)
4610 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4611 ("ocaml-octavius" ,ocaml-octavius)
4612 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4613 (properties `((upstream-name . "ppx_js_style")))
4614 (home-page "https://github.com/janestreet/ppx_js_style")
4615 (synopsis "Code style checker for Jane Street Packages")
4616 (description "This packages is a no-op ppx rewriter. It is used as a
4617 @code{lint} tool to enforce some coding conventions across all Jane Street
4618 packages.")
4619 (license license:asl2.0)))
4620
4621 (define-public ocaml-ppx-typerep-conv
4622 (package
4623 (name "ocaml-ppx-typerep-conv")
4624 (version "0.11.1")
4625 (source (origin
4626 (method git-fetch)
4627 (uri (git-reference
4628 (url "https://github.com/janestreet/ppx_typerep_conv.git")
4629 (commit (string-append "v" version))))
4630 (file-name (git-file-name name version))
4631 (sha256
4632 (base32
4633 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
4634 (build-system dune-build-system)
4635 (arguments
4636 `(#:test-target "."))
4637 (propagated-inputs
4638 `(("ocaml-base" ,ocaml-base)
4639 ("ocaml-typerep" ,ocaml-typerep)
4640 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4641 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4642 (properties `((upstream-name . "ppx_typerep_conv")))
4643 (home-page "https://github.com/janestreet/ppx_typerep_conv")
4644 (synopsis "Generation of runtime types from type declarations")
4645 (description "This package can automatically generate runtime types
4646 from type definitions.")
4647 (license license:asl2.0)))
4648
4649 (define-public ocaml-ppx-base
4650 (package
4651 (name "ocaml-ppx-base")
4652 (version "0.11.0")
4653 (source (origin
4654 (method url-fetch)
4655 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4656 (version-major+minor version)
4657 "/files/ppx_base-v" version ".tar.gz"))
4658 (sha256
4659 (base32
4660 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))))
4661 (build-system dune-build-system)
4662 (arguments
4663 `(#:test-target "."))
4664 (propagated-inputs
4665 `(("ocaml-ppx-compare" ,ocaml-ppx-compare)
4666 ("ocaml-ppx-enumerate" ,ocaml-ppx-enumerate)
4667 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
4668 ("ocaml-ppx-js-style" ,ocaml-ppx-js-style)
4669 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4670 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4671 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4672 (properties `((upstream-name . "ppx_base")))
4673 (home-page "https://github.com/janestreet/ppx_base")
4674 (synopsis "Base set of ppx rewriters")
4675 (description "Ppx_base is the set of ppx rewriters used for Base.
4676
4677 Note that Base doesn't need ppx to build, it is only used as a
4678 verification tool.")
4679 (license license:asl2.0)))
4680
4681 (define-public ocaml-ppx-bin-prot
4682 (package
4683 (name "ocaml-ppx-bin-prot")
4684 (version "0.11.1")
4685 (source (origin
4686 (method git-fetch)
4687 (uri (git-reference
4688 (url "https://github.com/janestreet/ppx_bin_prot.git")
4689 (commit (string-append "v" version))))
4690 (file-name (git-file-name name version))
4691 (sha256
4692 (base32
4693 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
4694 (build-system dune-build-system)
4695 (arguments
4696 ;; Cyclic dependency with ocaml-ppx-jane
4697 `(#:tests? #f))
4698 (propagated-inputs
4699 `(("ocaml-base" ,ocaml-base)
4700 ("ocaml-bin-prot" ,ocaml-bin-prot)
4701 ("ocaml-ppx-here" ,ocaml-ppx-here)
4702 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4703 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4704 (properties `((upstream-name . "ppx_bin_prot")))
4705 (home-page "https://github.com/janestreet/ppx_bin_prot")
4706 (synopsis "Generation of bin_prot readers and writers from types")
4707 (description "Generation of binary serialization and deserialization
4708 functions from type definitions.")
4709 (license license:asl2.0)))
4710
4711 (define-public ocaml-ppx-jane
4712 (package
4713 (name "ocaml-ppx-jane")
4714 (version "0.11.0")
4715 (source (origin
4716 (method url-fetch)
4717 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4718 (version-major+minor version)
4719 "/files/ppx_jane-v" version ".tar.gz"))
4720 (sha256
4721 (base32
4722 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
4723 (build-system dune-build-system)
4724 (arguments
4725 `(#:test-target "."))
4726 (propagated-inputs
4727 `(("ocaml-ppx-assert" ,ocaml-ppx-assert)
4728 ("ocaml-ppx-base" ,ocaml-ppx-base)
4729 ("ocaml-ppx-bench" ,ocaml-ppx-bench)
4730 ("ocaml-ppx-bin-prot" ,ocaml-ppx-bin-prot)
4731 ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf)
4732 ("ocaml-ppx-expect" ,ocaml-ppx-expect)
4733 ("ocaml-ppx-fail" ,ocaml-ppx-fail)
4734 ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv)
4735 ("ocaml-ppx-here" ,ocaml-ppx-here)
4736 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4737 ("ocaml-ppx-let" ,ocaml-ppx-let)
4738 ("ocaml-ppx-optcomp" ,ocaml-ppx-optcomp)
4739 ("ocaml-ppx-optional" ,ocaml-ppx-optional)
4740 ("ocaml-ppx-pipebang" ,ocaml-ppx-pipebang)
4741 ("ocaml-ppx-sexp-message" ,ocaml-ppx-sexp-message)
4742 ("ocaml-ppx-sexp-value" ,ocaml-ppx-sexp-value)
4743 ("ocaml-ppx-typerep-conv" ,ocaml-ppx-typerep-conv)
4744 ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv)
4745 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4746 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4747 (properties `((upstream-name . "ppx_jane")))
4748 (home-page "https://github.com/janestreet/ppx_jane")
4749 (synopsis "Standard Jane Street ppx rewriters")
4750 (description "This package installs a ppx-jane executable, which is a ppx
4751 driver including all standard Jane Street ppx rewriters.")
4752 (license license:asl2.0)))
4753
4754 (define-public ocaml-splittable-random
4755 (package
4756 (name "ocaml-splittable-random")
4757 (version "0.11.0")
4758 (source (origin
4759 (method url-fetch)
4760 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4761 (version-major+minor version)
4762 "/files/splittable_random-v" version ".tar.gz"))
4763 (sha256
4764 (base32
4765 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
4766 (build-system dune-build-system)
4767 (propagated-inputs
4768 `(("ocaml-base" ,ocaml-base)
4769 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
4770 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
4771 (properties `((upstream-name . "splittable_random")))
4772 (home-page "https://github.com/janestreet/splittable_random")
4773 (synopsis "PRNG that can be split into independent streams")
4774 (description "This package provides a splittable
4775 @acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
4776 be used as a stream of random values; it can also be split to produce a
4777 second, independent stream of random values.
4778
4779 This library implements a splittable pseudo-random number generator that sacrifices
4780 cryptographic-quality randomness in favor of performance.")
4781 (license license:asl2.0)))
4782
4783 (define-public ocaml-jane-street-headers
4784 (package
4785 (name "ocaml-jane-street-headers")
4786 (version "0.11.0")
4787 (source (origin
4788 (method url-fetch)
4789 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4790 (version-major+minor version)
4791 "/files/jane-street-headers-v" version ".tar.gz"))
4792 (sha256
4793 (base32
4794 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
4795 (build-system dune-build-system)
4796 (arguments
4797 `(#:test-target "."))
4798 (home-page "https://github.com/janestreet/jane-street-headers")
4799 (synopsis "Jane Street C header files")
4800 (description "This package provides C header files shared between the
4801 various Jane Street packages.")
4802 (license license:asl2.0)))
4803
4804 (define-public ocaml-configurator
4805 (package
4806 (name "ocaml-configurator")
4807 (version "0.11.0")
4808 (source (origin
4809 (method url-fetch)
4810 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4811 (version-major+minor version)
4812 "/files/configurator-v" version ".tar.gz"))
4813 (sha256
4814 (base32
4815 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
4816 (build-system dune-build-system)
4817 (arguments
4818 ;; No tests
4819 `(#:tests? #f))
4820 (propagated-inputs
4821 `(("ocaml-base" ,ocaml-base)
4822 ("ocaml-stdio" ,ocaml-stdio)))
4823 (home-page "https://github.com/janestreet/configurator")
4824 (synopsis "Helper library for gathering system configuration")
4825 (description "Configurator is a small library that helps writing OCaml
4826 scripts that test features available on the system, in order to generate config.h
4827 files for instance.
4828
4829 Configurator allows one to:
4830 @itemize
4831 @item test if a C program compiles
4832 @item query pkg-config
4833 @item import #define from OCaml header files
4834 @item generate config.h file
4835 @end itemize")
4836 (license license:asl2.0)))
4837
4838 (define-public ocaml-spawn
4839 (package
4840 (name "ocaml-spawn")
4841 (version "0.13.0")
4842 (source (origin
4843 (method git-fetch)
4844 (uri (git-reference
4845 (url "https://github.com/janestreet/spawn.git")
4846 (commit (string-append "v" version))))
4847 (file-name (git-file-name name version))
4848 (sha256
4849 (base32
4850 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
4851 (build-system dune-build-system)
4852 (arguments
4853 `(#:phases
4854 (modify-phases %standard-phases
4855 (add-before 'check 'fix-tests
4856 (lambda _
4857 (substitute* "test/tests.ml"
4858 (("/bin/pwd") (which "pwd"))
4859 (("/bin/echo") (which "echo")))
4860 #t)))))
4861 (native-inputs
4862 `(("ocaml-ppx-expect" ,ocaml-ppx-expect)))
4863 (home-page "https://github.com/janestreet/spawn")
4864 (synopsis "Spawning sub-processes")
4865 (description
4866 "Spawn is a small library exposing only one functionality: spawning sub-process.
4867
4868 It has three main goals:
4869
4870 @itemize
4871 @item provide missing features of Unix.create_process such as providing a
4872 working directory,
4873 @item provide better errors when a system call fails in the
4874 sub-process. For instance if a command is not found, you get a proper
4875 @code{Unix.Unix_error} exception,
4876 @item improve performances by using vfork when available. It is often
4877 claimed that nowadays fork is as fast as vfork, however in practice
4878 fork takes time proportional to the process memory while vfork is
4879 constant time. In application using a lot of memory, vfork can be
4880 thousands of times faster than fork.
4881 @end itemize")
4882 (license license:asl2.0)))
4883
4884 (define-public ocaml-core
4885 (package
4886 (name "ocaml-core")
4887 (version "0.11.3")
4888 (source (origin
4889 (method git-fetch)
4890 (uri (git-reference
4891 (url "https://github.com/janestreet/core.git")
4892 (commit (string-append "v" version))))
4893 (file-name (git-file-name name version))
4894 (sha256
4895 (base32
4896 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
4897 (build-system dune-build-system)
4898 (arguments
4899 `(#:jbuild? #t
4900 ;; Require a cyclic dependency: core_extended
4901 #:tests? #f))
4902 (propagated-inputs
4903 `(("ocaml-base" ,ocaml-base)
4904 ("ocaml-configurator" ,ocaml-configurator)
4905 ("ocaml-core-kernel" ,ocaml-core-kernel)
4906 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
4907 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
4908 ("ocaml-sexplib" ,ocaml-sexplib)
4909 ("ocaml-spawn" ,ocaml-spawn)
4910 ("ocaml-stdio" ,ocaml-stdio)
4911 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
4912 ("ocaml-ppxlib" ,ocaml-ppxlib)))
4913 (home-page "https://github.com/janestreet/core")
4914 (synopsis "Alternative to OCaml's standard library")
4915 (description "The Core suite of libraries is an alternative to OCaml's
4916 standard library that was developed by Jane Street.")
4917 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
4918 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
4919 (license license:asl2.0)))
4920
4921 (define-public ocaml-core-kernel
4922 (package
4923 (name "ocaml-core-kernel")
4924 (version "0.11.1")
4925 (source (origin
4926 (method git-fetch)
4927 (uri (git-reference
4928 (url "https://github.com/janestreet/core_kernel.git")
4929 (commit (string-append "v" version))))
4930 (file-name (git-file-name name version))
4931 (sha256
4932 (base32
4933 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
4934 (build-system dune-build-system)
4935 (arguments
4936 ;; Cyclic dependency with ocaml-core
4937 `(#:tests? #f))
4938 (propagated-inputs
4939 `(("ocaml-base" ,ocaml-base)
4940 ("ocaml-bin-prot" ,ocaml-bin-prot)
4941 ("ocaml-configurator" ,ocaml-configurator)
4942 ("ocaml-fieldslib" ,ocaml-fieldslib)
4943 ("ocaml-jane-street-headers" ,ocaml-jane-street-headers)
4944 ("ocaml-ppx-assert" ,ocaml-ppx-assert)
4945 ("ocaml-ppx-base" ,ocaml-ppx-base)
4946 ("ocaml-ppx-hash" ,ocaml-ppx-hash)
4947 ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test)
4948 ("ocaml-ppx-jane" ,ocaml-ppx-jane)
4949 ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
4950 ("ocaml-ppx-sexp-message" ,ocaml-ppx-sexp-message)
4951 ("ocaml-sexplib" ,ocaml-sexplib)
4952 ("ocaml-splittable-random" ,ocaml-splittable-random)
4953 ("ocaml-stdio" ,ocaml-stdio)
4954 ("ocaml-typerep" ,ocaml-typerep)
4955 ("ocaml-variantslib" ,ocaml-variantslib)
4956 ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
4957 (properties `((upstream-name . "core_kernel")))
4958 (home-page "https://github.com/janestreet/core_kernel")
4959 (synopsis "Portable standard library for OCaml")
4960 (description "Core is an alternative to the OCaml standard library.
4961
4962 Core_kernel is the system-independent part of Core. It is aimed for cases when
4963 the full Core is not available, such as in Javascript.")
4964 (license (list
4965 ;; this package and parts of OCaml, relicensed by janestreet
4966 license:asl2.0
4967 ;; MLton and sjs
4968 license:expat))))
4969
4970 (define-public ocaml-markup
4971 (package
4972 (name "ocaml-markup")
4973 (version "0.8.0")
4974 (home-page "https://github.com/aantron/markup.ml")
4975 (source
4976 (origin
4977 (method git-fetch)
4978 (uri (git-reference
4979 (url (string-append home-page ".git"))
4980 (commit version)))
4981 (file-name (git-file-name name version))
4982 (sha256
4983 (base32
4984 "0aif4abvfmi9xc1pvw5n5rbm6rzkkpsxyvdn0lanr33rjpvkwdlm"))))
4985 (build-system dune-build-system)
4986 (inputs
4987 `(("ocaml-uchar" ,ocaml-uchar)
4988 ("ocaml-uutf" ,ocaml-uutf)
4989 ("ocaml-lwt" ,ocaml-lwt)))
4990 (native-inputs `(("ocaml-ounit" ,ocaml-ounit)))
4991 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
4992 (description "Markup.ml provides an HTML parser and an XML parser. The
4993 parsers are wrapped in a simple interface: they are functions that transform
4994 byte streams to parsing signal streams. Streams can be manipulated in various
4995 ways, such as processing by fold, filter, and map, assembly into DOM tree
4996 structures, or serialization back to HTML or XML.
4997
4998 Both parsers are based on their respective standards. The HTML parser, in
4999 particular, is based on the state machines defined in HTML5.
5000
5001 The parsers are error-recovering by default, and accept fragments. This makes
5002 it very easy to get a best-effort parse of some input. The parsers can,
5003 however, be easily configured to be strict, and to accept only full documents.
5004
5005 Apart from this, the parsers are streaming (do not build up a document in
5006 memory), non-blocking (can be used with threading libraries), lazy (do not
5007 consume input unless the signal stream is being read), and process the input in
5008 a single pass. They automatically detect the character encoding of the input
5009 stream, and convert everything to UTF-8.")
5010 (license license:bsd-3)))