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