gnu: libuv: Update to 1.11.0.
[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 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
10 ;;;
11 ;;; This file is part of GNU Guix.
12 ;;;
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
17 ;;;
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
22 ;;;
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26 (define-module (gnu packages ocaml)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages autotools)
29 #:use-module (gnu packages base)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages curl)
32 #:use-module (gnu packages emacs)
33 #:use-module (gnu packages gcc)
34 #:use-module (gnu packages ghostscript)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages gnome)
37 #:use-module (gnu packages gtk)
38 #:use-module (gnu packages libevent)
39 #:use-module (gnu packages lynx)
40 #:use-module (gnu packages m4)
41 #:use-module (gnu packages multiprecision)
42 #:use-module (gnu packages ncurses)
43 #:use-module (gnu packages pcre)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages python)
47 #:use-module (gnu packages tex)
48 #:use-module (gnu packages texinfo)
49 #:use-module (gnu packages time)
50 #:use-module (gnu packages tls)
51 #:use-module (gnu packages version-control)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages xorg)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system ocaml)
56 #:use-module (guix download)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (guix svn-download)
60 #:use-module (guix utils))
61
62 ;; A shortcut for files from ocaml forge. Downloaded files are computed from
63 ;; their number, not their name.
64 (define (ocaml-forge-uri name version file-number)
65 (string-append "https://forge.ocamlcore.org/frs/download.php/"
66 (number->string file-number) "/" name "-" version
67 ".tar.gz"))
68
69 ;; Janestreet packages are found in a similar way and all need the same patch.
70 (define (janestreet-origin name version hash)
71 (origin (method url-fetch)
72 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
73 (version-major+minor version) "/files/"
74 name "-" version ".tar.gz"))
75 (sha256 (base32 hash))
76 (modules '((guix build utils)))
77 (snippet
78 (let ((pattern (string-append "lib/" name)))
79 `(begin
80 ;; install.ml contains an invalid reference to the ppx file and
81 ;; propagates this error to the generated META file. It
82 ;; looks for it in the "lib" directory, but it is installed in
83 ;; "lib/ocaml/site-lib/package". This substitute does not change
84 ;; this file for non ppx packages.
85 (substitute* "install.ml"
86 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
87 ;; The standard Makefile would try to install janestreet modules
88 ;; in OCaml's directory in the store, which is read-only.
89 (substitute* "Makefile"
90 (("--prefix")
91 "--libdir $(LIBDIR) --prefix")))))))
92
93 ;; They also require almost the same set of arguments
94 (define janestreet-arguments
95 `(#:use-make? #t
96 #:make-flags
97 (list (string-append "CONFIGUREFLAGS=--prefix "
98 (assoc-ref %outputs "out")
99 " --enable-tests")
100 (string-append "LIBDIR="
101 (assoc-ref %outputs "out")
102 "/lib/ocaml/site-lib")
103 ;; for ocaml-bin-prot, otherwise ignored
104 (string-append "OCAML_TOPLEVEL_PATH="
105 (assoc-ref %build-inputs "findlib")
106 "/lib/ocaml/site-lib"))
107 #:phases (modify-phases %standard-phases (delete 'configure))))
108
109 (define-public ocaml
110 (package
111 (name "ocaml")
112 (version "4.02.3")
113 (source (origin
114 (method url-fetch)
115 (uri (string-append
116 "http://caml.inria.fr/pub/distrib/ocaml-"
117 (version-major+minor version)
118 "/ocaml-" version ".tar.xz"))
119 (sha256
120 (base32
121 "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3"))
122 (patches
123 (search-patches
124 "ocaml-CVE-2015-8869.patch"
125 "ocaml-Add-a-.file-directive.patch"))))
126 (build-system gnu-build-system)
127 (native-search-paths
128 (list (search-path-specification
129 (variable "OCAMLPATH")
130 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
131 (search-path-specification
132 (variable "CAML_LD_LIBRARY_PATH")
133 (files (list "lib/ocaml/site-lib/stubslibs")))))
134 (native-inputs
135 `(("perl" ,perl)
136 ("pkg-config" ,pkg-config)))
137 (inputs
138 `(("libx11" ,libx11)
139 ;; For libiberty, needed for objdump support.
140 ("gcc:lib" ,(canonical-package gcc-4.9) "lib")
141 ("zlib" ,zlib))) ;also needed for objdump support
142 (arguments
143 `(#:modules ((guix build gnu-build-system)
144 (guix build utils)
145 (web server))
146 #:phases
147 (modify-phases %standard-phases
148 (add-after 'unpack 'patch-/bin/sh-references
149 (lambda* (#:key inputs #:allow-other-keys)
150 (let* ((sh (string-append (assoc-ref inputs "bash")
151 "/bin/sh"))
152 (quoted-sh (string-append "\"" sh "\"")))
153 (with-fluids ((%default-port-encoding #f))
154 (for-each
155 (lambda (file)
156 (substitute* file
157 (("\"/bin/sh\"")
158 (begin
159 (format (current-error-port) "\
160 patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
161 file quoted-sh)
162 quoted-sh))))
163 (find-files "." "\\.ml$"))
164 #t))))
165 (replace 'configure
166 (lambda* (#:key outputs #:allow-other-keys)
167 (let* ((out (assoc-ref outputs "out"))
168 (mandir (string-append out "/share/man")))
169 ;; Custom configure script doesn't recognize
170 ;; --prefix=<PREFIX> syntax (with equals sign).
171 (zero? (system* "./configure"
172 "--prefix" out
173 "--mandir" mandir)))))
174 (replace 'build
175 (lambda _
176 (zero? (system* "make" "-j" (number->string
177 (parallel-job-count))
178 "world.opt"))))
179 (delete 'check)
180 (add-after 'install 'check
181 (lambda _
182 (with-directory-excursion "testsuite"
183 (zero? (system* "make" "all")))))
184 (add-before 'check 'prepare-socket-test
185 (lambda _
186 (format (current-error-port)
187 "Spawning local test web server on port 8080~%")
188 (when (zero? (primitive-fork))
189 (run-server (lambda (request request-body)
190 (values '((content-type . (text/plain)))
191 "Hello!"))
192 'http '(#:port 8080)))
193 (let ((file "testsuite/tests/lib-threads/testsocket.ml"))
194 (format (current-error-port)
195 "Patching ~a to use localhost port 8080~%"
196 file)
197 (substitute* file
198 (("caml.inria.fr") "localhost")
199 (("80") "8080")
200 (("HTTP1.0") "HTTP/1.0"))
201 #t))))))
202 (home-page "https://ocaml.org/")
203 (synopsis "The OCaml programming language")
204 (description
205 "OCaml is a general purpose industrial-strength programming language with
206 an emphasis on expressiveness and safety. Developed for more than 20 years at
207 Inria it benefits from one of the most advanced type systems and supports
208 functional, imperative and object-oriented styles of programming.")
209 ;; The compiler is distributed under qpl1.0 with a change to choice of
210 ;; law: the license is governed by the laws of France. The library is
211 ;; distributed under lgpl2.0.
212 (license (list license:qpl license:lgpl2.0))))
213
214 (define-public opam
215 (package
216 (name "opam")
217 (version "1.2.2")
218 (source (origin
219 (method url-fetch)
220 ;; Use the '-full' version, which includes all the dependencies.
221 (uri (string-append
222 "https://github.com/ocaml/opam/releases/download/"
223 version "/opam-full-" version ".tar.gz")
224 ;; (string-append "https://github.com/ocaml/opam/archive/"
225 ;; version ".tar.gz")
226 )
227 (sha256
228 (base32
229 "004gwn6rbpcb53y3rpb3v23vk39rp2xmf0liyd5iy12ij8bigrhm"))))
230 (build-system gnu-build-system)
231 (arguments
232 '(;; Sometimes, 'make -jX' would fail right after ./configure with
233 ;; "Fatal error: exception End_of_file".
234 #:parallel-build? #f
235
236 ;; For some reason, 'ocp-build' needs $TERM to be set.
237 #:make-flags `("TERM=screen"
238 ,(string-append "SHELL="
239 (assoc-ref %build-inputs "bash")
240 "/bin/sh"))
241 #:test-target "tests"
242
243 ;; FIXME: There's an obscure test failure:
244 ;; …/_obuild/opam/opam.asm install P1' failed.
245 #:tests? #f
246
247 #:phases (modify-phases %standard-phases
248 (add-before 'build 'pre-build
249 (lambda* (#:key inputs make-flags #:allow-other-keys)
250 (let ((bash (assoc-ref inputs "bash")))
251 (substitute* "src/core/opamSystem.ml"
252 (("\"/bin/sh\"")
253 (string-append "\"" bash "/bin/sh\"")))
254 ;; Build dependencies
255 (zero? (apply system* "make" "lib-ext" make-flags)))))
256 (add-before 'check 'pre-check
257 (lambda _
258 (setenv "HOME" (getcwd))
259 (and (system "git config --global user.email guix@gnu.org")
260 (system "git config --global user.name Guix")))))))
261 (native-inputs
262 `(("git" ,git) ;for the tests
263 ("python" ,python) ;for the tests
264 ("camlp4" ,camlp4)))
265 (inputs
266 `(("ocaml" ,ocaml)
267 ("ncurses" ,ncurses)
268 ("curl" ,curl)))
269 (home-page "http://opam.ocamlpro.com/")
270 (synopsis "Package manager for OCaml")
271 (description
272 "OPAM is a tool to manage OCaml packages. It supports multiple
273 simultaneous compiler installations, flexible package constraints, and a
274 Git-friendly development workflow.")
275
276 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
277 (license license:lgpl3)))
278
279 (define-public camlp4
280 (package
281 (name "camlp4")
282 (version "4.02+6")
283 (source (origin
284 (method url-fetch)
285 (uri (string-append "https://github.com/ocaml/camlp4/archive/"
286 version ".tar.gz"))
287 (sha256
288 (base32
289 "0icdfzhsbgf89925gc8gl3fm8z2xzszzlib0v9dj5wyzkyv3a342"))
290 (file-name (string-append name "-" version ".tar.gz"))))
291 (build-system gnu-build-system)
292 (native-inputs `(("ocaml" ,ocaml)
293 ("which" ,which)))
294 (inputs `(("ocaml" ,ocaml)))
295 (arguments
296 '(#:tests? #f ;no documented test target
297 ;; a race-condition will lead byte and native targets to mkdir _build
298 ;; which fails on the second attempt.
299 #:parallel-build? #f
300 #:make-flags '("all")
301 #:phases (modify-phases %standard-phases
302 (replace
303 'configure
304 (lambda* (#:key outputs #:allow-other-keys)
305 ;; This is a home-made 'configure' script.
306 (let ((out (assoc-ref outputs "out")))
307 (zero? (system* "./configure"
308 (string-append "--libdir=" out
309 "/lib/ocaml/site-lib")
310 (string-append "--bindir=" out "/bin")
311 (string-append "--pkgdir=" out
312 "/lib/ocaml/site-lib"))))))
313 (add-after 'install 'install-meta
314 (lambda* (#:key outputs #:allow-other-keys)
315 (let ((out (assoc-ref outputs "out")))
316 (substitute* "camlp4/META.in"
317 (("directory = .*")
318 (string-append "directory = \"" out
319 "/lib/ocaml/site-lib/camlp4\"\n")))
320 (zero? (system* "make" "install-META"))))))))
321 (home-page "https://github.com/ocaml/camlp4")
322 (synopsis "Write parsers in OCaml")
323 (description
324 "Camlp4 is a software system for writing extensible parsers for
325 programming languages. It provides a set of OCaml libraries that are used to
326 define grammars as well as loadable syntax extensions of such grammars.
327 Camlp4 stands for Caml Preprocessor and Pretty-Printer and one of its most
328 important applications is the definition of domain-specific extensions of the
329 syntax of OCaml.")
330
331 ;; This is LGPLv2 with an exception that allows packages statically-linked
332 ;; against the library to be released under any terms.
333 (license license:lgpl2.0)))
334
335 (define-public camlp5
336 (package
337 (name "camlp5")
338 (version "6.14")
339 (source (origin
340 (method url-fetch)
341 (uri (string-append "http://camlp5.gforge.inria.fr/distrib/src/"
342 name "-" version ".tgz"))
343 (sha256
344 (base32
345 "1ql04iyvclpyy9805kpddc4ndjb5d0qg4shhi2fc6bixi49fvy89"))))
346 (build-system gnu-build-system)
347 (inputs
348 `(("ocaml" ,ocaml)))
349 (arguments
350 `(#:tests? #f ; XXX TODO figure out how to run the tests
351 #:phases
352 (modify-phases %standard-phases
353 (replace 'configure
354 (lambda* (#:key outputs #:allow-other-keys)
355 (let* ((out (assoc-ref outputs "out"))
356 (mandir (string-append out "/share/man")))
357 ;; Custom configure script doesn't recognize
358 ;; --prefix=<PREFIX> syntax (with equals sign).
359 (zero? (system* "./configure"
360 "--prefix" out
361 "--mandir" mandir)))))
362 (replace 'build
363 (lambda _
364 (zero? (system* "make" "-j" (number->string
365 (parallel-job-count))
366 "world.opt")))))))
367 (home-page "http://camlp5.gforge.inria.fr/")
368 (synopsis "Pre-processor Pretty Printer for OCaml")
369 (description
370 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
371 tools for syntax (Stream Parsers and Grammars) and the ability to modify the
372 concrete syntax of the language (Quotations, Syntax Extensions).")
373 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
374 (license (list license:bsd-3 license:qpl))))
375
376 (define-public hevea
377 (package
378 (name "hevea")
379 (version "2.28")
380 (source (origin
381 (method url-fetch)
382 (uri (string-append "http://hevea.inria.fr/old/"
383 name "-" version ".tar.gz"))
384 (sha256
385 (base32
386 "14fns13wlnpiv9i05841kvi3cq4b9v2sw5x3ff6ziws28q701qnd"))))
387 (build-system gnu-build-system)
388 (inputs
389 `(("ocaml" ,ocaml)))
390 (arguments
391 `(#:tests? #f ; no test suite
392 #:make-flags (list (string-append "PREFIX=" %output))
393 #:phases (modify-phases %standard-phases
394 (delete 'configure)
395 (add-before 'build 'patch-/bin/sh
396 (lambda _
397 (substitute* "_tags"
398 (("/bin/sh") (which "sh")))
399 #t)))))
400 (home-page "http://hevea.inria.fr/")
401 (synopsis "LaTeX to HTML translator")
402 (description
403 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
404 written in Objective Caml.")
405 (license license:qpl)))
406
407 (define-public coq
408 (package
409 (name "coq")
410 (version "8.5pl2")
411 (source (origin
412 (method url-fetch)
413 (uri (string-append "https://coq.inria.fr/distrib/V" version
414 "/files/" name "-" version ".tar.gz"))
415 (sha256
416 (base32
417 "0wyywia0darak2zmc5v0ra9rn0b9whwdfiahralm8v5za499s8w3"))))
418 (build-system gnu-build-system)
419 (native-inputs
420 `(("texlive" ,texlive)
421 ("findlib" ,ocaml-findlib)
422 ("hevea" ,hevea)))
423 (inputs
424 `(("ocaml" ,ocaml)
425 ("lablgtk" ,lablgtk)
426 ("camlp5" ,camlp5)))
427 (arguments
428 `(#:phases
429 (modify-phases %standard-phases
430 (replace 'configure
431 (lambda* (#:key outputs #:allow-other-keys)
432 (let* ((out (assoc-ref outputs "out"))
433 (mandir (string-append out "/share/man"))
434 (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
435 (zero? (system* "./configure"
436 "-prefix" out
437 "-mandir" mandir
438 "-browser" browser
439 "-coqide" "opt")))))
440 (replace 'build
441 (lambda _
442 (zero? (system* "make" "-j" (number->string
443 (parallel-job-count))
444 "world"))))
445 (delete 'check)
446 (add-after 'install 'check
447 (lambda _
448 (with-directory-excursion "test-suite"
449 (zero? (system* "make"))))))))
450 (home-page "https://coq.inria.fr")
451 (synopsis "Proof assistant for higher-order logic")
452 (description
453 "Coq is a proof assistant for higher-order logic, which allows the
454 development of computer programs consistent with their formal specification.
455 It is developed using Objective Caml and Camlp5.")
456 ;; The code is distributed under lgpl2.1.
457 ;; Some of the documentation is distributed under opl1.0+.
458 (license (list license:lgpl2.1 license:opl1.0+))))
459
460 (define-public proof-general
461 (package
462 (name "proof-general")
463 (version "4.2")
464 (source (origin
465 (method url-fetch)
466 (uri (string-append
467 "http://proofgeneral.inf.ed.ac.uk/releases/"
468 "ProofGeneral-" version ".tgz"))
469 (sha256
470 (base32
471 "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm"))))
472 (build-system gnu-build-system)
473 (native-inputs
474 `(("which" ,which)
475 ("emacs" ,emacs-minimal)
476 ("texinfo" ,texinfo)))
477 (inputs
478 `(("host-emacs" ,emacs)
479 ("perl" ,perl)
480 ("coq" ,coq)))
481 (arguments
482 `(#:tests? #f ; no check target
483 #:make-flags (list (string-append "PREFIX=" %output)
484 (string-append "DEST_PREFIX=" %output))
485 #:modules ((guix build gnu-build-system)
486 (guix build utils)
487 (guix build emacs-utils))
488 #:imported-modules (,@%gnu-build-system-modules
489 (guix build emacs-utils))
490 #:phases
491 (modify-phases %standard-phases
492 (delete 'configure)
493 (add-after 'unpack 'disable-byte-compile-error-on-warn
494 (lambda _
495 (substitute* "Makefile"
496 (("\\(setq byte-compile-error-on-warn t\\)")
497 "(setq byte-compile-error-on-warn nil)"))
498 #t))
499 (add-after 'unpack 'patch-hardcoded-paths
500 (lambda* (#:key inputs outputs #:allow-other-keys)
501 (let ((out (assoc-ref outputs "out"))
502 (coq (assoc-ref inputs "coq"))
503 (emacs (assoc-ref inputs "host-emacs")))
504 (define (coq-prog name)
505 (string-append coq "/bin/" name))
506 (emacs-substitute-variables "coq/coq.el"
507 ("coq-prog-name" (coq-prog "coqtop"))
508 ("coq-compiler" (coq-prog "coqc"))
509 ("coq-dependency-analyzer" (coq-prog "coqdep")))
510 (substitute* "Makefile"
511 (("/sbin/install-info") "install-info"))
512 (substitute* "bin/proofgeneral"
513 (("^PGHOMEDEFAULT=.*" all)
514 (string-append all
515 "PGHOME=$PGHOMEDEFAULT\n"
516 "EMACS=" emacs "/bin/emacs")))
517 #t)))
518 (add-after 'unpack 'clean
519 (lambda _
520 ;; Delete the pre-compiled elc files for Emacs 23.
521 (zero? (system* "make" "clean"))))
522 (add-after 'install 'install-doc
523 (lambda* (#:key make-flags #:allow-other-keys)
524 ;; XXX FIXME avoid building/installing pdf files,
525 ;; due to unresolved errors building them.
526 (substitute* "Makefile"
527 ((" [^ ]*\\.pdf") ""))
528 (zero? (apply system* "make" "install-doc"
529 make-flags)))))))
530 (home-page "http://proofgeneral.inf.ed.ac.uk/")
531 (synopsis "Generic front-end for proof assistants based on Emacs")
532 (description
533 "Proof General is a major mode to turn Emacs into an interactive proof
534 assistant to write formal mathematical proofs using a variety of theorem
535 provers.")
536 (license license:gpl2+)))
537
538 (define-public ocaml-menhir
539 (package
540 (name "ocaml-menhir")
541 (version "20161115")
542 (source (origin
543 (method url-fetch)
544 (uri (string-append
545 "http://gallium.inria.fr/~fpottier/menhir/"
546 "menhir-" version ".tar.gz"))
547 (sha256
548 (base32
549 "1j8nmcj2gq6hyyi16z27amiahplgrnk4ppchpm0v4qy80kwkf47k"))))
550 (build-system gnu-build-system)
551 (inputs
552 `(("ocaml" ,ocaml)))
553 (arguments
554 `(#:parallel-build? #f ; Parallel build causes failure
555 #:tests? #f ; No check target
556 #:phases
557 (modify-phases %standard-phases
558 (replace 'configure
559 (lambda* (#:key outputs #:allow-other-keys)
560 (let ((out (assoc-ref outputs "out")))
561 (setenv "PREFIX" out))
562 #t)))))
563 (home-page "http://gallium.inria.fr/~fpottier/menhir")
564 (synopsis "Parser generator")
565 (description "Menhir is a parser generator. It turns high-level grammar
566 specifications, decorated with semantic actions expressed in the OCaml
567 programming language into parsers, again expressed in OCaml. It is based on
568 Knuth’s LR(1) parser construction technique.")
569 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
570 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
571 ;; are QPL licensed.
572 (license (list license:gpl2+ license:qpl))))
573
574 (define-public lablgtk
575 (package
576 (name "lablgtk")
577 (version "2.18.5")
578 (source (origin
579 (method url-fetch)
580 (uri (ocaml-forge-uri name version 1627))
581 (sha256
582 (base32
583 "0cyj6sfdvzx8hw7553lhgwc0krlgvlza0ph3dk9gsxy047dm3wib"))))
584 (build-system gnu-build-system)
585 (native-inputs
586 `(("camlp4" ,camlp4)
587 ("ocaml" ,ocaml)
588 ("findlib" ,ocaml-findlib)
589 ("pkg-config" ,pkg-config)))
590 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
591 ;; and gtk+-quartz-2.0 once available.
592 (inputs
593 `(("gtk+" ,gtk+-2)
594 ("gtksourceview" ,gtksourceview-2)
595 ("libgnomecanvas" ,libgnomecanvas)
596 ("libgnomeui" ,libgnomeui)
597 ("libglade" ,libglade)
598 ("librsvg" ,librsvg)))
599 (arguments
600 `(#:tests? #f ; no check target
601
602 ;; opt: also install cmxa files
603 #:make-flags (list "all" "opt"
604 (string-append "FINDLIBDIR="
605 (assoc-ref %outputs "out")
606 "/lib/ocaml"))
607 ;; Occasionally we would get "Error: Unbound module GtkThread" when
608 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
609 #:parallel-build? #f
610
611 #:phases
612 (modify-phases %standard-phases
613 (add-before 'install 'prepare-install
614 (lambda* (#:key inputs outputs #:allow-other-keys)
615 (let ((out (assoc-ref outputs "out"))
616 (ocaml (assoc-ref inputs "ocaml")))
617 ;; Install into the output and not the ocaml directory.
618 (mkdir-p (string-append out "/lib/ocaml"))
619 (substitute* "config.make"
620 ((ocaml) out))
621 #t))))))
622 (home-page "http://lablgtk.forge.ocamlcore.org/")
623 (synopsis "GTK+ bindings for OCaml")
624 (description
625 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
626 a strongly-typed object-oriented interface that is compatible with the
627 dynamic typing of GTK+. Most widgets and methods are available. LablGtk
628 also provides bindings to
629 gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
630 gnomeui, gtksourceview, gtkspell,
631 libglade (and it an generate OCaml code from .glade files),
632 libpanel, librsvg and quartz.")
633 (license license:lgpl2.1)))
634
635 (define-public unison
636 (package
637 (name "unison")
638 (version "2.48.3")
639 (source
640 (origin
641 (method svn-fetch)
642 (uri (svn-reference
643 (url (string-append "https://webdav.seas.upenn.edu/svn/"
644 "unison/branches/"
645 (version-major+minor version)))
646 (revision 535)))
647 (file-name (string-append name "-" version "-checkout"))
648 (sha256
649 (base32
650 "0486s53wyayicj9f2raj2dvwvk4xyzar219rccc1iczdwixm4x05"))
651 (modules '((guix build utils)
652 (ice-9 rdelim)
653 (ice-9 regex)
654 (srfi srfi-1)))
655 (snippet
656 `(begin
657 ;; The svn revision in the release tarball appears to be
658 ;; artificially manipulated in order to set the desired point
659 ;; version number. Because the point version is calculated during
660 ;; the build, we can offset pointVersionOrigin by the desired
661 ;; point version and write that into "Rev: %d". We do this rather
662 ;; than hardcoding the necessary revision number, for
663 ;; maintainability.
664 (with-atomic-file-replacement "src/mkProjectInfo.ml"
665 (lambda (in out)
666 (let ((pt-ver (string->number (third (string-split ,version #\.))))
667 (pt-rx (make-regexp "^let pointVersionOrigin = ([0-9]+)"))
668 (rev-rx (make-regexp "Rev: [0-9]+")))
669 (let loop ((pt-origin #f))
670 (let ((line (read-line in 'concat)))
671 (cond
672 ((regexp-exec pt-rx line)
673 => (lambda (m)
674 (display line out)
675 (loop (string->number (match:substring m 1)))))
676 ((regexp-exec rev-rx line)
677 => (lambda (m)
678 (format out "~aRev: ~d~a"
679 (match:prefix m)
680 (+ pt-origin pt-ver)
681 (match:suffix m))
682 (dump-port in out))) ;done
683 (else
684 (display line out)
685 (loop pt-origin))))))))
686 ;; Without the '-fix' argument, the html file produced does not
687 ;; have functioning internal hyperlinks.
688 (substitute* "doc/Makefile"
689 (("hevea unison") "hevea -fix unison"))))))
690 (build-system gnu-build-system)
691 (outputs '("out"
692 "doc")) ; 1.9 MiB of documentation
693 (native-inputs
694 `(("ocaml" ,ocaml)
695 ;; For documentation
696 ("ghostscript" ,ghostscript)
697 ("texlive" ,texlive)
698 ("hevea" ,hevea)
699 ("lynx" ,lynx)))
700 (arguments
701 `(#:parallel-build? #f
702 #:parallel-tests? #f
703 #:test-target "selftest"
704 #:tests? #f ; Tests require writing to $HOME.
705 ; If some $HOME is provided, they fail with the message
706 ; "Fatal error: Skipping some tests -- remove me!"
707 #:phases
708 (modify-phases %standard-phases
709 (delete 'configure)
710 (add-before 'install 'prepare-install
711 (lambda* (#:key outputs #:allow-other-keys)
712 (let* ((out (assoc-ref outputs "out"))
713 (bin (string-append out "/bin")))
714 (mkdir-p bin)
715 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
716 #t)))
717 (add-after 'install 'install-fsmonitor
718 (lambda* (#:key outputs #:allow-other-keys)
719 (let* ((out (assoc-ref outputs "out"))
720 (bin (string-append out "/bin")))
721 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
722 (install-file "src/unison-fsmonitor" bin))))
723 (add-after 'install 'install-doc
724 (lambda* (#:key outputs #:allow-other-keys)
725 (let ((doc (string-append (assoc-ref outputs "doc")
726 "/share/doc/unison")))
727 (mkdir-p doc)
728 ;; This file needs write-permissions, because it's
729 ;; overwritten by 'docs' during documentation generation.
730 (chmod "src/strings.ml" #o600)
731 (and (zero? (system* "make" "docs"
732 "TEXDIRECTIVES=\\\\draftfalse"))
733 (begin
734 (for-each (lambda (f)
735 (install-file f doc))
736 (map (lambda (ext)
737 (string-append
738 "doc/unison-manual." ext))
739 ;; Install only html documentation,
740 ;; since the build is currently
741 ;; non-reproducible with the ps, pdf,
742 ;; and dvi docs.
743 '(;;"ps" "pdf" "dvi"
744 "html")))
745 #t))))))))
746 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
747 (synopsis "File synchronizer")
748 (description
749 "Unison is a file-synchronization tool. It allows two replicas of
750 a collection of files and directories to be stored on different hosts
751 (or different disks on the same host), modified separately, and then
752 brought up to date by propagating the changes in each replica
753 to the other.")
754 (license license:gpl3+)))
755
756 (define-public ocaml-findlib
757 (package
758 (name "ocaml-findlib")
759 (version "1.6.1")
760 (source (origin
761 (method url-fetch)
762 (uri (string-append "http://download.camlcity.org/download/"
763 "findlib" "-" version ".tar.gz"))
764 (sha256
765 (base32
766 "02abg1lsnwvjg3igdyb8qjgr5kv1nbwl4gaf8mdinzfii5p82721"))
767 (patches (search-patches "ocaml-findlib-make-install.patch"))))
768 (build-system gnu-build-system)
769 (native-inputs
770 `(("camlp4" ,camlp4)
771 ("m4" ,m4)
772 ("ocaml" ,ocaml)))
773 (arguments
774 `(#:tests? #f ; no test suite
775 #:parallel-build? #f
776 #:make-flags (list "all" "opt")
777 #:phases (modify-phases %standard-phases
778 (replace
779 'configure
780 (lambda* (#:key inputs outputs #:allow-other-keys)
781 (let ((out (assoc-ref outputs "out")))
782 (system*
783 "./configure"
784 "-bindir" (string-append out "/bin")
785 "-config" (string-append out "/etc/ocamfind.conf")
786 "-mandir" (string-append out "/share/man")
787 "-sitelib" (string-append out "/lib/ocaml/site-lib")
788 "-with-toolbox"))))
789 (add-after 'install 'remove-camlp4
790 (lambda* (#:key outputs #:allow-other-keys)
791 (let ((out (assoc-ref outputs "out")))
792 (delete-file-recursively
793 (string-append out "/lib/ocaml/site-lib/camlp4"))))))))
794 (home-page "http://projects.camlcity.org/projects/findlib.html")
795 (synopsis "Management tool for OCaml libraries")
796 (description
797 "The \"findlib\" library provides a scheme to manage reusable software
798 components (packages), and includes tools that support this scheme. Packages
799 are collections of OCaml modules for which metainformation can be stored. The
800 packages are kept in the file system hierarchy, but with strict directory
801 structure. The library contains functions to look the directory up that
802 stores a package, to query metainformation about a package, and to retrieve
803 dependency information about multiple packages. There is also a tool that
804 allows the user to enter queries on the command-line. In order to simplify
805 compilation and linkage, there are new frontends of the various OCaml
806 compilers that can directly deal with packages.")
807 (license license:x11)))
808
809 ;; note that some tests may hang for no obvious reason.
810 (define-public ocaml-ounit
811 (package
812 (name "ocaml-ounit")
813 (version "2.0.0")
814 (source (origin
815 (method url-fetch)
816 (uri (ocaml-forge-uri "ounit" version 1258))
817 (sha256
818 (base32
819 "118xsadrx84pif9vaq13hv4yh22w9kmr0ypvhrs0viir1jr0ajjd"))))
820 (build-system ocaml-build-system)
821 (native-inputs
822 `(("libxml2" ,libxml2))) ; for xmllint
823 (arguments
824 `(#:phases
825 (modify-phases %standard-phases
826 ;; Tests are done during build.
827 (delete 'check))))
828 (home-page "http://ounit.forge.ocamlcore.org")
829 (synopsis "Unit testing framework for OCaml")
830 (description "Unit testing framework for OCaml. It is similar to JUnit and
831 other XUnit testing frameworks.")
832 (license license:expat)))
833
834 (define-public camlzip
835 (package
836 (name "camlzip")
837 (version "1.0.6")
838 (source (origin
839 (method url-fetch)
840 (uri (ocaml-forge-uri name version 1616))
841 (sha256
842 (base32
843 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
844 (build-system ocaml-build-system)
845 (inputs
846 `(("zlib" ,zlib)))
847 (arguments
848 `(#:phases
849 (modify-phases %standard-phases
850 (delete 'configure)
851 (add-after 'install 'install-camlzip
852 (lambda* (#:key outputs #:allow-other-keys)
853 (let* ((out (assoc-ref outputs "out"))
854 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
855 (mkdir-p dir)
856 (call-with-output-file (string-append dir "/META")
857 (lambda (port)
858 (format port "version=\"1.06\"\n")
859 (format port "requires=\"unix\"\n")
860 (format port "archive(byte)=\"zip.cma\"\n")
861 (format port "archive(native)=\"zip.cmxa\"\n")
862 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
863 (format port "directory=\"../zip\"\n")))))))
864 #:install-target "install-findlib"
865 #:make-flags
866 (list "all" "allopt"
867 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
868 "/lib/ocaml"))))
869 (home-page "http://forge.ocamlcore.org/projects/camlzip")
870 (synopsis "Provides easy access to compressed files")
871 (description "Provides easy access to compressed files in ZIP, GZIP and
872 JAR format. It provides functions for reading from and writing to compressed
873 files in these formats.")
874 (license license:lgpl2.1+)))
875
876 (define-public ocamlmod
877 (package
878 (name "ocamlmod")
879 (version "0.0.8")
880 (source (origin
881 (method url-fetch)
882 (uri (ocaml-forge-uri name version 1544))
883 (sha256
884 (base32
885 "1w0w8lfyymvk300dv13gvhrddpcyknvyp4g2yvq2vaw7khkhjs9g"))))
886 (build-system ocaml-build-system)
887 (native-inputs
888 `(("ounit" ,ocaml-ounit)))
889 (arguments
890 `(#:phases
891 (modify-phases %standard-phases
892 ;; Tests are done during build.
893 (delete 'check))))
894 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
895 (synopsis "Generate modules from OCaml source files")
896 (description "Generate modules from OCaml source files.")
897 (license license:lgpl2.1+))) ; with an exception
898
899 (define-public ocaml-zarith
900 (package
901 (name "ocaml-zarith")
902 (version "1.4.1")
903 (source (origin
904 (method url-fetch)
905 (uri (ocaml-forge-uri "zarith" version 1574))
906 (sha256
907 (base32
908 "0l36hzmfbvdai2kcgynh13vfdim5x2grnaw61fxqalyjm90c3di3"))))
909 (build-system ocaml-build-system)
910 (native-inputs
911 `(("perl" ,perl)))
912 (inputs
913 `(("gmp" ,gmp)))
914 (arguments
915 `(#:tests? #f ; no test target
916 #:phases
917 (modify-phases %standard-phases
918 (replace 'configure
919 (lambda* (#:key #:allow-other-keys)
920 (zero? (system* "./configure")))))))
921 (home-page "https://forge.ocamlcore.org/projects/zarith/")
922 (synopsis "Implements arbitrary-precision integers")
923 (description "Implements arithmetic and logical operations over
924 arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
925 over big integers. Small integers are represented as Caml unboxed integers,
926 for speed and space economy.")
927 (license license:lgpl2.1+))) ; with an exception
928
929 (define-public ocaml-frontc
930 (package
931 (name "ocaml-frontc")
932 (version "3.4")
933 (source (origin
934 (method url-fetch)
935 (uri (string-append "https://www.irit.fr/recherches/ARCHI/MARCH/"
936 "frontc/Frontc-" version ".tgz"))
937 (sha256
938 (base32
939 "16dz153s92dgbw1rrfwbhscy73did87kfmjwyh3qpvs748h1sc4g"))))
940 (build-system ocaml-build-system)
941 (arguments
942 `(#:phases
943 (modify-phases %standard-phases
944 (delete 'configure)
945 (add-after 'install 'install-meta
946 (lambda* (#:key outputs #:allow-other-keys)
947 (let ((out (assoc-ref outputs "out")))
948 (with-output-to-file
949 (string-append out "/lib/ocaml/frontc/META")
950 (lambda _
951 (display
952 (string-append
953 "description = \"Parser for the C language\"
954 version = \"" ,version "\"
955 requires = \"unix\"
956 archive(byte) = \"frontc.cma\"
957 archive(native) = \"frontc.cmxa\""))))
958 (symlink (string-append out "/lib/ocaml/frontc")
959 (string-append out "/lib/ocaml/FrontC"))))))
960 #:make-flags (list (string-append "PREFIX="
961 (assoc-ref %outputs "out"))
962 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
963 (home-page "https://www.irit.fr/FrontC")
964 (synopsis "C parser and lexer library")
965 (description "FrontC is an OCAML library providing a C parser and lexer.
966 The result is a syntactic tree easy to process with usual OCAML tree management.
967 It provides support for ANSI C syntax, old-C K&R style syntax and the standard
968 GNU CC attributes. It provides also a C pretty printer as an example of use.")
969 (license license:lgpl2.1)))
970
971 (define-public ocaml-qtest
972 (package
973 (name "ocaml-qtest")
974 (version "2.3")
975 (source (origin
976 (method url-fetch)
977 (uri (string-append "https://github.com/vincent-hugot/iTeML/"
978 "archive/v" version ".tar.gz"))
979 (sha256
980 (base32
981 "1n7x5l6h4j44f75wzgzjsjkq349i4gj707w1hr7fx84igxxfr6vl"))))
982 (build-system ocaml-build-system)
983 (native-inputs
984 `(("findlib" ,ocaml-findlib)))
985 (propagated-inputs
986 `(("ounit" ,ocaml-ounit)))
987 (arguments
988 `(#:tests? #f ; No test target.
989 #:make-flags
990 (list (string-append "BIN=" (assoc-ref %outputs "out") "/bin"))
991 #:phases
992 (modify-phases %standard-phases
993 (delete 'configure))))
994 (home-page "https://github.com/vincent-hugot/iTeML")
995 (synopsis "Inline (Unit) Tests for OCaml")
996 (description "Qtest extracts inline unit tests written using a special
997 syntax in comments. Those tests are then run using the oUnit framework and the
998 qcheck library. The possibilities range from trivial tests -- extremely simple
999 to use -- to sophisticated random generation of test cases.")
1000 (license license:lgpl3+)))
1001
1002 (define-public ocaml-stringext
1003 (package
1004 (name "ocaml-stringext")
1005 (version "1.4.3")
1006 (source (origin
1007 (method url-fetch)
1008 (uri (string-append "https://github.com/rgrinberg/stringext"
1009 "/archive/v" version ".tar.gz"))
1010 (sha256
1011 (base32
1012 "19g6lfn03iki9f8h91hi0yiqn0b3wkxyq08b3y23wgv6jw6mssfh"))))
1013 (build-system ocaml-build-system)
1014 (native-inputs
1015 `(("qtest" ,ocaml-qtest)))
1016 (home-page "https://github.com/rgrinberg/stringext")
1017 (synopsis "Extra string functions for OCaml")
1018 (description "Provides a single module named Stringext that provides a grab
1019 bag of often used but missing string functions from the stdlib. E.g, split,
1020 full_split, cut, rcut, etc..")
1021 ;; the only mention of a license in this project is in its `opam' file
1022 ;; where it says `mit'.
1023 (license license:expat)))
1024
1025
1026 (define-public ocaml-bisect
1027 (package
1028 (name "ocaml-bisect")
1029 (version "1.3")
1030 (source (origin
1031 (method url-fetch)
1032 (uri (ocaml-forge-uri "bisect" version 1051))
1033 (sha256
1034 (base32
1035 "0kcg2rh0qlkfpbv3nhcb75n62b04gbrz0zasq15ynln91zd5qrg0"))
1036 (patches
1037 (search-patches
1038 "ocaml-bisect-fix-camlp4-in-another-directory.patch"))))
1039 (build-system ocaml-build-system)
1040 (native-inputs
1041 `(("camlp4" ,camlp4)
1042 ("libxml2" ,libxml2)
1043 ("which" ,which)))
1044 (propagated-inputs
1045 `(("camlp4" ,camlp4)))
1046 (arguments
1047 `(#:test-target "tests"
1048 #:make-flags
1049 (list "all" (string-append "CAMLP4_LIBDIR="
1050 (assoc-ref %build-inputs "camlp4")
1051 "/lib/ocaml/site-lib/camlp4"))
1052 #:phases
1053 (modify-phases %standard-phases
1054 (replace 'configure
1055 (lambda* (#:key outputs #:allow-other-keys)
1056 (zero? (system* "./configure" "-prefix"
1057 (assoc-ref outputs "out"))))))))
1058 (home-page "http://bisect.x9c.fr")
1059 (synopsis "Code coverage tool for the OCaml language")
1060 (description "Bisect is a code coverage tool for the OCaml language. It is
1061 a camlp4-based tool that allows to instrument your application before running
1062 tests. After application execution, it is possible to generate a report in HTML
1063 format that is the replica of the application source code annotated with code
1064 coverage information.")
1065 (license license:gpl3+)))
1066
1067 (define-public ocaml-bitstring
1068 (package
1069 (name "ocaml-bitstring")
1070 (version "2.1.0")
1071 (source (origin
1072 (method url-fetch)
1073 (uri (string-append "https://github.com/xguerin/bitstring"
1074 "/archive/v" version ".tar.gz"))
1075 (sha256
1076 (base32
1077 "0miw4banfpmx4kxrckpqr57b1fcmsqdmspyjx6gqjd4kghm4l7xj"))
1078 (patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
1079 (build-system ocaml-build-system)
1080 (native-inputs
1081 `(("camlp4" ,camlp4)
1082 ("time" ,time)
1083 ("autoconf" ,autoconf)
1084 ("automake" ,automake)
1085 ("bisect" ,ocaml-bisect)))
1086 (propagated-inputs
1087 `(("camlp4" ,camlp4)))
1088 (arguments
1089 `(#:configure-flags
1090 (list "CAMLP4OF=camlp4of" "--enable-coverage")
1091 #:make-flags
1092 (list (string-append "BISECTLIB="
1093 (assoc-ref %build-inputs "bisect")
1094 "/lib/ocaml/site-lib")
1095 (string-append "OCAMLCFLAGS=-g -I "
1096 (assoc-ref %build-inputs "camlp4")
1097 "/lib/ocaml/site-lib/camlp4 -I "
1098 "$(BISECTLIB)/bisect")
1099 (string-append "OCAMLOPTFLAGS=-g -I "
1100 (assoc-ref %build-inputs "camlp4")
1101 "/lib/ocaml/site-lib/camlp4 -I "
1102 "$(BISECTLIB)/bisect"))
1103 #:phases
1104 (modify-phases %standard-phases
1105 (add-before 'configure 'fix-configure
1106 (lambda* (#:key inputs #:allow-other-keys)
1107 (substitute* "Makefile.in"
1108 (("@abs_top_builddir@")
1109 (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
1110 (substitute* "configure"
1111 (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
1112 "/bin/sh")))))
1113 (add-after 'install 'link-lib
1114 (lambda* (#:key outputs #:allow-other-keys)
1115 (let* ((out (assoc-ref outputs "out"))
1116 (stubs (string-append out
1117 "/lib/ocaml/site-lib/stubslibs"))
1118 (lib (string-append out
1119 "/lib/ocaml/site-lib/bitstring")))
1120 (mkdir-p stubs)
1121 (symlink (string-append lib "/dllbitstring.so")
1122 (string-append stubs "/dllbitstring.so"))))))))
1123 (home-page "https://github.com/xguerin/bitstring")
1124 (synopsis "Bitstrings and bitstring matching for OCaml")
1125 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1126 a syntax extension and library for OCaml. You can use this module to both parse
1127 and generate binary formats, files and protocols. Bitstring handling is added
1128 as primitives to the language, making it exceptionally simple to use and very
1129 powerful.")
1130 (license license:isc)))
1131
1132 (define-public ocaml-result
1133 (package
1134 (name "ocaml-result")
1135 (version "1.2")
1136 (source (origin
1137 (method url-fetch)
1138 (uri (string-append "https://github.com/janestreet/result"
1139 "/archive/" version ".tar.gz"))
1140 (sha256
1141 (base32
1142 "1pgpfsgvhxnh0i37fkvp9j8nadns9hz9iqgabj4dr519j2gr1xvw"))))
1143 (build-system ocaml-build-system)
1144 (arguments
1145 `(#:tests? #f
1146 #:phases
1147 (modify-phases %standard-phases
1148 (delete 'configure))))
1149 (home-page "https://github.com/janestreet/result")
1150 (synopsis "Compatibility Result module")
1151 (description "Uses the new result type defined in OCaml >= 4.03 while
1152 staying compatible with older version of OCaml should use the Result module
1153 defined in this library.")
1154 (license license:bsd-3)))
1155
1156 (define-public ocaml-topkg
1157 (package
1158 (name "ocaml-topkg")
1159 (version "0.8.1")
1160 (source (origin
1161 (method url-fetch)
1162 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1163 "topkg-" version ".tbz"))
1164 (sha256
1165 (base32
1166 "18rrh6fmf708z7dd30amljmcgaypj3kk49jrmrj68r4wnw8004j8"))))
1167 (build-system ocaml-build-system)
1168 (native-inputs
1169 `(("opam" ,opam)))
1170 (propagated-inputs
1171 `(("result" ,ocaml-result)))
1172 (arguments
1173 `(#:tests? #f
1174 #:build-flags '("build")
1175 #:phases
1176 (modify-phases %standard-phases
1177 (delete 'configure))))
1178 (home-page "http://erratique.ch/software/topkg")
1179 (synopsis "Transitory OCaml software packager")
1180 (description "Topkg is a packager for distributing OCaml software. It
1181 provides an API to describe the files a package installs in a given build
1182 configuration and to specify information about the package's distribution,
1183 creation and publication procedures.")
1184 (license license:isc)))
1185
1186 (define-public ocaml-rresult
1187 (package
1188 (name "ocaml-rresult")
1189 (version "0.5.0")
1190 (source (origin
1191 (method url-fetch)
1192 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1193 "rresult-" version ".tbz"))
1194 (sha256
1195 (base32
1196 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1197 (build-system ocaml-build-system)
1198 (native-inputs
1199 `(("opam" ,opam)))
1200 (propagated-inputs
1201 `(("topkg" ,ocaml-topkg)))
1202 (arguments
1203 `(#:tests? #f
1204 #:build-flags '("build")
1205 #:phases
1206 (modify-phases %standard-phases
1207 (delete 'configure))))
1208 (home-page "http://erratique.ch/software/rresult")
1209 (synopsis "Result value combinators for OCaml")
1210 (description "Handle computation results and errors in an explicit and
1211 declarative manner, without resorting to exceptions. It defines combinators
1212 to operate on the result type available from OCaml 4.03 in the standard
1213 library.")
1214 (license license:isc)))
1215
1216 (define-public ocaml-mtime
1217 (package
1218 (name "ocaml-mtime")
1219 (version "0.8.3")
1220 (source (origin
1221 (method url-fetch)
1222 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1223 "mtime-" version ".tbz"))
1224 (sha256
1225 (base32
1226 "1hfx4ny2dkw6jf3jppz0640dafl5xgn8r2si9kpwzhmibal8qrah"))))
1227 (build-system ocaml-build-system)
1228 (native-inputs
1229 `(("opam" ,opam)))
1230 (propagated-inputs
1231 `(("topkg" ,ocaml-topkg)))
1232 (arguments
1233 `(#:tests? #f
1234 #:build-flags
1235 '("native=true" "native-dynlink=true" "jsoo=false")
1236 #:phases
1237 (modify-phases %standard-phases
1238 (delete 'configure))))
1239 (home-page "http://erratique.ch/software/mtime")
1240 (synopsis "Monotonic wall-clock time for OCaml")
1241 (description "Access monotonic wall-clock time. It allows to measure time
1242 spans without being subject to operating system calendar time adjustments.")
1243 (license license:isc)))
1244
1245 (define-public ocaml-cmdliner
1246 (package
1247 (name "ocaml-cmdliner")
1248 (version "0.9.8")
1249 (source (origin
1250 (method url-fetch)
1251 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1252 "cmdliner-" version ".tbz"))
1253 (sha256
1254 (base32
1255 "0hdxlkgiwjml9dpaa80282a8350if7mc1m6yz2mrd7gci3fszykx"))))
1256 (build-system ocaml-build-system)
1257 (native-inputs
1258 `(("opam" ,opam)))
1259 (arguments
1260 `(#:tests? #f
1261 #:build-flags '("native=true" "native-dynlink=true")
1262 #:phases
1263 (modify-phases %standard-phases
1264 (delete 'configure))))
1265 (home-page "http://erratique.ch/software/cmdliner")
1266 (synopsis "Declarative definition of command line interfaces for OCaml")
1267 (description "Cmdliner is a module for the declarative definition of command
1268 line interfaces. It provides a simple and compositional mechanism to convert
1269 command line arguments to OCaml values and pass them to your functions. The
1270 module automatically handles syntax errors, help messages and UNIX man page
1271 generation. It supports programs with single or multiple commands and respects
1272 most of the POSIX and GNU conventions.")
1273 (license license:bsd-3)))
1274
1275 (define-public ocaml-fmt
1276 (package
1277 (name "ocaml-fmt")
1278 (version "0.8.0")
1279 (source
1280 (origin
1281 (method url-fetch)
1282 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1283 version ".tbz"))
1284 (sha256 (base32
1285 "16y7ibndnairb53j8a6qgipyqwjxncn4pl9jiw5bxjfjm59108px"))))
1286 (build-system ocaml-build-system)
1287 (native-inputs `(("opam" ,opam)
1288 ("topkg" ,ocaml-topkg)))
1289 (propagated-inputs `(("result" ,ocaml-result)
1290 ("cmdliner" ,ocaml-cmdliner)))
1291 (arguments `(#:tests? #f
1292 #:build-flags (list "build" "--with-base-unix" "true"
1293 "--with-cmdliner" "true")
1294 #:phases
1295 (modify-phases %standard-phases
1296 (delete 'configure))))
1297 (home-page "http://erratique.ch/software/fmt")
1298 (synopsis "OCaml Format pretty-printer combinators")
1299 (description "Fmt exposes combinators to devise Format pretty-printing
1300 functions.")
1301 (license license:isc)))
1302
1303 (define-public ocaml-astring
1304 (package
1305 (name "ocaml-astring")
1306 (version "0.8.3")
1307 (source
1308 (origin
1309 (method url-fetch)
1310 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1311 version ".tbz"))
1312 (sha256 (base32
1313 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1314 (build-system ocaml-build-system)
1315 (native-inputs `(("opam" ,opam)
1316 ("topkg" ,ocaml-topkg)))
1317 (arguments `(#:tests? #f
1318 #:build-flags (list "build")
1319 #:phases
1320 (modify-phases %standard-phases
1321 (delete 'configure))))
1322 (home-page "http://erratique.ch/software/astring")
1323 (synopsis "Alternative String module for OCaml")
1324 (description "Astring exposes an alternative String module for OCaml. This
1325 module balances minimality and expressiveness for basic, index-free, string
1326 processing and provides types and functions for substrings, string sets and
1327 string maps. The String module exposed by Astring has exception safe functions,
1328 removes deprecated and rarely used functions, alters some signatures and names,
1329 adds a few missing functions and fully exploits OCaml's newfound string
1330 immutability.")
1331 (license license:isc)))
1332
1333 (define-public ocaml-alcotest
1334 (package
1335 (name "ocaml-alcotest")
1336 (version "0.7.2")
1337 (source (origin
1338 (method url-fetch)
1339 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1340 "download/" version "/alcotest-" version ".tbz"))
1341 (sha256
1342 (base32
1343 "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
1344 (build-system ocaml-build-system)
1345 (arguments `(#:tests? #f
1346 #:build-flags (list "build")
1347 #:phases
1348 (modify-phases %standard-phases
1349 (delete 'configure))))
1350 (native-inputs `(("opam" ,opam)
1351 ("topkg" ,ocaml-topkg)))
1352 (propagated-inputs `(("fmt" ,ocaml-fmt)
1353 ("astring" ,ocaml-astring)))
1354 (home-page "https://github.com/mirage/alcotest")
1355 (synopsis "Lightweight OCaml test framework")
1356 (description "Alcotest exposes simple interface to perform unit tests. It
1357 exposes a simple TESTABLE module type, a check function to assert test
1358 predicates and a run function to perform a list of unit -> unit test callbacks.
1359 Alcotest provides a quiet and colorful output where only faulty runs are fully
1360 displayed at the end of the run (with the full logs ready to inspect), with a
1361 simple (yet expressive) query language to select the tests to run.")
1362 (license license:isc)))
1363
1364 (define-public ocaml-ppx-tools
1365 (package
1366 (name "ocaml-ppx-tools")
1367 (version "5.0+4.02.0")
1368 (source
1369 (origin
1370 (method url-fetch)
1371 (uri (string-append "https://github.com/alainfrisch/ppx_tools/archive/"
1372 version ".tar.gz"))
1373 (sha256 (base32
1374 "0rjg4rngi8k9873z4zq95zn9hj8qyw1vcrf11y15aqasfpqq16rc"))))
1375 (build-system ocaml-build-system)
1376 (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
1377 #:tests? #f))
1378 (home-page "https://github.com/alainfrisch/ppx_tools")
1379 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1380 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1381 (license license:expat)))
1382
1383 (define-public ocaml-react
1384 (package
1385 (name "ocaml-react")
1386 (version "1.2.0")
1387 (source
1388 (origin
1389 (method url-fetch)
1390 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1391 version ".tbz"))
1392 (sha256 (base32
1393 "0knhgbngphv5sp1yskfd97crf169qhpc0igr6w7vqw0q36lswyl8"))))
1394 (build-system ocaml-build-system)
1395 (native-inputs `(("opam" ,opam)))
1396 (arguments `(#:tests? #f
1397 #:build-flags (list "native=true" "native-dynlink=true")
1398 #:phases
1399 (modify-phases %standard-phases
1400 (delete 'configure))))
1401 (home-page "http://erratique.ch/software/react")
1402 (synopsis "Declarative events and signals for OCaml")
1403 (description "React is an OCaml module for functional reactive programming
1404 (FRP). It provides support to program with time varying values: declarative
1405 events and signals. React doesn't define any primitive event or signal, it
1406 lets the client choose the concrete timeline.")
1407 (license license:bsd-3)))
1408
1409 (define-public ocaml-ssl
1410 (package
1411 (name "ocaml-ssl")
1412 (version "0.5.3")
1413 (source
1414 (origin
1415 (method url-fetch)
1416 (uri (string-append "https://github.com/savonet/ocaml-ssl/archive/"
1417 version ".tar.gz"))
1418 (sha256 (base32
1419 "1ds5gzyzpcgwn7h40dmjkll7g990cr82ay05b2a7nrclvv6fdpg8"))))
1420 (build-system ocaml-build-system)
1421 (arguments `(#:tests? #f
1422 #:make-flags (list "OCAMLFIND_LDCONF=ignore")
1423 #:phases
1424 (modify-phases %standard-phases
1425 (add-before 'configure 'bootstrap
1426 (lambda* (#:key #:allow-other-keys)
1427 (system* "./bootstrap")
1428 (substitute* "src/OCamlMakefile"
1429 (("/bin/sh") (which "bash")))
1430 (substitute* "configure"
1431 (("/bin/sh") (which "bash"))))))))
1432 (native-inputs `(("autoconf" ,autoconf)
1433 ("automake" ,automake)
1434 ("which" ,which)))
1435 (propagated-inputs `(("openssl" ,openssl)))
1436 (home-page "https://github.com/savonet/ocaml-ssl/")
1437 (synopsis "OCaml bindings for OpenSSL")
1438 (description "OCaml bindings for OpenSSL.")
1439 (license license:lgpl2.1)))
1440
1441 (define-public ocaml-lwt
1442 (package
1443 (name "ocaml-lwt")
1444 (version "2.6.0")
1445 (source
1446 (origin
1447 (method url-fetch)
1448 (uri (string-append "https://github.com/ocsigen/lwt/archive/" version
1449 ".tar.gz"))
1450 (sha256 (base32
1451 "1gbw0g8a5a4b16diqrmlhc8ilnikrm4w3jjm1zq310maqg8z0zxz"))))
1452 (build-system ocaml-build-system)
1453 (arguments
1454 `(#:configure-flags
1455 (list "--enable-ssl" "--enable-glib" "--enable-react"
1456 "--enable-ppx")
1457 #:phases
1458 (modify-phases %standard-phases
1459 (add-before 'configure 'disable-some-checks
1460 (lambda* (#:key #:allow-other-keys)
1461 (substitute* "tests/unix/main.ml"
1462 (("Test_mcast.suite;") ""))))
1463 (add-after 'install 'link-stubs
1464 (lambda* (#:key outputs #:allow-other-keys)
1465 (let* ((out (assoc-ref outputs "out"))
1466 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
1467 (lib (string-append out "/lib/ocaml/site-lib/lwt")))
1468 (mkdir-p stubs)
1469 (symlink (string-append lib "/dlllwt-glib_stubs.so")
1470 (string-append stubs "/dlllwt-glib_stubs.so"))
1471 (symlink (string-append lib "/dlllwt-unix_stubs.so")
1472 (string-append stubs "/dlllwt-unix_stubs.so"))))))))
1473 (native-inputs `(("pkg-config" ,pkg-config)
1474 ("ppx-tools" ,ocaml-ppx-tools)))
1475 (inputs `(("libev" ,libev)
1476 ("glib" ,glib)))
1477 (propagated-inputs `(("result" ,ocaml-result)
1478 ("ocaml-ssl" ,ocaml-ssl)
1479 ("ocaml-react" ,ocaml-react)))
1480 (home-page "https://github.com/ocsigen/lwt")
1481 (synopsis "Cooperative threads and I/O in monadic style")
1482 (description "Lwt provides typed, composable cooperative threads. These
1483 make it easy to run normally-blocking I/O operations concurrently in a single
1484 process. Also, in many cases, Lwt threads can interact without the need for
1485 locks or other synchronization primitives.")
1486 (license license:lgpl2.1)))
1487
1488 (define-public ocaml-logs
1489 (package
1490 (name "ocaml-logs")
1491 (version "0.6.2")
1492 (source (origin
1493 (method url-fetch)
1494 (uri (string-append "http://erratique.ch/software/logs/releases/"
1495 "logs-" version ".tbz"))
1496 (sha256
1497 (base32
1498 "1khbn7jqpid83zn8rvyh1x1sirls7zc878zj4fz985m5xlsfy853"))))
1499 (build-system ocaml-build-system)
1500 (arguments `(#:tests? #f
1501 #:build-flags (list "build" "--with-js_of_ocaml" "false")
1502 #:phases
1503 (modify-phases %standard-phases
1504 (delete 'configure))))
1505 (native-inputs `(("opam" ,opam)))
1506 (propagated-inputs `(("fmt" ,ocaml-fmt)
1507 ("lwt" ,ocaml-lwt)
1508 ("mtime" ,ocaml-mtime)
1509 ("result" ,ocaml-result)
1510 ("cmdliner" ,ocaml-cmdliner)
1511 ("topkg" ,ocaml-topkg)))
1512 (home-page "http://erratique.ch/software/logs")
1513 (synopsis "Logging infrastructure for OCaml")
1514 (description "Logs provides a logging infrastructure for OCaml. Logging is
1515 performed on sources whose reporting level can be set independently. Log
1516 message report is decoupled from logging and is handled by a reporter.")
1517 (license license:isc)))
1518
1519 (define-public ocaml-fpath
1520 (package
1521 (name "ocaml-fpath")
1522 (version "0.7.1")
1523 (source (origin
1524 (method url-fetch)
1525 (uri (string-append "http://erratique.ch/software/fpath/releases/"
1526 "fpath-" version ".tbz"))
1527 (sha256
1528 (base32
1529 "05134ij27xjl6gaqsc65yl19vfj6cjxq3mbm9bf4mija8grdpn6g"))))
1530 (build-system ocaml-build-system)
1531 (arguments `(#:tests? #f
1532 #:build-flags (list "build")
1533 #:phases
1534 (modify-phases %standard-phases
1535 (delete 'configure))))
1536 (native-inputs `(("opam" ,opam)))
1537 (propagated-inputs `(("topkg" ,ocaml-topkg)
1538 ("astring" ,ocaml-astring)))
1539 (home-page "http://erratique.ch/software/fpath")
1540 (synopsis "File system paths for OCaml")
1541 (description "Fpath is an OCaml module for handling file system paths with
1542 POSIX or Windows conventions. Fpath processes paths without accessing the
1543 file system and is independent from any system library.")
1544 (license license:isc)))
1545
1546 (define-public ocaml-bos
1547 (package
1548 (name "ocaml-bos")
1549 (version "0.1.4")
1550 (source (origin
1551 (method url-fetch)
1552 (uri (string-append "http://erratique.ch/software/bos/releases/"
1553 "bos-" version ".tbz"))
1554 (sha256
1555 (base32
1556 "1ly66lysk4w6mdy4k1n3ynlpfpq7lw4wshcpzgx58v6x613w5s7q"))))
1557 (build-system ocaml-build-system)
1558 (arguments `(#:tests? #f
1559 #:build-flags (list "build")
1560 #:phases
1561 (modify-phases %standard-phases
1562 (delete 'configure))))
1563 (native-inputs `(("opam" ,opam)))
1564 (propagated-inputs `(("topkg" ,ocaml-topkg)
1565 ("astring" ,ocaml-astring)
1566 ("fmt" ,ocaml-fmt)
1567 ("fpath" ,ocaml-fpath)
1568 ("logs" ,ocaml-logs)
1569 ("rresult" ,ocaml-rresult)))
1570 (home-page "http://erratique.ch/software/bos")
1571 (synopsis "Basic OS interaction for OCaml")
1572 (description "Bos provides support for basic and robust interaction with
1573 the operating system in OCaml. It has functions to access the process
1574 environment, parse command line arguments, interact with the file system and
1575 run command line programs.")
1576 (license license:isc)))
1577
1578 (define-public ocaml-xmlm
1579 (package
1580 (name "ocaml-xmlm")
1581 (version "1.2.0")
1582 (source (origin
1583 (method url-fetch)
1584 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
1585 "xmlm-" version ".tbz"))
1586 (sha256
1587 (base32
1588 "1jywcrwn5z3gkgvicr004cxmdaqfmq8wh72f81jqz56iyn5024nh"))))
1589 (build-system ocaml-build-system)
1590 (arguments `(#:tests? #f
1591 #:phases
1592 (modify-phases %standard-phases
1593 (delete 'configure)
1594 (replace 'build
1595 (lambda* (#:key #:allow-other-keys)
1596 (zero? (system* "pkg/build" "true")))))))
1597 (native-inputs `(("opam" ,opam)))
1598 (home-page "http://erratique.ch/software/xmlm")
1599 (synopsis "Streaming XML codec for OCaml")
1600 (description "Xmlm is a streaming codec to decode and encode the XML data
1601 format. It can process XML documents without a complete in-memory
1602 representation of the data.")
1603 (license license:isc)))
1604
1605 (define-public ocaml-ulex
1606 (package
1607 (name "ocaml-ulex")
1608 (version "1.1")
1609 (source (origin
1610 (method url-fetch)
1611 (uri (string-append "http://www.cduce.org/download/ulex-"
1612 version ".tar.gz"))
1613 (sha256
1614 (base32
1615 "0fjlkwps14adfgxdrbb4yg65fhyimplvjjs1xqj5np197cig67x0"))))
1616 (build-system ocaml-build-system)
1617 (arguments `(#:phases (modify-phases %standard-phases (delete 'configure))
1618 #:tests? #f
1619 #:make-flags
1620 (list "all.opt"
1621 (string-append "OCAMLBUILD=ocamlbuild -byte-plugin "
1622 "-cflags -I,"
1623 (assoc-ref %build-inputs "camlp4")
1624 "/lib/ocaml/site-lib/camlp4"))))
1625 (native-inputs `(("camlp4" ,camlp4)))
1626 (home-page "http://www.cduce.org/download.html#side")
1627 (synopsis "Lexer generator for Unicode and OCaml")
1628 (description "Lexer generator for Unicode and OCaml.")
1629 (license license:expat)))
1630
1631 (define-public ocaml-uchar
1632 (package
1633 (name "ocaml-uchar")
1634 (version "0.0.1")
1635 (source
1636 (origin
1637 (method url-fetch)
1638 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
1639 version "/uchar-" version ".tbz"))
1640 (sha256 (base32
1641 "0ficw1x7ymbd6m8hqw3w1aycwm1hbwd6bad3c5pspwnzh3qlikhi"))))
1642 (build-system ocaml-build-system)
1643 (arguments `(#:tests? #f
1644 #:build-flags (list "native=true" "native-dynlink=true")
1645 #:phases
1646 (modify-phases %standard-phases
1647 (delete 'configure))))
1648 (native-inputs `(("opam" ,opam)))
1649 (home-page "https://github.com/ocaml/uchar")
1650 (synopsis "Compatibility library for OCaml's Uchar module")
1651 (description "The uchar package provides a compatibility library for the
1652 `Uchar` module introduced in OCaml 4.03.")
1653 (license license:lgpl2.1)))
1654
1655 (define-public ocaml-uutf
1656 (package
1657 (name "ocaml-uutf")
1658 (version "1.0.0")
1659 (source (origin
1660 (method url-fetch)
1661 (uri (string-append "http://erratique.ch/software/uutf/releases/"
1662 "uutf-" version ".tbz"))
1663 (sha256
1664 (base32
1665 "08i0cw02cxw4mi2rs01v9xi307qshs6fnd1dlqyb52kcxzblpp37"))))
1666 (build-system ocaml-build-system)
1667 (arguments `(#:tests? #f
1668 #:build-flags (list "build")
1669 #:phases
1670 (modify-phases %standard-phases
1671 (delete 'configure))))
1672 (native-inputs `(("opam" ,opam)
1673 ("topkg" ,ocaml-topkg)))
1674 (propagated-inputs `(("uchar" ,ocaml-uchar)
1675 ("cmdliner" ,ocaml-cmdliner)))
1676 (home-page "http://erratique.ch/software/uutf")
1677 (synopsis "Non-blocking streaming Unicode codec for OCaml")
1678 (description "Uutf is a non-blocking streaming codec to decode and encode
1679 the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
1680 work character by character without blocking on IO. Decoders perform character
1681 position tracking and support newline normalization.
1682
1683 Functions are also provided to fold over the characters of UTF encoded OCaml
1684 string values and to directly encode characters in OCaml Buffer.t values.")
1685 (license license:isc)))
1686
1687 (define-public ocaml-jsonm
1688 (package
1689 (name "ocaml-jsonm")
1690 (version "1.0.0")
1691 (source (origin
1692 (method url-fetch)
1693 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
1694 "jsonm-" version ".tbz"))
1695 (sha256
1696 (base32
1697 "1v3ln6d965lplj28snjdqdqablpp1kx8bw2cfx0m6i157mqyln62"))))
1698 (build-system ocaml-build-system)
1699 (arguments `(#:tests? #f
1700 #:build-flags (list "build")
1701 #:phases
1702 (modify-phases %standard-phases
1703 (delete 'configure))))
1704 (native-inputs `(("opam" ,opam)
1705 ("topkg" ,ocaml-topkg)))
1706 (propagated-inputs `(("uutf" ,ocaml-uutf)
1707 ("cmdliner" ,ocaml-cmdliner)))
1708 (home-page "http://erratique.ch/software/jsonm")
1709 (synopsis "Non-blocking streaming JSON codec for OCaml")
1710 (description "Jsonm is a non-blocking streaming codec to decode and encode
1711 the JSON data format. It can process JSON text without blocking on IO and
1712 without a complete in-memory representation of the data.")
1713 (license license:isc)))
1714
1715 (define-public ocaml-ocurl
1716 (package
1717 (name "ocaml-ocurl")
1718 (version "0.7.9")
1719 (source (origin
1720 (method url-fetch)
1721 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
1722 version ".tar.gz"))
1723 (sha256
1724 (base32
1725 "0pm6nm33wi0p9h765k6zb94ljpknryam4qd1hmb2rsk2y0y1181n"))))
1726 (build-system ocaml-build-system)
1727 (arguments `(#:phases
1728 (modify-phases %standard-phases
1729 (add-before 'configure 'fix-/bin/sh
1730 (lambda* (#:key inputs #:allow-other-keys)
1731 (substitute* "configure"
1732 (("-/bin/sh") (string-append "-" (which "bash")))))))))
1733 (native-inputs `(("pkg-config" ,pkg-config)))
1734 (inputs `(("curl" ,curl)))
1735 (home-page "http://ocurl.forge.ocamlcore.org/")
1736 (synopsis "OCaml bindings for libcurl")
1737 (description "Client-side URL transfer library, supporting HTTP and a
1738 multitude of other network protocols (FTP/SMTP/RTSP/etc).")
1739 (license license:isc)))
1740
1741 (define-public ocaml-base64
1742 (package
1743 (name "ocaml-base64")
1744 (version "2.1.2")
1745 (source (origin
1746 (method url-fetch)
1747 (uri (string-append "https://github.com/mirage/ocaml-base64/"
1748 "releases/download/v" version "/base64-"
1749 version ".tbz"))
1750 (file-name (string-append name "-" version ".tar.gz"))
1751 (sha256
1752 (base32
1753 "1p45sawchmrkr22gkmydjc4ary23pisp58zsnb7iq7d82nxs1lfq"))))
1754 (build-system ocaml-build-system)
1755 (arguments
1756 `(#:build-flags (list "build" "--tests" "true")
1757 #:phases
1758 (modify-phases %standard-phases
1759 (delete 'configure))))
1760 (native-inputs
1761 `(("topkg" ,ocaml-topkg)
1762 ("opam" ,opam)
1763 ("rresult" ,ocaml-rresult)
1764 ("bos" ,ocaml-bos)
1765 ("alcotest" ,ocaml-alcotest)))
1766 (home-page "https://github.com/mirage/ocaml-base64")
1767 (synopsis "Base64 encoding for OCaml")
1768 (description "Base64 is a group of similar binary-to-text encoding schemes
1769 that represent binary data in an ASCII string format by translating it into a
1770 radix-64 representation. It is specified in RFC 4648.")
1771 (license license:isc)))
1772
1773 (define-public ocamlify
1774 (package
1775 (name "ocamlify")
1776 (version "0.0.2")
1777 (source (origin
1778 (method url-fetch)
1779 (uri (ocaml-forge-uri name version 1209))
1780 (sha256
1781 (base32
1782 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
1783 (build-system ocaml-build-system)
1784 ; tests are done during build
1785 (arguments
1786 `(#:phases
1787 (modify-phases %standard-phases
1788 (delete 'check))))
1789 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
1790 (synopsis "Include files in OCaml code")
1791 (description "OCamlify allows to create OCaml source code by including
1792 whole files into OCaml string or string list. The code generated can be
1793 compiled as a standard OCaml file. It allows embedding external resources as
1794 OCaml code.")
1795 (license license:lgpl2.1+))); with the OCaml static compilation exception
1796
1797 (define-public omake
1798 (package
1799 (name "omake")
1800 (version "0.10.1")
1801 (source (origin
1802 (method url-fetch)
1803 (uri (string-append "http://download.camlcity.org/download/"
1804 "omake-" version ".tar.gz"))
1805 (sha256
1806 (base32
1807 "093ansbppms90hiqvzar2a46fj8gm9iwnf8gn38s6piyp70lrbsj"))
1808 (patches (search-patches "omake-fix-non-determinism.patch"))))
1809 (build-system ocaml-build-system)
1810 (arguments
1811 `(#:make-flags
1812 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
1813 #:tests? #f ; no test target
1814 #:phases
1815 (modify-phases %standard-phases
1816 (add-before 'configure 'fix-makefile
1817 (lambda* (#:key outputs #:allow-other-keys)
1818 (substitute* "mk/osconfig_unix.mk"
1819 (("CC = cc") "CC = gcc")))))))
1820 (native-inputs `(("hevea" ,hevea)))
1821 (home-page "http://projects.camlcity.org/projects/omake.html")
1822 (synopsis "Build system designed for scalability and portability")
1823 (description "Similar to make utilities you may have used, but it features
1824 many additional enhancements, including:
1825
1826 @enumerate
1827 @item Support for projects spanning several directories or directory hierarchies.
1828 @item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
1829 with full support for incremental builds.
1830 @item Dependency analysis takes the command lines into account — whenever the
1831 command line used to build a target changes, the target is considered
1832 out-of-date.
1833 @item Fully scriptable, includes a library that providing support for standard
1834 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
1835 @end enumerate")
1836 (license (list license:lgpl2.1 ; libmojave
1837 license:expat ; OMake scripts
1838 license:gpl2)))) ; OMake itself, with ocaml linking exception
1839 ; see LICENSE.OMake
1840
1841 (define-public ocaml-batteries
1842 (package
1843 (name "ocaml-batteries")
1844 (version "2.5.3")
1845 (source (origin
1846 (method url-fetch)
1847 (uri (ocaml-forge-uri "batteries" version 1650))
1848 (sha256
1849 (base32
1850 "1a97w3x2l1jr5x9kj5gqm1x6b0q9fjqdcsvls7arnl3bvzgsia0n"))))
1851 (build-system ocaml-build-system)
1852 (native-inputs
1853 `(("qtest" ,ocaml-qtest)
1854 ("bisect" ,ocaml-bisect)
1855 ("ounit" ,ocaml-ounit)))
1856 (arguments
1857 `(#:phases
1858 (modify-phases %standard-phases
1859 (delete 'check) ; tests are run by the build phase
1860 (replace 'build
1861 (lambda* (#:key outputs #:allow-other-keys)
1862 (zero? (system* "ocaml" "setup.ml" "-build")))))))
1863 (home-page "http://batteries.forge.ocamlcore.org/")
1864 (synopsis "Development platform for the OCaml programming language")
1865 (description "Define a standard set of libraries which may be expected on
1866 every compliant installation of OCaml and organize these libraries into a
1867 hierarchy of modules.")
1868 (license license:lgpl2.1+)))
1869
1870 (define-public ocaml-pcre
1871 (package
1872 (name "ocaml-pcre")
1873 (version "7.2.3")
1874 (source (origin
1875 (method url-fetch)
1876 (uri (string-append "https://github.com/mmottl/pcre-ocaml/archive"
1877 "/v" version ".tar.gz"))
1878 (file-name (string-append name "-" version ".tar.gz"))
1879 (sha256
1880 (base32
1881 "0rj6dw79px4sj2kq0iss2nzq3rnsn9wivvc0f44wa1mppr6njfb3"))))
1882 (build-system ocaml-build-system)
1883 (arguments
1884 `(#:phases
1885 (modify-phases %standard-phases
1886 (add-after 'install 'link-lib
1887 (lambda* (#:key outputs #:allow-other-keys)
1888 (let* ((out (assoc-ref outputs "out"))
1889 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
1890 (lib (string-append out "/lib/ocaml/site-lib/pcre")))
1891 (mkdir-p stubs)
1892 (symlink (string-append lib "/dllpcre_stubs.so")
1893 (string-append stubs "/dllpcre_stubs.so"))))))))
1894 (native-inputs
1895 `(("batteries" ,ocaml-batteries)
1896 ("pcre:bin" ,pcre "bin")))
1897 (propagated-inputs `(("pcre" ,pcre)))
1898 (home-page "https://mmottl.github.io/pcre-ocaml")
1899 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
1900 (description "Pcre-ocaml offers library functions for string pattern
1901 matching and substitution, similar to the functionality offered by the Perl
1902 language.")
1903 (license license:lgpl2.1+))); with the OCaml link exception
1904
1905 (define-public ocaml-expect
1906 (package
1907 (name "ocaml-expect")
1908 (version "0.0.5")
1909 (source (origin
1910 (method url-fetch)
1911 (uri (ocaml-forge-uri name version 1372))
1912 (sha256
1913 (base32
1914 "07xq8w2x2vffc32z7vk6y14jwbfb1cw0m2lm1jzi60hnr1dvg8by"))))
1915 (build-system ocaml-build-system)
1916 (native-inputs
1917 `(("ocaml-pcre" ,ocaml-pcre)
1918 ("ounit" ,ocaml-ounit)))
1919 (propagated-inputs `(("batteries" ,ocaml-batteries)))
1920 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
1921 (synopsis "Simple implementation of expect")
1922 (description "Help building unitary testing of interactive program. You
1923 can match the question using a regular expression or a timeout.")
1924 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
1925
1926 (define-public ocaml-fileutils
1927 (package
1928 (name "ocaml-fileutils")
1929 (version "0.5.1")
1930 (source (origin
1931 (method url-fetch)
1932 (uri (ocaml-forge-uri name version 1651))
1933 (sha256
1934 (base32
1935 "0g6zx2rcvacklxyli19ixcf6ich9ipxsps4k3jz98f5zlaab0a7g"))))
1936 (build-system ocaml-build-system)
1937 (native-inputs `(("ounit" ,ocaml-ounit)))
1938 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
1939 (synopsis "Pure OCaml functions to manipulate real file and filename")
1940 (description "Library to provide pure OCaml functions to manipulate real
1941 file (POSIX like) and filename.")
1942 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
1943
1944 (define-public ocaml-oasis
1945 (package
1946 (name "ocaml-oasis")
1947 (version "0.4.8")
1948 (source (origin
1949 (method url-fetch)
1950 (uri (ocaml-forge-uri name version 1669))
1951 (sha256
1952 (base32
1953 "1ln7vc7ip6s5xbi20mhnn087xi4a2m5vqawx0703qqnfkzhmslqy"))
1954 (modules '((guix build utils)))
1955 (snippet
1956 '(substitute* "test/test-main/Test.ml"
1957 ;; most of these tests fail because ld cannot find crti.o, but according
1958 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
1959 ;; are set correctly whene LD_LIBRARY_PATH is defined beforhand.
1960 (("TestBaseCompat.tests;") "")
1961 (("TestExamples.tests;") "")
1962 (("TestFull.tests;") "")
1963 (("TestPluginDevFiles.tests;") "")
1964 (("TestPluginInternal.tests;") "")
1965 (("TestPluginOCamlbuild.tests;") "")
1966 (("TestPluginOMake.tests;") "")))))
1967 (build-system ocaml-build-system)
1968 (native-inputs
1969 `(("ocamlify" ,ocamlify)
1970 ("ocamlmod" ,ocamlmod)
1971 ("ounit" ,ocaml-ounit)
1972 ("omake" ,omake)
1973 ("ocaml-expect" ,ocaml-expect)
1974 ("ocaml-pcre" ,ocaml-pcre)
1975 ("ocaml-fileutils" ,ocaml-fileutils)
1976 ("camlp4" ,camlp4)
1977 ("texlive" ,texlive)
1978 ("pkg-config" ,pkg-config)))
1979 (home-page "https://oasis.forge.ocamlcore.org")
1980 (synopsis "Integrates a configure, build, install system in OCaml projects")
1981 (description "OASIS is a tool to integrate a configure, build and install
1982 system in your OCaml projects. It helps to create standard entry points in your
1983 build system and allows external tools to analyse your project easily.")
1984 (license license:lgpl2.1+))) ; with ocaml static compilation exception
1985
1986 (define-public ocaml-js-build-tools
1987 (package
1988 (name "ocaml-js-build-tools")
1989 (version "113.33.06")
1990 (source (janestreet-origin "js-build-tools" version
1991 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
1992 (native-inputs
1993 `(("oasis" ,ocaml-oasis)
1994 ("opam" ,opam)))
1995 (build-system ocaml-build-system)
1996 (arguments janestreet-arguments)
1997 (home-page "https://github.com/janestreet/js-build-tools")
1998 (synopsis "Collection of tools to help building Jane Street Packages")
1999 (description "This package contains tools to help building Jane Street
2000 packages, but can be used for other purposes. It contains:
2001 @enumerate
2002 @item an @command{oasis2opam-install} tool to produce a @file{.install} file
2003 from the oasis build log
2004 @item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2005 @end enumerate")
2006 (license license:asl2.0)))
2007
2008 (define-public ocaml-bin-prot
2009 (package
2010 (name "ocaml-bin-prot")
2011 (version "113.33.03")
2012 (source (janestreet-origin "bin_prot" version
2013 "1ws8c017z8nbj3vw92ndvjk9011f71rmp3llncbv8r5fc76wqv3l"))
2014 (native-inputs
2015 `(("js-build-tools" ,ocaml-js-build-tools)
2016 ("opam" ,opam)))
2017 (build-system ocaml-build-system)
2018 (arguments janestreet-arguments)
2019 (home-page "https://github.com/janestreet/bin_prot/")
2020 (synopsis "Binary protocol generator")
2021 (description "This library contains functionality for reading and writing
2022 OCaml-values in a type-safe binary protocol. It is extremely efficient,
2023 typically supporting type-safe marshalling and unmarshalling of even highly
2024 structured values at speeds sufficient to saturate a gigabit connection. The
2025 protocol is also heavily optimized for size, making it ideal for long-term
2026 storage of large amounts of data.")
2027 (license license:asl2.0)))