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