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