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