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