gnu: Fix common unquote typos.
[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, 2017 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
11 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
12 ;;; Copyright © 2018 Peter Kreye <kreyepr@gmail.com>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages ocaml)
30 #:use-module (gnu packages)
31 #:use-module (gnu packages autotools)
32 #:use-module (gnu packages base)
33 #:use-module (gnu packages bison)
34 #:use-module (gnu packages boost)
35 #:use-module (gnu packages compression)
36 #:use-module (gnu packages curl)
37 #:use-module (gnu packages databases)
38 #:use-module (gnu packages emacs)
39 #:use-module (gnu packages flex)
40 #:use-module (gnu packages gcc)
41 #:use-module (gnu packages ghostscript)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages gnome)
44 #:use-module (gnu packages gtk)
45 #:use-module (gnu packages libevent)
46 #:use-module (gnu packages libffi)
47 #:use-module (gnu packages llvm)
48 #:use-module (gnu packages m4)
49 #:use-module (gnu packages multiprecision)
50 #:use-module (gnu packages ncurses)
51 #:use-module (gnu packages pcre)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages protobuf)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages sdl)
57 #:use-module (gnu packages tex)
58 #:use-module (gnu packages texinfo)
59 #:use-module (gnu packages time)
60 #:use-module (gnu packages tls)
61 #:use-module (gnu packages version-control)
62 #:use-module (gnu packages web-browsers)
63 #:use-module (gnu packages xml)
64 #:use-module (gnu packages xorg)
65 #:use-module (guix build-system gnu)
66 #:use-module (guix build-system ocaml)
67 #:use-module (guix download)
68 #:use-module ((guix licenses) #:prefix license:)
69 #:use-module (guix packages)
70 #:use-module (guix svn-download)
71 #:use-module (guix utils)
72 #:use-module ((srfi srfi-1) #:hide (zip)))
73
74 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
75 ;; their number, not their name.
76 (define (ocaml-forge-uri name version file-number)
77 (string-append "https://forge.ocamlcore.org/frs/download.php/"
78 (number->string file-number) "/" name "-" version
79 ".tar.gz"))
80
81 ;; Janestreet packages are found in a similar way and all need the same patch.
82 (define (janestreet-origin name version hash)
83 (origin (method url-fetch)
84 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
85 (version-major+minor version) "/files/"
86 name "-" version ".tar.gz"))
87 (sha256 (base32 hash))
88 (modules '((guix build utils)))
89 (snippet
90 (let ((pattern (string-append "lib/" name)))
91 `(begin
92 ;; install.ml contains an invalid reference to the ppx file and
93 ;; propagates this error to the generated META file. It
94 ;; looks for it in the "lib" directory, but it is installed in
95 ;; "lib/ocaml/site-lib/package". This substitute does not change
96 ;; this file for non ppx packages.
97 (substitute* "install.ml"
98 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
99 ;; The standard Makefile would try to install janestreet modules
100 ;; in OCaml's directory in the store, which is read-only.
101 (substitute* "Makefile"
102 (("--prefix")
103 "--libdir $(LIBDIR) --prefix")))))))
104
105 ;; They also require almost the same set of arguments
106 (define janestreet-arguments
107 `(#:use-make? #t
108 #:make-flags
109 (list (string-append "CONFIGUREFLAGS=--prefix "
110 (assoc-ref %outputs "out")
111 " --enable-tests")
112 (string-append "LIBDIR="
113 (assoc-ref %outputs "out")
114 "/lib/ocaml/site-lib")
115 ;; for ocaml-bin-prot, otherwise ignored
116 (string-append "OCAML_TOPLEVEL_PATH="
117 (assoc-ref %build-inputs "findlib")
118 "/lib/ocaml/site-lib"))
119 #:phases (modify-phases %standard-phases (delete 'configure))))
120
121 (define-public ocaml
122 (package
123 (name "ocaml")
124 (version "4.02.3")
125 (source (origin
126 (method url-fetch)
127 (uri (string-append
128 "http://caml.inria.fr/pub/distrib/ocaml-"
129 (version-major+minor version)
130 "/ocaml-" version ".tar.xz"))
131 (sha256
132 (base32
133 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
134 (patches
135 (search-patches
136 "ocaml-CVE-2015-8869.patch"
137 "ocaml-Add-a-.file-directive.patch"))))
138 (build-system gnu-build-system)
139 (native-search-paths
140 (list (search-path-specification
141 (variable "OCAMLPATH")
142 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
143 (search-path-specification
144 (variable "CAML_LD_LIBRARY_PATH")
145 (files (list "lib/ocaml/site-lib/stubslibs")))))
146 (native-inputs
147 `(("perl" ,perl)
148 ("pkg-config" ,pkg-config)))
149 (inputs
150 `(("libx11" ,libx11)
151 ;; For libiberty, needed for objdump support.
152 ("gcc:lib" ,(canonical-package gcc) "lib")
153 ("zlib" ,zlib))) ;also needed for objdump support
154 (arguments
155 `(#:modules ((guix build gnu-build-system)
156 (guix build utils)
157 (web server))
158 #:phases
159 (modify-phases %standard-phases
160 (add-after 'unpack 'patch-/bin/sh-references
161 (lambda* (#:key inputs #:allow-other-keys)
162 (let* ((sh (string-append (assoc-ref inputs "bash")
163 "/bin/sh"))
164 (quoted-sh (string-append "\"" sh "\"")))
165 (with-fluids ((%default-port-encoding #f))
166 (for-each
167 (lambda (file)
168 (substitute* file
169 (("\"/bin/sh\"")
170 (begin
171 (format (current-error-port) "\
172 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
173 file quoted-sh)
174 quoted-sh))))
175 (find-files "." "\\.ml$"))
176 #t))))
177 (replace 'configure
178 (lambda* (#:key outputs #:allow-other-keys)
179 (let* ((out (assoc-ref outputs "out"))
180 (mandir (string-append out "/share/man")))
181 ;; Custom configure script doesn't recognize
182 ;; --prefix=<PREFIX> syntax (with equals sign).
183 (zero? (system* "./configure"
184 "--prefix" out
185 "--mandir" mandir)))))
186 (replace 'build
187 (lambda _
188 (zero? (system* "make" "-j" (number->string
189 (parallel-job-count))
190 "world.opt"))))
191 (delete 'check)
192 (add-after 'install 'check
193 (lambda _
194 (with-directory-excursion "testsuite"
195 (zero? (system* "make" "all")))))
196 (add-before 'check 'prepare-socket-test
197 (lambda _
198 (format (current-error-port)
199 "Spawning local test web server on port 8080~%")
200 (when (zero? (primitive-fork))
201 (run-server (lambda (request request-body)
202 (values '((content-type . (text/plain)))
203 "Hello!"))
204 'http '(#:port 8080)))
205 (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
206 (format (current-error-port)
207 "Patching ~a to use localhost port 8080~%"
208 file)
209 (substitute* file
210 (("caml.inria.fr") "localhost")
211 (("80") "8080")
212 (("HTTP1.0") "HTTP/1.0"))
213 #t))))))
214 (home-page "https://ocaml.org/")
215 (synopsis "The OCaml programming language")
216 (description
217 "OCaml is a general purpose industrial-strength programming language with
218 an emphasis on expressiveness and safety. Developed for more than 20 years at
219 Inria it benefits from one of the most advanced type systems and supports
220 functional, imperative and object-oriented styles of programming.")
221 ;; The compiler is distributed under qpl1.0 with a change to choice of
222 ;; law: the license is governed by the laws of France. The library is
223 ;; distributed under lgpl2.0.
224 (license (list license:qpl license:lgpl2.0))))
225
226 (define-public ocaml-4.01
227 (package
228 (inherit ocaml)
229 (version "4.01.0")
230 (source (origin
231 (method url-fetch)
232 (uri (string-append
233 "http://caml.inria.fr/pub/distrib/ocaml-"
234 (version-major+minor version)
235 "/ocaml-" version ".tar.xz"))
236 (sha256
237 (base32
238 "03d7ida94s1gpr3gadf4jyhmh5rrszd5s4m4z59daaib25rvfyv7"))))
239 (arguments
240 (substitute-keyword-arguments (package-arguments ocaml)
241 ((#:phases phases)
242 `(modify-phases ,phases
243 (replace 'build
244 (lambda _
245 ;; Specifying '-j' at all causes the build to fail.
246 (zero? (system* "make" "world.opt"))))
247 (replace 'check
248 (lambda _
249 (with-directory-excursion "testsuite"
250 (zero? (system*
251 "make"
252 "all"
253 (string-append
254 "TOPDIR=" (getcwd) "/.."))))))))))))
255
256 (define-public opam
257 (package
258 (name "opam")
259 (version "1.2.2")
260 (source (origin
261 (method url-fetch)
262 ;; Use the '-full' version, which includes all the dependencies.
263 (uri (string-append
264 "https://github.com/ocaml/opam/releases/download/"
265 version "/opam-full-" version ".tar.gz")
266 ;; (string-append "https://github.com/ocaml/opam/archive/"
267 ;; version ".tar.gz")
268 )
269 (sha256
270 (base32
271 "004gwn6rbpcb53y3rpb3v23vk39rp2xmf0liyd5iy12ij8bigrhm"))))
272 (build-system gnu-build-system)
273 (arguments
274 '(;; Sometimes, 'make -jX' would fail right after ./configure with
275 ;; "Fatal error: exception End_of_file".
276 #:parallel-build? #f
277
278 ;; For some reason, 'ocp-build' needs $TERM to be set.
279 #:make-flags `("TERM=screen"
280 ,(string-append "SHELL="
281 (assoc-ref %build-inputs "bash")
282 "/bin/sh"))
283 #:test-target "tests"
284
285 ;; FIXME: There's an obscure test failure:
286 ;; …/_obuild/opam/opam.asm install P1' failed.
287 #:tests? #f
288
289 #:phases (modify-phases %standard-phases
290 (add-before 'build 'pre-build
291 (lambda* (#:key inputs make-flags #:allow-other-keys)
292 (let ((bash (assoc-ref inputs "bash")))
293 (substitute* "src/core/opamSystem.ml"
294 (("\"/bin/sh\"")
295 (string-append "\"" bash "/bin/sh\"")))
296 ;; Build dependencies
297 (zero? (apply system* "make" "lib-ext" make-flags)))))
298 (add-before 'check 'pre-check
299 (lambda _
300 (setenv "HOME" (getcwd))
301 (and (system "git config --global user.email guix@gnu.org")
302 (system "git config --global user.name Guix")))))))
303 (native-inputs
304 `(("git" ,git) ;for the tests
305 ("python" ,python) ;for the tests
306 ("camlp4" ,camlp4)))
307 (inputs
308 `(("ocaml" ,ocaml)
309 ("ncurses" ,ncurses)
310 ("curl" ,curl)))
311 (home-page "http://opam.ocamlpro.com/")
312 (synopsis "Package manager for OCaml")
313 (description
314 "OPAM is a tool to manage OCaml packages. It supports multiple
315 simultaneous compiler installations, flexible package constraints, and a
316 Git-friendly development workflow.")
317
318 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
319 (license license:lgpl3)))
320
321 (define-public camlp4
322 (package
323 (name "camlp4")
324 (version "4.02+6")
325 (source (origin
326 (method url-fetch)
327 (uri (string-append "https://github.com/ocaml/camlp4/archive/"
328 version ".tar.gz"))
329 (sha256
330 (base32
331 "0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342"))
332 (file-name (string-append name "-" version ".tar.gz"))))
333 (build-system gnu-build-system)
334 (native-inputs `(("ocaml" ,ocaml)
335 ("which" ,which)))
336 (inputs `(("ocaml" ,ocaml)))
337 (arguments
338 '(#:tests? #f ;no documented test target
339 ;; a race-condition will lead byte and native targets to mkdir _build
340 ;; which fails on the second attempt.
341 #:parallel-build? #f
342 #:make-flags '("all")
343 #:phases (modify-phases %standard-phases
344 (replace
345 'configure
346 (lambda* (#:key outputs #:allow-other-keys)
347 ;; This is a home-made 'configure' script.
348 (let ((out (assoc-ref outputs "out")))
349 (zero? (system* "./configure"
350 (string-append "--libdir=" out
351 "/lib/ocaml/site-lib")
352 (string-append "--bindir=" out "/bin")
353 (string-append "--pkgdir=" out
354 "/lib/ocaml/site-lib"))))))
355 (add-after 'install 'install-meta
356 (lambda* (#:key outputs #:allow-other-keys)
357 (let ((out (assoc-ref outputs "out")))
358 (substitute* "camlp4/META.in"
359 (("directory = .*")
360 (string-append "directory = \"" out
361 "/lib/ocaml/site-lib/camlp4\"\n")))
362 (zero? (system* "make" "install-META"))))))))
363 (home-page "https://github.com/ocaml/camlp4")
364 (synopsis "Write parsers in OCaml")
365 (description
366 "Camlp4 is a software system for writing extensible parsers for
367 programming languages. It provides a set of OCaml libraries that are used to
368 define grammars as well as loadable syntax extensions of such grammars.
369 Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most
370 important applications is the definition of domain-specific extensions of the
371 syntax of OCaml.")
372
373 ;; This is LGPLv2 with an exception that allows packages statically-linked
374 ;; against the library to be released under any terms.
375 (license license:lgpl2.0)))
376
377 (define-public camlp5
378 (package
379 (name "camlp5")
380 (version "6.14")
381 (source (origin
382 (method url-fetch)
383 (uri (string-append "http://camlp5.gforge.inria.fr/distrib/src/"
384 name "-" version ".tgz"))
385 (sha256
386 (base32
387 "1ql04iyvclpyy9805kpddc4ndjb5d0qg4shhi2fc6bixi49fvy89"))))
388 (build-system gnu-build-system)
389 (inputs
390 `(("ocaml" ,ocaml)))
391 (arguments
392 `(#:tests? #f ; XXX TODO figure out how to run the tests
393 #:phases
394 (modify-phases %standard-phases
395 (replace 'configure
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let* ((out (assoc-ref outputs "out"))
398 (mandir (string-append out "/share/man")))
399 ;; Custom configure script doesn't recognize
400 ;; --prefix=<PREFIX> syntax (with equals sign).
401 (zero? (system* "./configure"
402 "--prefix" out
403 "--mandir" mandir)))))
404 (replace 'build
405 (lambda _
406 (zero? (system* "make" "-j" (number->string
407 (parallel-job-count))
408 "world.opt"))))
409 ;; Required for findlib to find camlp5's libraries
410 (add-after 'install 'install-meta
411 (lambda* (#:key outputs #:allow-other-keys)
412 (install-file "etc/META" (string-append (assoc-ref outputs "out")
413 "/lib/ocaml/camlp5/")))))))
414 (home-page "http://camlp5.gforge.inria.fr/")
415 (synopsis "Pre-processor Pretty Printer for OCaml")
416 (description
417 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
418 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
419 concrete syntax of the language (Quotations, Syntax Extensions).")
420 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
421 (license (list license:bsd-3 license:qpl))))
422
423 (define-public hevea
424 (package
425 (name "hevea")
426 (version "2.28")
427 (source (origin
428 (method url-fetch)
429 (uri (string-append "http://hevea.inria.fr/old/"
430 name "-" version ".tar.gz"))
431 (sha256
432 (base32
433 "14fns13wlnpiv9i05841kvi3cq4b9v2sw5x3ff6ziws28q701qnd"))))
434 (build-system gnu-build-system)
435 (inputs
436 `(("ocaml" ,ocaml)))
437 (arguments
438 `(#:tests? #f ; no test suite
439 #:make-flags (list (string-append "PREFIX=" %output))
440 #:phases (modify-phases %standard-phases
441 (delete 'configure)
442 (add-before 'build 'patch-/bin/sh
443 (lambda _
444 (substitute* "_tags"
445 (("/bin/sh") (which "sh")))
446 #t)))))
447 (home-page "http://hevea.inria.fr/")
448 (synopsis "LaTeX to HTML translator")
449 (description
450 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
451 written in Objective Caml.")
452 (license license:qpl)))
453
454 (define-public coq
455 (package
456 (name "coq")
457 (version "8.7.0")
458 (source (origin
459 (method url-fetch)
460 (uri (string-append "https://coq.inria.fr/distrib/V" version
461 "/files/" name "-" version ".tar.gz"))
462 (sha256
463 (base32
464 "15wjngjd5pyfqdl5yw92rvdxvy15xcjlpx0rqlkzvcsis1z20xpk"))))
465 (native-search-paths
466 (list (search-path-specification
467 (variable "COQPATH")
468 (files (list "lib/coq/user-contrib")))))
469 (build-system ocaml-build-system)
470 (native-inputs
471 `(("texlive" ,texlive)
472 ("hevea" ,hevea)))
473 (inputs
474 `(("lablgtk" ,lablgtk)
475 ("python" ,python-2)
476 ("camlp5" ,camlp5)))
477 (arguments
478 `(#:phases
479 (modify-phases %standard-phases
480 (replace 'configure
481 (lambda* (#:key outputs #:allow-other-keys)
482 (let* ((out (assoc-ref outputs "out"))
483 (mandir (string-append out "/share/man"))
484 (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
485 (zero? (system* "./configure"
486 "-prefix" out
487 "-mandir" mandir
488 "-browser" browser
489 "-coqide" "opt")))))
490 (replace 'build
491 (lambda _
492 (zero? (system* "make" "-j" (number->string
493 (parallel-job-count))
494 "world"))))
495 (delete 'check)
496 (add-after 'install 'check
497 (lambda _
498 (with-directory-excursion "test-suite"
499 ;; These two tests fail.
500 ;; This one fails because the output is not formatted as expected.
501 (delete-file-recursively "coq-makefile/timing")
502 ;; This one fails because we didn't build coqtop.byte.
503 (delete-file-recursively "coq-makefile/findlib-package")
504 (zero? (system* "make"))))))))
505 (home-page "https://coq.inria.fr")
506 (synopsis "Proof assistant for higher-order logic")
507 (description
508 "Coq is a proof assistant for higher-order logic, which allows the
509 development of computer programs consistent with their formal specification.
510 It is developed using Objective Caml and Camlp5.")
511 ;; The code is distributed under lgpl2.1.
512 ;; Some of the documentation is distributed under opl1.0+.
513 (license (list license:lgpl2.1 license:opl1.0+))))
514
515 (define-public proof-general
516 (package
517 (name "proof-general")
518 (version "4.2")
519 (source (origin
520 (method url-fetch)
521 (uri (string-append
522 "http://proofgeneral.inf.ed.ac.uk/releases/"
523 "ProofGeneral-" version ".tgz"))
524 (sha256
525 (base32
526 "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm"))))
527 (build-system gnu-build-system)
528 (native-inputs
529 `(("which" ,which)
530 ("emacs" ,emacs-minimal)
531 ("texinfo" ,texinfo)))
532 (inputs
533 `(("host-emacs" ,emacs)
534 ("perl" ,perl)
535 ("coq" ,coq)))
536 (arguments
537 `(#:tests? #f ; no check target
538 #:make-flags (list (string-append "PREFIX=" %output)
539 (string-append "DEST_PREFIX=" %output))
540 #:modules ((guix build gnu-build-system)
541 (guix build utils)
542 (guix build emacs-utils))
543 #:imported-modules (,@%gnu-build-system-modules
544 (guix build emacs-utils))
545 #:phases
546 (modify-phases %standard-phases
547 (delete 'configure)
548 (add-after 'unpack 'disable-byte-compile-error-on-warn
549 (lambda _
550 (substitute* "Makefile"
551 (("\\(setq byte-compile-error-on-warn t\\)")
552 "(setq byte-compile-error-on-warn nil)"))
553 #t))
554 (add-after 'unpack 'patch-hardcoded-paths
555 (lambda* (#:key inputs outputs #:allow-other-keys)
556 (let ((out (assoc-ref outputs "out"))
557 (coq (assoc-ref inputs "coq"))
558 (emacs (assoc-ref inputs "host-emacs")))
559 (define (coq-prog name)
560 (string-append coq "/bin/" name))
561 (emacs-substitute-variables "coq/coq.el"
562 ("coq-prog-name" (coq-prog "coqtop"))
563 ("coq-compiler" (coq-prog "coqc"))
564 ("coq-dependency-analyzer" (coq-prog "coqdep")))
565 (substitute* "Makefile"
566 (("/sbin/install-info") "install-info"))
567 (substitute* "bin/proofgeneral"
568 (("^PGHOMEDEFAULT=.*" all)
569 (string-append all
570 "PGHOME=$PGHOMEDEFAULT\n"
571 "EMACS=" emacs "/bin/emacs")))
572 #t)))
573 (add-after 'unpack 'clean
574 (lambda _
575 ;; Delete the pre-compiled elc files for Emacs 23.
576 (zero? (system* "make" "clean"))))
577 (add-after 'install 'install-doc
578 (lambda* (#:key make-flags #:allow-other-keys)
579 ;; XXX FIXME avoid building/installing pdf files,
580 ;; due to unresolved errors building them.
581 (substitute* "Makefile"
582 ((" [^ ]*\\.pdf") ""))
583 (zero? (apply system* "make" "install-doc"
584 make-flags)))))))
585 (home-page "http://proofgeneral.inf.ed.ac.uk/")
586 (synopsis "Generic front-end for proof assistants based on Emacs")
587 (description
588 "Proof General is a major mode to turn Emacs into an interactive proof
589 assistant to write formal mathematical proofs using a variety of theorem
590 provers.")
591 (license license:gpl2+)))
592
593 (define-public emacs-tuareg
594 (package
595 (name "emacs-tuareg")
596 (version "2.0.10")
597 (source (origin
598 (method url-fetch)
599 (uri (string-append "https://github.com/ocaml/tuareg/archive/"
600 version ".tar.gz"))
601 (file-name (string-append name "-" version ".tar.gz"))
602 (sha256
603 (base32
604 "1r2smclcs63n74lcyckbp90j09wyjdngn816cqzfkw54iwh3hd7q"))))
605 (build-system gnu-build-system)
606 (native-inputs `(("emacs" ,emacs-minimal)
607 ("opam" ,opam)))
608 (arguments
609 `(#:phases
610 (modify-phases %standard-phases
611 (delete 'configure)
612 (add-before 'install 'fix-install-path
613 (lambda* (#:key outputs #:allow-other-keys)
614 (substitute* "Makefile"
615 (("/emacs/site-lisp")
616 (string-append (assoc-ref %outputs "out")
617 "/share/emacs/site-lisp/")))
618 #t))
619 (add-after 'install 'post-install
620 (lambda* (#:key outputs #:allow-other-keys)
621 (symlink "tuareg.el"
622 (string-append (assoc-ref outputs "out")
623 "/share/emacs/site-lisp/"
624 "tuareg-autoloads.el"))
625 #t)))))
626 (home-page "https://github.com/ocaml/tuareg")
627 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
628 (description "Tuareg helps editing OCaml code, to highlight important
629 parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
630 Emacs.")
631 (license license:gpl2+)))
632
633 (define-public ocaml-menhir
634 (package
635 (name "ocaml-menhir")
636 (version "20161115")
637 (source (origin
638 (method url-fetch)
639 (uri (string-append
640 "http://gallium.inria.fr/~fpottier/menhir/"
641 "menhir-" version ".tar.gz"))
642 (sha256
643 (base32
644 "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
645 (build-system gnu-build-system)
646 (inputs
647 `(("ocaml" ,ocaml)))
648 (arguments
649 `(#:parallel-build? #f ; Parallel build causes failure
650 #:tests? #f ; No check target
651 #:phases
652 (modify-phases %standard-phases
653 (replace 'configure
654 (lambda* (#:key outputs #:allow-other-keys)
655 (let ((out (assoc-ref outputs "out")))
656 (setenv "PREFIX" out))
657 #t)))))
658 (home-page "http://gallium.inria.fr/~fpottier/menhir")
659 (synopsis "Parser generator")
660 (description "Menhir is a parser generator. It turns high-level grammar
661 specifications, decorated with semantic actions expressed in the OCaml
662 programming language into parsers, again expressed in OCaml. It is based on
663 Knuth’s LR(1) parser construction technique.")
664 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
665 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
666 ;; are QPL licensed.
667 (license (list license:gpl2+ license:qpl))))
668
669 (define-public lablgtk
670 (package
671 (name "lablgtk")
672 (version "2.18.5")
673 (source (origin
674 (method url-fetch)
675 (uri (ocaml-forge-uri name version 1627))
676 (sha256
677 (base32
678 "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
679 (build-system gnu-build-system)
680 (native-inputs
681 `(("camlp4" ,camlp4)
682 ("ocaml" ,ocaml)
683 ("findlib" ,ocaml-findlib)
684 ("pkg-config" ,pkg-config)))
685 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
686 ;; and gtk+-quartz-2.0 once available.
687 (inputs
688 `(("gtk+" ,gtk+-2)
689 ("gtksourceview" ,gtksourceview-2)
690 ("libgnomecanvas" ,libgnomecanvas)
691 ("libgnomeui" ,libgnomeui)
692 ("libglade" ,libglade)
693 ("librsvg" ,librsvg)))
694 (arguments
695 `(#:tests? #f ; no check target
696
697 ;; opt: also install cmxa files
698 #:make-flags (list "all" "opt"
699 (string-append "FINDLIBDIR="
700 (assoc-ref %outputs "out")
701 "/lib/ocaml"))
702 ;; Occasionally we would get "Error: Unbound module GtkThread" when
703 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
704 #:parallel-build? #f
705
706 #:phases
707 (modify-phases %standard-phases
708 (add-before 'install 'prepare-install
709 (lambda* (#:key inputs outputs #:allow-other-keys)
710 (let ((out (assoc-ref outputs "out"))
711 (ocaml (assoc-ref inputs "ocaml")))
712 ;; Install into the output and not the ocaml directory.
713 (mkdir-p (string-append out "/lib/ocaml"))
714 (substitute* "config.make"
715 ((ocaml) out))
716 #t))))))
717 (home-page "http://lablgtk.forge.ocamlcore.org/")
718 (synopsis "GTK+ bindings for OCaml")
719 (description
720 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
721 a strongly-typed object-oriented interface that is compatible with the
722 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
723 also provides bindings to
724 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
725 gnomeui, gtksourceview, gtkspell,
726 libglade (and it an generate OCaml code from .glade files),
727 libpanel, librsvg and quartz.")
728 (license license:lgpl2.1)))
729
730 (define-public unison
731 (package
732 (name "unison")
733 (version "2.48.3")
734 (source
735 (origin
736 (method svn-fetch)
737 (uri (svn-reference
738 (url (string-append "https://webdav.seas.upenn.edu/svn/"
739 "unison/branches/"
740 (version-major+minor version)))
741 (revision 535)))
742 (file-name (string-append name "-" version "-checkout"))
743 (sha256
744 (base32
745 "0486s53wyayicj9f2raj2dvwvk4xyzar219rccc1iczdwixm4x05"))
746 (modules '((guix build utils)
747 (ice-9 rdelim)
748 (ice-9 regex)
749 (srfi srfi-1)))
750 (snippet
751 `(begin
752 ;; The svn revision in the release tarball appears to be
753 ;; artificially manipulated in order to set the desired point
754 ;; version number. Because the point version is calculated during
755 ;; the build, we can offset pointVersionOrigin by the desired
756 ;; point version and write that into "Rev: %d". We do this rather
757 ;; than hardcoding the necessary revision number, for
758 ;; maintainability.
759 (with-atomic-file-replacement "src/mkProjectInfo.ml"
760 (lambda (in out)
761 (let ((pt-ver (string->number (third (string-split ,version #\.))))
762 (pt-rx (make-regexp "^let pointVersionOrigin = ([0-9]+)"))
763 (rev-rx (make-regexp "Rev: [0-9]+")))
764 (let loop ((pt-origin #f))
765 (let ((line (read-line in 'concat)))
766 (cond
767 ((regexp-exec pt-rx line)
768 => (lambda (m)
769 (display line out)
770 (loop (string->number (match:substring m 1)))))
771 ((regexp-exec rev-rx line)
772 => (lambda (m)
773 (format out "~aRev: ~d~a"
774 (match:prefix m)
775 (+ pt-origin pt-ver)
776 (match:suffix m))
777 (dump-port in out))) ;done
778 (else
779 (display line out)
780 (loop pt-origin))))))))
781 ;; Without the '-fix' argument, the html file produced does not
782 ;; have functioning internal hyperlinks.
783 (substitute* "doc/Makefile"
784 (("hevea unison") "hevea -fix unison"))))))
785 (build-system gnu-build-system)
786 (outputs '("out"
787 "doc")) ; 1.9 MiB of documentation
788 (native-inputs
789 `(("ocaml" ,ocaml)
790 ;; For documentation
791 ("ghostscript" ,ghostscript)
792 ("texlive" ,texlive)
793 ("hevea" ,hevea)
794 ("lynx" ,lynx)))
795 (arguments
796 `(#:parallel-build? #f
797 #:parallel-tests? #f
798 #:test-target "selftest"
799 #:tests? #f ; Tests require writing to $HOME.
800 ; If some $HOME is provided, they fail with the message
801 ; "Fatal error: Skipping some tests -- remove me!"
802 #:phases
803 (modify-phases %standard-phases
804 (delete 'configure)
805 (add-before 'install 'prepare-install
806 (lambda* (#:key outputs #:allow-other-keys)
807 (let* ((out (assoc-ref outputs "out"))
808 (bin (string-append out "/bin")))
809 (mkdir-p bin)
810 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
811 #t)))
812 (add-after 'install 'install-fsmonitor
813 (lambda* (#:key outputs #:allow-other-keys)
814 (let* ((out (assoc-ref outputs "out"))
815 (bin (string-append out "/bin")))
816 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
817 (install-file "src/unison-fsmonitor" bin))))
818 (add-after 'install 'install-doc
819 (lambda* (#:key outputs #:allow-other-keys)
820 (let ((doc (string-append (assoc-ref outputs "doc")
821 "/share/doc/unison")))
822 (mkdir-p doc)
823 ;; This file needs write-permissions, because it's
824 ;; overwritten by 'docs' during documentation generation.
825 (chmod "src/strings.ml" #o600)
826 (and (zero? (system* "make" "docs"
827 "TEXDIRECTIVES=\\\\draftfalse"))
828 (begin
829 (for-each (lambda (f)
830 (install-file f doc))
831 (map (lambda (ext)
832 (string-append
833 "doc/unison-manual." ext))
834 ;; Install only html documentation,
835 ;; since the build is currently
836 ;; non-reproducible with the ps, pdf,
837 ;; and dvi docs.
838 '(;;"ps" "pdf" "dvi"
839 "html")))
840 #t))))))))
841 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
842 (synopsis "File synchronizer")
843 (description
844 "Unison is a file-synchronization tool. It allows two replicas of
845 a collection of files and directories to be stored on different hosts
846 (or different disks on the same host), modified separately, and then
847 brought up to date by propagating the changes in each replica
848 to the other.")
849 (license license:gpl3+)))
850
851 (define-public ocaml-findlib
852 (package
853 (name "ocaml-findlib")
854 (version "1.7.3")
855 (source (origin
856 (method url-fetch)
857 (uri (string-append "http://download.camlcity.org/download/"
858 "findlib" "-" version ".tar.gz"))
859 (sha256
860 (base32
861 "12xx8si1qv3xz90qsrpazjjk4lc1989fzm97rsmc4diwla7n15ni"))))
862 (build-system gnu-build-system)
863 (native-inputs
864 `(("camlp4" ,camlp4)
865 ("m4" ,m4)
866 ("ocaml" ,ocaml)))
867 (arguments
868 `(#:tests? #f ; no test suite
869 #:parallel-build? #f
870 #:make-flags (list "all" "opt")
871 #:phases (modify-phases %standard-phases
872 (replace
873 'configure
874 (lambda* (#:key inputs outputs #:allow-other-keys)
875 (let ((out (assoc-ref outputs "out")))
876 (system*
877 "./configure"
878 "-bindir" (string-append out "/bin")
879 "-config" (string-append out "/etc/ocamfind.conf")
880 "-mandir" (string-append out "/share/man")
881 "-sitelib" (string-append out "/lib/ocaml/site-lib")
882 "-with-toolbox"))))
883 (replace 'install
884 (lambda* (#:key outputs #:allow-other-keys)
885 (let ((out (assoc-ref outputs "out")))
886 (zero? (system* "make" "install"
887 (string-append "OCAML_CORE_STDLIB="
888 out "/lib/ocaml/site-lib"))))))
889 (add-after 'install 'remove-camlp4
890 (lambda* (#:key outputs #:allow-other-keys)
891 (let ((out (assoc-ref outputs "out")))
892 (delete-file-recursively
893 (string-append out "/lib/ocaml/site-lib/camlp4"))))))))
894 (home-page "http://projects.camlcity.org/projects/findlib.html")
895 (synopsis "Management tool for OCaml libraries")
896 (description
897 "The \"findlib\" library provides a scheme to manage reusable software
898 components (packages), and includes tools that support this scheme. Packages
899 are collections of OCaml modules for which metainformation can be stored. The
900 packages are kept in the file system hierarchy, but with strict directory
901 structure. The library contains functions to look the directory up that
902 stores a package, to query metainformation about a package, and to retrieve
903 dependency information about multiple packages. There is also a tool that
904 allows the user to enter queries on the command-line. In order to simplify
905 compilation and linkage, there are new frontends of the various OCaml
906 compilers that can directly deal with packages.")
907 (license license:x11)))
908
909 (define-public ocaml4.01-findlib
910 (package
911 (inherit ocaml-findlib)
912 (name "ocaml4.01-findlib")
913 (native-inputs
914 `(("m4" ,m4)
915 ("ocaml" ,ocaml-4.01)))))
916
917 ;; note that some tests may hang for no obvious reason.
918 (define-public ocaml-ounit
919 (package
920 (name "ocaml-ounit")
921 (version "2.0.0")
922 (source (origin
923 (method url-fetch)
924 (uri (ocaml-forge-uri "ounit" version 1258))
925 (sha256
926 (base32
927 "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))))
928 (build-system ocaml-build-system)
929 (native-inputs
930 `(("libxml2" ,libxml2))) ; for xmllint
931 (arguments
932 `(#:phases
933 (modify-phases %standard-phases
934 ;; Tests are done during build.
935 (delete 'check))))
936 (home-page "http://ounit.forge.ocamlcore.org")
937 (synopsis "Unit testing framework for OCaml")
938 (description "Unit testing framework for OCaml. It is similar to JUnit and
939 other XUnit testing frameworks.")
940 (license license:expat)))
941
942 (define-public ocaml4.01-ounit
943 (package-with-ocaml4.01 ocaml-ounit))
944
945 (define-public camlzip
946 (package
947 (name "camlzip")
948 (version "1.0.6")
949 (source (origin
950 (method url-fetch)
951 (uri (ocaml-forge-uri name version 1616))
952 (sha256
953 (base32
954 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
955 (build-system ocaml-build-system)
956 (inputs
957 `(("zlib" ,zlib)))
958 (arguments
959 `(#:phases
960 (modify-phases %standard-phases
961 (delete 'configure)
962 (add-after 'install 'install-camlzip
963 (lambda* (#:key outputs #:allow-other-keys)
964 (let* ((out (assoc-ref outputs "out"))
965 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
966 (mkdir-p dir)
967 (call-with-output-file (string-append dir "/META")
968 (lambda (port)
969 (format port "version=\"1.06\"\n")
970 (format port "requires=\"unix\"\n")
971 (format port "archive(byte)=\"zip.cma\"\n")
972 (format port "archive(native)=\"zip.cmxa\"\n")
973 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
974 (format port "directory=\"../zip\"\n")))))))
975 #:install-target "install-findlib"
976 #:make-flags
977 (list "all" "allopt"
978 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
979 "/lib/ocaml"))))
980 (home-page "http://forge.ocamlcore.org/projects/camlzip")
981 (synopsis "Provides easy access to compressed files")
982 (description "Provides easy access to compressed files in ZIP, GZIP and
983 JAR format. It provides functions for reading from and writing to compressed
984 files in these formats.")
985 (license license:lgpl2.1+)))
986
987 (define-public ocaml4.01-camlzip
988 (let ((base (package-with-ocaml4.01 camlzip)))
989 (package
990 (inherit base)
991 (name "ocaml4.01-camlzip")
992 ;; Version 1.05 is the last version to support OCaml 4.01.0.
993 (version "1.05")
994 (source
995 (origin
996 (method url-fetch)
997 (uri
998 (string-append
999 "http://forge.ocamlcore.org/frs/download.php/1037/camlzip-"
1000 version ".tar.gz"))
1001 (sha256
1002 (base32
1003 "0syh72jk9s0qwjmmfrkqchaj98m020ii082jn38pwnmb6v3p02wk")))))))
1004
1005 (define-public ocamlmod
1006 (package
1007 (name "ocamlmod")
1008 (version "0.0.8")
1009 (source (origin
1010 (method url-fetch)
1011 (uri (ocaml-forge-uri name version 1544))
1012 (sha256
1013 (base32
1014 "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))))
1015 (build-system ocaml-build-system)
1016 (native-inputs
1017 `(("ounit" ,ocaml-ounit)))
1018 (arguments
1019 `(#:phases
1020 (modify-phases %standard-phases
1021 ;; Tests are done during build.
1022 (delete 'check))))
1023 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1024 (synopsis "Generate modules from OCaml source files")
1025 (description "Generate modules from OCaml source files.")
1026 (license license:lgpl2.1+))) ; with an exception
1027
1028 (define-public ocaml-zarith
1029 (package
1030 (name "ocaml-zarith")
1031 (version "1.4.1")
1032 (source (origin
1033 (method url-fetch)
1034 (uri (ocaml-forge-uri "zarith" version 1574))
1035 (sha256
1036 (base32
1037 "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))))
1038 (build-system ocaml-build-system)
1039 (native-inputs
1040 `(("perl" ,perl)))
1041 (inputs
1042 `(("gmp" ,gmp)))
1043 (arguments
1044 `(#:tests? #f ; no test target
1045 #:phases
1046 (modify-phases %standard-phases
1047 (replace 'configure
1048 (lambda* (#:key #:allow-other-keys)
1049 (zero? (system* "./configure")))))))
1050 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1051 (synopsis "Implements arbitrary-precision integers")
1052 (description "Implements arithmetic and logical operations over
1053 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1054 over big integers. Small integers are represented as Caml unboxed integers,
1055 for speed and space economy.")
1056 (license license:lgpl2.1+))) ; with an exception
1057
1058 (define-public ocaml-frontc
1059 (package
1060 (name "ocaml-frontc")
1061 (version "3.4")
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
1065 "frontc/Frontc-" version ".tgz"))
1066 (sha256
1067 (base32
1068 "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
1069 (build-system ocaml-build-system)
1070 (arguments
1071 `(#:phases
1072 (modify-phases %standard-phases
1073 (delete 'configure)
1074 (add-after 'install 'install-meta
1075 (lambda* (#:key outputs #:allow-other-keys)
1076 (let ((out (assoc-ref outputs "out")))
1077 (with-output-to-file
1078 (string-append out "/lib/ocaml/frontc/META")
1079 (lambda _
1080 (display
1081 (string-append
1082 "description = \"Parser for the C language\"
1083 version = \"" ,version "\"
1084 requires = \"unix\"
1085 archive(byte) = \"frontc.cma\"
1086 archive(native) = \"frontc.cmxa\""))))
1087 (symlink (string-append out "/lib/ocaml/frontc")
1088 (string-append out "/lib/ocaml/FrontC"))))))
1089 #:make-flags (list (string-append "PREFIX="
1090 (assoc-ref %outputs "out"))
1091 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
1092 (home-page "https://www.irit.fr/FrontC")
1093 (synopsis "C parser and lexer library")
1094 (description "FrontC is an OCAML library providing a C parser and lexer.
1095 The result is a syntactic tree easy to process with usual OCAML tree management.
1096 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1097 GNU CC attributes. It provides also a C pretty printer as an example of use.")
1098 (license license:lgpl2.1)))
1099
1100 (define-public ocaml-qcheck
1101 (package
1102 (name "ocaml-qcheck")
1103 (version "0.5.3.1")
1104 (source (origin
1105 (method url-fetch)
1106 (uri (string-append "https://github.com/c-cube/qcheck/archive/"
1107 version ".tar.gz"))
1108 (file-name (string-append name "-" version ".tar.gz"))
1109 (sha256
1110 (base32
1111 "1zs1pg5cb1iry554v3cdmmiglsrwmsqa9x8zxmzb118fnk5d3ha6"))))
1112 (build-system ocaml-build-system)
1113 (native-inputs
1114 `(("ounit" ,ocaml-ounit)))
1115 (home-page "https://github.com/c-cube/qcheck")
1116 (synopsis "QuickCheck inspired property-based testing for OCaml")
1117 (description "QuickCheck inspired property-based testing for OCaml. This
1118 module allows to check invariants (properties of some types) over randomly
1119 generated instances of the type. It provides combinators for generating
1120 instances and printing them.")
1121 (license license:lgpl3+)))
1122
1123 (define-public ocaml-qtest
1124 (package
1125 (name "ocaml-qtest")
1126 (version "2.8")
1127 (source (origin
1128 (method url-fetch)
1129 (uri (string-append "https://github.com/vincent-hugot/qtest/"
1130 "archive/" version ".tar.gz"))
1131 (file-name (string-append name "-" version ".tar.gz"))
1132 (sha256
1133 (base32
1134 "1ff4if64mc9c7wmhjdgnlnh6k6a713piqzr4043zzj4s5pw7smxk"))))
1135 (build-system ocaml-build-system)
1136 (native-inputs
1137 `(("findlib" ,ocaml-findlib)))
1138 (propagated-inputs
1139 `(("ounit" ,ocaml-ounit)
1140 ("qcheck" ,ocaml-qcheck)))
1141 (arguments
1142 `(#:tests? #f ; No test target.
1143 #:make-flags
1144 (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
1145 #:phases
1146 (modify-phases %standard-phases
1147 (delete 'configure))))
1148 (home-page "https://github.com/vincent-hugot/qtest")
1149 (synopsis "Inline (Unit) Tests for OCaml")
1150 (description "Qtest extracts inline unit tests written using a special
1151 syntax in comments. Those tests are then run using the oUnit framework and the
1152 qcheck library. The possibilities range from trivial tests -- extremely simple
1153 to use -- to sophisticated random generation of test cases.")
1154 (license license:lgpl3+)))
1155
1156 (define-public ocaml4.01-qtest
1157 (package-with-ocaml4.01 ocaml-qtest))
1158
1159 (define-public ocaml-stringext
1160 (package
1161 (name "ocaml-stringext")
1162 (version "1.4.3")
1163 (source (origin
1164 (method url-fetch)
1165 (uri (string-append "https://github.com/rgrinberg/stringext"
1166 "/archive/v" version ".tar.gz"))
1167 (file-name (string-append name "-" version ".tar.gz"))
1168 (sha256
1169 (base32
1170 "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
1171 (build-system ocaml-build-system)
1172 (native-inputs
1173 `(("qtest" ,ocaml-qtest)))
1174 (home-page "https://github.com/rgrinberg/stringext")
1175 (synopsis "Extra string functions for OCaml")
1176 (description "Provides a single module named Stringext that provides a grab
1177 bag of often used but missing string functions from the stdlib. E.g, split,
1178 full_split, cut, rcut, etc..")
1179 ;; the only mention of a license in this project is in its `opam' file
1180 ;; where it says `mit'.
1181 (license license:expat)))
1182
1183
1184 (define-public ocaml-bisect
1185 (package
1186 (name "ocaml-bisect")
1187 (version "1.3")
1188 (source (origin
1189 (method url-fetch)
1190 (uri (ocaml-forge-uri "bisect" version 1051))
1191 (sha256
1192 (base32
1193 "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
1194 (patches
1195 (search-patches
1196 "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
1197 (build-system ocaml-build-system)
1198 (native-inputs
1199 `(("camlp4" ,camlp4)
1200 ("libxml2" ,libxml2)
1201 ("which" ,which)))
1202 (propagated-inputs
1203 `(("camlp4" ,camlp4)))
1204 (arguments
1205 `(#:test-target "tests"
1206 #:make-flags
1207 (list "all" (string-append "CAMLP4_LIBDIR="
1208 (assoc-ref %build-inputs "camlp4")
1209 "/lib/ocaml/site-lib/camlp4"))
1210 #:phases
1211 (modify-phases %standard-phases
1212 (replace 'configure
1213 (lambda* (#:key outputs #:allow-other-keys)
1214 (zero? (system* "./configure" "-prefix"
1215 (assoc-ref outputs "out"))))))))
1216 (home-page "http://bisect.x9c.fr")
1217 (synopsis "Code coverage tool for the OCaml language")
1218 (description "Bisect is a code coverage tool for the OCaml language. It is
1219 a camlp4-based tool that allows to instrument your application before running
1220 tests. After application execution, it is possible to generate a report in HTML
1221 format that is the replica of the application source code annotated with code
1222 coverage information.")
1223 (properties `((ocaml4.01-variant . ,(delay ocaml4.01-bisect))))
1224 (license license:gpl3+)))
1225
1226 (define-public ocaml4.01-bisect
1227 (let ((base (package-with-ocaml4.01 (strip-ocaml4.01-variant ocaml-bisect))))
1228 (package
1229 (inherit base)
1230 (arguments
1231 `(#:ocaml ,ocaml-4.01
1232 ;; Camlp4 is included with OCaml 4.01, so do not include it as a
1233 ;; separate input.
1234 ,@(strip-keyword-arguments '(#:make-flags) (package-arguments base))))
1235 (native-inputs `(,@(alist-delete "camlp4" (package-native-inputs base))))
1236 (propagated-inputs
1237 `(,@(alist-delete "camlp4" (package-propagated-inputs base)))))))
1238
1239 (define-public ocaml-bitstring
1240 (package
1241 (name "ocaml-bitstring")
1242 (version "2.1.1")
1243 (source (origin
1244 (method url-fetch)
1245 (uri (string-append "https://github.com/xguerin/bitstring"
1246 "/archive/v" version ".tar.gz"))
1247 (file-name (string-append name "-" version ".tar.gz"))
1248 (sha256
1249 (base32
1250 "0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8"))
1251 (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
1252 (build-system ocaml-build-system)
1253 (native-inputs
1254 `(("camlp4" ,camlp4)
1255 ("time" ,time)
1256 ("autoconf" ,autoconf)
1257 ("automake" ,automake)
1258 ("bisect" ,ocaml-bisect)))
1259 (propagated-inputs
1260 `(("camlp4" ,camlp4)))
1261 (arguments
1262 `(#:configure-flags
1263 (list "CAMLP4OF=camlp4of" "--enable-coverage")
1264 #:make-flags
1265 (list (string-append "BISECTLIB="
1266 (assoc-ref %build-inputs "bisect")
1267 "/lib/ocaml/site-lib")
1268 (string-append "OCAMLCFLAGS=-g -I "
1269 (assoc-ref %build-inputs "camlp4")
1270 "/lib/ocaml/site-lib/camlp4 -I "
1271 "$(BISECTLIB)/bisect")
1272 (string-append "OCAMLOPTFLAGS=-g -I "
1273 (assoc-ref %build-inputs "camlp4")
1274 "/lib/ocaml/site-lib/camlp4 -I "
1275 "$(BISECTLIB)/bisect"))
1276 #:phases
1277 (modify-phases %standard-phases
1278 (add-before 'configure 'fix-configure
1279 (lambda* (#:key inputs #:allow-other-keys)
1280 (substitute* "Makefile.in"
1281 (("@abs_top_builddir@")
1282 (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
1283 (substitute* "configure"
1284 (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
1285 "/bin/sh")))))
1286 (add-after 'install 'link-lib
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let* ((out (assoc-ref outputs "out"))
1289 (stubs (string-append out
1290 "/lib/ocaml/site-lib/stubslibs"))
1291 (lib (string-append out
1292 "/lib/ocaml/site-lib/bitstring")))
1293 (mkdir-p stubs)
1294 (symlink (string-append lib "/dllbitstring.so")
1295 (string-append stubs "/dllbitstring.so"))))))))
1296 (home-page "https://github.com/xguerin/bitstring")
1297 (synopsis "Bitstrings and bitstring matching for OCaml")
1298 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1299 a syntax extension and library for OCaml. You can use this module to both parse
1300 and generate binary formats, files and protocols. Bitstring handling is added
1301 as primitives to the language, making it exceptionally simple to use and very
1302 powerful.")
1303 (license license:isc)))
1304
1305 (define-public ocaml-result
1306 (package
1307 (name "ocaml-result")
1308 (version "1.2")
1309 (source (origin
1310 (method url-fetch)
1311 (uri (string-append "https://github.com/janestreet/result"
1312 "/archive/" version ".tar.gz"))
1313 (file-name (string-append name "-" version ".tar.gz"))
1314 (sha256
1315 (base32
1316 "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
1317 (build-system ocaml-build-system)
1318 (arguments
1319 `(#:tests? #f
1320 #:phases
1321 (modify-phases %standard-phases
1322 (delete 'configure))))
1323 (home-page "https://github.com/janestreet/result")
1324 (synopsis "Compatibility Result module")
1325 (description "Uses the new result type defined in OCaml >= 4.03 while
1326 staying compatible with older version of OCaml should use the Result module
1327 defined in this library.")
1328 (license license:bsd-3)))
1329
1330 (define-public ocaml-topkg
1331 (package
1332 (name "ocaml-topkg")
1333 (version "0.8.1")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1337 "topkg-" version ".tbz"))
1338 (sha256
1339 (base32
1340 "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
1341 (build-system ocaml-build-system)
1342 (native-inputs
1343 `(("opam" ,opam)))
1344 (propagated-inputs
1345 `(("result" ,ocaml-result)))
1346 (arguments
1347 `(#:tests? #f
1348 #:build-flags '("build")
1349 #:phases
1350 (modify-phases %standard-phases
1351 (delete 'configure))))
1352 (home-page "http://erratique.ch/software/topkg")
1353 (synopsis "Transitory OCaml software packager")
1354 (description "Topkg is a packager for distributing OCaml software. It
1355 provides an API to describe the files a package installs in a given build
1356 configuration and to specify information about the package's distribution,
1357 creation and publication procedures.")
1358 (license license:isc)))
1359
1360 (define-public ocaml-rresult
1361 (package
1362 (name "ocaml-rresult")
1363 (version "0.5.0")
1364 (source (origin
1365 (method url-fetch)
1366 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1367 "rresult-" version ".tbz"))
1368 (sha256
1369 (base32
1370 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1371 (build-system ocaml-build-system)
1372 (native-inputs
1373 `(("opam" ,opam)))
1374 (propagated-inputs
1375 `(("topkg" ,ocaml-topkg)))
1376 (arguments
1377 `(#:tests? #f
1378 #:build-flags '("build")
1379 #:phases
1380 (modify-phases %standard-phases
1381 (delete 'configure))))
1382 (home-page "http://erratique.ch/software/rresult")
1383 (synopsis "Result value combinators for OCaml")
1384 (description "Handle computation results and errors in an explicit and
1385 declarative manner, without resorting to exceptions. It defines combinators
1386 to operate on the result type available from OCaml 4.03 in the standard
1387 library.")
1388 (license license:isc)))
1389
1390 (define-public ocaml-sqlite3
1391 (package
1392 (name "ocaml-sqlite3")
1393 (version "4.1.2")
1394 (source
1395 (origin
1396 (method url-fetch)
1397 (uri (string-append
1398 "https://github.com/mmottl/sqlite3-ocaml/releases/download/v"
1399 version "/sqlite3-ocaml-" version ".tar.gz"))
1400 (sha256
1401 (base32
1402 "14c1nir7c6bivajg0vyx853y7la7r5d25g1v5hjb2wfi73r15p1m"))))
1403 (build-system ocaml-build-system)
1404 (native-inputs
1405 `(("pkg-config" ,pkg-config)))
1406 (inputs
1407 `(("sqlite" ,sqlite)))
1408 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1409 (synopsis "SQLite3 Bindings for OCaml")
1410 (description
1411 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1412 API. Sqlite3 is a self-contained, serverless, zero-configuration,
1413 transactional SQL database engine with outstanding performance for many use
1414 cases. These bindings are written in a way that enables a friendly
1415 coexistence with the old (version 2) SQLite and its OCaml wrapper
1416 @code{ocaml-sqlite}.")
1417 (license license:expat)))
1418
1419 (define-public ocaml4.01-sqlite3
1420 (package-with-ocaml4.01 ocaml-sqlite3))
1421
1422 (define-public ocaml-csv
1423 (package
1424 (name "ocaml-csv")
1425 (version "1.6")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri
1430 (string-append
1431 "https://github.com/Chris00/ocaml-csv/releases/download/"
1432 version "/csv-" version ".tar.gz"))
1433 (sha256
1434 (base32
1435 "0rv7x843vn6scxj87hzl01yqrl26rc27lr8s7z6rp9vs745g05zj"))))
1436 (build-system ocaml-build-system)
1437 (home-page "https://github.com/Chris00/ocaml-csv")
1438 (synopsis "Pure OCaml functions to read and write CSV")
1439 (description
1440 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1441 by all major spreadsheets. This library implements pure OCaml functions to
1442 read and write files in this format as well as some convenience functions to
1443 manipulate such data.")
1444 (license (package-license camlp4))))
1445
1446 (define-public ocaml4.01-csv
1447 (package-with-ocaml4.01 ocaml-csv))
1448
1449 (define-public ocaml-mtime
1450 (package
1451 (name "ocaml-mtime")
1452 (version "0.8.3")
1453 (source (origin
1454 (method url-fetch)
1455 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1456 "mtime-" version ".tbz"))
1457 (sha256
1458 (base32
1459 "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
1460 (build-system ocaml-build-system)
1461 (native-inputs
1462 `(("opam" ,opam)))
1463 (propagated-inputs
1464 `(("topkg" ,ocaml-topkg)))
1465 (arguments
1466 `(#:tests? #f
1467 #:build-flags
1468 '("native=true" "native-dynlink=true" "jsoo=false")
1469 #:phases
1470 (modify-phases %standard-phases
1471 (delete 'configure))))
1472 (home-page "http://erratique.ch/software/mtime")
1473 (synopsis "Monotonic wall-clock time for OCaml")
1474 (description "Access monotonic wall-clock time. It allows to measure time
1475 spans without being subject to operating system calendar time adjustments.")
1476 (license license:isc)))
1477
1478 (define-public ocaml-cmdliner
1479 (package
1480 (name "ocaml-cmdliner")
1481 (version "0.9.8")
1482 (source (origin
1483 (method url-fetch)
1484 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1485 "cmdliner-" version ".tbz"))
1486 (sha256
1487 (base32
1488 "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
1489 (build-system ocaml-build-system)
1490 (native-inputs
1491 `(("opam" ,opam)))
1492 (arguments
1493 `(#:tests? #f
1494 #:build-flags '("native=true" "native-dynlink=true")
1495 #:phases
1496 (modify-phases %standard-phases
1497 (delete 'configure))))
1498 (home-page "http://erratique.ch/software/cmdliner")
1499 (synopsis "Declarative definition of command line interfaces for OCaml")
1500 (description "Cmdliner is a module for the declarative definition of command
1501 line interfaces. It provides a simple and compositional mechanism to convert
1502 command line arguments to OCaml values and pass them to your functions. The
1503 module automatically handles syntax errors, help messages and UNIX man page
1504 generation. It supports programs with single or multiple commands and respects
1505 most of the POSIX and GNU conventions.")
1506 (license license:bsd-3)))
1507
1508 (define-public ocaml-fmt
1509 (package
1510 (name "ocaml-fmt")
1511 (version "0.8.0")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1516 version ".tbz"))
1517 (sha256 (base32
1518 "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px"))))
1519 (build-system ocaml-build-system)
1520 (native-inputs `(("opam" ,opam)
1521 ("topkg" ,ocaml-topkg)))
1522 (propagated-inputs `(("result" ,ocaml-result)
1523 ("cmdliner" ,ocaml-cmdliner)))
1524 (arguments `(#:tests? #f
1525 #:build-flags (list "build" "--with-base-unix" "true"
1526 "--with-cmdliner" "true")
1527 #:phases
1528 (modify-phases %standard-phases
1529 (delete 'configure))))
1530 (home-page "http://erratique.ch/software/fmt")
1531 (synopsis "OCaml Format pretty-printer combinators")
1532 (description "Fmt exposes combinators to devise Format pretty-printing
1533 functions.")
1534 (license license:isc)))
1535
1536 (define-public ocaml-astring
1537 (package
1538 (name "ocaml-astring")
1539 (version "0.8.3")
1540 (source
1541 (origin
1542 (method url-fetch)
1543 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1544 version ".tbz"))
1545 (sha256 (base32
1546 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1547 (build-system ocaml-build-system)
1548 (native-inputs `(("opam" ,opam)
1549 ("topkg" ,ocaml-topkg)))
1550 (arguments `(#:tests? #f
1551 #:build-flags (list "build")
1552 #:phases
1553 (modify-phases %standard-phases
1554 (delete 'configure))))
1555 (home-page "http://erratique.ch/software/astring")
1556 (synopsis "Alternative String module for OCaml")
1557 (description "Astring exposes an alternative String module for OCaml. This
1558 module balances minimality and expressiveness for basic, index-free, string
1559 processing and provides types and functions for substrings, string sets and
1560 string maps. The String module exposed by Astring has exception safe functions,
1561 removes deprecated and rarely used functions, alters some signatures and names,
1562 adds a few missing functions and fully exploits OCaml's newfound string
1563 immutability.")
1564 (license license:isc)))
1565
1566 (define-public ocaml-alcotest
1567 (package
1568 (name "ocaml-alcotest")
1569 (version "0.7.2")
1570 (source (origin
1571 (method url-fetch)
1572 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1573 "download/" version "/alcotest-" version ".tbz"))
1574 (sha256
1575 (base32
1576 "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
1577 (build-system ocaml-build-system)
1578 (arguments `(#:tests? #f
1579 #:build-flags (list "build")
1580 #:phases
1581 (modify-phases %standard-phases
1582 (delete 'configure))))
1583 (native-inputs `(("opam" ,opam)
1584 ("topkg" ,ocaml-topkg)))
1585 (propagated-inputs `(("fmt" ,ocaml-fmt)
1586 ("astring" ,ocaml-astring)))
1587 (home-page "https://github.com/mirage/alcotest")
1588 (synopsis "Lightweight OCaml test framework")
1589 (description "Alcotest exposes simple interface to perform unit tests. It
1590 exposes a simple TESTABLE module type, a check function to assert test
1591 predicates and a run function to perform a list of unit -> unit test callbacks.
1592 Alcotest provides a quiet and colorful output where only faulty runs are fully
1593 displayed at the end of the run (with the full logs ready to inspect), with a
1594 simple (yet expressive) query language to select the tests to run.")
1595 (license license:isc)))
1596
1597 (define-public ocaml-ppx-tools
1598 (package
1599 (name "ocaml-ppx-tools")
1600 (version "5.0+4.02.0")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1605 version ".tar.gz"))
1606 (sha256 (base32
1607 "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"))))
1608 (build-system ocaml-build-system)
1609 (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
1610 #:tests? #f))
1611 (home-page "https://github.com/alainfrisch/ppx_tools")
1612 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1613 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1614 (license license:expat)))
1615
1616 (define-public ocaml-react
1617 (package
1618 (name "ocaml-react")
1619 (version "1.2.0")
1620 (source
1621 (origin
1622 (method url-fetch)
1623 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1624 version ".tbz"))
1625 (sha256 (base32
1626 "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
1627 (build-system ocaml-build-system)
1628 (native-inputs `(("opam" ,opam)))
1629 (arguments `(#:tests? #f
1630 #:build-flags (list "native=true" "native-dynlink=true")
1631 #:phases
1632 (modify-phases %standard-phases
1633 (delete 'configure))))
1634 (home-page "http://erratique.ch/software/react")
1635 (synopsis "Declarative events and signals for OCaml")
1636 (description "React is an OCaml module for functional reactive programming
1637 (FRP). It provides support to program with time varying values: declarative
1638 events and signals. React doesn't define any primitive event or signal, it
1639 lets the client choose the concrete timeline.")
1640 (license license:bsd-3)))
1641
1642 (define-public ocaml-ssl
1643 (package
1644 (name "ocaml-ssl")
1645 (version "0.5.5")
1646 (source
1647 (origin
1648 (method url-fetch)
1649 (uri (string-append "https://github.com/savonet/ocaml-ssl/archive/"
1650 version ".tar.gz"))
1651 (file-name (string-append name "-" version ".tar.gz"))
1652 (sha256 (base32
1653 "15p7652cvzdrlqxc1af11mg07wasxr1fsaj44gcmmh6bmav7wfzq"))))
1654 (build-system ocaml-build-system)
1655 (arguments `(#:tests? #f
1656 #:make-flags (list "OCAMLFIND_LDCONF=ignore")
1657 #:phases
1658 (modify-phases %standard-phases
1659 (add-after 'unpack 'bootstrap
1660 (lambda* (#:key #:allow-other-keys)
1661 (system* "sh" "bootstrap")
1662 (substitute* "src/OCamlMakefile"
1663 (("/bin/sh") (which "bash")))
1664 (substitute* "configure"
1665 (("/bin/sh") (which "bash"))))))))
1666 (native-inputs `(("autoconf" ,autoconf)
1667 ("automake" ,automake)
1668 ("which" ,which)))
1669 (propagated-inputs `(("openssl" ,openssl)))
1670 (home-page "https://github.com/savonet/ocaml-ssl/")
1671 (synopsis "OCaml bindings for OpenSSL")
1672 (description
1673 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
1674 through Transport Layer Security (@dfn{TLS}) encrypted connections.")
1675 (license license:lgpl2.1)))
1676
1677 (define-public ocaml-lwt
1678 (package
1679 (name "ocaml-lwt")
1680 (version "2.6.0")
1681 (source
1682 (origin
1683 (method url-fetch)
1684 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
1685 ".tar.gz"))
1686 (file-name (string-append name "-" version ".tar.gz"))
1687 (sha256 (base32
1688 "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz"))))
1689 (build-system ocaml-build-system)
1690 (arguments
1691 `(#:configure-flags
1692 (list "--enable-ssl" "--enable-glib" "--enable-react"
1693 "--enable-ppx")
1694 #:phases
1695 (modify-phases %standard-phases
1696 (add-before 'configure 'disable-some-checks
1697 (lambda* (#:key #:allow-other-keys)
1698 (substitute* "tests/unix/main.ml"
1699 (("Test_mcast.suite;") ""))))
1700 (add-after 'install 'link-stubs
1701 (lambda* (#:key outputs #:allow-other-keys)
1702 (let* ((out (assoc-ref outputs "out"))
1703 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
1704 (lib (string-append out "/lib/ocaml/site-lib/lwt")))
1705 (mkdir-p stubs)
1706 (symlink (string-append lib "/dlllwt-glib_stubs.so")
1707 (string-append stubs "/dlllwt-glib_stubs.so"))
1708 (symlink (string-append lib "/dlllwt-unix_stubs.so")
1709 (string-append stubs "/dlllwt-unix_stubs.so"))))))))
1710 (native-inputs `(("pkg-config" ,pkg-config)
1711 ("ppx-tools" ,ocaml-ppx-tools)))
1712 (inputs `(("libev" ,libev)
1713 ("glib" ,glib)))
1714 (propagated-inputs `(("result" ,ocaml-result)
1715 ("ocaml-ssl" ,ocaml-ssl)
1716 ("ocaml-react" ,ocaml-react)))
1717 (home-page "https://github.com/ocsigen/lwt")
1718 (synopsis "Cooperative threads and I/O in monadic style")
1719 (description "Lwt provides typed, composable cooperative threads. These
1720 make it easy to run normally-blocking I/O operations concurrently in a single
1721 process. Also, in many cases, Lwt threads can interact without the need for
1722 locks or other synchronization primitives.")
1723 (license license:lgpl2.1)))
1724
1725 (define-public ocaml-logs
1726 (package
1727 (name "ocaml-logs")
1728 (version "0.6.2")
1729 (source (origin
1730 (method url-fetch)
1731 (uri (string-append "http://erratique.ch/software/logs/releases/"
1732 "logs-" version ".tbz"))
1733 (sha256
1734 (base32
1735 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
1736 (build-system ocaml-build-system)
1737 (arguments `(#:tests? #f
1738 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1739 #:phases
1740 (modify-phases %standard-phases
1741 (delete 'configure))))
1742 (native-inputs `(("opam" ,opam)))
1743 (propagated-inputs `(("fmt" ,ocaml-fmt)
1744 ("lwt" ,ocaml-lwt)
1745 ("mtime" ,ocaml-mtime)
1746 ("result" ,ocaml-result)
1747 ("cmdliner" ,ocaml-cmdliner)
1748 ("topkg" ,ocaml-topkg)))
1749 (home-page "http://erratique.ch/software/logs")
1750 (synopsis "Logging infrastructure for OCaml")
1751 (description "Logs provides a logging infrastructure for OCaml. Logging is
1752 performed on sources whose reporting level can be set independently. Log
1753 message report is decoupled from logging and is handled by a reporter.")
1754 (license license:isc)))
1755
1756 (define-public ocaml-fpath
1757 (package
1758 (name "ocaml-fpath")
1759 (version "0.7.1")
1760 (source (origin
1761 (method url-fetch)
1762 (uri (string-append "http://erratique.ch/software/fpath/releases/"
1763 "fpath-" version ".tbz"))
1764 (sha256
1765 (base32
1766 "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
1767 (build-system ocaml-build-system)
1768 (arguments `(#:tests? #f
1769 #:build-flags (list "build")
1770 #:phases
1771 (modify-phases %standard-phases
1772 (delete 'configure))))
1773 (native-inputs `(("opam" ,opam)))
1774 (propagated-inputs `(("topkg" ,ocaml-topkg)
1775 ("astring" ,ocaml-astring)))
1776 (home-page "http://erratique.ch/software/fpath")
1777 (synopsis "File system paths for OCaml")
1778 (description "Fpath is an OCaml module for handling file system paths with
1779 POSIX or Windows conventions. Fpath processes paths without accessing the
1780 file system and is independent from any system library.")
1781 (license license:isc)))
1782
1783 (define-public ocaml-bos
1784 (package
1785 (name "ocaml-bos")
1786 (version "0.1.4")
1787 (source (origin
1788 (method url-fetch)
1789 (uri (string-append "http://erratique.ch/software/bos/releases/"
1790 "bos-" version ".tbz"))
1791 (sha256
1792 (base32
1793 "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
1794 (build-system ocaml-build-system)
1795 (arguments `(#:tests? #f
1796 #:build-flags (list "build")
1797 #:phases
1798 (modify-phases %standard-phases
1799 (delete 'configure))))
1800 (native-inputs `(("opam" ,opam)))
1801 (propagated-inputs `(("topkg" ,ocaml-topkg)
1802 ("astring" ,ocaml-astring)
1803 ("fmt" ,ocaml-fmt)
1804 ("fpath" ,ocaml-fpath)
1805 ("logs" ,ocaml-logs)
1806 ("rresult" ,ocaml-rresult)))
1807 (home-page "http://erratique.ch/software/bos")
1808 (synopsis "Basic OS interaction for OCaml")
1809 (description "Bos provides support for basic and robust interaction with
1810 the operating system in OCaml. It has functions to access the process
1811 environment, parse command line arguments, interact with the file system and
1812 run command line programs.")
1813 (license license:isc)))
1814
1815 (define-public ocaml-xmlm
1816 (package
1817 (name "ocaml-xmlm")
1818 (version "1.2.0")
1819 (source (origin
1820 (method url-fetch)
1821 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
1822 "xmlm-" version ".tbz"))
1823 (sha256
1824 (base32
1825 "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"))))
1826 (build-system ocaml-build-system)
1827 (arguments `(#:tests? #f
1828 #:phases
1829 (modify-phases %standard-phases
1830 (delete 'configure)
1831 (replace 'build
1832 (lambda* (#:key #:allow-other-keys)
1833 (zero? (system* "pkg/build" "true")))))))
1834 (native-inputs `(("opam" ,opam)))
1835 (home-page "http://erratique.ch/software/xmlm")
1836 (synopsis "Streaming XML codec for OCaml")
1837 (description "Xmlm is a streaming codec to decode and encode the XML data
1838 format. It can process XML documents without a complete in-memory
1839 representation of the data.")
1840 (license license:isc)))
1841
1842 (define-public ocaml4.01-xmlm
1843 (package-with-ocaml4.01 ocaml-xmlm))
1844
1845 (define-public ocaml-ulex
1846 (package
1847 (name "ocaml-ulex")
1848 (version "1.1")
1849 (source (origin
1850 (method url-fetch)
1851 (uri (string-append "http://www.cduce.org/download/ulex-"
1852 version ".tar.gz"))
1853 (sha256
1854 (base32
1855 "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0"))))
1856 (build-system ocaml-build-system)
1857 (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
1858 #:tests? #f
1859 #:make-flags
1860 (list "all.opt"
1861 (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
1862 "-cflags -I,"
1863 (assoc-ref %build-inputs "camlp4")
1864 "/lib/ocaml/site-lib/camlp4"))))
1865 (native-inputs `(("camlp4" ,camlp4)))
1866 (home-page "http://www.cduce.org/download.html#side")
1867 (synopsis "Lexer generator for Unicode and OCaml")
1868 (description "Lexer generator for Unicode and OCaml.")
1869 (license license:expat)))
1870
1871 (define-public ocaml-uchar
1872 (package
1873 (name "ocaml-uchar")
1874 (version "0.0.1")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
1879 version "/uchar-" version ".tbz"))
1880 (sha256 (base32
1881 "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi"))))
1882 (build-system ocaml-build-system)
1883 (arguments `(#:tests? #f
1884 #:build-flags (list "native=true" "native-dynlink=true")
1885 #:phases
1886 (modify-phases %standard-phases
1887 (delete 'configure))))
1888 (native-inputs `(("opam" ,opam)))
1889 (home-page "https://github.com/ocaml/uchar")
1890 (synopsis "Compatibility library for OCaml's Uchar module")
1891 (description "The uchar package provides a compatibility library for the
1892 `Uchar` module introduced in OCaml 4.03.")
1893 (license license:lgpl2.1)))
1894
1895 (define-public ocaml-uutf
1896 (package
1897 (name "ocaml-uutf")
1898 (version "1.0.0")
1899 (source (origin
1900 (method url-fetch)
1901 (uri (string-append "http://erratique.ch/software/uutf/releases/"
1902 "uutf-" version ".tbz"))
1903 (sha256
1904 (base32
1905 "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37"))))
1906 (build-system ocaml-build-system)
1907 (arguments `(#:tests? #f
1908 #:build-flags (list "build")
1909 #:phases
1910 (modify-phases %standard-phases
1911 (delete 'configure))))
1912 (native-inputs `(("opam" ,opam)
1913 ("topkg" ,ocaml-topkg)))
1914 (propagated-inputs `(("uchar" ,ocaml-uchar)
1915 ("cmdliner" ,ocaml-cmdliner)))
1916 (home-page "http://erratique.ch/software/uutf")
1917 (synopsis "Non-blocking streaming Unicode codec for OCaml")
1918 (description "Uutf is a non-blocking streaming codec to decode and encode
1919 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
1920 work character by character without blocking on IO. Decoders perform character
1921 position tracking and support newline normalization.
1922
1923 Functions are also provided to fold over the characters of UTF encoded OCaml
1924 string values and to directly encode characters in OCaml Buffer.t values.")
1925 (license license:isc)))
1926
1927 (define-public ocaml-jsonm
1928 (package
1929 (name "ocaml-jsonm")
1930 (version "1.0.0")
1931 (source (origin
1932 (method url-fetch)
1933 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
1934 "jsonm-" version ".tbz"))
1935 (sha256
1936 (base32
1937 "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62"))))
1938 (build-system ocaml-build-system)
1939 (arguments `(#:tests? #f
1940 #:build-flags (list "build")
1941 #:phases
1942 (modify-phases %standard-phases
1943 (delete 'configure))))
1944 (native-inputs `(("opam" ,opam)
1945 ("topkg" ,ocaml-topkg)))
1946 (propagated-inputs `(("uutf" ,ocaml-uutf)
1947 ("cmdliner" ,ocaml-cmdliner)))
1948 (home-page "http://erratique.ch/software/jsonm")
1949 (synopsis "Non-blocking streaming JSON codec for OCaml")
1950 (description "Jsonm is a non-blocking streaming codec to decode and encode
1951 the JSON data format. It can process JSON text without blocking on IO and
1952 without a complete in-memory representation of the data.")
1953 (license license:isc)))
1954
1955 (define-public ocaml-ocurl
1956 (package
1957 (name "ocaml-ocurl")
1958 (version "0.7.9")
1959 (source (origin
1960 (method url-fetch)
1961 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
1962 version ".tar.gz"))
1963 (sha256
1964 (base32
1965 "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n"))))
1966 (build-system ocaml-build-system)
1967 (arguments `(#:phases
1968 (modify-phases %standard-phases
1969 (add-before 'configure 'fix-/bin/sh
1970 (lambda* (#:key inputs #:allow-other-keys)
1971 (substitute* "configure"
1972 (("-/bin/sh") (string-append "-" (which "bash")))))))))
1973 (native-inputs `(("pkg-config" ,pkg-config)))
1974 (inputs `(("curl" ,curl)))
1975 (home-page "http://ocurl.forge.ocamlcore.org/")
1976 (synopsis "OCaml bindings for libcurl")
1977 (description "Client-side URL transfer library, supporting HTTP and a
1978 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
1979 (license license:isc)))
1980
1981 (define-public ocaml-base64
1982 (package
1983 (name "ocaml-base64")
1984 (version "2.1.2")
1985 (source (origin
1986 (method url-fetch)
1987 (uri (string-append "https://github.com/mirage/ocaml-base64/"
1988 "releases/download/v" version "/base64-"
1989 version ".tbz"))
1990 (file-name (string-append name "-" version ".tar.gz"))
1991 (sha256
1992 (base32
1993 "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
1994 (build-system ocaml-build-system)
1995 (arguments
1996 `(#:build-flags (list "build" "--tests" "true")
1997 #:phases
1998 (modify-phases %standard-phases
1999 (delete 'configure))))
2000 (native-inputs
2001 `(("topkg" ,ocaml-topkg)
2002 ("opam" ,opam)
2003 ("rresult" ,ocaml-rresult)
2004 ("bos" ,ocaml-bos)
2005 ("alcotest" ,ocaml-alcotest)))
2006 (home-page "https://github.com/mirage/ocaml-base64")
2007 (synopsis "Base64 encoding for OCaml")
2008 (description "Base64 is a group of similar binary-to-text encoding schemes
2009 that represent binary data in an ASCII string format by translating it into a
2010 radix-64 representation. It is specified in RFC 4648.")
2011 (license license:isc)))
2012
2013 (define-public ocamlify
2014 (package
2015 (name "ocamlify")
2016 (version "0.0.2")
2017 (source (origin
2018 (method url-fetch)
2019 (uri (ocaml-forge-uri name version 1209))
2020 (sha256
2021 (base32
2022 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
2023 (build-system ocaml-build-system)
2024 ; tests are done during build
2025 (arguments
2026 `(#:phases
2027 (modify-phases %standard-phases
2028 (delete 'check))))
2029 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2030 (synopsis "Include files in OCaml code")
2031 (description "OCamlify allows to create OCaml source code by including
2032 whole files into OCaml string or string list. The code generated can be
2033 compiled as a standard OCaml file. It allows embedding external resources as
2034 OCaml code.")
2035 (license license:lgpl2.1+))); with the OCaml static compilation exception
2036
2037 (define-public omake
2038 (package
2039 (name "omake")
2040 (version "0.10.1")
2041 (source (origin
2042 (method url-fetch)
2043 (uri (string-append "http://download.camlcity.org/download/"
2044 "omake-" version ".tar.gz"))
2045 (sha256
2046 (base32
2047 "093ansbppms90hiqvzar2a46fj8gm9iwnf8gn38s6piyp70lrbsj"))
2048 (patches (search-patches "omake-fix-non-determinism.patch"))))
2049 (build-system ocaml-build-system)
2050 (arguments
2051 `(#:make-flags
2052 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2053 #:tests? #f ; no test target
2054 #:phases
2055 (modify-phases %standard-phases
2056 (add-before 'configure 'fix-makefile
2057 (lambda* (#:key outputs #:allow-other-keys)
2058 (substitute* "mk/osconfig_unix.mk"
2059 (("CC = cc") "CC = gcc")))))))
2060 (native-inputs `(("hevea" ,hevea)))
2061 (home-page "http://projects.camlcity.org/projects/omake.html")
2062 (synopsis "Build system designed for scalability and portability")
2063 (description "Similar to make utilities you may have used, but it features
2064 many additional enhancements, including:
2065
2066 @enumerate
2067 @item Support for projects spanning several directories or directory hierarchies.
2068 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2069 with full support for incremental builds.
2070 @item Dependency analysis takes the command lines into account — whenever the
2071 command line used to build a target changes, the target is considered
2072 out-of-date.
2073 @item Fully scriptable, includes a library that providing support for standard
2074 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2075 @end enumerate")
2076 (license (list license:lgpl2.1 ; libmojave
2077 license:expat ; OMake scripts
2078 license:gpl2)))) ; OMake itself, with ocaml linking exception
2079 ; see LICENSE.OMake
2080
2081 (define-public ocaml-batteries
2082 (package
2083 (name "ocaml-batteries")
2084 (version "2.5.3")
2085 (source (origin
2086 (method url-fetch)
2087 (uri (ocaml-forge-uri "batteries" version 1650))
2088 (sha256
2089 (base32
2090 "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
2091 (build-system ocaml-build-system)
2092 (native-inputs
2093 `(("qtest" ,ocaml-qtest)
2094 ("bisect" ,ocaml-bisect)
2095 ("ounit" ,ocaml-ounit)))
2096 (arguments
2097 `(#:phases
2098 (modify-phases %standard-phases
2099 (delete 'check) ; tests are run by the build phase
2100 (replace 'build
2101 (lambda* (#:key outputs #:allow-other-keys)
2102 (zero? (system* "ocaml" "setup.ml" "-build")))))))
2103 (home-page "http://batteries.forge.ocamlcore.org/")
2104 (synopsis "Development platform for the OCaml programming language")
2105 (description "Define a standard set of libraries which may be expected on
2106 every compliant installation of OCaml and organize these libraries into a
2107 hierarchy of modules.")
2108 (license license:lgpl2.1+)))
2109
2110 (define-public ocaml4.01-batteries
2111 (package-with-ocaml4.01 ocaml-batteries))
2112
2113 (define-public ocaml-pcre
2114 (package
2115 (name "ocaml-pcre")
2116 (version "7.2.3")
2117 (source (origin
2118 (method url-fetch)
2119 (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
2120 "/v" version ".tar.gz"))
2121 (file-name (string-append name "-" version ".tar.gz"))
2122 (sha256
2123 (base32
2124 "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
2125 (build-system ocaml-build-system)
2126 (arguments
2127 `(#:phases
2128 (modify-phases %standard-phases
2129 (add-after 'install 'link-lib
2130 (lambda* (#:key outputs #:allow-other-keys)
2131 (let* ((out (assoc-ref outputs "out"))
2132 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
2133 (lib (string-append out "/lib/ocaml/site-lib/pcre")))
2134 (mkdir-p stubs)
2135 (symlink (string-append lib "/dllpcre_stubs.so")
2136 (string-append stubs "/dllpcre_stubs.so"))))))))
2137 (native-inputs
2138 `(("batteries" ,ocaml-batteries)
2139 ("pcre:bin" ,pcre "bin")))
2140 (propagated-inputs `(("pcre" ,pcre)))
2141 (home-page "https://mmottl.github.io/pcre-ocaml")
2142 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2143 (description "Pcre-ocaml offers library functions for string pattern
2144 matching and substitution, similar to the functionality offered by the Perl
2145 language.")
2146 (license license:lgpl2.1+))); with the OCaml link exception
2147
2148 (define-public ocaml-expect
2149 (package
2150 (name "ocaml-expect")
2151 (version "0.0.5")
2152 (source (origin
2153 (method url-fetch)
2154 (uri (ocaml-forge-uri name version 1372))
2155 (sha256
2156 (base32
2157 "07xq8w2x2vffc32z7vk6y14jwbfb1cw0m2lm1jzi60hnr1dvg8by"))))
2158 (build-system ocaml-build-system)
2159 (native-inputs
2160 `(("ocaml-pcre" ,ocaml-pcre)
2161 ("ounit" ,ocaml-ounit)))
2162 (propagated-inputs `(("batteries" ,ocaml-batteries)))
2163 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2164 (synopsis "Simple implementation of expect")
2165 (description "Help building unitary testing of interactive program. You
2166 can match the question using a regular expression or a timeout.")
2167 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2168
2169 (define-public ocaml-fileutils
2170 (package
2171 (name "ocaml-fileutils")
2172 (version "0.5.1")
2173 (source (origin
2174 (method url-fetch)
2175 (uri (ocaml-forge-uri name version 1651))
2176 (sha256
2177 (base32
2178 "0g6zx2rcvacklxyli19ixcf6ich9ipxsps4k3jz98f5zlaab0a7g"))))
2179 (build-system ocaml-build-system)
2180 (native-inputs `(("ounit" ,ocaml-ounit)))
2181 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2182 (synopsis "Pure OCaml functions to manipulate real file and filename")
2183 (description "Library to provide pure OCaml functions to manipulate real
2184 file (POSIX like) and filename.")
2185 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
2186
2187 (define-public ocaml-oasis
2188 (package
2189 (name "ocaml-oasis")
2190 (version "0.4.8")
2191 (source (origin
2192 (method url-fetch)
2193 (uri (ocaml-forge-uri name version 1669))
2194 (sha256
2195 (base32
2196 "1ln7vc7ip6s5xbi20mhnn087xi4a2m5vqawx0703qqnfkzhmslqy"))
2197 (modules '((guix build utils)))
2198 (snippet
2199 '(substitute* "test/test-main/Test.ml"
2200 ;; most of these tests fail because ld cannot find crti.o, but according
2201 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
2202 ;; are set correctly whene LD_LIBRARY_PATH is defined beforhand.
2203 (("TestBaseCompat.tests;") "")
2204 (("TestExamples.tests;") "")
2205 (("TestFull.tests;") "")
2206 (("TestPluginDevFiles.tests;") "")
2207 (("TestPluginInternal.tests;") "")
2208 (("TestPluginOCamlbuild.tests;") "")
2209 (("TestPluginOMake.tests;") "")))))
2210 (build-system ocaml-build-system)
2211 (native-inputs
2212 `(("ocamlify" ,ocamlify)
2213 ("ocamlmod" ,ocamlmod)
2214 ("ounit" ,ocaml-ounit)
2215 ("omake" ,omake)
2216 ("ocaml-expect" ,ocaml-expect)
2217 ("ocaml-pcre" ,ocaml-pcre)
2218 ("ocaml-fileutils" ,ocaml-fileutils)
2219 ("camlp4" ,camlp4)
2220 ("texlive" ,texlive)
2221 ("pkg-config" ,pkg-config)))
2222 (home-page "https://oasis.forge.ocamlcore.org")
2223 (synopsis "Integrates a configure, build, install system in OCaml projects")
2224 (description "OASIS is a tool to integrate a configure, build and install
2225 system in your OCaml projects. It helps to create standard entry points in your
2226 build system and allows external tools to analyse your project easily.")
2227 (license license:lgpl2.1+))) ; with ocaml static compilation exception
2228
2229 (define-public ocaml-js-build-tools
2230 (package
2231 (name "ocaml-js-build-tools")
2232 (version "113.33.06")
2233 (source (janestreet-origin "js-build-tools" version
2234 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2235 (native-inputs
2236 `(("oasis" ,ocaml-oasis)
2237 ("opam" ,opam)))
2238 (build-system ocaml-build-system)
2239 (arguments janestreet-arguments)
2240 (home-page "https://github.com/janestreet/js-build-tools")
2241 (synopsis "Collection of tools to help building Jane Street Packages")
2242 (description "This package contains tools to help building Jane Street
2243 packages, but can be used for other purposes. It contains:
2244 @enumerate
2245 @item an @command{oasis2opam-install} tool to produce a @file{.install} file
2246 from the oasis build log
2247 @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2248 @end enumerate")
2249 (license license:asl2.0)))
2250
2251 (define-public ocaml-bin-prot
2252 (package
2253 (name "ocaml-bin-prot")
2254 (version "113.33.03")
2255 (source (janestreet-origin "bin_prot" version
2256 "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
2257 (native-inputs
2258 `(("js-build-tools" ,ocaml-js-build-tools)
2259 ("opam" ,opam)))
2260 (build-system ocaml-build-system)
2261 (arguments janestreet-arguments)
2262 (home-page "https://github.com/janestreet/bin_prot/")
2263 (synopsis "Binary protocol generator")
2264 (description "This library contains functionality for reading and writing
2265 OCaml-values in a type-safe binary protocol. It is extremely efficient,
2266 typically supporting type-safe marshalling and unmarshalling of even highly
2267 structured values at speeds sufficient to saturate a gigabit connection. The
2268 protocol is also heavily optimized for size, making it ideal for long-term
2269 storage of large amounts of data.")
2270 (license license:asl2.0)))
2271
2272 (define-public ocaml-fieldslib
2273 (package
2274 (name "ocaml-fieldslib")
2275 (version "113.33.03")
2276 (source (janestreet-origin "fieldslib" version
2277 "1rm3bn54bzk2hlq8f3w067ak8s772w4a8f78i3yh79vxfzq8ncvv"))
2278 (native-inputs
2279 `(("js-build-tools" ,ocaml-js-build-tools)
2280 ("opam" ,opam)))
2281 (build-system ocaml-build-system)
2282 (arguments janestreet-arguments)
2283 (home-page "https://github.com/janestreet/fieldslib/")
2284 (synopsis "Syntax extension to record fields")
2285 (description "Syntax extension to define first class values representing
2286 record fields, to get and set record fields, iterate and fold over all fields
2287 of a record and create new record values.")
2288 (license license:asl2.0)))
2289
2290 (define-public ocaml-ppx-core
2291 (package
2292 (name "ocaml-ppx-core")
2293 (version "113.33.03")
2294 (source (janestreet-origin "ppx_core" version
2295 "0f69l4czhgssnhb5ds2j9dbqjyz8dp1y3i3x0i4h6pxnms20zbxa"))
2296 (build-system ocaml-build-system)
2297 (native-inputs
2298 `(("js-build-tools" ,ocaml-js-build-tools)
2299 ("opam" ,opam)))
2300 (inputs `(("ppx-tools" ,ocaml-ppx-tools)))
2301 (arguments janestreet-arguments)
2302 (home-page "https://github.com/janestreet/ppx_core/")
2303 (synopsis "Standard library for ppx rewriters")
2304 (description "Ppx_core is a standard library for OCaml AST transformers.
2305 It contains:
2306 @enumerate
2307 @item various auto-generated AST traversal using an open recursion scheme
2308 @item helpers for building AST fragments
2309 @item helpers for matching AST fragments
2310 @item a framework for dealing with attributes and extension points.
2311 @end enumerate")
2312 (license license:asl2.0)))
2313
2314 (define-public ocaml-ppx-optcomp
2315 (package
2316 (name "ocaml-ppx-optcomp")
2317 (version "113.33.03")
2318 (source (janestreet-origin "ppx_optcomp" version
2319 "13an8p2r7sd0d5lv54mlzrxdni47408bwqi3bjcx4m6005170q30"))
2320 (build-system ocaml-build-system)
2321 (native-inputs
2322 `(("js-build-tools" ,ocaml-js-build-tools)
2323 ("opam" ,opam)))
2324 (propagated-inputs
2325 `(("ppx-tools" ,ocaml-ppx-tools)
2326 ("ppx-core" ,ocaml-ppx-core)))
2327 (arguments janestreet-arguments)
2328 (home-page "https://github.com/janestreet/ppx_optcomp/")
2329 (synopsis "Optional compilation for OCaml")
2330 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
2331 used to handle optional compilations of pieces of code depending of the word
2332 size, the version of the compiler, ...")
2333 (license license:asl2.0)))
2334
2335 (define-public ocaml-ppx-driver
2336 (package
2337 (name "ocaml-ppx-driver")
2338 (version "113.33.03")
2339 (source (janestreet-origin "ppx_driver" version
2340 "011zzr45897j49b7iiybb29k7pspcx36mlnp7nh6pxb8b0ga76fh"))
2341 (build-system ocaml-build-system)
2342 (native-inputs
2343 `(("js-build-tools" ,ocaml-js-build-tools)
2344 ("opam" ,opam)
2345 ("ppx-optcomp" ,ocaml-ppx-optcomp)))
2346 (propagated-inputs
2347 `(("ppx-optcomp" ,ocaml-ppx-optcomp)
2348 ("ppx-core" ,ocaml-ppx-core)))
2349 (arguments janestreet-arguments)
2350 (home-page "https://github.com/janestreet/ppx_driver/")
2351 (synopsis "Feature-full driver for OCaml AST transformers")
2352 (description "A driver is an executable created from a set of OCaml AST
2353 transformers linked together with a command line frontend. The aim is to
2354 provide a tool that can be used to:
2355 @enumerate
2356 @item easily view the pre-processed version of a file, no need to construct a
2357 complex command line: @command{ppx file.ml} will do
2358 @item use a single executable to run several transformations: no need to fork
2359 many times just for pre-processing
2360 @item improved errors for misspelled/misplaced attributes and extension points.
2361 @end enumerate")
2362 (license license:asl2.0)))
2363
2364 (define-public ocaml-cppo
2365 (package
2366 (name "ocaml-cppo")
2367 (version "1.4.1")
2368 (source
2369 (origin
2370 (method url-fetch)
2371 (uri (string-append "https://github.com/mjambon/cppo/archive/v" version
2372 ".tar.gz"))
2373 (sha256 (base32
2374 "02gma6nw09vfnd6h7bl3n70lwz7m9z2svplxyfh6h5bf4lqgqzjv"))
2375 (file-name (string-append name "-" version ".tar.gz"))))
2376 (build-system ocaml-build-system)
2377 (arguments
2378 `(#:phases (modify-phases %standard-phases (delete 'configure))
2379 #:make-flags (list (string-append "BINDIR="
2380 (assoc-ref %outputs "out") "/bin"))
2381 #:tests? #f))
2382 (home-page "https://github.com/mjambon/cppo")
2383 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2384 (description "Cppo is an equivalent of the C preprocessor for OCaml
2385 programs. It allows the definition of simple macros and file inclusion. Cpp ois:
2386 @enumerate
2387 @item more OCaml-friendly than cpp
2388 @item easy to learn without consulting a manual
2389 @item reasonably fast
2390 @item simple to install and to maintain.
2391 @end enumerate")
2392 (license license:bsd-3)))
2393
2394 ;; this package is not reproducible. This is related to temporary filenames
2395 ;; such as findlib_initxxxxx where xxxxx is random.
2396 (define-public ocaml-ppx-deriving
2397 (package
2398 (name "ocaml-ppx-deriving")
2399 (version "4.1")
2400 (source
2401 (origin
2402 (method url-fetch)
2403 (uri (string-append "https://github.com/whitequark/ppx_deriving//archive/v"
2404 version ".tar.gz"))
2405 (sha256 (base32
2406 "1fr16g121j6zinwcprzlhx2py4271n9jzs2m9hq2f3qli2b1p0vl"))
2407 (file-name (string-append name "-" version ".tar.gz"))))
2408 (build-system ocaml-build-system)
2409 (native-inputs
2410 `(("js-build-tools" ,ocaml-js-build-tools)
2411 ("cppo" ,ocaml-cppo)
2412 ("ounit" ,ocaml-ounit)
2413 ("opam" ,opam)))
2414 (propagated-inputs
2415 `(("result" ,ocaml-result)
2416 ("ppx-tools" ,ocaml-ppx-tools)))
2417 (arguments
2418 `(#:phases
2419 (modify-phases %standard-phases
2420 (delete 'configure)
2421 (add-before 'install 'fix-environment
2422 (lambda* (#:key outputs #:allow-other-keys)
2423 ;; the installation procedures looks for the installed module
2424 (setenv "OCAMLPATH"
2425 (string-append (getenv "OCAMLPATH") ":"
2426 (getenv "OCAMLFIND_DESTDIR"))))))))
2427 (home-page "https://github.com/whitequark/ppx_deriving/")
2428 (synopsis "Type-driven code generation for OCaml >=4.02")
2429 (description "Ppx_deriving provides common infrastructure for generating
2430 code based on type definitions, and a set of useful plugins for common tasks.")
2431 (license license:expat)))
2432
2433 (define-public ocaml-ppx-type-conv
2434 (package
2435 (name "ocaml-ppx-type-conv")
2436 (version "113.33.03")
2437 (source
2438 (janestreet-origin "ppx_type_conv" version
2439 "1sp602ads2f250nv4d4rgw54d14k7flyhb4w8ff084f657hhmxv2"))
2440 (build-system ocaml-build-system)
2441 (native-inputs
2442 `(("js-build-tools" ,ocaml-js-build-tools)
2443 ("opam" ,opam)))
2444 (propagated-inputs
2445 `(("ppx-deriving" ,ocaml-ppx-deriving)
2446 ("ppx-tools" ,ocaml-ppx-tools)
2447 ("result" ,ocaml-result)
2448 ("ppx-core" ,ocaml-ppx-core)
2449 ("ppx-driver" ,ocaml-ppx-driver)))
2450 (arguments janestreet-arguments)
2451 (home-page "https://github.com/janestreet/ppx_type_conv/")
2452 (synopsis "Support Library for type-driven code generators")
2453 (description "The type_conv library factors out functionality needed by
2454 different preprocessors that generate code from type specifications.")
2455 (license license:asl2.0)))
2456
2457 (define-public ocaml-ppx-inline-test
2458 (package
2459 (name "ocaml-ppx-inline-test")
2460 (version "113.33.03")
2461 (source (janestreet-origin "ppx_inline_test" version
2462 "0859ni43fl39dd5g6cxfhq0prxmx59bd2bfq8jafp593ba4q0icq"))
2463 (build-system ocaml-build-system)
2464 (native-inputs
2465 `(("js-build-tools" ,ocaml-js-build-tools)
2466 ("opam" ,opam)
2467 ("ppx-core" ,ocaml-ppx-core)))
2468 (propagated-inputs
2469 `(("ppx-driver" ,ocaml-ppx-driver)
2470 ("ppx-tools" ,ocaml-ppx-tools)
2471 ("ppx-core" ,ocaml-ppx-core)))
2472 (arguments janestreet-arguments)
2473 (home-page "https://github.com/janestreet/ppx_inline_test/")
2474 (synopsis "Syntax extension for writing in-line tests in ocaml code")
2475 (description "Syntax extension for writing in-line tests in ocaml code.")
2476 (license license:asl2.0)))
2477
2478 (define-public ocaml-ppx-bench
2479 (package
2480 (name "ocaml-ppx-bench")
2481 (version "113.33.03")
2482 (source (janestreet-origin "ppx_bench" version
2483 "1hky3y17qpb925rymf97wv54di9gaqdmkix7wpkjw14qzl512b68"))
2484 (build-system ocaml-build-system)
2485 (native-inputs
2486 `(("js-build-tools" ,ocaml-js-build-tools)
2487 ("opam" ,opam)
2488 ("ppx-core" ,ocaml-ppx-core)))
2489 (propagated-inputs
2490 `(("ppx-driver" ,ocaml-ppx-driver)
2491 ("ppx-tools" ,ocaml-ppx-tools)
2492 ("ppx-inline-test" ,ocaml-ppx-inline-test)
2493 ("ppx-core" ,ocaml-ppx-core)))
2494 (arguments janestreet-arguments)
2495 (home-page "https://github.com/janestreet/ppx_bench/")
2496 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
2497 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
2498 (license license:asl2.0)))
2499
2500 (define-public ocaml-ppx-compare
2501 (package
2502 (name "ocaml-ppx-compare")
2503 (version "113.33.03")
2504 (source (janestreet-origin "ppx_compare" version
2505 "0bfhi33kq9l4q6zzc6svki2csracz5j4731c3npcy6cs73jynn0z"))
2506 (build-system ocaml-build-system)
2507 (native-inputs
2508 `(("js-build-tools" ,ocaml-js-build-tools)
2509 ("opam" ,opam)
2510 ("ppx-core" ,ocaml-ppx-core)))
2511 (propagated-inputs
2512 `(("ppx-driver" ,ocaml-ppx-driver)
2513 ("ppx-tools" ,ocaml-ppx-tools)
2514 ("ppx-core" ,ocaml-ppx-core)
2515 ("ppx-type-conv" ,ocaml-ppx-type-conv)))
2516 (arguments janestreet-arguments)
2517 (home-page "https://github.com/janestreet/ppx_compare/")
2518 (synopsis "Generation of comparison functions from types")
2519 (description "Generation of fast comparison functions from type expressions
2520 and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
2521 from type representations. The scaffolded functions are usually much faster
2522 than ocaml's Pervasives.compare. Scaffolding functions also gives you more
2523 flexibility by allowing you to override them for a specific type and more safety
2524 by making sure that you only compare comparable values.")
2525 (license license:asl2.0)))
2526
2527 (define-public ocaml-sexplib
2528 (package
2529 (name "ocaml-sexplib")
2530 (version "113.33.03")
2531 (source (janestreet-origin "sexplib" version
2532 "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima"))
2533 (build-system ocaml-build-system)
2534 (native-inputs
2535 `(("js-build-tools" ,ocaml-js-build-tools)
2536 ("opam" ,opam)))
2537 (arguments janestreet-arguments)
2538 (home-page "https://github.com/janestreet/sexplib/")
2539 (synopsis "Library for serializing OCaml values to and from S-expressions")
2540 (description "Sexplib contains functionality for parsing and pretty-printing
2541 s-expressions.")
2542 (license license:asl2.0)))
2543
2544 (define-public ocaml-typerep
2545 (package
2546 (name "ocaml-typerep")
2547 (version "113.33.03")
2548 (source (janestreet-origin "typerep" version
2549 "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy"))
2550 (native-inputs
2551 `(("js-build-tools" ,ocaml-js-build-tools)
2552 ("opam" ,opam)))
2553 (build-system ocaml-build-system)
2554 (arguments janestreet-arguments)
2555 (home-page "https://github.com/janestreet/typerep/")
2556 (synopsis "Typerep is a library for runtime types")
2557 (description "Typerep is a library for runtime types.")
2558 (license license:asl2.0)))
2559
2560 (define-public ocaml-variantslib
2561 (package
2562 (name "ocaml-variantslib")
2563 (version "113.33.03")
2564 (source (janestreet-origin "variantslib" version
2565 "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n"))
2566 (native-inputs
2567 `(("js-build-tools" ,ocaml-js-build-tools)
2568 ("opam" ,opam)))
2569 (build-system ocaml-build-system)
2570 (arguments janestreet-arguments)
2571 (home-page "https://github.com/janestreet/variantslib")
2572 (synopsis "OCaml variants as first class values")
2573 (description "OCaml variants as first class values.")
2574 (license license:asl2.0)))
2575
2576 (define-public ocaml-ppx-sexp-conv
2577 (package
2578 (name "ocaml-ppx-sexp-conv")
2579 (version "113.33.03")
2580 (source (janestreet-origin "ppx_sexp_conv" version
2581 "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7"))
2582 (build-system ocaml-build-system)
2583 (native-inputs
2584 `(("js-build-tools" ,ocaml-js-build-tools)
2585 ("opam" ,opam)
2586 ("ppx-core" ,ocaml-ppx-core)))
2587 (propagated-inputs
2588 `(("sexplib" ,ocaml-sexplib)
2589 ("ppx-core" ,ocaml-ppx-core)
2590 ("ppx-type-conv" ,ocaml-ppx-type-conv)
2591 ("ppx-tools" ,ocaml-ppx-tools)))
2592 (arguments janestreet-arguments)
2593 (home-page "https://github.com/janestreet/ppx_sexp_conv")
2594 (synopsis "Generation of S-expression conversion functions from type definitions")
2595 (description "Generation of S-expression conversion functions from type
2596 definitions.")
2597 (license license:asl2.0)))
2598
2599 (define-public ocaml-ppx-variants-conv
2600 (package
2601 (name "ocaml-ppx-variants-conv")
2602 (version "113.33.03")
2603 (source (janestreet-origin "ppx_variants_conv" version
2604 "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34"))
2605 (build-system ocaml-build-system)
2606 (native-inputs
2607 `(("js-build-tools" ,ocaml-js-build-tools)
2608 ("opam" ,opam)))
2609 (propagated-inputs
2610 `(("ppx-core" ,ocaml-ppx-core)
2611 ("variantslib" ,ocaml-variantslib)
2612 ("ppx-tools" ,ocaml-ppx-tools)
2613 ("ppx-type-conv" ,ocaml-ppx-type-conv)))
2614 (arguments janestreet-arguments)
2615 (home-page "https://github.com/janestreet/ppx_variants_conv")
2616 (synopsis "Generation of accessor and iteration functions for ocaml variant
2617 types")
2618 (description "Generation of accessor and iteration functions for ocaml
2619 variant types.")
2620 (license license:asl2.0)))
2621
2622 (define-public ocaml-ppx-here
2623 (package
2624 (name "ocaml-ppx-here")
2625 (version "113.33.03")
2626 (source (janestreet-origin "ppx_here" version
2627 "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7"))
2628 (build-system ocaml-build-system)
2629 (native-inputs
2630 `(("js-build-tools" ,ocaml-js-build-tools)
2631 ("opam" ,opam)))
2632 (propagated-inputs
2633 `(("ppx-driver" ,ocaml-ppx-driver)
2634 ("ppx-core" ,ocaml-ppx-core)))
2635 (arguments janestreet-arguments)
2636 (home-page "https://github.com/janestreet/ppx_here")
2637 (synopsis "Expands [%here] into its location")
2638 (description "Expands [%here] into its location.")
2639 (license license:asl2.0)))
2640
2641 (define-public ocaml-ppx-assert
2642 (package
2643 (name "ocaml-ppx-assert")
2644 (version "113.33.03")
2645 (source (janestreet-origin "ppx_assert" version
2646 "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p"))
2647 (build-system ocaml-build-system)
2648 (native-inputs
2649 `(("js-build-tools" ,ocaml-js-build-tools)
2650 ("opam" ,opam)))
2651 (propagated-inputs
2652 `(("ppx-compare" ,ocaml-ppx-compare)
2653 ("ppx-core" ,ocaml-ppx-core)
2654 ("ppx-driver" ,ocaml-ppx-driver)
2655 ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
2656 ("ppx-tools" ,ocaml-ppx-tools)
2657 ("ppx-type-conv" ,ocaml-ppx-type-conv)
2658 ("ppx-sexplib" ,ocaml-sexplib)
2659 ("ppx-here" ,ocaml-ppx-here)))
2660 (arguments janestreet-arguments)
2661 (home-page "https://github.com/janestreet/ppx_assert")
2662 (synopsis "Assert-like extension nodes that raise useful errors on failure")
2663 (description "Assert-like extension nodes that raise useful errors on failure.")
2664 (license license:asl2.0)))
2665
2666 (define-public ocaml-ppx-enumerate
2667 (package
2668 (name "ocaml-ppx-enumerate")
2669 (version "113.33.03")
2670 (source (janestreet-origin "ppx_enumerate" version
2671 "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4"))
2672 (build-system ocaml-build-system)
2673 (native-inputs
2674 `(("js-build-tools" ,ocaml-js-build-tools)
2675 ("opam" ,opam)))
2676 (propagated-inputs
2677 `(("ppx-tools" ,ocaml-ppx-tools)
2678 ("ppx-type-conv" ,ocaml-ppx-type-conv)
2679 ("ppx-core" ,ocaml-ppx-core)))
2680 (arguments janestreet-arguments)
2681 (home-page "https://github.com/janestreet/ppx_enumerate")
2682 (synopsis "Generate a list containing all values of a finite type")
2683 (description "Ppx_enumerate is a ppx rewriter which generates a definition
2684 for the list of all values of a type (for a type which only has finitely
2685 many values).")
2686 (license license:asl2.0)))
2687
2688 (define-public ocaml-ppx-let
2689 (package
2690 (name "ocaml-ppx-let")
2691 (version "113.33.03")
2692 (source (janestreet-origin "ppx_let" version
2693 "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9"))
2694 (build-system ocaml-build-system)
2695 (native-inputs
2696 `(("js-build-tools" ,ocaml-js-build-tools)
2697 ("opam" ,opam)))
2698 (propagated-inputs
2699 `(("ppx-driver" ,ocaml-ppx-driver)
2700 ("ppx-core" ,ocaml-ppx-core)))
2701 (arguments janestreet-arguments)
2702 (home-page "https://github.com/janestreet/ppx_let")
2703 (synopsis "Monadic let-bindings")
2704 (description "A ppx rewriter for monadic and applicative let bindings,
2705 match expressions, and if expressions.")
2706 (license license:asl2.0)))
2707
2708 (define-public ocaml-ppx-typerep-conv
2709 (package
2710 (name "ocaml-ppx-typerep-conv")
2711 (version "113.33.03")
2712 (source (janestreet-origin "ppx_typerep_conv" version
2713 "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg"))
2714 (build-system ocaml-build-system)
2715 (native-inputs
2716 `(("js-build-tools" ,ocaml-js-build-tools)
2717 ("opam" ,opam)))
2718 (propagated-inputs
2719 `(("ppx-tools" ,ocaml-ppx-tools)
2720 ("ppx-type-conv" ,ocaml-ppx-type-conv)
2721 ("ppx-core" ,ocaml-ppx-core)
2722 ("typerep" ,ocaml-typerep)))
2723 (arguments janestreet-arguments)
2724 (home-page "https://github.com/janestreet/ppx_typerep_conv")
2725 (synopsis "Generation of runtime types from type declarations")
2726 (description "Automatic generation of runtime types from type definitions.")
2727 (license license:asl2.0)))
2728
2729 (define-public ocaml-ppx-sexp-value
2730 (package
2731 (name "ocaml-ppx-sexp-value")
2732 (version "113.33.03")
2733 (source (janestreet-origin "ppx_sexp_value" version
2734 "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g"))
2735 (build-system ocaml-build-system)
2736 (native-inputs
2737 `(("js-build-tools" ,ocaml-js-build-tools)
2738 ("opam" ,opam)))
2739 (propagated-inputs
2740 `(("ppx-driver" ,ocaml-ppx-driver)
2741 ("ppx-here" ,ocaml-ppx-here)
2742 ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
2743 ("ppx-tools" ,ocaml-ppx-tools)
2744 ("ppx-core" ,ocaml-ppx-core)))
2745 (arguments janestreet-arguments)
2746 (home-page "https://github.com/janestreet/ppx_sexp_value/")
2747 (synopsis "Simplify building s-expressions from ocaml values")
2748 (description "A ppx rewriter that simplifies building s-expressions from
2749 ocaml values.")
2750 (license license:asl2.0)))
2751
2752 (define-public ocaml-ppx-pipebang
2753 (package
2754 (name "ocaml-ppx-pipebang")
2755 (version "113.33.03")
2756 (source (janestreet-origin "ppx_pipebang" version
2757 "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw"))
2758 (build-system ocaml-build-system)
2759 (native-inputs
2760 `(("js-build-tools" ,ocaml-js-build-tools)
2761 ("opam" ,opam)))
2762 (propagated-inputs
2763 `(("ppx-driver" ,ocaml-ppx-driver)
2764 ("ppx-tools" ,ocaml-ppx-tools)
2765 ("ppx-core" ,ocaml-ppx-core)))
2766 (arguments janestreet-arguments)
2767 (home-page "https://github.com/janestreet/ppx_pipebang/")
2768 (synopsis "Inline reverse application operators `|>` and `|!`")
2769 (description "A ppx rewriter that inlines reverse application operators
2770 @code{|>} and @code{|!}.")
2771 (license license:asl2.0)))
2772
2773 (define-public ocaml-ppx-bin-prot
2774 (package
2775 (name "ocaml-ppx-bin-prot")
2776 (version "113.33.03")
2777 (source (janestreet-origin "ppx_bin_prot" version
2778 "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h"))
2779 (build-system ocaml-build-system)
2780 (native-inputs
2781 `(("js-build-tools" ,ocaml-js-build-tools)
2782 ("opam" ,opam)))
2783 (propagated-inputs
2784 `(("bin-prot" ,ocaml-bin-prot)
2785 ("ppx-tools" ,ocaml-ppx-tools)
2786 ("ppx-type-conv" ,ocaml-ppx-type-conv)
2787 ("ppx-core" ,ocaml-ppx-core)))
2788 (arguments janestreet-arguments)
2789 (home-page "https://github.com/janestreet/ppx_bin_prot/")
2790 (synopsis "Generation of bin_prot readers and writers from types")
2791 (description "Generation of binary serialization and deserialization
2792 functions from type definitions.")
2793 (license license:asl2.0)))
2794
2795 (define-public ocaml-ppx-fail
2796 (package
2797 (name "ocaml-ppx-fail")
2798 (version "113.33.03")
2799 (source (janestreet-origin "ppx_fail" version
2800 "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn"))
2801 (build-system ocaml-build-system)
2802 (native-inputs
2803 `(("js-build-tools" ,ocaml-js-build-tools)
2804 ("opam" ,opam)))
2805 (propagated-inputs
2806 `(("ppx-driver" ,ocaml-ppx-driver)
2807 ("ppx-tools" ,ocaml-ppx-tools)
2808 ("ppx-here" ,ocaml-ppx-here)
2809 ("ppx-core" ,ocaml-ppx-core)))
2810 (arguments janestreet-arguments)
2811 (home-page "https://github.com/janestreet/ppx_fail/")
2812 (synopsis "Add location to calls to failwiths")
2813 (description "Syntax extension that makes [failwiths] always include a
2814 position.")
2815 (license license:asl2.0)))
2816
2817 (define-public ocaml-ppx-custom-printf
2818 (package
2819 (name "ocaml-ppx-custom-printf")
2820 (version "113.33.03")
2821 (source (janestreet-origin "ppx_custom_printf" version
2822 "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8"))
2823 (build-system ocaml-build-system)
2824 (native-inputs
2825 `(("js-build-tools" ,ocaml-js-build-tools)
2826 ("opam" ,opam)))
2827 (propagated-inputs
2828 `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
2829 ("ppx-tools" ,ocaml-ppx-tools)
2830 ("ppx-core" ,ocaml-ppx-core)
2831 ("ppx-driver" ,ocaml-ppx-driver)))
2832 (arguments janestreet-arguments)
2833 (home-page "https://github.com/janestreet/ppx_custom_printf/")
2834 (synopsis "Printf-style format-strings for user-defined string conversion")
2835 (description "Extensions to printf-style format-strings for user-defined
2836 string conversion.")
2837 (license license:asl2.0)))
2838
2839 (define-public ocaml-ppx-sexp-message
2840 (package
2841 (name "ocaml-ppx-sexp-message")
2842 (version "113.33.03")
2843 (source (janestreet-origin "ppx_sexp_message" version
2844 "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68"))
2845 (build-system ocaml-build-system)
2846 (native-inputs
2847 `(("js-build-tools" ,ocaml-js-build-tools)
2848 ("opam" ,opam)))
2849 (propagated-inputs
2850 `(("ppx-driver" ,ocaml-ppx-driver)
2851 ("ppx-here" ,ocaml-ppx-here)
2852 ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
2853 ("ppx-tools" ,ocaml-ppx-tools)
2854 ("ppx-core" ,ocaml-ppx-core)))
2855 (arguments janestreet-arguments)
2856 (home-page "https://github.com/janestreet/ppx_sexp_message/")
2857 (synopsis "A ppx rewriter for easy construction of s-expressions")
2858 (description "Ppx_sexp_message aims to ease the creation of s-expressions
2859 in OCaml. This is mainly motivated by writing error and debugging messages,
2860 where one needs to construct a s-expression based on various element of the
2861 context such as function arguments.")
2862 (license license:asl2.0)))
2863
2864 (define-public ocaml-ppx-fields-conv
2865 (package
2866 (name "ocaml-ppx-fields-conv")
2867 (version "113.33.03")
2868 (source (janestreet-origin "ppx_fields_conv" version
2869 "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv"))
2870 (build-system ocaml-build-system)
2871 (native-inputs
2872 `(("js-build-tools" ,ocaml-js-build-tools)
2873 ("opam" ,opam)
2874 ("ppx-core" ,ocaml-ppx-core)))
2875 (propagated-inputs
2876 `(("fieldslib" ,ocaml-fieldslib)
2877 ("ppx-tools" ,ocaml-ppx-tools)
2878 ("ppx-core" ,ocaml-ppx-core)
2879 ("ppx-type-conv" ,ocaml-ppx-type-conv)))
2880 (arguments janestreet-arguments)
2881 (home-page "https://github.com/janestreet/ppx_fields_conv/")
2882 (synopsis "Generation of accessor and iteration functions for ocaml records")
2883 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
2884 first class values representing record fields, and additional routines, to get
2885 and set record fields, iterate and fold over all fields of a record and create
2886 new record values.")
2887 (license license:asl2.0)))
2888
2889 (define-public ocaml-re
2890 (package
2891 (name "ocaml-re")
2892 (version "1.7.1")
2893 (source (origin
2894 (method url-fetch)
2895 (uri (string-append "https://github.com/ocaml/ocaml-re//archive/"
2896 version ".tar.gz"))
2897 (file-name (string-append name "-" version ".tar.gz"))
2898 (sha256
2899 (base32
2900 "1s3rcr76cgm4p1xmaazc58arkg2lz3zfcp1icm00m6s5ccnkh67b"))))
2901 (build-system ocaml-build-system)
2902 (native-inputs `(("ounit" ,ocaml-ounit)))
2903 (home-page "https://github.com/ocaml/ocaml-re/")
2904 (synopsis "Regular expression library for OCaml")
2905 (description "Pure OCaml regular expressions with:
2906 @enumerate
2907 @item Perl-style regular expressions (module Re_perl)
2908 @item Posix extended regular expressions (module Re_posix)
2909 @item Emacs-style regular expressions (module Re_emacs)
2910 @item Shell-style file globbing (module Re_glob)
2911 @item Compatibility layer for OCaml's built-in Str module (module Re_str)
2912 @end enumerate")
2913 (license license:expat)))
2914
2915 (define-public ocaml-ppx-expect
2916 (package
2917 (name "ocaml-ppx-expect")
2918 (version "113.33.03")
2919 (source (janestreet-origin "ppx_expect" version
2920 "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc"))
2921 (build-system ocaml-build-system)
2922 (native-inputs
2923 `(("js-build-tools" ,ocaml-js-build-tools)
2924 ("opam" ,opam)))
2925 (propagated-inputs
2926 `(("fieldslib" ,ocaml-fieldslib)
2927 ("ppx-tools" ,ocaml-ppx-tools)
2928 ("ppx-assert" ,ocaml-ppx-assert)
2929 ("ppx-compare" ,ocaml-ppx-compare)
2930 ("ppx-core" ,ocaml-ppx-core)
2931 ("ppx-custom-printf" ,ocaml-ppx-custom-printf)
2932 ("ppx-driver" ,ocaml-ppx-driver)
2933 ("ppx-fields-conv" ,ocaml-ppx-fields-conv)
2934 ("ppx-inline-test" ,ocaml-ppx-inline-test)
2935 ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
2936 ("ppx-variants-conv" ,ocaml-ppx-variants-conv)
2937 ("re" ,ocaml-re)
2938 ("sexplib" ,ocaml-sexplib)
2939 ("variantslib" ,ocaml-variantslib)))
2940 (arguments janestreet-arguments)
2941 (home-page "https://github.com/janestreet/ppx_expect/")
2942 (synopsis "Cram like framework for OCaml")
2943 (description "Expect-test is a framework for writing tests in OCaml, similar
2944 to Cram. Expect-tests mimic the existing inline tests framework with the
2945 let%expect_test construct. The body of an expect-test can contain
2946 output-generating code, interleaved with %expect extension expressions to denote
2947 the expected output.")
2948 (license license:asl2.0)))
2949
2950 (define-public ocaml-ppx-jane
2951 (package
2952 (name "ocaml-ppx-jane")
2953 (version "113.33.03")
2954 (source (janestreet-origin "ppx_jane" version
2955 "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl"))
2956 (build-system ocaml-build-system)
2957 (native-inputs
2958 `(("js-build-tools" ,ocaml-js-build-tools)
2959 ("opam" ,opam)))
2960 (propagated-inputs
2961 `(("ppx-assert" ,ocaml-ppx-assert)
2962 ("ppx-bench" ,ocaml-ppx-bench)
2963 ("ppx-bin-prot" ,ocaml-ppx-bin-prot)
2964 ("ppx-compare" ,ocaml-ppx-compare)
2965 ("ppx-custom-printf" ,ocaml-ppx-custom-printf)
2966 ("ppx-deriving" ,ocaml-ppx-deriving)
2967 ("ppx-enumerate" ,ocaml-ppx-enumerate)
2968 ("ppx-expect" ,ocaml-ppx-expect)
2969 ("ppx-fail" ,ocaml-ppx-fail)
2970 ("ppx-fields-conv" ,ocaml-ppx-fields-conv)
2971 ("ppx-here" ,ocaml-ppx-here)
2972 ("ppx-inline-test" ,ocaml-ppx-inline-test)
2973 ("ppx-let" ,ocaml-ppx-let)
2974 ("ppx-pipebang" ,ocaml-ppx-pipebang)
2975 ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
2976 ("ppx-sexp-message" ,ocaml-ppx-sexp-message)
2977 ("ppx-sexp-value" ,ocaml-ppx-sexp-value)
2978 ("ppx-typerep-conv" ,ocaml-ppx-typerep-conv)
2979 ("ppx-variants-conv" ,ocaml-ppx-variants-conv)))
2980 (arguments janestreet-arguments)
2981 (home-page "https://github.com/janestreet/ppx_jane/")
2982 (synopsis "Standard Jane Street ppx rewriters")
2983 (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.")
2984 (license license:asl2.0)))
2985
2986 (define-public ocaml-core-kernel
2987 (package
2988 (name "ocaml-core-kernel")
2989 (version "113.33.03")
2990 (source (janestreet-origin "core_kernel" version
2991 "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y"))
2992 (native-inputs
2993 `(("js-build-tools" ,ocaml-js-build-tools)
2994 ("ppx-jane" ,ocaml-ppx-jane)
2995 ("opam" ,opam)))
2996 (propagated-inputs
2997 `(("bin_prot" ,ocaml-bin-prot)
2998 ("ppx-assert" ,ocaml-ppx-assert)
2999 ("ppx-bench" ,ocaml-ppx-bench)
3000 ("ppx-driver" ,ocaml-ppx-driver)
3001 ("ppx-expect" ,ocaml-ppx-expect)
3002 ("ppx-inline-test" ,ocaml-ppx-inline-test)
3003 ("typerep" ,ocaml-typerep)
3004 ("sexplib" ,ocaml-sexplib)
3005 ("variantslib" ,ocaml-variantslib)
3006 ("result" ,ocaml-result)
3007 ("fieldslib" ,ocaml-fieldslib)))
3008 (build-system ocaml-build-system)
3009 (arguments janestreet-arguments)
3010 (home-page "https://github.com/janestreet/core_kernel/")
3011 (synopsis "Portable standard library for OCaml")
3012 (description "Core is an alternative to the OCaml standard library.
3013
3014 Core_kernel is the system-independent part of Core. It is aimed for cases when
3015 the full Core is not available, such as in Javascript.")
3016 (license license:asl2.0)))
3017
3018 (define-public ocaml-async-kernel
3019 (package
3020 (name "ocaml-async-kernel")
3021 (version "113.33.03")
3022 (source (janestreet-origin "async_kernel" version
3023 "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd"))
3024 (native-inputs
3025 `(("oasis" ,ocaml-oasis)
3026 ("js-build-tools" ,ocaml-js-build-tools)
3027 ("ppx-jane" ,ocaml-ppx-jane)
3028 ("opam" ,opam)))
3029 (propagated-inputs
3030 `(("core-kernel" ,ocaml-core-kernel)))
3031 (build-system ocaml-build-system)
3032 (arguments janestreet-arguments)
3033 (home-page "https://github.com/janestreet/async_kernel/")
3034 (synopsis "Monadic concurrency library")
3035 (description "Async-kernel is a library for concurrent programming in OCaml.")
3036 (license license:asl2.0)))
3037
3038 (define-public ocaml-async-rpc-kernel
3039 (package
3040 (name "ocaml-async-rpc-kernel")
3041 (version "113.33.03")
3042 (source (janestreet-origin "async_rpc_kernel" version
3043 "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh"))
3044 (native-inputs
3045 `(("oasis" ,ocaml-oasis)
3046 ("js-build-tools" ,ocaml-js-build-tools)
3047 ("ppx-jane" ,ocaml-ppx-jane)
3048 ("opam" ,opam)))
3049 (propagated-inputs
3050 `(("async-kernel" ,ocaml-async-kernel)))
3051 (build-system ocaml-build-system)
3052 (arguments janestreet-arguments)
3053 (home-page "https://github.com/janestreet/async_rpc_kernel/")
3054 (synopsis "Platform-independent core of the Async RPC library")
3055 (description "Async_rpc_kernel is the platform-independent core of
3056 the Async RPC library.")
3057 (license license:asl2.0)))
3058
3059 (define-public ocaml-core
3060 (package
3061 (name "ocaml-core")
3062 (version "113.33.03")
3063 (source (janestreet-origin "core" version
3064 "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268"))
3065 (native-inputs
3066 `(("oasis" ,ocaml-oasis)
3067 ("js-build-tools" ,ocaml-js-build-tools)
3068 ("ppx-jane" ,ocaml-ppx-jane)
3069 ("opam" ,opam)))
3070 (propagated-inputs
3071 `(("core-kernel" ,ocaml-core-kernel)))
3072 (build-system ocaml-build-system)
3073 (arguments janestreet-arguments)
3074 (home-page "https://github.com/janestreet/core/")
3075 (synopsis "Alternative to OCaml's standard library")
3076 (description "The Core suite of libraries is an alternative to OCaml's
3077 standard library that was developed by Jane Street.")
3078 (license license:asl2.0)))
3079
3080 (define-public ocaml-async-unix
3081 (package
3082 (name "ocaml-async-unix")
3083 (version "113.33.03")
3084 (source (janestreet-origin "async_unix" version
3085 "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h"))
3086 (native-inputs
3087 `(("oasis" ,ocaml-oasis)
3088 ("js-build-tools" ,ocaml-js-build-tools)
3089 ("ppx-jane" ,ocaml-ppx-jane)
3090 ("opam" ,opam)))
3091 (propagated-inputs
3092 `(("async-kernel" ,ocaml-async-kernel)
3093 ("core" ,ocaml-core)))
3094 (build-system ocaml-build-system)
3095 (arguments janestreet-arguments)
3096 (home-page "https://github.com/janestreet/async_unix")
3097 (synopsis "Asynchronous execution library for Unix")
3098 (description "Async_unix is an asynchronous execution library for Unix.")
3099 (license license:asl2.0)))
3100
3101 (define-public ocaml-async-extra
3102 (package
3103 (name "ocaml-async-extra")
3104 (version "113.33.03")
3105 (source (janestreet-origin "async_extra" version
3106 "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f"))
3107 (native-inputs
3108 `(("oasis" ,ocaml-oasis)
3109 ("js-build-tools" ,ocaml-js-build-tools)
3110 ("ppx-jane" ,ocaml-ppx-jane)
3111 ("opam" ,opam)))
3112 (propagated-inputs
3113 `(("async-rpc-kernel" ,ocaml-async-rpc-kernel)
3114 ("async-unix" ,ocaml-async-unix)
3115 ("core" ,ocaml-core)))
3116 (build-system ocaml-build-system)
3117 (arguments janestreet-arguments)
3118 (home-page "https://github.com/janestreet/async_extra")
3119 (synopsis "Extra functionnalities for the async library")
3120 (description "Async_extra provides additional functionnalities for the
3121 async library.")
3122 (license license:asl2.0)))
3123
3124 (define-public ocaml-async
3125 (package
3126 (name "ocaml-async")
3127 (version "113.33.03")
3128 (source (janestreet-origin "async" version
3129 "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25"))
3130 (native-inputs
3131 `(("oasis" ,ocaml-oasis)
3132 ("js-build-tools" ,ocaml-js-build-tools)
3133 ("ppx-jane" ,ocaml-ppx-jane)
3134 ("opam" ,opam)))
3135 (propagated-inputs
3136 `(("async-extra" ,ocaml-async-extra)))
3137 (build-system ocaml-build-system)
3138 (arguments janestreet-arguments)
3139 (home-page "https://github.com/janestreet/async")
3140 (synopsis "Monadic concurrency library")
3141 (description "Async is a library for concurrent programming in OCaml.")
3142 (license license:asl2.0)))
3143
3144 (define-public ocaml-ocplib-endian
3145 (package
3146 (name "ocaml-ocplib-endian")
3147 (version "1.0")
3148 (source (origin
3149 (method url-fetch)
3150 (uri (string-append "https://github.com/OCamlPro/ocplib-endian/"
3151 "archive/" version ".tar.gz"))
3152 (sha256
3153 (base32
3154 "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn"))
3155 (file-name (string-append name "-" version ".tar.gz"))))
3156 (build-system ocaml-build-system)
3157 (native-inputs `(("cppo" ,ocaml-cppo)))
3158 (home-page "https://github.com/OCamlPro/ocplib-endian")
3159 (synopsis "Optimised functions to read and write int16/32/64 from strings
3160 and bigarrays")
3161 (description "Optimised functions to read and write int16/32/64 from strings
3162 and bigarrays, based on new primitives added in version 4.01. It works on
3163 strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
3164 big- and little-endian, with their unsafe counter-parts.")
3165 (license license:lgpl2.1)))
3166
3167 (define-public ocaml-cstruct
3168 (package
3169 (name "ocaml-cstruct")
3170 (version "2.3.1")
3171 (source (origin
3172 (method url-fetch)
3173 (uri (string-append "https://github.com/mirage/ocaml-cstruct/"
3174 "archive/v" version ".tar.gz"))
3175 (sha256
3176 (base32
3177 "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949"))
3178 (file-name (string-append name "-" version ".tar.gz"))))
3179 (build-system ocaml-build-system)
3180 (arguments
3181 `(#:configure-flags
3182 (list "--enable-lwt" "--enable-async")
3183 #:phases
3184 (modify-phases %standard-phases
3185 (add-after 'install 'link-stubs
3186 (lambda* (#:key outputs #:allow-other-keys)
3187 (let* ((out (assoc-ref outputs "out"))
3188 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3189 (lib (string-append out "/lib/ocaml/site-lib/cstruct")))
3190 (mkdir-p stubs)
3191 (symlink (string-append lib "/dllcstruct_stubs.so")
3192 (string-append stubs "/dllcstruct_stubs.so"))))))))
3193 (native-inputs
3194 `(("ounit" ,ocaml-ounit)
3195 ("ppx-tools" ,ocaml-ppx-tools)
3196 ("camlp4" ,camlp4)))
3197 (propagated-inputs
3198 `(("ocplib-endian" ,ocaml-ocplib-endian)
3199 ("lwt" ,ocaml-lwt)
3200 ("async" ,ocaml-async)
3201 ("sexplib" ,ocaml-sexplib)))
3202 (home-page "https://github.com/mirage/ocaml-cstruct")
3203 (synopsis "Access C structures via a camlp4 extension")
3204 (description "Cstruct is a library and syntax extension to make it easier
3205 to access C-like structures directly from OCaml. It supports both reading and
3206 writing to these structures, and they are accessed via the Bigarray module.")
3207 (license license:isc)))
3208
3209 (define-public ocaml-hex
3210 (package
3211 (name "ocaml-hex")
3212 (version "1.0.0")
3213 (source (origin
3214 (method url-fetch)
3215 (uri (string-append "https://github.com/mirage/ocaml-hex/"
3216 "archive/" version ".tar.gz"))
3217 (sha256
3218 (base32
3219 "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v"))
3220 (file-name (string-append name "-" version ".tar.gz"))))
3221 (build-system ocaml-build-system)
3222 (propagated-inputs `(("cstruct" ,ocaml-cstruct)))
3223 (home-page "https://github.com/mirage/ocaml-hex/")
3224 (synopsis "Minimal library providing hexadecimal converters")
3225 (description "Hex is a minimal library providing hexadecimal converters.")
3226 (license license:isc)))
3227
3228 (define-public ocaml-ezjsonm
3229 (package
3230 (name "ocaml-ezjsonm")
3231 (version "0.4.3")
3232 (source (origin
3233 (method url-fetch)
3234 (uri (string-append "https://github.com/mirage/ezjsonm/archive/"
3235 version ".tar.gz"))
3236 (sha256
3237 (base32
3238 "1kag0z2xlk4rw73a240dmkxh9rj6psxxcxkm7d7z0rrj6hzjajgq"))
3239 (file-name (string-append name "-" version ".tar.gz"))))
3240 (build-system ocaml-build-system)
3241 (native-inputs
3242 `(("alcotest" ,ocaml-alcotest)))
3243 (propagated-inputs
3244 `(("hex" ,ocaml-hex)
3245 ("jsonm" ,ocaml-jsonm)
3246 ("lwt" ,ocaml-lwt)
3247 ("sexplib" ,ocaml-sexplib)))
3248 (arguments
3249 `(#:configure-flags (list "--enable-lwt")))
3250 (home-page "https://github.com/mirage/ezjsonm/")
3251 (synopsis "Read and write JSON data")
3252 (description "Ezjsonm provides more convenient (but far less flexible) input
3253 and output functions that go to and from [string] values than jsonm. This avoids
3254 the need to write signal code, which is useful for quick scripts that manipulate
3255 JSON.")
3256 (license license:isc)))
3257
3258 (define-public ocaml-uri
3259 (package
3260 (name "ocaml-uri")
3261 (version "1.9.2")
3262 (source (origin
3263 (method url-fetch)
3264 (uri (string-append "https://github.com/mirage/ocaml-uri/archive/v"
3265 version ".tar.gz"))
3266 (sha256
3267 (base32
3268 "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc"))
3269 (file-name (string-append name "-" version ".tar.gz"))))
3270 (build-system ocaml-build-system)
3271 (native-inputs
3272 `(("ounit" ,ocaml-ounit)))
3273 (propagated-inputs
3274 `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv)
3275 ("re" ,ocaml-re)
3276 ("ppx-deriving" ,ocaml-ppx-deriving)
3277 ("sexplib" ,ocaml-sexplib)
3278 ("stringext" ,ocaml-stringext)))
3279 (home-page "https://github.com/mirage/ocaml-uri")
3280 (synopsis "RFC3986 URI/URL parsing library")
3281 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
3282 (license license:isc)))
3283
3284 (define-public ocaml-easy-format
3285 (package
3286 (name "ocaml-easy-format")
3287 (version "1.2.0")
3288 (source (origin
3289 (method url-fetch)
3290 (uri (string-append "https://github.com/mjambon/easy-format/"
3291 "archive/v" version ".tar.gz"))
3292 (sha256
3293 (base32
3294 "1zcz682y9figa84k7lgdjcab5qbzk3yy14ygfqp2dhhrvjygm252"))
3295 (file-name (string-append name "-" version ".tar.gz"))))
3296 (build-system ocaml-build-system)
3297 (arguments
3298 `(#:phases
3299 (modify-phases %standard-phases
3300 (delete 'configure))))
3301 (home-page "https://github.com/mjambon/easy-format")
3302 (synopsis "Interface to the Format module")
3303 (description "Easy-format is a high-level and functional interface to the
3304 Format module of the OCaml standard library.")
3305 (license license:bsd-3)))
3306
3307 (define-public optcomp
3308 (package
3309 (name "optcomp")
3310 (version "1.6")
3311 (source (origin
3312 (method url-fetch)
3313 (uri (string-append "https://github.com/diml/optcomp/archive/"
3314 version ".tar.gz"))
3315 (sha256
3316 (base32
3317 "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh"))
3318 (file-name (string-append name "-" version ".tar.gz"))))
3319 (build-system ocaml-build-system)
3320 (arguments
3321 `(#:use-make? #t
3322 #:make-flags
3323 (list (string-append "BUILDFLAGS=\"-cflags -I,"
3324 (assoc-ref %build-inputs "camlp4")
3325 "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\""))))
3326 (native-inputs `(("camlp4" ,camlp4)))
3327 (propagated-inputs `(("camlp4" ,camlp4)))
3328 (home-page "https://github.com/diml/optcomp")
3329 (synopsis "Optional compilation for OCaml")
3330 (description "Optcomp provides an optional compilation facility with
3331 cpp-like directives.")
3332 (license license:bsd-3)))
3333
3334 (define-public ocaml-piqilib
3335 (package
3336 (name "ocaml-piqilib")
3337 (version "0.6.13")
3338 (source (origin
3339 (method url-fetch)
3340 (uri (string-append "https://github.com/alavrik/piqi/archive/v"
3341 version ".tar.gz"))
3342 (sha256
3343 (base32
3344 "1whqr2bb3gds2zmrzqnv8vqka9928w4lx6mi6g244kmbwb2h8d8l"))
3345 (file-name (string-append name "-" version ".tar.gz"))))
3346 (build-system ocaml-build-system)
3347 (arguments
3348 `(#:phases
3349 (modify-phases %standard-phases
3350 (add-before 'configure 'fix-ocamlpath
3351 (lambda _
3352 (substitute* '("Makefile" "make/Makefile.ocaml")
3353 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
3354 #t))
3355 (replace 'configure
3356 (lambda* (#:key outputs #:allow-other-keys)
3357 (let ((out (assoc-ref outputs "out")))
3358 (substitute* "make/OCamlMakefile"
3359 (("/bin/sh") (which "bash")))
3360 (zero? (system* "./configure" "--prefix" out "--ocaml-libdir"
3361 (string-append out "/lib/ocaml/site-lib"))))))
3362 (add-after 'build 'build-ocaml
3363 (lambda* (#:key outputs #:allow-other-keys)
3364 (zero? (system* "make" "ocaml"))))
3365 (add-after 'install 'install-ocaml
3366 (lambda* (#:key outputs #:allow-other-keys)
3367 (zero? (system* "make" "ocaml-install"))))
3368 (add-after 'install-ocaml 'link-stubs
3369 (lambda* (#:key outputs #:allow-other-keys)
3370 (let* ((out (assoc-ref outputs "out"))
3371 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3372 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3373 (mkdir-p stubs)
3374 (symlink (string-append lib "/dllpiqilib_stubs.so")
3375 (string-append stubs "/dllpiqilib_stubs.so"))
3376 #t))))))
3377 (native-inputs
3378 `(("which" ,which)
3379 ("camlp4" ,camlp4)))
3380 (propagated-inputs
3381 `(("xmlm" ,ocaml-xmlm)
3382 ("ulex" ,ocaml-ulex)
3383 ("optcomp" ,optcomp)
3384 ("easy-format" ,ocaml-easy-format)
3385 ("base64" ,ocaml-base64)))
3386 (home-page "http://piqi.org")
3387 (synopsis "Data serialization and conversion library")
3388 (description "Piqilib is the common library used by the piqi command-line
3389 tool and piqi-ocaml.")
3390 (license license:asl2.0)))
3391
3392 (define-public ocaml-uuidm
3393 (package
3394 (name "ocaml-uuidm")
3395 (version "0.9.6")
3396 (source (origin
3397 (method url-fetch)
3398 (uri (string-append "http://erratique.ch/software/uuidm/"
3399 "releases/uuidm-" version ".tbz"))
3400 (sha256
3401 (base32
3402 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
3403 (build-system ocaml-build-system)
3404 (arguments
3405 `(#:build-flags
3406 (list "build" "--tests" "true" "--with-cmdliner" "true")
3407 #:phases
3408 (modify-phases %standard-phases
3409 (delete 'configure))))
3410 (native-inputs
3411 `(("opam" ,opam)))
3412 (propagated-inputs
3413 `(("cmdliner" ,ocaml-cmdliner)
3414 ("topkg" ,ocaml-topkg)))
3415 (home-page "http://erratique.ch/software/uuidm")
3416 (synopsis "Universally unique identifiers for OCaml")
3417 (description "Uuidm is an OCaml module implementing 128 bits universally
3418 unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
3419 and 4 (random based) according to RFC 4122.")
3420 (license license:isc)))
3421
3422 (define-public ocaml-graph
3423 (package
3424 (name "ocaml-graph")
3425 (version "1.8.7")
3426 (source (origin
3427 (method url-fetch)
3428 (uri (string-append "http://ocamlgraph.lri.fr/download/"
3429 "ocamlgraph-" version ".tar.gz"))
3430 (sha256
3431 (base32
3432 "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz"))
3433 (patches (search-patches "ocaml-graph-honor-source-date-epoch.patch"))))
3434 (build-system ocaml-build-system)
3435 (arguments
3436 `(#:install-target "install-findlib"
3437 #:phases
3438 (modify-phases %standard-phases
3439 (add-before 'configure 'set-shell
3440 (lambda* (#:key inputs #:allow-other-keys)
3441 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
3442 "/bin/sh")))))))
3443 (inputs `(("lablgtk" ,lablgtk)))
3444 (home-page "http://ocamlgraph.lri.fr/")
3445 (synopsis "Graph library for OCaml")
3446 (description "OCamlgraph is a generic graph library for OCaml.")
3447 (license license:lgpl2.1)))
3448
3449 (define-public ocaml-piqi
3450 (package
3451 (name "ocaml-piqi")
3452 (version "0.7.5")
3453 (source (origin
3454 (method url-fetch)
3455 (uri (string-append "https://github.com/alavrik/piqi-ocaml/"
3456 "archive/v" version ".tar.gz"))
3457 (file-name (string-append name "-" version ".tar.gz"))
3458 (sha256
3459 (base32
3460 "0ngz6y8i98i5v2ma8nk6mc83pdsmf2z0ks7m3xi6clfg3zqbddrv"))))
3461 (build-system ocaml-build-system)
3462 (arguments
3463 `(#:make-flags
3464 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
3465 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
3466 "/bin/sh"))
3467 #:phases
3468 (modify-phases %standard-phases
3469 (delete 'configure))))
3470 (native-inputs
3471 `(("which" ,which)
3472 ("protobuf" ,protobuf))) ; for tests
3473 (propagated-inputs
3474 `(("piqilib" ,ocaml-piqilib)))
3475 (home-page "https://github.com/alavrik/piqi-ocaml")
3476 (synopsis "Protocol serialization system for OCaml")
3477 (description "Piqi is a multi-format data serialization system for OCaml.
3478 It provides a uniform interface for serializing OCaml data structures to JSON,
3479 XML and Protocol Buffers formats.")
3480 (license license:asl2.0)))
3481
3482 (define-public bap
3483 (package
3484 (name "bap")
3485 (version "1.1.0")
3486 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
3487 (source (origin
3488 (method url-fetch)
3489 (uri (string-append home-page "/archive/v" version ".tar.gz"))
3490 (sha256
3491 (base32
3492 "1ms95m4j1qrmy7zqmsn2izh7gq68lnmssl7chyhk977kd3sxj66m"))
3493 (file-name (string-append name "-" version ".tar.gz"))))
3494 (build-system ocaml-build-system)
3495 (native-inputs
3496 `(("oasis" ,ocaml-oasis)
3497 ("clang" ,clang)
3498 ("ounit" ,ocaml-ounit)))
3499 (propagated-inputs
3500 `(("core-kernel" ,ocaml-core-kernel)
3501 ("ppx-driver" ,ocaml-ppx-driver)
3502 ("uri" ,ocaml-uri)
3503 ("llvm" ,llvm)
3504 ("gmp" ,gmp)
3505 ("clang-runtime" ,clang-runtime)
3506 ("fileutils" ,ocaml-fileutils)
3507 ("cmdliner" ,ocaml-cmdliner)
3508 ("zarith" ,ocaml-zarith)
3509 ("uuidm" ,ocaml-uuidm)
3510 ("camlzip" ,camlzip)
3511 ("frontc" ,ocaml-frontc)
3512 ("ezjsonm" ,ocaml-ezjsonm)
3513 ("ocurl" ,ocaml-ocurl)
3514 ("piqi" ,ocaml-piqi)
3515 ("ocamlgraph" ,ocaml-graph)
3516 ("bitstring" ,ocaml-bitstring)
3517 ("ppx-jane" ,ocaml-ppx-jane)
3518 ("re" ,ocaml-re)))
3519 (inputs `(("llvm" ,llvm)))
3520 (arguments
3521 `(#:use-make? #t
3522 #:phases
3523 (modify-phases %standard-phases
3524 (replace 'configure
3525 (lambda* (#:key outputs #:allow-other-keys)
3526 (zero? (system* "./configure" "--prefix"
3527 (assoc-ref outputs "out")
3528 "--libdir"
3529 (string-append
3530 (assoc-ref outputs "out")
3531 "/lib/ocaml/site-lib")
3532 "--with-llvm-version=3.8"
3533 "--with-llvm-config=llvm-config"
3534 "--enable-everything"))))
3535 (add-after 'install 'link-stubs
3536 (lambda* (#:key outputs #:allow-other-keys)
3537 (let* ((out (assoc-ref outputs "out"))
3538 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3539 (lib (string-append out "/lib/ocaml/site-lib/bap-plugin-llvm")))
3540 (mkdir-p stubs)
3541 (symlink (string-append lib "/dllllvm_plugin_stubs.so")
3542 (string-append stubs "/dllllvm_plugin_stubs.so"))))))))
3543 (synopsis "Binary Analysis Platform")
3544 (description "Binary Analysis Platform is a framework for writing program
3545 analysis tools, that target binary files. The framework consists of a plethora
3546 of libraries, plugins, and frontends. The libraries provide code reusability,
3547 the plugins facilitate extensibility, and the frontends serve as entry points.")
3548 (license license:expat)))
3549
3550 (define-public ocaml-camomile
3551 (package
3552 (name "ocaml-camomile")
3553 (version "0.8.5")
3554 (home-page "https://github.com/yoriyuki/Camomile")
3555 (source (origin
3556 (method url-fetch)
3557 (uri (string-append home-page "/releases/download/rel-" version
3558 "/camomile-" version ".tar.bz2"))
3559 (sha256
3560 (base32
3561 "003ikpvpaliy5hblhckfmln34zqz0mk3y2m1fqvbjngh3h2np045"))))
3562 (build-system ocaml-build-system)
3563 (native-inputs `(("camlp4" ,camlp4)))
3564 (arguments
3565 `(#:phases
3566 (modify-phases %standard-phases
3567 (add-before 'configure 'fix-bin/sh
3568 (lambda _
3569 (setenv "CONFIG_SHELL" (which "bash")))))))
3570 (synopsis "Comprehensive Unicode library")
3571 (description "Camomile is a Unicode library for OCaml. Camomile provides
3572 Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
3573 200 encodings, collation and locale-sensitive case mappings, and more. The
3574 library is currently designed for Unicode Standard 3.2.")
3575 ;; with an exception for linked libraries to use a different license
3576 (license license:lgpl2.0+)))
3577
3578 (define-public ocaml-jbuilder
3579 (package
3580 (name "ocaml-jbuilder")
3581 (version "1.0+beta16")
3582 (source (origin
3583 (method url-fetch)
3584 (uri (string-append
3585 "https://github.com/janestreet/jbuilder/archive/"
3586 version ".tar.gz"))
3587 (file-name (string-append name "-" version ".tar.gz"))
3588 (sha256
3589 (base32
3590 "0gcy52y0mkg450yxwszp3lww303a1154566r8jb4hh5l61dh4dwj"))))
3591 (build-system ocaml-build-system)
3592 (arguments
3593 `(#:phases
3594 (modify-phases %standard-phases
3595 (replace 'configure
3596 (lambda* (#:key outputs #:allow-other-keys)
3597 (let ((out (assoc-ref outputs "out")))
3598 (setenv "PREFIX" out))
3599 #t)))))
3600 (native-inputs
3601 `(("menhir" ,ocaml-menhir)))
3602 (propagated-inputs
3603 `(("opam" ,opam)))
3604 (home-page "https://github.com/janestreet/jbuilder")
3605 (synopsis "Composable build system for OCaml")
3606 (description "Jbuilder is a build system designed for OCaml/Reason projects
3607 only. It focuses on providing the user with a consistent experience and takes
3608 care of most of the low-level details of OCaml compilation. All you have to do
3609 is provide a description of your project and Jbuilder will do the rest.")
3610 (license license:asl2.0)))
3611
3612 (define-public ocaml-zed
3613 (package
3614 (name "ocaml-zed")
3615 (version "1.6")
3616 (source (origin
3617 (method url-fetch)
3618 (uri (string-append "https://github.com/diml/zed/archive/"
3619 version ".tar.gz"))
3620 (file-name (string-append name "-" version ".tar.gz"))
3621 (sha256
3622 (base32
3623 "19m5vrj60vg1b63qfsv0aabdlzgn40cqmx65s3wafqi4fs9xp6jn"))))
3624 (build-system ocaml-build-system)
3625 (arguments
3626 `(#:phases
3627 (modify-phases %standard-phases
3628 (delete 'configure)
3629 (replace 'build
3630 (lambda* (#:key #:allow-other-keys)
3631 (zero? (system* "jbuilder" "build"))))
3632 (delete 'check)
3633 (replace 'install
3634 (lambda* (#:key outputs #:allow-other-keys)
3635 (let ((out (assoc-ref outputs "out")))
3636 (zero? (system* "jbuilder" "install" "--prefix" out))))))))
3637 (native-inputs
3638 `(("jbuilder" ,ocaml-jbuilder)))
3639 (propagated-inputs
3640 `(("camomile" ,ocaml-camomile)
3641 ("react" ,ocaml-react)))
3642 (home-page "https://github.com/diml/zed")
3643 (synopsis "Abstract engine for text editing in OCaml")
3644 (description "Zed is an abstract engine for text edition. It can be used
3645 to write text editors, edition widgets, readlines, etc. You just have to
3646 connect an engine to your inputs and rendering functions to get an editor.")
3647 (license license:bsd-3)))
3648
3649 (define-public ocaml-lambda-term
3650 (package
3651 (name "ocaml-lambda-term")
3652 (version "1.11")
3653 (source
3654 (origin
3655 (method url-fetch)
3656 (uri (string-append "https://github.com/diml/lambda-term/archive/"
3657 version ".tar.gz"))
3658 (file-name (string-append name "-" version ".tar.gz"))
3659 (sha256
3660 (base32 "10lx1jqgmmfwwlv64di4a8nia9l53v7179z70n9fx6aq5l7r8nba"))))
3661 (build-system ocaml-build-system)
3662 (arguments
3663 `(#:test-target "test"
3664 #:phases
3665 (modify-phases %standard-phases
3666 (delete 'configure)
3667 ;; currently, ocaml-lwt is an old version of lwt from before lwt.react
3668 ;; was split into a separate module called lwt_react
3669 (add-before 'build 'use-old-lwt-react-name
3670 (lambda _
3671 (substitute* "src/jbuild" (("lwt_react") "lwt.react"))))
3672 (replace 'install
3673 (lambda* (#:key outputs #:allow-other-keys)
3674 (let ((out (assoc-ref outputs "out")))
3675 (zero? (system* "jbuilder" "install" "--prefix" out))))))))
3676 (native-inputs
3677 `(("jbuilder" ,ocaml-jbuilder)))
3678 (propagated-inputs
3679 `(("lwt" ,ocaml-lwt)
3680 ("zed" ,ocaml-zed)))
3681 (home-page "https://github.com/diml/lambda-term")
3682 (synopsis "Terminal manipulation library for OCaml")
3683 (description "Lambda-Term is a cross-platform library for manipulating the
3684 terminal. It provides an abstraction for keys, mouse events, colors, as well as
3685 a set of widgets to write curses-like applications. The main objective of
3686 Lambda-Term is to provide a higher level functional interface to terminal
3687 manipulation than, for example, ncurses, by providing a native OCaml interface
3688 instead of bindings to a C library.")
3689 (license license:bsd-3)))
3690
3691 (define-public ocaml-utop
3692 (package
3693 (name "ocaml-utop")
3694 (version "2.0.2")
3695 (source (origin
3696 (method url-fetch)
3697 (uri (string-append "https://github.com/diml/utop/archive/"
3698 version ".tar.gz"))
3699 (file-name (string-append name "-" version ".tar.gz"))
3700 (sha256
3701 (base32
3702 "0rglznh4prcix8spi3f060jz2gngk7x8vkd291fxs10b88aqcpxf"))))
3703 (build-system gnu-build-system)
3704 (arguments
3705 `(#:test-target "test"
3706 #:phases
3707 (modify-phases %standard-phases
3708 (delete 'configure)
3709 (replace 'install
3710 (lambda* (#:key outputs #:allow-other-keys)
3711 (let* ((out (assoc-ref outputs "out"))
3712 (libdir (string-append out "/lib/ocaml/site-lib")))
3713 (mkdir-p libdir)
3714 (zero? (system* "jbuilder" "install"
3715 "--prefix" out
3716 "--libdir" libdir))))))))
3717 (native-inputs
3718 `(("ocaml" ,ocaml)
3719 ("cppo" ,ocaml-cppo)
3720 ("jbuilder" ,ocaml-jbuilder)))
3721 (propagated-inputs
3722 `(("ocaml-findlib" ,ocaml-findlib)
3723 ("lambda-term" ,ocaml-lambda-term)
3724 ("lwt" ,ocaml-lwt)
3725 ("react" ,ocaml-react)
3726 ("camomile" ,ocaml-camomile)
3727 ("zed" ,ocaml-zed)))
3728 (home-page "https://github.com/diml/utop")
3729 (synopsis "Improved interface to the OCaml toplevel")
3730 (description "UTop is an improved toplevel for OCaml. It can run in a
3731 terminal or in Emacs. It supports line editing, history, real-time and context
3732 sensitive completion, colors, and more.")
3733 (license license:bsd-3)))
3734
3735 (define-public ocaml-integers
3736 (package
3737 (name "ocaml-integers")
3738 (version "0.2.2")
3739 (home-page "https://github.com/ocamllabs/ocaml-integers")
3740 (source (origin
3741 (method url-fetch)
3742 (uri (string-append home-page
3743 "/releases/download/v0.2.2/integers-"
3744 version ".tbz"))
3745 (file-name (string-append name "-" version ".tbz"))
3746 (sha256
3747 (base32
3748 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
3749 (build-system ocaml-build-system)
3750 (arguments
3751 `(#:tests? #f; no tests
3752 #:build-flags (list "build")
3753 #:phases
3754 (modify-phases %standard-phases
3755 (delete 'configure))))
3756 (inputs
3757 `(("topkg" ,ocaml-topkg)
3758 ("opam" ,opam)))
3759 (synopsis "Various signed and unsigned integer types for OCaml")
3760 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
3761 and 64-bit signed and unsigned integer types, together with aliases such as
3762 long and size_t whose sizes depend on the host platform.")
3763 (license license:expat)))
3764
3765 (define-public ocaml-ctypes
3766 (package
3767 (name "ocaml-ctypes")
3768 (version "0.13.1")
3769 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
3770 (source (origin
3771 (method url-fetch)
3772 (uri (string-append home-page "/archive/" version ".tar.gz"))
3773 (file-name (string-append name "-" version ".tar.gz"))
3774 (sha256
3775 (base32
3776 "17w0pr5k0zjcjns4y9n36rjpfl35zhvp3h8ggqs9lz12qhshdk2m"))))
3777 (build-system ocaml-build-system)
3778 (arguments
3779 `(#:make-flags
3780 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
3781 #:phases
3782 (modify-phases %standard-phases
3783 (delete 'configure))))
3784 (native-inputs
3785 `(("pkg-config" ,pkg-config)))
3786 (inputs
3787 `(("libffi" ,libffi)
3788 ("ounit" ,ocaml-ounit)
3789 ("integers" ,ocaml-integers)
3790 ("lwt" ,ocaml-lwt)
3791 ("topkg" ,ocaml-topkg)
3792 ("opam" ,opam)))
3793 (synopsis "Library for binding to C libraries using pure OCaml")
3794 (description "Ctypes is a library for binding to C libraries using pure
3795 OCaml. The primary aim is to make writing C extensions as straightforward as
3796 possible. The core of ctypes is a set of combinators for describing the
3797 structure of C types -- numeric types, arrays, pointers, structs, unions and
3798 functions. You can use these combinators to describe the types of the
3799 functions that you want to call, then bind directly to those functions -- all
3800 without writing or generating any C!")
3801 (license license:expat)))
3802
3803 (define-public ocaml-ocb-stubblr
3804 (package
3805 (name "ocaml-ocb-stubblr")
3806 (version "0.1.1")
3807 (home-page "https://github.com/pqwy/ocb-stubblr")
3808 (source (origin
3809 (method url-fetch)
3810 (uri (string-append
3811 home-page "/releases/download/v0.1.1/ocb-stubblr-"
3812 version ".tbz"))
3813 (file-name (string-append name "-" version ".tbz"))
3814 (sha256
3815 (base32
3816 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
3817 (build-system ocaml-build-system)
3818 (arguments
3819 `(#:build-flags (list "build" "--tests" "true")
3820 #:phases
3821 (modify-phases %standard-phases
3822 (delete 'configure))))
3823 (inputs
3824 `(("topkg" ,ocaml-topkg)
3825 ("opam" ,opam)))
3826 (native-inputs
3827 `(("astring" ,ocaml-astring)))
3828 (synopsis "OCamlbuild plugin for C stubs")
3829 (description "Ocb-stubblr is about ten lines of code that you need to
3830 repeat over, over, over and over again if you are using ocamlbuild to build
3831 OCaml projects that contain C stubs.")
3832 (license license:isc)))
3833
3834 (define-public ocaml-tsdl
3835 (package
3836 (name "ocaml-tsdl")
3837 (version "0.9.1")
3838 (home-page "http://erratique.ch/software/tsdl")
3839 (source (origin
3840 (method url-fetch)
3841 (uri (string-append home-page "/releases/tsdl-"
3842 version ".tbz"))
3843 (file-name (string-append name "-" version ".tar.gz"))
3844 (sha256
3845 (base32
3846 "08bb97fhvz829fb0sgjn2p20mp7b04v98zy2qxpk2w390a6c4b34"))))
3847 (build-system ocaml-build-system)
3848 (arguments
3849 `(#:build-flags '("build")
3850 #:tests? #f; tests require a display device
3851 #:phases
3852 (modify-phases %standard-phases
3853 (delete 'configure))))
3854 (native-inputs
3855 `(("opam" ,opam)
3856 ("pkg-config" ,pkg-config)))
3857 (inputs
3858 `(("topkg" ,ocaml-topkg)
3859 ("result" ,ocaml-result)
3860 ("sdl2" ,sdl2)
3861 ("integers" ,ocaml-integers)
3862 ("ctypes" ,ocaml-ctypes)))
3863 (synopsis "Thin bindings to SDL for OCaml")
3864 (description "Tsdl is an OCaml library providing thin bindings to the
3865 cross-platform SDL C library.")
3866 (license license:isc)))
3867
3868 (define-public coq-flocq
3869 (package
3870 (name "coq-flocq")
3871 (version "2.6.0")
3872 (source (origin
3873 (method url-fetch)
3874 (uri (string-append "https://gforge.inria.fr/frs/download.php/file"
3875 "/37054/flocq-" version ".tar.gz"))
3876 (sha256
3877 (base32
3878 "13fv150dcwnjrk00d7zj2c5x9jwmxgrq0ay440gkr730l8mvk3l3"))))
3879 (build-system gnu-build-system)
3880 (native-inputs
3881 `(("ocaml" ,ocaml)
3882 ("which" ,which)
3883 ("coq" ,coq)))
3884 (arguments
3885 `(#:configure-flags
3886 (list (string-append "--libdir=" (assoc-ref %outputs "out")
3887 "/lib/coq/user-contrib/Flocq"))
3888 #:phases
3889 (modify-phases %standard-phases
3890 (add-before 'configure 'fix-remake
3891 (lambda _
3892 (substitute* "remake.cpp"
3893 (("/bin/sh") (which "sh")))))
3894 (replace 'build
3895 (lambda _
3896 (zero? (system* "./remake"))))
3897 (replace 'check
3898 (lambda _
3899 (zero? (system* "./remake" "check"))))
3900 ;; TODO: requires coq-gappa and coq-interval.
3901 ;(zero? (system* "./remake" "check-more"))))
3902 (replace 'install
3903 (lambda _
3904 (zero? (system* "./remake" "install")))))))
3905 (home-page "http://flocq.gforge.inria.fr/")
3906 (synopsis "Floating-point formalization for the Coq system")
3907 (description "Flocq (Floats for Coq) is a floating-point formalization for
3908 the Coq system. It provides a comprehensive library of theorems on a multi-radix
3909 multi-precision arithmetic. It also supports efficient numerical computations
3910 inside Coq.")
3911 (license license:lgpl3+)))
3912
3913 (define-public coq-gappa
3914 (package
3915 (name "coq-gappa")
3916 (version "1.3.1")
3917 (source (origin
3918 (method url-fetch)
3919 (uri (string-append "https://gforge.inria.fr/frs/download.php/file/36351/gappa-"
3920 version ".tar.gz"))
3921 (sha256
3922 (base32
3923 "0924jr6f15fx22qfsvim5vc0qxqg30ivg9zxj34lf6slbgdl3j39"))))
3924 (build-system gnu-build-system)
3925 (native-inputs
3926 `(("ocaml" ,ocaml)
3927 ("which" ,which)
3928 ("coq" ,coq)
3929 ("bison" ,bison)
3930 ("flex" ,flex)))
3931 (inputs
3932 `(("gmp" ,gmp)
3933 ("mpfr" ,mpfr)
3934 ("boost" ,boost)))
3935 (arguments
3936 `(#:configure-flags
3937 (list (string-append "--libdir=" (assoc-ref %outputs "out")
3938 "/lib/coq/user-contrib/Gappa"))
3939 #:phases
3940 (modify-phases %standard-phases
3941 (add-before 'configure 'fix-remake
3942 (lambda _
3943 (substitute* "remake.cpp"
3944 (("/bin/sh") (which "sh")))))
3945 (replace 'build
3946 (lambda _
3947 (zero? (system* "./remake"))))
3948 (replace 'check
3949 (lambda _
3950 (zero? (system* "./remake" "check"))))
3951 (replace 'install
3952 (lambda _
3953 (zero? (system* "./remake" "install")))))))
3954 (home-page "http://gappa.gforge.inria.fr/")
3955 (synopsis "Verify and formally prove properties on numerical programs")
3956 (description "Gappa is a tool intended to help verifying and formally proving
3957 properties on numerical programs dealing with floating-point or fixed-point
3958 arithmetic. It has been used to write robust floating-point filters for CGAL
3959 and it is used to certify elementary functions in CRlibm. While Gappa is
3960 intended to be used directly, it can also act as a backend prover for the Why3
3961 software verification plateform or as an automatic tactic for the Coq proof
3962 assistant.")
3963 (license (list license:gpl2+ license:cecill))));either gpl2+ or cecill
3964
3965 (define-public coq-mathcomp
3966 (package
3967 (name "coq-mathcomp")
3968 (version "1.6.2")
3969 (source (origin
3970 (method url-fetch)
3971 (uri (string-append "https://github.com/math-comp/math-comp/archive/mathcomp-"
3972 version ".tar.gz"))
3973 (sha256
3974 (base32
3975 "0lg5ncr7p4y8qqq6pfw6brqc6a9xzlfa0drprwfdn0rnyaq5nca6"))))
3976 (build-system gnu-build-system)
3977 (native-inputs
3978 `(("ocaml" ,ocaml)
3979 ("which" ,which)
3980 ("coq" ,coq)))
3981 (arguments
3982 `(#:tests? #f; No need to test formally-verified programs :)
3983 #:phases
3984 (modify-phases %standard-phases
3985 (delete 'configure)
3986 (add-before 'build 'chdir
3987 (lambda _
3988 (chdir "mathcomp")))
3989 (replace 'install
3990 (lambda* (#:key outputs #:allow-other-keys)
3991 (setenv "COQLIB" (string-append (assoc-ref outputs "out") "/lib/coq/"))
3992 (zero? (system* "make" "-f" "Makefile.coq"
3993 (string-append "COQLIB=" (assoc-ref outputs "out")
3994 "/lib/coq/")
3995 "install")))))))
3996 (home-page "https://math-comp.github.io/math-comp/")
3997 (synopsis "Mathematical Components for Coq")
3998 (description "Mathematical Components for Coq has its origins in the formal
3999 proof of the Four Colour Theorem. Since then it has grown to cover many areas
4000 of mathematics and has been used for large scale projects like the formal proof
4001 of the Odd Order Theorem.
4002
4003 The library is written using the Ssreflect proof language that is an integral
4004 part of the distribution.")
4005 (license license:cecill-b)))
4006
4007 (define-public coq-coquelicot
4008 (package
4009 (name "coq-coquelicot")
4010 (version "3.0.1")
4011 (source (origin
4012 (method url-fetch)
4013 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
4014 "file/37045/coquelicot-" version ".tar.gz"))
4015 (sha256
4016 (base32
4017 "0hsyhsy2lwqxxx2r8xgi5csmirss42lp9bkb9yy35mnya0w78c8r"))))
4018 (build-system gnu-build-system)
4019 (native-inputs
4020 `(("ocaml" ,ocaml)
4021 ("which" ,which)
4022 ("coq" ,coq)))
4023 (propagated-inputs
4024 `(("mathcomp" ,coq-mathcomp)))
4025 (arguments
4026 `(#:configure-flags
4027 (list (string-append "--libdir=" (assoc-ref %outputs "out")
4028 "/lib/coq/user-contrib/Coquelicot"))
4029 #:phases
4030 (modify-phases %standard-phases
4031 (add-before 'configure 'fix-remake
4032 (lambda _
4033 (substitute* "remake.cpp"
4034 (("/bin/sh") (which "sh")))))
4035 (replace 'build
4036 (lambda _
4037 (zero? (system* "./remake"))))
4038 (replace 'check
4039 (lambda _
4040 (zero? (system* "./remake" "check"))))
4041 (replace 'install
4042 (lambda _
4043 (zero? (system* "./remake" "install")))))))
4044 (home-page "http://coquelicot.saclay.inria.fr/index.html")
4045 (synopsis "Coq library for Reals")
4046 (description "Coquelicot is an easier way of writing formulas and theorem
4047 statements, achieved by relying on total functions in place of dependent types
4048 for limits, derivatives, integrals, power series, and so on. To help with the
4049 proof process, the library comes with a comprehensive set of theorems that cover
4050 not only these notions, but also some extensions such as parametric integrals,
4051 two-dimensional differentiability, asymptotic behaviors. It also offers some
4052 automations for performing differentiability proofs. Moreover, Coquelicot is a
4053 conservative extension of Coq's standard library and provides correspondence
4054 theorems between the two libraries.")
4055 (license license:lgpl3+)))
4056
4057 (define-public coq-bignums
4058 (package
4059 (name "coq-bignums")
4060 (version "8.7.0")
4061 (source (origin
4062 (method url-fetch)
4063 (uri (string-append "https://github.com/coq/bignums/archive/V"
4064 version ".tar.gz"))
4065 (file-name (string-append name "-" version ".tar.gz"))
4066 (sha256
4067 (base32
4068 "03iw9jiwq9jx45gsvp315y3lxr8m9ksppmcjvxs5c23qnky6zqjx"))))
4069 (build-system gnu-build-system)
4070 (native-inputs
4071 `(("ocaml" ,ocaml)
4072 ("coq" ,coq)))
4073 (inputs
4074 `(("camlp5" ,camlp5)))
4075 (arguments
4076 `(#:tests? #f; No test target
4077 #:make-flags
4078 (list (string-append "COQLIBINSTALL=" (assoc-ref %outputs "out")
4079 "/lib/coq/user-contrib"))
4080 #:phases
4081 (modify-phases %standard-phases
4082 (delete 'configure))))
4083 (home-page "https://github.com/coq/bignums")
4084 (synopsis "Coq library for arbitrary large numbers")
4085 (description "Bignums is a coq library of arbitrary large numbers. It
4086 provides BigN, BigZ, BigQ that used to be part of Coq standard library.")
4087 (license license:lgpl2.1+)))
4088
4089 (define-public coq-interval
4090 (package
4091 (name "coq-interval")
4092 (version "3.3.0")
4093 (source (origin
4094 (method url-fetch)
4095 (uri (string-append "https://gforge.inria.fr/frs/download.php/"
4096 "file/37077/interval-" version ".tar.gz"))
4097 (sha256
4098 (base32
4099 "08fdcf3hbwqphglvwprvqzgkg0qbimpyhnqsgv3gac4y1ap0f903"))))
4100 (build-system gnu-build-system)
4101 (native-inputs
4102 `(("ocaml" ,ocaml)
4103 ("which" ,which)
4104 ("coq" ,coq)))
4105 (propagated-inputs
4106 `(("flocq" ,coq-flocq)
4107 ("bignums" ,coq-bignums)
4108 ("coquelicot" ,coq-coquelicot)
4109 ("mathcomp" ,coq-mathcomp)))
4110 (arguments
4111 `(#:configure-flags
4112 (list (string-append "--libdir=" (assoc-ref %outputs "out")
4113 "/lib/coq/user-contrib/Gappa"))
4114 #:phases
4115 (modify-phases %standard-phases
4116 (add-before 'configure 'fix-remake
4117 (lambda _
4118 (substitute* "remake.cpp"
4119 (("/bin/sh") (which "sh")))))
4120 (replace 'build
4121 (lambda _
4122 (zero? (system* "./remake"))))
4123 (replace 'check
4124 (lambda _
4125 (zero? (system* "./remake" "check"))))
4126 (replace 'install
4127 (lambda _
4128 (zero? (system* "./remake" "install")))))))
4129 (home-page "http://coq-interval.gforge.inria.fr/")
4130 (synopsis "Coq tactics to simplify inequality proofs")
4131 (description "Interval provides vernacular files containing tactics for
4132 simplifying the proofs of inequalities on expressions of real numbers for the
4133 Coq proof assistant.")
4134 (license license:cecill-c)))