gnu: Add ocrodjvu.
[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>
0f654e63 8;;; Copyright © 2016, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
efeda080 9;;; Copyright © 2016-2020 Julien Lepiller <julien@lepiller.eu>
ec436717 10;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
338ae8eb 11;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
2b4d2a4d 12;;; Copyright © 2018 Peter Kreye <kreyepr@gmail.com>
cdcbccd1 13;;; Copyright © 2018, 2019 Gabriel Hondet <gabrielhondet@gmail.com>
59a07504 14;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
fa5d6e4c 15;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
eb1ebabf 16;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
05b90a4a 17;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
87f31bf2 18;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
d192efae
CR
19;;;
20;;; This file is part of GNU Guix.
21;;;
22;;; GNU Guix is free software; you can redistribute it and/or modify it
23;;; under the terms of the GNU General Public License as published by
24;;; the Free Software Foundation; either version 3 of the License, or (at
25;;; your option) any later version.
26;;;
27;;; GNU Guix is distributed in the hope that it will be useful, but
28;;; WITHOUT ANY WARRANTY; without even the implied warranty of
29;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30;;; GNU General Public License for more details.
31;;;
32;;; You should have received a copy of the GNU General Public License
33;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
34
35(define-module (gnu packages ocaml)
d192efae 36 #:use-module (gnu packages)
eb1ebabf 37 #:use-module (gnu packages algebra)
44c23cb8 38 #:use-module (gnu packages autotools)
0705f79c 39 #:use-module (gnu packages base)
88191ace
JL
40 #:use-module (gnu packages bison)
41 #:use-module (gnu packages boost)
69b8f08c 42 #:use-module (gnu packages compression)
1ff755d1
DC
43 #:use-module (gnu packages curl)
44 #:use-module (gnu packages emacs)
eeb883cb 45 #:use-module (gnu packages emacs-xyz)
88191ace 46 #:use-module (gnu packages flex)
1ff755d1 47 #:use-module (gnu packages gcc)
90907a22 48 #:use-module (gnu packages ghostscript)
1fdfbadf 49 #:use-module (gnu packages glib)
1ff755d1
DC
50 #:use-module (gnu packages gnome)
51 #:use-module (gnu packages gtk)
1fdfbadf 52 #:use-module (gnu packages libevent)
69d08bb1 53 #:use-module (gnu packages libffi)
cd1562ef 54 #:use-module (gnu packages llvm)
a747baba 55 #:use-module (gnu packages m4)
59a07504 56 #:use-module (gnu packages maths)
ddf2b503 57 #:use-module (gnu packages multiprecision)
a34cedc4 58 #:use-module (gnu packages ncurses)
f8a12de1 59 #:use-module (gnu packages pcre)
1ff755d1
DC
60 #:use-module (gnu packages perl)
61 #:use-module (gnu packages pkg-config)
fc3d70ae 62 #:use-module (gnu packages protobuf)
1ff755d1 63 #:use-module (gnu packages python)
ec9d9325 64 #:use-module (gnu packages python-xyz)
05b90a4a 65 #:use-module (gnu packages rsync)
a9e9fd15 66 #:use-module (gnu packages sdl)
cd0322a3 67 #:use-module (gnu packages sqlite)
1ff755d1
DC
68 #:use-module (gnu packages tex)
69 #:use-module (gnu packages texinfo)
44c23cb8 70 #:use-module (gnu packages time)
37f17e2a 71 #:use-module (gnu packages tls)
7a1d25c4 72 #:use-module (gnu packages virtualization)
c5196ac7 73 #:use-module (gnu packages web-browsers)
7a76b4af 74 #:use-module (gnu packages xml)
1ff755d1 75 #:use-module (gnu packages xorg)
effc8325 76 #:use-module (guix build-system dune)
db1eb632 77 #:use-module (guix build-system emacs)
1ff755d1 78 #:use-module (guix build-system gnu)
7a76b4af 79 #:use-module (guix build-system ocaml)
1ff755d1 80 #:use-module (guix download)
8ae540a2 81 #:use-module (guix git-download)
1ff755d1
DC
82 #:use-module ((guix licenses) #:prefix license:)
83 #:use-module (guix packages)
84 #:use-module (guix svn-download)
1345231c 85 #:use-module (guix utils)
0ad5f809 86 #:use-module ((srfi srfi-1) #:hide (zip)))
d192efae 87
56f73ead
JL
88;; A shortcut for files from ocaml forge. Downloaded files are computed from
89;; their number, not their name.
90(define (ocaml-forge-uri name version file-number)
91 (string-append "https://forge.ocamlcore.org/frs/download.php/"
92 (number->string file-number) "/" name "-" version
93 ".tar.gz"))
94
f95ebba5
JL
95;; Janestreet packages are found in a similar way and all need the same patch.
96(define (janestreet-origin name version hash)
97 (origin (method url-fetch)
98 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/"
99 (version-major+minor version) "/files/"
100 name "-" version ".tar.gz"))
101 (sha256 (base32 hash))
102 (modules '((guix build utils)))
103 (snippet
104 (let ((pattern (string-append "lib/" name)))
105 `(begin
106 ;; install.ml contains an invalid reference to the ppx file and
107 ;; propagates this error to the generated META file. It
108 ;; looks for it in the "lib" directory, but it is installed in
109 ;; "lib/ocaml/site-lib/package". This substitute does not change
110 ;; this file for non ppx packages.
111 (substitute* "install.ml"
112 ((,pattern) (string-append "lib/ocaml/site-lib/" ,name)))
113 ;; The standard Makefile would try to install janestreet modules
114 ;; in OCaml's directory in the store, which is read-only.
115 (substitute* "Makefile"
116 (("--prefix")
6cbee49d
MW
117 "--libdir $(LIBDIR) --prefix"))
118 #t)))))
f95ebba5
JL
119
120;; They also require almost the same set of arguments
121(define janestreet-arguments
122 `(#:use-make? #t
123 #:make-flags
124 (list (string-append "CONFIGUREFLAGS=--prefix "
125 (assoc-ref %outputs "out")
126 " --enable-tests")
127 (string-append "LIBDIR="
128 (assoc-ref %outputs "out")
129 "/lib/ocaml/site-lib")
130 ;; for ocaml-bin-prot, otherwise ignored
131 (string-append "OCAML_TOPLEVEL_PATH="
132 (assoc-ref %build-inputs "findlib")
133 "/lib/ocaml/site-lib"))
134 #:phases (modify-phases %standard-phases (delete 'configure))))
135
0c837082 136(define-public ocaml-4.11
d192efae
CR
137 (package
138 (name "ocaml")
0c837082 139 (version "4.11.1")
d192efae 140 (source (origin
69b8f08c
MW
141 (method url-fetch)
142 (uri (string-append
143 "http://caml.inria.fr/pub/distrib/ocaml-"
144 (version-major+minor version)
145 "/ocaml-" version ".tar.xz"))
146 (sha256
147 (base32
0c837082 148 "0k4521c0p10c5ams6vjv5qkkjhmpkb0bfn04llcz46ah0f3r2jpa"))))
d192efae 149 (build-system gnu-build-system)
6372e336
JN
150 (native-search-paths
151 (list (search-path-specification
152 (variable "OCAMLPATH")
e6876cb9 153 (files (list "lib/ocaml" "lib/ocaml/site-lib")))
796a17ab
JL
154 (search-path-specification
155 (variable "CAML_LD_LIBRARY_PATH")
564cf93f
JL
156 (files (list "lib/ocaml/site-lib/stubslibs"
157 "lib/ocaml/site-lib/stublibs")))))
69b8f08c
MW
158 (native-inputs
159 `(("perl" ,perl)
160 ("pkg-config" ,pkg-config)))
161 (inputs
162 `(("libx11" ,libx11)
2f6d3e41 163 ;; For libiberty, needed for objdump support.
e1f32cf1 164 ("gcc:lib" ,(canonical-package gcc) "lib")
2f6d3e41 165 ("zlib" ,zlib))) ;also needed for objdump support
d192efae 166 (arguments
7b99aa04 167 `(#:phases
69b8f08c
MW
168 (modify-phases %standard-phases
169 (add-after 'unpack 'patch-/bin/sh-references
2b1f7b83
DC
170 (lambda* (#:key inputs #:allow-other-keys)
171 (let* ((sh (string-append (assoc-ref inputs "bash")
172 "/bin/sh"))
173 (quoted-sh (string-append "\"" sh "\"")))
174 (with-fluids ((%default-port-encoding #f))
175 (for-each
176 (lambda (file)
177 (substitute* file
178 (("\"/bin/sh\"")
179 (begin
180 (format (current-error-port) "\
69b8f08c 181patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%"
2b1f7b83
DC
182 file quoted-sh)
183 quoted-sh))))
184 (find-files "." "\\.ml$"))
185 #t))))
69b8f08c 186 (replace 'build
2b1f7b83 187 (lambda _
bb29e855
RW
188 (invoke "make" "-j" (number->string (parallel-job-count))
189 "world.opt")))
7b99aa04 190 (replace 'check
2b1f7b83
DC
191 (lambda _
192 (with-directory-excursion "testsuite"
c3634df2 193 (invoke "make" "all")))))))
69b8f08c 194 (home-page "https://ocaml.org/")
d192efae
CR
195 (synopsis "The OCaml programming language")
196 (description
197 "OCaml is a general purpose industrial-strength programming language with
35b9e423 198an emphasis on expressiveness and safety. Developed for more than 20 years at
d192efae
CR
199Inria it benefits from one of the most advanced type systems and supports
200functional, imperative and object-oriented styles of programming.")
69b8f08c
MW
201 ;; The compiler is distributed under qpl1.0 with a change to choice of
202 ;; law: the license is governed by the laws of France. The library is
203 ;; distributed under lgpl2.0.
d8e0a08c 204 (license (list license:qpl license:lgpl2.0))))
a34cedc4 205
0c837082
JL
206(define-public ocaml-4.09
207 (package
208 (inherit ocaml-4.11)
209 (version "4.09.0")
210 (source (origin
211 (method url-fetch)
212 (uri (string-append
213 "http://caml.inria.fr/pub/distrib/ocaml-"
214 (version-major+minor version)
215 "/ocaml-" version ".tar.xz"))
216 (sha256
217 (base32
218 "1v3z5ar326f3hzvpfljg4xj8b9lmbrl53fn57yih1bkbx3gr3yzj"))))))
219
7b99aa04
JL
220(define-public ocaml-4.07
221 (package
222 (inherit ocaml-4.09)
223 (version "4.07.1")
224 (source (origin
225 (method url-fetch)
226 (uri (string-append
227 "http://caml.inria.fr/pub/distrib/ocaml-"
228 (version-major+minor version)
229 "/ocaml-" version ".tar.xz"))
230 (sha256
231 (base32
232 "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z"))))
233 (arguments
234 (substitute-keyword-arguments (package-arguments ocaml-4.09)
235 ((#:phases phases)
236 `(modify-phases ,phases
237 (replace 'configure
238 (lambda* (#:key outputs #:allow-other-keys)
239 (let* ((out (assoc-ref outputs "out"))
240 (mandir (string-append out "/share/man")))
241 ;; Custom configure script doesn't recognize
242 ;; --prefix=<PREFIX> syntax (with equals sign).
243 (invoke "./configure"
244 "--prefix" out
245 "--mandir" mandir))))))))))
246
0a173fe2 247(define-public ocaml ocaml-4.11)
564cf93f
JL
248
249(define-public ocamlbuild
912f4400
JL
250 (package
251 (name "ocamlbuild")
7a4780ce 252 (version "0.14.0")
8da3f78e
TGR
253 (source
254 (origin
255 (method git-fetch)
256 (uri (git-reference
b0e7b699 257 (url "https://github.com/ocaml/ocamlbuild")
8da3f78e
TGR
258 (commit version)))
259 (file-name (git-file-name name version))
260 (sha256
7a4780ce
JL
261 (base32 "1hb5mcdz4wv7sh1pj7dq9q4fgz5h3zg7frpiya6s8zd3ypwzq0kh"))))
262 (build-system ocaml-build-system)
912f4400 263 (arguments
7a4780ce 264 `(#:make-flags
912f4400
JL
265 (list (string-append "OCAMLBUILD_PREFIX=" (assoc-ref %outputs "out"))
266 (string-append "OCAMLBUILD_BINDIR=" (assoc-ref %outputs "out")
7a4780ce 267 "/bin")
912f4400 268 (string-append "OCAMLBUILD_LIBDIR=" (assoc-ref %outputs "out")
7a4780ce 269 "/lib/ocaml/site-lib")
912f4400 270 (string-append "OCAMLBUILD_MANDIR=" (assoc-ref %outputs "out")
7a4780ce 271 "/share/man"))
912f4400
JL
272 #:phases
273 (modify-phases %standard-phases
7a4780ce
JL
274 (delete 'configure))
275 ; some failures because of changes in OCaml's error message formating
276 #:tests? #f))
912f4400
JL
277 (home-page "https://github.com/ocaml/ocamlbuild")
278 (synopsis "OCaml build tool")
279 (description "OCamlbuild is a generic build tool, that has built-in rules
280for building OCaml library and programs.")
281 (license license:lgpl2.1+)))
564cf93f 282
bb338a7f
JL
283(define-public ocaml-extlib
284 (package
285 (name "ocaml-extlib")
bb79af86 286 (version "1.7.7")
bb338a7f
JL
287 (source (origin
288 (method url-fetch)
bb79af86 289 (uri (string-append "https://ygrek.org/p/release/ocaml-extlib/"
bb338a7f
JL
290 "extlib-" version ".tar.gz"))
291 (sha256
292 (base32
bb79af86 293 "1sxmzc1mx3kg62j8kbk0dxkx8mkf1rn70h542cjzrziflznap0s1"))))
bb338a7f
JL
294 (build-system ocaml-build-system)
295 (arguments
296 `(#:phases
297 (modify-phases %standard-phases
298 (delete 'configure))))
299 (native-inputs
300 `(("ocaml-cppo" ,ocaml-cppo)))
301 (home-page "https://github.com/ygrek/ocaml-extlib")
302 (synopsis "Complete and small extension for OCaml standard library")
303 (description "This library adds new functions to OCaml standard library
304modules, modifies some functions in order to get better performances or
305safety (tail-recursive) and also provides new modules which should be useful
306for day to day programming.")
307 ;; With static-linking exception
308 (license license:lgpl2.1+)))
309
718fadb8
JL
310(define-public ocaml-cudf
311 (package
312 (name "ocaml-cudf")
313 (version "0.9")
314 (source
315 (origin
316 (method url-fetch)
317 (uri "https://gforge.inria.fr/frs/download.php/36602/cudf-0.9.tar.gz")
318 (sha256
319 (base32
320 "0771lwljqwwn3cryl0plny5a5dyyrj4z6bw66ha5n8yfbpcy8clr"))))
321 (build-system ocaml-build-system)
322 (propagated-inputs `(("ocaml-extlib" ,ocaml-extlib)))
323 (native-inputs
324 `(("perl" ,perl)
325 ("ocamlbuild" ,ocamlbuild)
326 ("ocaml-ounit" ,ocaml-ounit)))
327 (arguments
328 `(#:make-flags
329 (list
330 "all" "opt"
331 (string-append "BINDIR=" (assoc-ref %outputs "out")
332 "/bin"))
333 #:phases
334 (modify-phases %standard-phases
335 (delete 'configure))))
336 (home-page "http://www.mancoosi.org/cudf/")
337 (synopsis "CUDF library (part of the Mancoosi tools)")
338 (description "CUDF (for Common Upgradeability Description Format) is a
339format for describing upgrade scenarios in package-based Free and Open Source
340Software distribution.")
341 ;; With static-linking exception
342 (license license:lgpl2.1+)))
343
c4262cc9
JL
344(define-public ocaml-mccs
345 (package
346 (name "ocaml-mccs")
7ae38a04 347 (version "1.1+11")
c4262cc9
JL
348 (source (origin
349 (method git-fetch)
350 (uri (git-reference
351 (url "https://github.com/AltGr/ocaml-mccs")
352 (commit version)))
353 (file-name (git-file-name name version))
354 (sha256
355 (base32
7ae38a04 356 "1gsad5cj03256i36wdjqk5pg51pyd48rpjazf0gfaakrn8lk438g"))))
c4262cc9
JL
357 (build-system dune-build-system)
358 (propagated-inputs `(("ocaml-cudf" ,ocaml-cudf)))
91c19e76 359 (home-page "https://www.i3s.unice.fr/~cpjm/misc/")
c4262cc9
JL
360 (synopsis "Upgrade path problem solver")
361 (description "Mccs (Multi Criteria CUDF Solver) is a CUDF problem solver.
362Mccs take as input a CUDF problem and computes the best solution according to
363a set of criteria. It relies on a Integer Programming solver or a
364Pseudo Boolean solver to achieve its task. Mccs can use a wide set of
365underlying solvers like Cplex, Gurobi, Lpsolver, Glpk, CbC, SCIP or WBO.")
366 (license (list
367 license:bsd-3
368 license:gpl3+
369 ;; With static-linking exception
370 license:lgpl2.1+))))
371
ec9d9325
JL
372(define-public ocaml-dose3
373 (package
374 (name "ocaml-dose3")
375 (version "5.0.1")
376 (source (origin
377 (method url-fetch)
378 (uri "https://gforge.inria.fr/frs/download.php/file/36063/dose3-5.0.1.tar.gz")
379 (sha256
380 (base32
381 "00yvyfm4j423zqndvgc1ycnmiffaa2l9ab40cyg23pf51qmzk2jm"))
382 (patches
383 (search-patches
30a6cd7c 384 "ocaml-dose3-add-unix-dependency.patch"
ec9d9325
JL
385 "ocaml-dose3-Fix-for-ocaml-4.06.patch"
386 "ocaml-dose3-dont-make-printconf.patch"
387 "ocaml-dose3-Install-mli-cmx-etc.patch"))))
388 (build-system ocaml-build-system)
389 (arguments
390 `(#:configure-flags
391 (list (string-append "SHELL="
392 (assoc-ref %build-inputs "bash")
393 "/bin/sh"))
394 #:make-flags
395 (list (string-append "LIBDIR="
396 (assoc-ref %outputs "out")
397 "/lib/ocaml/site-lib"))))
398 (propagated-inputs
399 `(("ocaml-graph" ,ocaml-graph)
400 ("ocaml-cudf" ,ocaml-cudf)
401 ("ocaml-extlib" ,ocaml-extlib)
402 ("ocaml-re" ,ocaml-re)))
403 (native-inputs
404 `(("perl" ,perl)
405 ("python" ,python-2) ; for a test script
406 ("python2-pyyaml" ,python2-pyyaml) ; for a test script
407 ("ocaml-extlib" ,ocaml-extlib)
408 ("ocamlbuild" ,ocamlbuild)
409 ("ocaml-cppo" ,ocaml-cppo)))
410 (home-page "http://www.mancoosi.org/software/")
411 (synopsis "Package distribution management framework")
412 (description "Dose3 is a framework made of several OCaml libraries for
413managing distribution packages and their dependencies. Though not tied to
414any particular distribution, dose3 constitutes a pool of libraries which
415enable analyzing packages coming from various distributions. Besides basic
416functionalities for querying and setting package properties, dose3 also
417implements algorithms for solving more complex problems such as monitoring
418package evolutions, correct and complete dependency resolution and
419repository-wide uninstallability checks.")
420 ;; with static-linking exception
421 (license license:lgpl2.1+)))
422
d1358ab6
JL
423(define-public ocaml-opam-file-format
424 (package
425 (name "ocaml-opam-file-format")
426 (version "2.0.0")
427 (source (origin
428 (method git-fetch)
429 (uri (git-reference
430 (url "https://github.com/ocaml/opam-file-format")
431 (commit version)))
b7a4cb52 432 (file-name (git-file-name name version))
d1358ab6
JL
433 (sha256
434 (base32
435 "0fqb99asnair0043hhc8r158d6krv5nzvymd0xwycr5y72yrp0hv"))))
436 (build-system ocaml-build-system)
437 (arguments
438 `(#:tests? #f; No tests
439 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
440 "/lib/ocaml/site-lib"))
441 #:phases
442 (modify-phases %standard-phases
443 (delete 'configure))))
444 (home-page "https://opam.ocaml.org")
445 (synopsis "Parser and printer for the opam file syntax")
446 (description "This package contains a parser and a pretty-printer for
7230f6d5 447the opam file format.")
d1358ab6
JL
448 ;; With static-linking exception
449 (license license:lgpl2.1+)))
450
a34cedc4
LC
451(define-public opam
452 (package
453 (name "opam")
ef841e96 454 (version "2.0.7")
a34cedc4 455 (source (origin
e9b86fa0
JL
456 (method git-fetch)
457 (uri (git-reference
458 (url "https://github.com/ocaml/opam")
459 (commit version)))
460 (file-name (git-file-name name version))
a34cedc4
LC
461 (sha256
462 (base32
ef841e96 463 "1p719ccn9wnzk6impsnwr809yh507h8f37dx9nn64b1hsyb5z8ax"))))
e9b86fa0 464 (build-system ocaml-build-system)
a34cedc4 465 (arguments
e9b86fa0
JL
466 `(#:configure-flags
467 (list (string-append "SHELL="
468 (assoc-ref %build-inputs "bash")
469 "/bin/sh"))
a34cedc4
LC
470
471 ;; For some reason, 'ocp-build' needs $TERM to be set.
e9b86fa0
JL
472 #:make-flags
473 (list "TERM=screen"
474 (string-append "SHELL="
475 (assoc-ref %build-inputs "bash")
476 "/bin/sh"))
477
a34cedc4
LC
478 #:test-target "tests"
479
2385cab1
EB
480 #:phases (modify-phases %standard-phases
481 (add-before 'build 'pre-build
482 (lambda* (#:key inputs make-flags #:allow-other-keys)
7a1d25c4
JL
483 (let ((bash (assoc-ref inputs "bash"))
484 (bwrap (string-append (assoc-ref inputs "bubblewrap")
485 "/bin/bwrap")))
2385cab1
EB
486 (substitute* "src/core/opamSystem.ml"
487 (("\"/bin/sh\"")
7a1d25c4
JL
488 (string-append "\"" bash "/bin/sh\""))
489 (("getconf")
490 (which "getconf")))
491 ;; Use bwrap from the store directly.
492 (substitute* "src/state/shellscripts/bwrap.sh"
493 (("-v bwrap") (string-append "-v " bwrap))
2a6ba9ff
JL
494 (("exec bwrap") (string-append "exec " bwrap))
495 ;; Mount /gnu and /run/current-system in the
496 ;; isolated environment when building with opam.
497 ;; This is necessary for packages to find external
498 ;; dependencies, such as a C compiler, make, etc...
e9b86fa0
JL
499 (("^add_sys_mounts /usr")
500 "add_sys_mounts /gnu /run/current-system /usr"))
7a1d25c4
JL
501 (substitute* "src/client/opamInitDefaults.ml"
502 (("\"bwrap\"") (string-append "\"" bwrap "\"")))
efeda080
JL
503 ;; Generating the documentation needs write access
504 (for-each
505 (lambda (f) (chmod f #o644))
506 (find-files "doc" "."))
7a1d25c4 507 #t)))
2385cab1
EB
508 (add-before 'check 'pre-check
509 (lambda _
05b90a4a
MB
510 ;; The "repo" test attempts to open some of these files O_WRONLY
511 ;; and fails with a bogus "OpamSystem.File_not_found" otherwise.
512 (for-each
513 (lambda (f) (chmod f #o644))
514 (find-files "tests/packages" "\\.opam$"))
515
516 (substitute* "tests/Makefile"
517 (("/usr/bin/printf")
518 (which "printf"))
519 ;; By default tests run twice: once with a "local" repository
520 ;; and once with a git repository: disable the git tests to
521 ;; avoid the dependency.
522 (("all: local git")
523 "all: local"))
7a1d25c4 524 #t)))))
a34cedc4 525 (native-inputs
e9b86fa0 526 `(("dune" ,dune)
e9b86fa0 527 ("ocaml-cppo" ,ocaml-cppo)
05b90a4a
MB
528
529 ;; For tests.
530 ("openssl" ,openssl)
531 ("python" ,python-wrapper)
532 ("rsync" ,rsync)
533 ("unzip" ,unzip)
534 ("which" ,which)))
a34cedc4
LC
535 (inputs
536 `(("ocaml" ,ocaml)
537 ("ncurses" ,ncurses)
7a1d25c4
JL
538 ("curl" ,curl)
539 ("bubblewrap" ,bubblewrap)))
e9b86fa0
JL
540 (propagated-inputs
541 `(("ocaml-cmdliner" ,ocaml-cmdliner)
542 ("ocaml-dose3" ,ocaml-dose3)
543 ("ocaml-mccs" ,ocaml-mccs)
544 ("ocaml-opam-file-format" ,ocaml-opam-file-format)
545 ("ocaml-re" ,ocaml-re)))
a34cedc4
LC
546 (home-page "http://opam.ocamlpro.com/")
547 (synopsis "Package manager for OCaml")
548 (description
549 "OPAM is a tool to manage OCaml packages. It supports multiple
550simultaneous compiler installations, flexible package constraints, and a
551Git-friendly development workflow.")
552
553 ;; The 'LICENSE' file waives some requirements compared to LGPLv3.
d8e0a08c 554 (license license:lgpl3)))
83f4dc36
MW
555
556(define-public camlp5
557 (package
558 (name "camlp5")
61949dbc 559 (version "7.13")
6aade739
TGR
560 (source
561 (origin
562 (method git-fetch)
563 (uri (git-reference
b0e7b699 564 (url "https://github.com/camlp5/camlp5")
6aade739
TGR
565 (commit (string-append "rel" (string-delete #\. version)))))
566 (file-name (git-file-name name version))
567 (sha256
61949dbc 568 (base32 "1d9spy3f5ahixm8nxxk086kpslzva669a5scn49am0s7vx4i71kp"))))
83f4dc36
MW
569 (build-system gnu-build-system)
570 (inputs
571 `(("ocaml" ,ocaml)))
572 (arguments
573 `(#:tests? #f ; XXX TODO figure out how to run the tests
574 #:phases
575 (modify-phases %standard-phases
576 (replace 'configure
577 (lambda* (#:key outputs #:allow-other-keys)
578 (let* ((out (assoc-ref outputs "out"))
579 (mandir (string-append out "/share/man")))
580 ;; Custom configure script doesn't recognize
581 ;; --prefix=<PREFIX> syntax (with equals sign).
402dedf8
MW
582 (invoke "./configure"
583 "--prefix" out
584 "--mandir" mandir))))
564cf93f
JL
585 (add-before 'build 'fix-/bin-references
586 (lambda _
587 (substitute* "config/Makefile"
588 (("/bin/rm") "rm"))
589 #t))
83f4dc36
MW
590 (replace 'build
591 (lambda _
402dedf8
MW
592 (invoke "make" "-j" (number->string
593 (parallel-job-count))
594 "world.opt")))
07b4cd3a
JL
595 ;; Required for findlib to find camlp5's libraries
596 (add-after 'install 'install-meta
597 (lambda* (#:key outputs #:allow-other-keys)
598 (install-file "etc/META" (string-append (assoc-ref outputs "out")
402dedf8
MW
599 "/lib/ocaml/camlp5/"))
600 #t)))))
619ffa02 601 (home-page "https://camlp5.github.io/")
83f4dc36
MW
602 (synopsis "Pre-processor Pretty Printer for OCaml")
603 (description
604 "Camlp5 is a Pre-Processor-Pretty-Printer for Objective Caml. It offers
605tools for syntax (Stream Parsers and Grammars) and the ability to modify the
606concrete syntax of the language (Quotations, Syntax Extensions).")
607 ;; Most files are distributed under bsd-3, but ocaml_stuff/* is under qpl.
d8e0a08c 608 (license (list license:bsd-3 license:qpl))))
d6b7b5ed
MW
609
610(define-public hevea
611 (package
612 (name "hevea")
2da5fcfd 613 (version "2.34")
d6b7b5ed
MW
614 (source (origin
615 (method url-fetch)
8f26f239 616 (uri (string-append "http://hevea.inria.fr/old/"
c917c23e 617 "hevea-" version ".tar.gz"))
d6b7b5ed
MW
618 (sha256
619 (base32
2da5fcfd 620 "1pzyszxw90klpcmhjqrjfc8cw6c0gm4w2blim8ydyxb6rq6qml1s"))))
d6b7b5ed
MW
621 (build-system gnu-build-system)
622 (inputs
623 `(("ocaml" ,ocaml)))
564cf93f
JL
624 (native-inputs
625 `(("ocamlbuild" ,ocamlbuild)))
d6b7b5ed 626 (arguments
c917c23e 627 `(#:tests? #f ; no test suite
d6b7b5ed
MW
628 #:make-flags (list (string-append "PREFIX=" %output))
629 #:phases (modify-phases %standard-phases
f5a8491b
EB
630 (delete 'configure)
631 (add-before 'build 'patch-/bin/sh
632 (lambda _
633 (substitute* "_tags"
634 (("/bin/sh") (which "sh")))
635 #t)))))
d6b7b5ed
MW
636 (home-page "http://hevea.inria.fr/")
637 (synopsis "LaTeX to HTML translator")
638 (description
639 "HeVeA is a LaTeX to HTML translator that generates modern HTML 5. It is
640written in Objective Caml.")
d8e0a08c 641 (license license:qpl)))
1973183b 642
564cf93f
JL
643(define-public ocaml-num
644 (package
645 (name "ocaml-num")
646 (version "1.1")
34f615a2
TGR
647 (source
648 (origin
649 (method git-fetch)
650 (uri (git-reference
b0e7b699 651 (url "https://github.com/ocaml/num")
34f615a2
TGR
652 (commit (string-append "v" version))))
653 (file-name (git-file-name name version))
654 (sha256
655 (base32 "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0"))))
564cf93f
JL
656 (build-system ocaml-build-system)
657 (arguments
658 `(#:phases
659 (modify-phases %standard-phases
660 (delete 'configure)
661 (add-before 'build 'fix-makefile
662 (lambda* (#:key outputs #:allow-other-keys)
663 ;; This package supposes we install to the same directory as
664 ;; the ocaml package.
665 (substitute* "src/META"
666 (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out")
667 "/lib/ocaml/site-lib\"")))
668 (substitute* "src/Makefile"
669 (("\\) \\$\\(STDLIBDIR\\)")
670 (string-append ") " (assoc-ref outputs "out")
671 "/lib/ocaml/site-lib")))
672 #t))
673 (add-after 'install 'fix-stubslib
674 (lambda* (#:key outputs #:allow-other-keys)
675 (format #t "~a~%" (find-files "." ".*.so"))
676 (let ((stubdir (string-append (assoc-ref outputs "out")
38f06188
JL
677 "/lib/ocaml/site-lib/stublibs")))
678 (delete-file stubdir)
564cf93f
JL
679 (mkdir-p stubdir)
680 (install-file "src/dllnums.so" stubdir))
681 #t)))))
682 (home-page "https://github.com/ocaml/num")
683 (synopsis "Arbitrary-precision integer and rational arithmetic")
684 (description "OCaml-Num contains the legacy Num library for
685arbitrary-precision integer and rational arithmetic that used to be part of
686the OCaml core distribution.")
687 (license license:lgpl2.1+))); with linking exception
688
833ade67 689(define-public emacs-tuareg
87f31bf2 690 ;; Last upstream release on Sept., 14th, 2018, since then "Package cl
691 ;; deprecated" or 'lexical-binding' and others had been fixed.
692 (let ((commit "ccde45bbc292123ec20617f1af7f7e19f7481545")
693 (revision "0"))
694 (package
695 (name "emacs-tuareg")
696 (version (git-version "2.2.0" revision commit))
697 (source
698 (origin
699 (method git-fetch)
700 (uri (git-reference
701 (url "https://github.com/ocaml/tuareg")
702 (commit commit)))
703 (file-name (git-file-name name version))
704 (sha256
705 (base32 "1yxv4bnqarilnpg5j7wywall8170hwvm0q4xx06yqjgcn8pq1lac"))))
706 (build-system gnu-build-system)
707 (native-inputs
708 `(("emacs" ,emacs-minimal)
709 ("opam" ,opam)))
710 (arguments
711 `(#:phases
712 (modify-phases %standard-phases
713 (add-after 'unpack 'make-git-checkout-writable
714 (lambda _
715 (for-each make-file-writable (find-files "."))
716 #t))
717 (delete 'configure)
718 (add-before 'install 'fix-install-path
719 (lambda* (#:key outputs #:allow-other-keys)
720 (substitute* "Makefile"
721 (("/emacs/site-lisp")
722 (string-append (assoc-ref %outputs "out")
723 "/share/emacs/site-lisp/")))
724 #t))
725 (add-after 'install 'post-install
726 (lambda* (#:key outputs #:allow-other-keys)
727 (symlink "tuareg.el"
728 (string-append (assoc-ref outputs "out")
729 "/share/emacs/site-lisp/"
730 "tuareg-autoloads.el"))
731 #t)))))
732 (home-page "https://github.com/ocaml/tuareg")
733 (synopsis "OCaml programming mode, REPL, debugger for Emacs")
734 (description "Tuareg helps editing OCaml code, to highlight important
833ade67
OP
735parts of the code, to run an OCaml REPL, and to run the OCaml debugger within
736Emacs.")
87f31bf2 737 (license license:gpl2+))))
833ade67 738
e31b75f2
DC
739(define-public ocaml-menhir
740 (package
741 (name "ocaml-menhir")
3a3b5948
JL
742 ;; More recent versions can be built after we have dune >= 2.0
743 (version "20190626")
187f9636 744 (source
745 (origin
746 (method git-fetch)
747 (uri (git-reference
748 (url "https://gitlab.inria.fr/fpottier/menhir.git")
749 (commit version)))
750 (file-name (git-file-name name version))
751 (sha256
3a3b5948 752 (base32 "0v8av4pw6rykzb7wx54xhbsx0jhh8xyb4x0k4yrxi0w5ylkck6mb"))))
187f9636 753 (build-system ocaml-build-system)
e31b75f2
DC
754 (inputs
755 `(("ocaml" ,ocaml)))
564cf93f
JL
756 (native-inputs
757 `(("ocamlbuild" ,ocamlbuild)))
e31b75f2 758 (arguments
187f9636 759 `(#:make-flags `("USE_OCAMLFIND=true"
760 ,(string-append "PREFIX=" (assoc-ref %outputs "out")))
e31b75f2
DC
761 #:tests? #f ; No check target
762 #:phases
763 (modify-phases %standard-phases
187f9636 764 (delete 'configure))))
765 (home-page "http://gallium.inria.fr/~fpottier/menhir/")
e31b75f2
DC
766 (synopsis "Parser generator")
767 (description "Menhir is a parser generator. It turns high-level grammar
768specifications, decorated with semantic actions expressed in the OCaml
187f9636 769programming language into parsers, again expressed in OCaml. It is based on
e31b75f2
DC
770Knuth’s LR(1) parser construction technique.")
771 ;; The file src/standard.mly and all files listed in src/mnehirLib.mlpack
772 ;; that have an *.ml or *.mli extension are GPL licensed. All other files
773 ;; are QPL licensed.
d8e0a08c 774 (license (list license:gpl2+ license:qpl))))
e31b75f2 775
ce9a30e6
JL
776(define-public ocaml-bigarray-compat
777 (package
778 (name "ocaml-bigarray-compat")
779 (version "1.0.0")
780 (source (origin
781 (method git-fetch)
782 (uri (git-reference
783 (url "https://github.com/mirage/bigarray-compat")
784 (commit (string-append "v" version))))
785 (file-name (git-file-name name version))
786 (sha256
787 (base32
788 "06j1dwlpisxshdd0nab4n4x266gg1s1n8na16lpgw3fvcznwnimz"))))
789 (build-system dune-build-system)
790 (arguments
791 `(#:tests? #f)); no tests
792 (home-page "https://github.com/mirage/bigarray-compat")
793 (synopsis "OCaml compatibility library")
794 (description "This package contains a compatibility library for
795@code{Stdlib.Bigarray} in OCaml.")
796 (license license:isc)))
797
3573b634
AE
798(define-public lablgtk
799 (package
800 (name "lablgtk")
a79b7ab5 801 (version "2.18.10")
56f73ead 802 (source (origin
3a23b461
JL
803 (method git-fetch)
804 (uri (git-reference
805 (url "https://github.com/garrigue/lablgtk")
a79b7ab5 806 (commit version)))
bcda0779 807 (file-name (git-file-name name version))
56f73ead
JL
808 (sha256
809 (base32
a79b7ab5 810 "0w8cdfcv2wc19sd3qzj3qq77qc6rbnbynsz02gzbl15kgrvgrfxi"))))
3573b634
AE
811 (build-system gnu-build-system)
812 (native-inputs
3a23b461 813 `(("ocaml" ,ocaml)
8afd1958 814 ("findlib" ,ocaml-findlib)
3573b634
AE
815 ("pkg-config" ,pkg-config)))
816 ;; FIXME: Add inputs gtkgl-2.0, libpanelapplet-2.0, gtkspell-2.0,
817 ;; and gtk+-quartz-2.0 once available.
818 (inputs
819 `(("gtk+" ,gtk+-2)
c900f843 820 ("gtksourceview" ,gtksourceview-2)
3573b634
AE
821 ("libgnomecanvas" ,libgnomecanvas)
822 ("libgnomeui" ,libgnomeui)
823 ("libglade" ,libglade)
824 ("librsvg" ,librsvg)))
825 (arguments
826 `(#:tests? #f ; no check target
ef89cb42 827
8c1088bb 828 ;; opt: also install cmxa files
8afd1958
JL
829 #:make-flags (list "all" "opt"
830 (string-append "FINDLIBDIR="
831 (assoc-ref %outputs "out")
832 "/lib/ocaml"))
ef89cb42
LC
833 ;; Occasionally we would get "Error: Unbound module GtkThread" when
834 ;; compiling 'gtkThInit.ml', with 'make -j'. So build sequentially.
835 #:parallel-build? #f
836
3573b634
AE
837 #:phases
838 (modify-phases %standard-phases
8afd1958 839 (add-before 'install 'prepare-install
3573b634
AE
840 (lambda* (#:key inputs outputs #:allow-other-keys)
841 (let ((out (assoc-ref outputs "out"))
842 (ocaml (assoc-ref inputs "ocaml")))
843 ;; Install into the output and not the ocaml directory.
8afd1958 844 (mkdir-p (string-append out "/lib/ocaml"))
3573b634
AE
845 (substitute* "config.make"
846 ((ocaml) out))
3573b634 847 #t))))))
73c26d57 848 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-lablgtk))))
3573b634
AE
849 (home-page "http://lablgtk.forge.ocamlcore.org/")
850 (synopsis "GTK+ bindings for OCaml")
851 (description
852 "LablGtk is an OCaml interface to GTK+ 1.2 and 2.x. It provides
853a strongly-typed object-oriented interface that is compatible with the
854dynamic typing of GTK+. Most widgets and methods are available. LablGtk
855also provides bindings to
856gdk-pixbuf, the GLArea widget (in combination with LablGL), gnomecanvas,
857gnomeui, gtksourceview, gtkspell,
858libglade (and it an generate OCaml code from .glade files),
859libpanel, librsvg and quartz.")
d8e0a08c 860 (license license:lgpl2.1)))
3573b634 861
73c26d57
JL
862(define-public ocaml4.07-lablgtk
863 (package
864 (inherit lablgtk)
865 (name "ocaml4.07-lablgtk")
866 (native-inputs
867 `(("ocaml" ,ocaml-4.07)
868 ("findlib" ,ocaml4.07-findlib)
869 ("pkg-config" ,pkg-config)))
870 (properties '())))
871
b9d8756b
AE
872(define-public unison
873 (package
874 (name "unison")
6c8666b4
AE
875 (version "2.51.2")
876 (source (origin
877 (method git-fetch)
878 (uri (git-reference
b0e7b699 879 (url "https://github.com/bcpierce00/unison")
6c8666b4
AE
880 (commit (string-append "v" version))))
881 (file-name (git-file-name name version))
882 (sha256
883 (base32
aea459a5
JL
884 "1bykiyc0dc5pkw8x370qkg2kygq9pq7yqzsgczd3y13b6ivm4sdq"))
885 (patches (search-patches "unison-fix-ocaml-4.08.patch"))))
b9d8756b 886 (build-system gnu-build-system)
90907a22
EB
887 (outputs '("out"
888 "doc")) ; 1.9 MiB of documentation
b9d8756b 889 (native-inputs
aea459a5 890 `(("ocaml" ,ocaml-4.09)
90907a22 891 ;; For documentation
2be896de 892 ("ghostscript" ,ghostscript)
68139bce 893 ("texlive" ,texlive-tiny)
90907a22 894 ("hevea" ,hevea)
564cf93f
JL
895 ("lynx" ,lynx)
896 ("which" ,which)))
b9d8756b
AE
897 (arguments
898 `(#:parallel-build? #f
899 #:parallel-tests? #f
900 #:test-target "selftest"
901 #:tests? #f ; Tests require writing to $HOME.
902 ; If some $HOME is provided, they fail with the message
903 ; "Fatal error: Skipping some tests -- remove me!"
904 #:phases
905 (modify-phases %standard-phases
906 (delete 'configure)
907 (add-before 'install 'prepare-install
908 (lambda* (#:key outputs #:allow-other-keys)
909 (let* ((out (assoc-ref outputs "out"))
910 (bin (string-append out "/bin")))
911 (mkdir-p bin)
912 (setenv "HOME" out) ; forces correct INSTALLDIR in Makefile
90907a22 913 #t)))
31d968fb
OD
914 (add-after 'install 'install-fsmonitor
915 (lambda* (#:key outputs #:allow-other-keys)
916 (let* ((out (assoc-ref outputs "out"))
917 (bin (string-append out "/bin")))
918 ;; 'unison-fsmonitor' is used in "unison -repeat watch" mode.
317e80ce
TGR
919 (install-file "src/unison-fsmonitor" bin)
920 #t)))
90907a22 921 (add-after 'install 'install-doc
31d968fb 922 (lambda* (#:key outputs #:allow-other-keys)
90907a22
EB
923 (let ((doc (string-append (assoc-ref outputs "doc")
924 "/share/doc/unison")))
925 (mkdir-p doc)
50ab554b
JL
926 ;; Remove an '\n' that prevents the doc to be generated
927 ;; correctly with newer hevea.
928 (substitute* "doc/local.tex"
929 (("----SNIP----.*") "----SNIP----"))
90907a22
EB
930 ;; This file needs write-permissions, because it's
931 ;; overwritten by 'docs' during documentation generation.
932 (chmod "src/strings.ml" #o600)
317e80ce
TGR
933 (invoke "make" "docs"
934 "TEXDIRECTIVES=\\\\draftfalse")
935 (for-each (lambda (f)
936 (install-file f doc))
937 (map (lambda (ext)
938 (string-append "doc/unison-manual." ext))
939 ;; Install only html documentation,
940 ;; since the build is currently
941 ;; non-reproducible with the ps, pdf,
942 ;; and dvi docs.
943 '(;; "ps" "pdf" "dvi"
944 "html")))
945 #t))))))
b9d8756b
AE
946 (home-page "https://www.cis.upenn.edu/~bcpierce/unison/")
947 (synopsis "File synchronizer")
948 (description
949 "Unison is a file-synchronization tool. It allows two replicas of
950a collection of files and directories to be stored on different hosts
951(or different disks on the same host), modified separately, and then
952brought up to date by propagating the changes in each replica
953to the other.")
d8e0a08c 954 (license license:gpl3+)))
a747baba
JN
955
956(define-public ocaml-findlib
957 (package
958 (name "ocaml-findlib")
a36074a8 959 (version "1.8.1")
a747baba
JN
960 (source (origin
961 (method url-fetch)
962 (uri (string-append "http://download.camlcity.org/download/"
963 "findlib" "-" version ".tar.gz"))
964 (sha256
965 (base32
a36074a8 966 "00s3sfb02pnjmkax25pcnljcnhcggiliccfz69a72ic7gsjwz1cf"))))
a747baba
JN
967 (build-system gnu-build-system)
968 (native-inputs
a36074a8 969 `(("m4" ,m4)
a747baba
JN
970 ("ocaml" ,ocaml)))
971 (arguments
972 `(#:tests? #f ; no test suite
973 #:parallel-build? #f
974 #:make-flags (list "all" "opt")
975 #:phases (modify-phases %standard-phases
976 (replace
977 'configure
978 (lambda* (#:key inputs outputs #:allow-other-keys)
979 (let ((out (assoc-ref outputs "out")))
4a810e75 980 (invoke
a747baba
JN
981 "./configure"
982 "-bindir" (string-append out "/bin")
983 "-config" (string-append out "/etc/ocamfind.conf")
984 "-mandir" (string-append out "/share/man")
985 "-sitelib" (string-append out "/lib/ocaml/site-lib")
ad3d730e 986 "-with-toolbox"))))
bff6739d
PK
987 (replace 'install
988 (lambda* (#:key outputs #:allow-other-keys)
989 (let ((out (assoc-ref outputs "out")))
4a810e75
MW
990 (invoke "make" "install"
991 (string-append "OCAML_CORE_STDLIB="
a36074a8 992 out "/lib/ocaml/site-lib"))))))))
a747baba
JN
993 (home-page "http://projects.camlcity.org/projects/findlib.html")
994 (synopsis "Management tool for OCaml libraries")
995 (description
996 "The \"findlib\" library provides a scheme to manage reusable software
997components (packages), and includes tools that support this scheme. Packages
998are collections of OCaml modules for which metainformation can be stored. The
8f65585b 999packages are kept in the file system hierarchy, but with strict directory
a747baba
JN
1000structure. The library contains functions to look the directory up that
1001stores a package, to query metainformation about a package, and to retrieve
1002dependency information about multiple packages. There is also a tool that
1003allows the user to enter queries on the command-line. In order to simplify
1004compilation and linkage, there are new frontends of the various OCaml
1005compilers that can directly deal with packages.")
d8e0a08c 1006 (license license:x11)))
7a76b4af 1007
e3388d63
JL
1008(define-public ocaml4.07-findlib
1009 (package
1010 (inherit ocaml-findlib)
1011 (name "ocaml4.07-findlib")
59fcf386 1012 (native-inputs
e3388d63
JL
1013 `(("m4" ,m4)
1014 ("ocaml" ,ocaml-4.07)))))
1015
35c02c55
JL
1016(define-public ocaml4.09-findlib
1017 (package
1018 (inherit ocaml-findlib)
1019 (name "ocaml4.09-findlib")
1020 (native-inputs
1021 `(("m4" ,m4)
1022 ("ocaml" ,ocaml-4.09)))))
1023
7a76b4af
JL
1024;; note that some tests may hang for no obvious reason.
1025(define-public ocaml-ounit
1026 (package
1027 (name "ocaml-ounit")
483be9bd 1028 (version "2.0.8")
7a76b4af
JL
1029 (source (origin
1030 (method url-fetch)
483be9bd 1031 (uri (ocaml-forge-uri "ounit" version 1749))
7a76b4af
JL
1032 (sha256
1033 (base32
483be9bd 1034 "03ifp9hjcxg4m5j190iy373jcn4039d3vy10kmd8p4lfciwzwc1f"))))
7a76b4af
JL
1035 (build-system ocaml-build-system)
1036 (native-inputs
564cf93f
JL
1037 `(("libxml2" ,libxml2) ; for xmllint
1038 ("ocamlbuild" ,ocamlbuild)))
7a76b4af 1039 (arguments
337273e4
DC
1040 `(#:phases
1041 (modify-phases %standard-phases
483be9bd 1042 (delete 'check)))) ; tests are run during build
7a76b4af
JL
1043 (home-page "http://ounit.forge.ocamlcore.org")
1044 (synopsis "Unit testing framework for OCaml")
1045 (description "Unit testing framework for OCaml. It is similar to JUnit and
1046other XUnit testing frameworks.")
1047 (license license:expat)))
bc2c3bc6
JL
1048
1049(define-public camlzip
1050 (package
1051 (name "camlzip")
1052 (version "1.0.6")
1053 (source (origin
1054 (method url-fetch)
1055 (uri (ocaml-forge-uri name version 1616))
1056 (sha256
1057 (base32
1058 "0m6gyjw46w3qnhxfsyqyag42znl5lwargks7w7rfchr9jzwpff68"))))
1059 (build-system ocaml-build-system)
1060 (inputs
1061 `(("zlib" ,zlib)))
1062 (arguments
1063 `(#:phases
1064 (modify-phases %standard-phases
1065 (delete 'configure)
8fe6b932
JL
1066 (add-after 'install 'install-camlzip
1067 (lambda* (#:key outputs #:allow-other-keys)
1068 (let* ((out (assoc-ref outputs "out"))
1069 (dir (string-append out "/lib/ocaml/site-lib/camlzip")))
1070 (mkdir-p dir)
1071 (call-with-output-file (string-append dir "/META")
1072 (lambda (port)
1073 (format port "version=\"1.06\"\n")
1074 (format port "requires=\"unix\"\n")
1075 (format port "archive(byte)=\"zip.cma\"\n")
1076 (format port "archive(native)=\"zip.cmxa\"\n")
1077 (format port "archive(native,plugin)=\"zip.cmxs\"\n")
1078 (format port "directory=\"../zip\"\n")))))))
bc2c3bc6
JL
1079 #:install-target "install-findlib"
1080 #:make-flags
1081 (list "all" "allopt"
1082 (string-append "INSTALLDIR=" (assoc-ref %outputs "out")
1083 "/lib/ocaml"))))
0c34b5e6 1084 (home-page "https://github.com/xavierleroy/camlzip")
bc2c3bc6
JL
1085 (synopsis "Provides easy access to compressed files")
1086 (description "Provides easy access to compressed files in ZIP, GZIP and
1087JAR format. It provides functions for reading from and writing to compressed
1088files in these formats.")
1089 (license license:lgpl2.1+)))
93eeadf0
JL
1090
1091(define-public ocamlmod
1092 (package
1093 (name "ocamlmod")
564cf93f 1094 (version "0.0.9")
93eeadf0
JL
1095 (source (origin
1096 (method url-fetch)
564cf93f 1097 (uri (ocaml-forge-uri name version 1702))
93eeadf0
JL
1098 (sha256
1099 (base32
564cf93f 1100 "0cgp9qqrq7ayyhddrmqmq1affvfqcn722qiakjq4dkywvp67h4aa"))))
93eeadf0
JL
1101 (build-system ocaml-build-system)
1102 (native-inputs
564cf93f
JL
1103 `(("ounit" ,ocaml-ounit)
1104 ("ocamlbuild" ,ocamlbuild)))
93eeadf0 1105 (arguments
3dcaa122
DC
1106 `(#:phases
1107 (modify-phases %standard-phases
1108 ;; Tests are done during build.
1109 (delete 'check))))
93eeadf0
JL
1110 (home-page "https://forge.ocamlcore.org/projects/ocamlmod")
1111 (synopsis "Generate modules from OCaml source files")
1112 (description "Generate modules from OCaml source files.")
1113 (license license:lgpl2.1+))) ; with an exception
ddf2b503
JL
1114
1115(define-public ocaml-zarith
1116 (package
1117 (name "ocaml-zarith")
3882f607 1118 (version "1.9.1")
ddf2b503 1119 (source (origin
09cd92a9
JL
1120 (method git-fetch)
1121 (uri (git-reference
1122 (url "https://github.com/ocaml/Zarith")
1123 (commit (string-append "release-" version))))
f1d4d79f 1124 (file-name (git-file-name name version))
ddf2b503
JL
1125 (sha256
1126 (base32
3882f607 1127 "0hv5ywz1q2cgn8apfz490clwk5hcynr937g2v8i13x2ax4bnv0lz"))))
ddf2b503
JL
1128 (build-system ocaml-build-system)
1129 (native-inputs
1130 `(("perl" ,perl)))
1131 (inputs
1132 `(("gmp" ,gmp)))
1133 (arguments
1134 `(#:tests? #f ; no test target
1135 #:phases
1136 (modify-phases %standard-phases
1137 (replace 'configure
04daa1ed 1138 (lambda _ (invoke "./configure"))))))
ddf2b503
JL
1139 (home-page "https://forge.ocamlcore.org/projects/zarith/")
1140 (synopsis "Implements arbitrary-precision integers")
1141 (description "Implements arithmetic and logical operations over
1142arbitrary-precision integers. It uses GMP to efficiently implement arithmetic
1143over big integers. Small integers are represented as Caml unboxed integers,
1144for speed and space economy.")
1145 (license license:lgpl2.1+))) ; with an exception
ff891f10
JL
1146
1147(define-public ocaml-frontc
1148 (package
1149 (name "ocaml-frontc")
e57dd201 1150 (version "3.4.2")
ff891f10 1151 (source (origin
bbe9915b
JL
1152 (method git-fetch)
1153 (uri (git-reference
1154 (url "https://github.com/BinaryAnalysisPlatform/FrontC")
1155 (commit (string-append
1156 "V_" (string-join (string-split version #\.) "_")))))
1157 (file-name (git-file-name name version))
ff891f10
JL
1158 (sha256
1159 (base32
e57dd201 1160 "0k7jk9hkglnkk27s62xl493jyqc017gyvwqb1lyc0ywbb001s102"))))
ff891f10
JL
1161 (build-system ocaml-build-system)
1162 (arguments
bbe9915b 1163 `(#:phases
ff891f10
JL
1164 (modify-phases %standard-phases
1165 (delete 'configure)
1166 (add-after 'install 'install-meta
1167 (lambda* (#:key outputs #:allow-other-keys)
1168 (let ((out (assoc-ref outputs "out")))
1169 (with-output-to-file
1170 (string-append out "/lib/ocaml/frontc/META")
1171 (lambda _
1172 (display
1173 (string-append
1174 "description = \"Parser for the C language\"
1175version = \"" ,version "\"
1176requires = \"unix\"
1177archive(byte) = \"frontc.cma\"
1178archive(native) = \"frontc.cmxa\""))))
1179 (symlink (string-append out "/lib/ocaml/frontc")
1180 (string-append out "/lib/ocaml/FrontC"))))))
1181 #:make-flags (list (string-append "PREFIX="
1182 (assoc-ref %outputs "out"))
1183 "OCAML_SITE=$(LIB_DIR)/ocaml/")))
ee33e415 1184 (properties `((upstream-name . "FrontC")))
ff891f10
JL
1185 (home-page "https://www.irit.fr/FrontC")
1186 (synopsis "C parser and lexer library")
1187 (description "FrontC is an OCAML library providing a C parser and lexer.
1188The result is a syntactic tree easy to process with usual OCAML tree management.
1189It provides support for ANSI C syntax, old-C K&R style syntax and the standard
1190GNU CC attributes. It provides also a C pretty printer as an example of use.")
1191 (license license:lgpl2.1)))
0472836f 1192
2c6ef0dd
JL
1193(define-public ocaml-qcheck
1194 (package
1195 (name "ocaml-qcheck")
795cf2a3 1196 (version "0.12")
b0133981
TGR
1197 (source
1198 (origin
1199 (method git-fetch)
1200 (uri (git-reference
b0e7b699 1201 (url "https://github.com/c-cube/qcheck")
b0133981
TGR
1202 (commit version)))
1203 (file-name (git-file-name name version))
1204 (sha256
795cf2a3 1205 (base32 "1llnfynhlndwyjig7wrayjnds2b3mggp5lw20dwxhn2i2lkkb22m"))))
3f59ecfc
JL
1206 (build-system dune-build-system)
1207 (arguments
795cf2a3
JL
1208 `(#:test-target "."
1209 #:phases
1210 (modify-phases %standard-phases
1211 (add-before 'build 'fix-deprecated
1212 (lambda _
1213 (substitute* "src/core/QCheck.ml"
1214 (("Pervasives.compare") "compare"))
1215 #t)))))
1216 (propagated-inputs
3f59ecfc 1217 `(("ocaml-alcotest" ,ocaml-alcotest)
795cf2a3
JL
1218 ("ocaml-ounit" ,ocaml-ounit)))
1219 (native-inputs
1220 `(("ocamlbuild" ,ocamlbuild)))
2c6ef0dd
JL
1221 (home-page "https://github.com/c-cube/qcheck")
1222 (synopsis "QuickCheck inspired property-based testing for OCaml")
1223 (description "QuickCheck inspired property-based testing for OCaml. This
bf052724 1224module checks invariants (properties of some types) over randomly
2c6ef0dd
JL
1225generated instances of the type. It provides combinators for generating
1226instances and printing them.")
1227 (license license:lgpl3+)))
1228
0472836f
JL
1229(define-public ocaml-qtest
1230 (package
1231 (name "ocaml-qtest")
73e01ae4 1232 (version "2.10.1")
0472836f 1233 (source (origin
e821a640
JL
1234 (method git-fetch)
1235 (uri (git-reference
1236 (url "https://github.com/vincent-hugot/qtest/")
1237 (commit (string-append "v" version))))
1238 (file-name (git-file-name name version))
0472836f
JL
1239 (sha256
1240 (base32
73e01ae4 1241 "0gddzan4vzs0vklsxhirdjrvx3rp7hhh2yr20vi13nq8rwkn9w29"))))
e821a640
JL
1242 (build-system dune-build-system)
1243 (arguments
a8a8547a 1244 `(#:test-target "tests"))
0472836f 1245 (propagated-inputs
e24d5271
JL
1246 `(("ounit" ,ocaml-ounit)
1247 ("qcheck" ,ocaml-qcheck)))
fdb3fba3 1248 (home-page "https://github.com/vincent-hugot/qtest")
0472836f
JL
1249 (synopsis "Inline (Unit) Tests for OCaml")
1250 (description "Qtest extracts inline unit tests written using a special
1251syntax in comments. Those tests are then run using the oUnit framework and the
1252qcheck library. The possibilities range from trivial tests -- extremely simple
1253to use -- to sophisticated random generation of test cases.")
1254 (license license:lgpl3+)))
3d598ebd
JL
1255
1256(define-public ocaml-stringext
1257 (package
1258 (name "ocaml-stringext")
69c83817 1259 (version "1.6.0")
3d598ebd 1260 (source (origin
acb98ad9
JL
1261 (method git-fetch)
1262 (uri (git-reference
1263 (url "https://github.com/rgrinberg/stringext")
1264 (commit version)))
1265 (file-name (git-file-name name version))
3d598ebd
JL
1266 (sha256
1267 (base32
69c83817 1268 "1m09cmn3vrk3gdm60fb730qsygcfyxsyv7gl9xfzck08q1x2x9qx"))))
acb98ad9
JL
1269 (build-system dune-build-system)
1270 (arguments
1271 `(#:test-target "."))
3d598ebd 1272 (native-inputs
564cf93f
JL
1273 `(("ocamlbuild" ,ocamlbuild)
1274 ("qtest" ,ocaml-qtest)))
3d598ebd
JL
1275 (home-page "https://github.com/rgrinberg/stringext")
1276 (synopsis "Extra string functions for OCaml")
1277 (description "Provides a single module named Stringext that provides a grab
1278bag of often used but missing string functions from the stdlib. E.g, split,
1279full_split, cut, rcut, etc..")
1280 ;; the only mention of a license in this project is in its `opam' file
1281 ;; where it says `mit'.
1282 (license license:expat)))
a5b5bd1d 1283
33917795 1284(define dune-bootstrap
564cf93f
JL
1285 (package
1286 (name "dune")
33917795 1287 (version "2.7.1")
564cf93f 1288 (source (origin
283ed30e
JL
1289 (method git-fetch)
1290 (uri (git-reference
1291 (url "https://github.com/ocaml/dune")
1292 (commit version)))
1293 (file-name (git-file-name name version))
564cf93f
JL
1294 (sha256
1295 (base32
33917795 1296 "10qgx83fq8b522y9mpllrp0l5cgmr2bs5s7aix5img21hlbm34in"))))
564cf93f
JL
1297 (build-system ocaml-build-system)
1298 (arguments
1299 `(#:tests? #f; require odoc
33917795
JL
1300 #:make-flags (list "release"
1301 (string-append "PREFIX=" (assoc-ref %outputs "out"))
8d135e37
JL
1302 (string-append "LIBDIR=" (assoc-ref %outputs "out")
1303 "/lib/ocaml/site-lib"))
564cf93f
JL
1304 #:phases
1305 (modify-phases %standard-phases
1306 (replace 'configure
1307 (lambda* (#:key outputs #:allow-other-keys)
33917795 1308 (mkdir-p "src/dune")
564cf93f
JL
1309 (invoke "./configure")
1310 #t)))))
1311 (home-page "https://github.com/ocaml/dune")
1312 (synopsis "OCaml build system")
1313 (description "Dune is a build system that was designed to simplify the
1314release of Jane Street packages. It reads metadata from @file{dune} files
1315following a very simple s-expression syntax.")
1316 (license license:expat)))
1317
6ed2741a
JL
1318(define ocaml4.09-dune-bootstrap
1319 (package-with-ocaml4.09 dune-bootstrap))
1320
33917795
JL
1321(define-public dune-configurator
1322 (package
1323 (inherit dune-bootstrap)
1324 (name "dune-configurator")
1325 (build-system dune-build-system)
1326 (arguments
1327 `(#:package "dune-configurator"
1328 #:dune ,dune-bootstrap
1329 ; require ppx_expect
1330 #:tests? #f))
1331 (propagated-inputs
1332 `(("ocaml-csexp" ,ocaml-csexp)))
6ed2741a 1333 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-dune-configurator))))
de5659d7
JL
1334 (synopsis "Dune helper library for gathering system configuration")
1335 (description "Dune-configurator is a small library that helps writing
1336OCaml scripts that test features available on the system, in order to generate
1337config.h files for instance. Among other things, dune-configurator allows one to:
1338
1339@itemize
1340@item test if a C program compiles
1341@item query pkg-config
1342@item import #define from OCaml header files
1343@item generate config.h file
1344@end itemize")))
33917795 1345
6ed2741a
JL
1346(define-public ocaml4.09-dune-configurator
1347 (package
1348 (inherit dune-configurator)
1349 (name "ocaml4.09-dune-configurator")
1350 (arguments
1351 `(#:package "dune-configurator"
1352 #:tests? #f
1353 #:dune ,ocaml4.09-dune-bootstrap
1354 #:ocaml ,ocaml-4.09
1355 #:findlib ,ocaml4.09-findlib))
1356 (propagated-inputs
1357 `(("ocaml-csexp" ,ocaml4.09-csexp)))))
1358
33917795
JL
1359(define-public dune
1360 (package
1361 (inherit dune-bootstrap)
1362 (propagated-inputs
1363 `(("dune-configurator" ,dune-configurator)))
6ed2741a
JL
1364 (properties `((ocaml4.07-variant . ,(delay ocaml4.07-dune))
1365 (ocaml4.09-variant . ,(delay ocaml4.09-dune))))))
1366
1367(define-public ocaml4.09-dune
1368 (package
1369 (inherit ocaml4.09-dune-bootstrap)
1370 (propagated-inputs
1371 `(("dune-configurator" ,dune-configurator)))))
33917795 1372
0ccd9463 1373(define-public ocaml4.07-dune
33917795
JL
1374 (package
1375 (inherit (package-with-ocaml4.07 dune-bootstrap))
1376 (version "1.11.3")
1377 (source (origin
1378 (method git-fetch)
1379 (uri (git-reference
1380 (url "https://github.com/ocaml/dune")
1381 (commit version)))
1382 (file-name (git-file-name "dune" version))
1383 (sha256
1384 (base32
1385 "0l4x0x2fz135pljv88zj8y6w1ninsqw0gn1mdxzprd6wbxbyn8wr"))))))
0ccd9463 1386
171abdd8
JL
1387(define-public ocaml-csexp
1388 (package
1389 (name "ocaml-csexp")
1390 (version "1.3.2")
1391 (source (origin
1392 (method git-fetch)
1393 (uri (git-reference
1394 (url "https://github.com/ocaml-dune/csexp")
1395 (commit version)))
1396 (file-name (git-file-name name version))
1397 (sha256
1398 (base32
1399 "190zppgvdjgghmrnx67ayzzk86qdjy3yn5fcrcw08wsh93384pl0"))))
1400 (build-system dune-build-system)
1401 (arguments
1402 `(#:tests? #f; FIXME: needs ppx_expect, but which version?
33917795 1403 #:dune ,dune-bootstrap
171abdd8
JL
1404 #:phases
1405 (modify-phases %standard-phases
1406 (add-before 'build 'chmod
1407 (lambda _
1408 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
1409 #t)))))
1410 (propagated-inputs
33917795 1411 `(("ocaml-result" ,ocaml-result)))
6ed2741a 1412 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-csexp))))
171abdd8
JL
1413 (home-page "https://github.com/ocaml-dune/csexp")
1414 (synopsis "Parsing and printing of S-expressions in Canonical form")
1415 (description "This library provides minimal support for Canonical
1416S-expressions. Canonical S-expressions are a binary encoding of
1417S-expressions that is super simple and well suited for communication
1418between programs.
1419
1420This library only provides a few helpers for simple applications. If
1421you need more advanced support, such as parsing from more fancy input
1422sources, you should consider copying the code of this library given
1423how simple parsing S-expressions in canonical form is.
1424
1425To avoid a dependency on a particular S-expression library, the only
1426module of this library is parameterised by the type of S-expressions.")
1427 (license license:expat)))
1428
6ed2741a
JL
1429(define-public ocaml4.09-csexp
1430 (package
1431 (inherit ocaml-csexp)
1432 (name "ocaml4.09-csexp")
1433 (arguments
1434 `(#:ocaml ,ocaml-4.09
1435 #:findlib ,ocaml4.09-findlib
1436 ,@(substitute-keyword-arguments (package-arguments ocaml-csexp)
1437 ((#:dune _) ocaml4.09-dune-bootstrap))))
1438 (propagated-inputs
1439 `(("ocaml-result" ,ocaml4.09-result)))))
1440
564cf93f
JL
1441(define-public ocaml-migrate-parsetree
1442 (package
1443 (name "ocaml-migrate-parsetree")
bd8558a0 1444 (version "1.7.3")
b2c2c415
GH
1445 (home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
1446 (source
1447 (origin
1448 (method git-fetch)
1449 (uri (git-reference
1450 (url (string-append home-page ".git"))
1451 (commit (string-append "v" version))))
8d2d68a5 1452 (file-name (git-file-name name version))
b2c2c415
GH
1453 (sha256
1454 (base32
bd8558a0 1455 "0336vz0galjnsazbmkxjwdv1qvdqsx2rgrvp778xgq2fzasz45cx"))))
effc8325 1456 (build-system dune-build-system)
564cf93f 1457 (arguments
b2c2c415 1458 `(#:tests? #f))
564cf93f 1459 (propagated-inputs
b2c2c415
GH
1460 `(("ocaml-ppx-derivers" ,ocaml-ppx-derivers)
1461 ("ocamlbuild" ,ocamlbuild)
564cf93f 1462 ("ocaml-result" ,ocaml-result)))
cf338cc3 1463 (properties `((upstream-name . "ocaml-migrate-parsetree")))
86912a67 1464 (synopsis "OCaml parsetree converter")
564cf93f
JL
1465 (description "This library converts between parsetrees of different OCaml
1466versions. For each version, there is a snapshot of the parsetree and conversion
1467functions to the next and/or previous version.")
1468 (license license:lgpl2.1+)))
1469
1470(define-public ocaml-ppx-tools-versioned
1471 (package
1472 (name "ocaml-ppx-tools-versioned")
f0c6fe31 1473 (version "5.4.0")
564cf93f 1474 (source (origin
8cc6a876
JL
1475 (method git-fetch)
1476 (uri (git-reference
1477 (url "https://github.com/ocaml-ppx/ppx_tools_versioned")
1478 (commit version)))
1479 (file-name (git-file-name name version))
564cf93f
JL
1480 (sha256
1481 (base32
f0c6fe31 1482 "07lnj4yzwvwyh5fhpp1dxrys4ddih15jhgqjn59pmgxinbnddi66"))))
59fa09e1 1483 (build-system dune-build-system)
564cf93f 1484 (arguments
b35b661b
JL
1485 `(#:test-target "."
1486 #:package "ppx_tools_versioned"))
564cf93f
JL
1487 (propagated-inputs
1488 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
c949a4eb 1489 (properties `((upstream-name . "ppx_tools_versioned")))
564cf93f
JL
1490 (home-page "https://github.com/let-def/ppx_tools_versioned")
1491 (synopsis "Variant of ppx_tools")
1492 (description "This package is a variant of ppx_tools based on
1493ocaml-migrate-parsetree")
1494 (license license:expat)))
1495
44c23cb8
JL
1496(define-public ocaml-bitstring
1497 (package
1498 (name "ocaml-bitstring")
564cf93f 1499 (version "3.1.0")
44c23cb8
JL
1500 (source (origin
1501 (method url-fetch)
564cf93f
JL
1502 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1503 "get/v" version ".tar.gz"))
0aee7fdc 1504 (file-name (string-append name "-" version ".tar.gz"))
44c23cb8
JL
1505 (sha256
1506 (base32
564cf93f 1507 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
f93246a5 1508 (build-system dune-build-system)
44c23cb8 1509 (native-inputs
24b199fd 1510 `(("time" ,time)
44c23cb8 1511 ("autoconf" ,autoconf)
24b199fd 1512 ("automake" ,automake)))
44c23cb8 1513 (propagated-inputs
24b199fd 1514 `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
44c23cb8 1515 (arguments
93304a0c 1516 `(#:package "bitstring"
33917795
JL
1517 #:tests? #f; Tests fail to build
1518 #:phases
1519 (modify-phases %standard-phases
1520 (add-before 'build 'upgrade
1521 (lambda _
1522 (invoke "dune" "upgrade")
1523 #t)))))
564cf93f
JL
1524 (home-page "https://github.com/xguerin/bitstring")
1525 (synopsis "Bitstrings and bitstring matching for OCaml")
1526 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1527a syntax extension and library for OCaml. You can use this module to both parse
1528and generate binary formats, files and protocols. Bitstring handling is added
1529as primitives to the language, making it exceptionally simple to use and very
1530powerful.")
1531 (license license:isc)))
1532
704b990c
JL
1533(define-public ocaml-result
1534 (package
1535 (name "ocaml-result")
bc92fd22 1536 (version "1.5")
704b990c 1537 (source (origin
22cd6a1d
JL
1538 (method git-fetch)
1539 (uri (git-reference
1540 (url "https://github.com/janestreet/result")
1541 (commit version)))
1542 (file-name (git-file-name name version))
704b990c
JL
1543 (sha256
1544 (base32
bc92fd22 1545 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
22cd6a1d 1546 (build-system dune-build-system)
704b990c 1547 (arguments
33917795
JL
1548 `(#:test-target "."
1549 #:dune ,dune-bootstrap))
6ed2741a 1550 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
704b990c
JL
1551 (home-page "https://github.com/janestreet/result")
1552 (synopsis "Compatibility Result module")
1553 (description "Uses the new result type defined in OCaml >= 4.03 while
1554staying compatible with older version of OCaml should use the Result module
1555defined in this library.")
1556 (license license:bsd-3)))
6ed2741a
JL
1557
1558(define-public ocaml4.09-result
1559 (package
1560 (inherit ocaml-result)
1561 (name "ocaml4.09-result")
1562 (arguments
1563 `(#:test-target "."
1564 #:dune ,ocaml4.09-dune-bootstrap
1565 #:ocaml ,ocaml-4.09
1566 #:findlib ,ocaml4.09-findlib))))
564cf93f 1567
a359c727
JL
1568(define-public ocaml-topkg
1569 (package
1570 (name "ocaml-topkg")
eddfd11d 1571 (version "1.0.0")
a359c727
JL
1572 (source (origin
1573 (method url-fetch)
1574 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1575 "topkg-" version ".tbz"))
1576 (sha256
1577 (base32
eddfd11d 1578 "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"))))
a359c727
JL
1579 (build-system ocaml-build-system)
1580 (native-inputs
564cf93f
JL
1581 `(("opam" ,opam)
1582 ("ocamlbuild" ,ocamlbuild)))
a359c727
JL
1583 (propagated-inputs
1584 `(("result" ,ocaml-result)))
1585 (arguments
1586 `(#:tests? #f
1587 #:build-flags '("build")
1588 #:phases
1589 (modify-phases %standard-phases
1590 (delete 'configure))))
1591 (home-page "http://erratique.ch/software/topkg")
1592 (synopsis "Transitory OCaml software packager")
1593 (description "Topkg is a packager for distributing OCaml software. It
1594provides an API to describe the files a package installs in a given build
1595configuration and to specify information about the package's distribution,
1596creation and publication procedures.")
1597 (license license:isc)))
564cf93f 1598
63147e5e
JL
1599(define-public ocaml-rresult
1600 (package
1601 (name "ocaml-rresult")
1602 (version "0.5.0")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1606 "rresult-" version ".tbz"))
1607 (sha256
1608 (base32
1609 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1610 (build-system ocaml-build-system)
1611 (native-inputs
564cf93f
JL
1612 `(("opam" ,opam)
1613 ("ocamlbuild" ,ocamlbuild)))
63147e5e
JL
1614 (propagated-inputs
1615 `(("topkg" ,ocaml-topkg)))
1616 (arguments
1617 `(#:tests? #f
1618 #:build-flags '("build")
1619 #:phases
1620 (modify-phases %standard-phases
1621 (delete 'configure))))
1622 (home-page "http://erratique.ch/software/rresult")
1623 (synopsis "Result value combinators for OCaml")
1624 (description "Handle computation results and errors in an explicit and
1625declarative manner, without resorting to exceptions. It defines combinators
1626to operate on the result type available from OCaml 4.03 in the standard
1627library.")
1628 (license license:isc)))
eb1ba731 1629
87858bc5 1630(define-public ocaml4.07-sqlite3
0c4dbdc2 1631 (package
87858bc5 1632 (name "ocaml4.07-sqlite3")
fbf786bd 1633 (version "4.4.1")
0c4dbdc2
BW
1634 (source
1635 (origin
fbf786bd
JL
1636 (method git-fetch)
1637 (uri (git-reference
1638 (url "https://github.com/mmottl/sqlite3-ocaml")
1639 (commit version)))
1640 (file-name (git-file-name name version))
0c4dbdc2
BW
1641 (sha256
1642 (base32
fbf786bd
JL
1643 "1536agm5fgcqysszhpd3kmw7lkc5n5ni7gmlyglrbvmnmrwf3av2"))))
1644 (build-system dune-build-system)
87858bc5
JL
1645 (arguments
1646 `(#:ocaml ,ocaml-4.07
db194f71
JL
1647 #:findlib ,ocaml4.07-findlib
1648 #:dune ,ocaml4.07-dune))
0c4dbdc2 1649 (native-inputs
87858bc5
JL
1650 `(("ocaml-base" ,ocaml4.07-base)
1651 ("ocaml-stdio" ,ocaml4.07-stdio)
564cf93f 1652 ("pkg-config" ,pkg-config)))
0c4dbdc2
BW
1653 (inputs
1654 `(("sqlite" ,sqlite)))
1655 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1656 (synopsis "SQLite3 Bindings for OCaml")
1657 (description
1658 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1659API. Sqlite3 is a self-contained, serverless, zero-configuration,
1660transactional SQL database engine with outstanding performance for many use
1661cases. These bindings are written in a way that enables a friendly
1662coexistence with the old (version 2) SQLite and its OCaml wrapper
1663@code{ocaml-sqlite}.")
1664 (license license:expat)))
1665
91df9eae
BW
1666(define-public ocaml-csv
1667 (package
1668 (name "ocaml-csv")
5696fbd9 1669 (version "2.3")
91df9eae
BW
1670 (source
1671 (origin
e58d05c3
JL
1672 (method git-fetch)
1673 (uri (git-reference
1674 (url "https://github.com/Chris00/ocaml-csv")
1675 (commit version)))
1676 (file-name (git-file-name name version))
91df9eae
BW
1677 (sha256
1678 (base32
5696fbd9 1679 "19k48517s8y1zb91a1312a0n94cbh5i5dixndcrqjmf87kkz61zx"))))
e58d05c3
JL
1680 (build-system dune-build-system)
1681 (arguments
1682 `(#:package "csv"
1683 #:test-target "."))
91df9eae
BW
1684 (home-page "https://github.com/Chris00/ocaml-csv")
1685 (synopsis "Pure OCaml functions to read and write CSV")
1686 (description
1687 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1688by all major spreadsheets. This library implements pure OCaml functions to
1689read and write files in this format as well as some convenience functions to
1690manipulate such data.")
5696fbd9
JL
1691 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
1692 ;; against the library to be released under any terms.
1693 (license license:lgpl2.1)))
91df9eae 1694
eb1ba731
JL
1695(define-public ocaml-mtime
1696 (package
1697 (name "ocaml-mtime")
853af25e 1698 (version "1.1.0")
eb1ba731
JL
1699 (source (origin
1700 (method url-fetch)
1701 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1702 "mtime-" version ".tbz"))
1703 (sha256
1704 (base32
853af25e 1705 "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3"))))
eb1ba731
JL
1706 (build-system ocaml-build-system)
1707 (native-inputs
564cf93f
JL
1708 `(("ocamlbuild" ,ocamlbuild)
1709 ("opam" ,opam)))
eb1ba731
JL
1710 (propagated-inputs
1711 `(("topkg" ,ocaml-topkg)))
1712 (arguments
1713 `(#:tests? #f
853af25e 1714 #:build-flags (list "build" "--with-js_of_ocaml" "false")
eb1ba731
JL
1715 #:phases
1716 (modify-phases %standard-phases
1717 (delete 'configure))))
1718 (home-page "http://erratique.ch/software/mtime")
1719 (synopsis "Monotonic wall-clock time for OCaml")
2bf52398 1720 (description "Access monotonic wall-clock time. It measures time
eb1ba731
JL
1721spans without being subject to operating system calendar time adjustments.")
1722 (license license:isc)))
6548e53f
JL
1723
1724(define-public ocaml-cmdliner
1725 (package
1726 (name "ocaml-cmdliner")
b6bba90e 1727 (version "1.0.3")
6548e53f
JL
1728 (source (origin
1729 (method url-fetch)
1730 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1731 "cmdliner-" version ".tbz"))
1732 (sha256
1733 (base32
b6bba90e 1734 "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"))))
6548e53f 1735 (build-system ocaml-build-system)
ca53346d
GH
1736 (inputs
1737 `(("ocaml-result" ,ocaml-result)))
6548e53f 1738 (native-inputs
b6bba90e 1739 `(("ocamlbuild" ,ocamlbuild)))
6548e53f
JL
1740 (arguments
1741 `(#:tests? #f
b6bba90e
JL
1742 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
1743 "/lib/ocaml/site-lib/cmdliner"))
6548e53f
JL
1744 #:phases
1745 (modify-phases %standard-phases
6c79cee2
JL
1746 (delete 'configure)
1747 (add-before 'build 'fix-source-file-order
1748 (lambda _
1749 (substitute* "build.ml"
1750 (("Sys.readdir dir")
1751 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
1752 #t)))))
6548e53f
JL
1753 (home-page "http://erratique.ch/software/cmdliner")
1754 (synopsis "Declarative definition of command line interfaces for OCaml")
1755 (description "Cmdliner is a module for the declarative definition of command
1756line interfaces. It provides a simple and compositional mechanism to convert
1757command line arguments to OCaml values and pass them to your functions. The
1758module automatically handles syntax errors, help messages and UNIX man page
1759generation. It supports programs with single or multiple commands and respects
1760most of the POSIX and GNU conventions.")
1761 (license license:bsd-3)))
beeb2d41
JL
1762
1763(define-public ocaml-fmt
1764 (package
1765 (name "ocaml-fmt")
0a86b93f 1766 (version "0.8.9")
beeb2d41
JL
1767 (source
1768 (origin
1769 (method url-fetch)
1770 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1771 version ".tbz"))
1772 (sha256 (base32
0a86b93f 1773 "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
beeb2d41 1774 (build-system ocaml-build-system)
564cf93f
JL
1775 (native-inputs
1776 `(("ocamlbuild" ,ocamlbuild)
1777 ("opam" ,opam)
1778 ("topkg" ,ocaml-topkg)))
1779 (propagated-inputs
0a86b93f
JL
1780 `(("cmdliner" ,ocaml-cmdliner)
1781 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
1782 ("ocaml-uchar" ,ocaml-uchar)))
beeb2d41
JL
1783 (arguments `(#:tests? #f
1784 #:build-flags (list "build" "--with-base-unix" "true"
1785 "--with-cmdliner" "true")
1786 #:phases
1787 (modify-phases %standard-phases
1788 (delete 'configure))))
1789 (home-page "http://erratique.ch/software/fmt")
1790 (synopsis "OCaml Format pretty-printer combinators")
1791 (description "Fmt exposes combinators to devise Format pretty-printing
1792functions.")
1793 (license license:isc)))
f46bceb6
JL
1794
1795(define-public ocaml-astring
1796 (package
1797 (name "ocaml-astring")
1798 (version "0.8.3")
1799 (source
1800 (origin
1801 (method url-fetch)
1802 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1803 version ".tbz"))
1804 (sha256 (base32
1805 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1806 (build-system ocaml-build-system)
564cf93f
JL
1807 (native-inputs
1808 `(("ocamlbuild" ,ocamlbuild)
1809 ("opam" ,opam)
1810 ("topkg" ,ocaml-topkg)))
1811 (arguments
1812 `(#:tests? #f
1813 #:build-flags (list "build")
1814 #:phases
1815 (modify-phases %standard-phases
1816 (delete 'configure))))
f46bceb6
JL
1817 (home-page "http://erratique.ch/software/astring")
1818 (synopsis "Alternative String module for OCaml")
1819 (description "Astring exposes an alternative String module for OCaml. This
1820module balances minimality and expressiveness for basic, index-free, string
1821processing and provides types and functions for substrings, string sets and
1822string maps. The String module exposed by Astring has exception safe functions,
1823removes deprecated and rarely used functions, alters some signatures and names,
1824adds a few missing functions and fully exploits OCaml's newfound string
1825immutability.")
1826 (license license:isc)))
69705efe
JL
1827
1828(define-public ocaml-alcotest
1829 (package
1830 (name "ocaml-alcotest")
01ec666e 1831 (version "1.0.0")
69705efe
JL
1832 (source (origin
1833 (method url-fetch)
1834 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1835 "download/" version "/alcotest-" version ".tbz"))
1836 (sha256
1837 (base32
01ec666e 1838 "1a43ilhwnj58pq3bi78ni46l9wh6klmmgfc93i94mvyx48bzzayx"))))
23c8a97a 1839 (build-system dune-build-system)
564cf93f 1840 (arguments
23c8a97a
JL
1841 `(#:package "alcotest"
1842 #:test-target "."))
564cf93f 1843 (native-inputs
23c8a97a 1844 `(("ocamlbuild" ,ocamlbuild)))
564cf93f 1845 (propagated-inputs
23c8a97a
JL
1846 `(("ocaml-astring" ,ocaml-astring)
1847 ("ocaml-cmdliner" ,ocaml-cmdliner)
1848 ("ocaml-fmt" ,ocaml-fmt)
01ec666e
JL
1849 ("ocaml-re" ,ocaml-re)
1850 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
1851 ("ocaml-uuidm" ,ocaml-uuidm)
1852 ("ocaml-uutf" ,ocaml-uutf)))
69705efe
JL
1853 (home-page "https://github.com/mirage/alcotest")
1854 (synopsis "Lightweight OCaml test framework")
1855 (description "Alcotest exposes simple interface to perform unit tests. It
1856exposes a simple TESTABLE module type, a check function to assert test
1857predicates and a run function to perform a list of unit -> unit test callbacks.
1858Alcotest provides a quiet and colorful output where only faulty runs are fully
1859displayed at the end of the run (with the full logs ready to inspect), with a
1860simple (yet expressive) query language to select the tests to run.")
1861 (license license:isc)))
0a7b43a8 1862
87858bc5 1863(define-public ocaml4.07-ppx-tools
0a7b43a8 1864 (package
87858bc5 1865 (name "ocaml4.07-ppx-tools")
564cf93f 1866 (version "5.1+4.06.0")
0a7b43a8 1867 (source
ef59cf9d
TGR
1868 (origin
1869 (method git-fetch)
1870 (uri (git-reference
b0e7b699 1871 (url "https://github.com/alainfrisch/ppx_tools")
ef59cf9d 1872 (commit version)))
9e6cce44 1873 (file-name (git-file-name name version))
ef59cf9d
TGR
1874 (sha256 (base32
1875 "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"))))
0a7b43a8 1876 (build-system ocaml-build-system)
564cf93f
JL
1877 (arguments
1878 `(#:phases (modify-phases %standard-phases (delete 'configure))
87858bc5
JL
1879 #:tests? #f
1880 #:ocaml ,ocaml-4.07
1881 #:findlib ,ocaml4.07-findlib))
d4857001 1882 (properties `((upstream-name . "ppx_tools")))
0a7b43a8
JL
1883 (home-page "https://github.com/alainfrisch/ppx_tools")
1884 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1885 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1886 (license license:expat)))
1342fce1
JL
1887
1888(define-public ocaml-react
1889 (package
1890 (name "ocaml-react")
d7d41026 1891 (version "1.2.1")
1342fce1
JL
1892 (source
1893 (origin
1894 (method url-fetch)
1895 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1896 version ".tbz"))
1897 (sha256 (base32
d7d41026 1898 "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"))))
1342fce1 1899 (build-system ocaml-build-system)
564cf93f
JL
1900 (native-inputs
1901 `(("ocamlbuild" ,ocamlbuild)
d7d41026
JL
1902 ("opam" ,opam)
1903 ("ocaml-topkg" ,ocaml-topkg)))
564cf93f
JL
1904 (arguments
1905 `(#:tests? #f
d7d41026 1906 #:build-flags (list "build")
564cf93f
JL
1907 #:phases
1908 (modify-phases %standard-phases
1909 (delete 'configure))))
1342fce1
JL
1910 (home-page "http://erratique.ch/software/react")
1911 (synopsis "Declarative events and signals for OCaml")
1912 (description "React is an OCaml module for functional reactive programming
1913(FRP). It provides support to program with time varying values: declarative
1914events and signals. React doesn't define any primitive event or signal, it
1915lets the client choose the concrete timeline.")
1916 (license license:bsd-3)))
37f17e2a
JL
1917
1918(define-public ocaml-ssl
1919 (package
1920 (name "ocaml-ssl")
4a8a0d85 1921 (version "0.5.9")
37f17e2a
JL
1922 (source
1923 (origin
8ae540a2
TGR
1924 (method git-fetch)
1925 (uri (git-reference
b0e7b699 1926 (url "https://github.com/savonet/ocaml-ssl")
8ae540a2
TGR
1927 (commit version)))
1928 (file-name (git-file-name name version))
37f17e2a 1929 (sha256 (base32
4a8a0d85 1930 "04h02rvzrwp886n5hsx84rnc9b150iggy38g5v1x1rwz3pkdnmf0"))))
b858c5ac 1931 (build-system dune-build-system)
564cf93f 1932 (arguments
b858c5ac 1933 `(#:test-target "."))
564cf93f
JL
1934 (native-inputs
1935 `(("autoconf" ,autoconf)
1936 ("automake" ,automake)
1937 ("which" ,which)))
37f17e2a
JL
1938 (propagated-inputs `(("openssl" ,openssl)))
1939 (home-page "https://github.com/savonet/ocaml-ssl/")
1940 (synopsis "OCaml bindings for OpenSSL")
36dba63b
TGR
1941 (description
1942 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
1943through Transport Layer Security (@dfn{TLS}) encrypted connections.")
37f17e2a 1944 (license license:lgpl2.1)))
1fdfbadf 1945
2624921a
JL
1946(define-public ocaml-mmap
1947 (package
1948 (name "ocaml-mmap")
1949 (version "1.1.0")
1950 (source (origin
1951 (method git-fetch)
1952 (uri (git-reference
1953 (url "https://github.com/mirage/mmap")
1954 (commit (string-append "v" version))))
0f654e63 1955 (file-name (git-file-name name version))
2624921a
JL
1956 (sha256
1957 (base32
1958 "1jaismy5d1bhbbanysmr2k79px0yv6ya265dri3949nha1l23i60"))))
1959 (build-system dune-build-system)
1960 (home-page "https://github.com/mirage/mmap")
1961 (synopsis "File mapping for OCaml")
1962 (description "This project provides a @command{Mmap.map_file} function
1963for mapping files in memory. This function is the same as the
a6d35eb4 1964@command{Unix.map_file} function added in OCaml >= 4.06.")
2624921a
JL
1965 (license (list license:qpl license:lgpl2.0))))
1966
1fdfbadf
JL
1967(define-public ocaml-lwt
1968 (package
1969 (name "ocaml-lwt")
16829d3b 1970 (version "5.1.1")
1fdfbadf
JL
1971 (source
1972 (origin
8684575a
EF
1973 (method git-fetch)
1974 (uri (git-reference
1975 (url "https://github.com/ocsigen/lwt")
1976 (commit version)))
1977 (file-name (git-file-name name version))
1fdfbadf 1978 (sha256 (base32
8684575a 1979 "1nl7rdnwfdhwcsm5zpay1nr9y5cbapd9x1qzily7zk9ab4v52m8g"))))
f880b03b 1980 (build-system dune-build-system)
1fdfbadf 1981 (arguments
16829d3b 1982 `(#:package "lwt"))
564cf93f 1983 (native-inputs
16829d3b
JL
1984 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
1985 ("ocaml-cppo" ,ocaml-cppo)
1986 ("pkg-config" ,pkg-config)))
564cf93f
JL
1987 (inputs
1988 `(("libev" ,libev)
1989 ("glib" ,glib)))
1990 (propagated-inputs
16829d3b
JL
1991 `(("ocaml-mmap" ,ocaml-mmap)
1992 ("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
1993 ("ocaml-result" ,ocaml-result)
1994 ("ocaml-seq" ,ocaml-seq)))
1fdfbadf
JL
1995 (home-page "https://github.com/ocsigen/lwt")
1996 (synopsis "Cooperative threads and I/O in monadic style")
1997 (description "Lwt provides typed, composable cooperative threads. These
1998make it easy to run normally-blocking I/O operations concurrently in a single
1999process. Also, in many cases, Lwt threads can interact without the need for
2000locks or other synchronization primitives.")
2001 (license license:lgpl2.1)))
9dc7dcb2 2002
d77310cc
JL
2003(define-public ocaml-lwt-react
2004 (package
2005 (inherit ocaml-lwt)
2006 (name "ocaml-lwt-react")
2007 (version "1.1.3")
2008 (source (origin
2009 (method git-fetch)
2010 (uri (git-reference
2011 (url "https://github.com/ocsigen/lwt")
2012 ;; Version from opam
2013 (commit "4.3.0")))
2014 (file-name (git-file-name name version))
2015 (sha256
2016 (base32
2017 "0f7036srqz7zmnz0n164734smgkrqz78r1i35cg30x31kkr3pnn4"))))
2018 (arguments
2019 `(#:package "lwt_react"))
2020 (properties `((upstream-name . "lwt_react")))
2021 (propagated-inputs
2022 `(("ocaml-lwt" ,ocaml-lwt)
2023 ("ocaml-react" ,ocaml-react)))))
2024
564cf93f
JL
2025(define-public ocaml-lwt-log
2026 (package
2027 (name "ocaml-lwt-log")
72b2e2ea
JL
2028 (version "1.1.1")
2029 (source (origin
2030 (method git-fetch)
2031 (uri (git-reference
2032 (url "https://github.com/aantron/lwt_log")
2033 (commit version)))
2034 (file-name (git-file-name name version))
2035 (sha256
2036 (base32
2037 "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
5d071263 2038 (build-system dune-build-system)
564cf93f 2039 (arguments
2d00625f 2040 `(#:tests? #f)); require lwt_ppx
564cf93f
JL
2041 (propagated-inputs
2042 `(("lwt" ,ocaml-lwt)))
f08b235d 2043 (properties `((upstream-name . "lwt_log")))
564cf93f
JL
2044 (home-page "https://github.com/aantron/lwt_log")
2045 (synopsis "Logging library")
2046 (description "This package provides a deprecated logging component for
2047ocaml lwt.")
2048 (license license:lgpl2.1)))
2049
9dc7dcb2
JL
2050(define-public ocaml-logs
2051 (package
2052 (name "ocaml-logs")
276be8f2 2053 (version "0.7.0")
9dc7dcb2
JL
2054 (source (origin
2055 (method url-fetch)
2056 (uri (string-append "http://erratique.ch/software/logs/releases/"
2057 "logs-" version ".tbz"))
2058 (sha256
2059 (base32
276be8f2 2060 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
9dc7dcb2 2061 (build-system ocaml-build-system)
564cf93f
JL
2062 (arguments
2063 `(#:tests? #f
2064 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2065 #:phases
2066 (modify-phases %standard-phases
2067 (delete 'configure))))
2068 (native-inputs
2069 `(("ocamlbuild" ,ocamlbuild)
2070 ("opam" ,opam)))
2071 (propagated-inputs
2072 `(("fmt" ,ocaml-fmt)
2073 ("lwt" ,ocaml-lwt)
2074 ("mtime" ,ocaml-mtime)
2075 ("result" ,ocaml-result)
2076 ("cmdliner" ,ocaml-cmdliner)
2077 ("topkg" ,ocaml-topkg)))
9dc7dcb2
JL
2078 (home-page "http://erratique.ch/software/logs")
2079 (synopsis "Logging infrastructure for OCaml")
2080 (description "Logs provides a logging infrastructure for OCaml. Logging is
2081performed on sources whose reporting level can be set independently. Log
2082message report is decoupled from logging and is handled by a reporter.")
2083 (license license:isc)))
fbf38b09
JL
2084
2085(define-public ocaml-fpath
2086 (package
2087 (name "ocaml-fpath")
7e495384 2088 (version "0.7.2")
fbf38b09
JL
2089 (source (origin
2090 (method url-fetch)
2091 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2092 "fpath-" version ".tbz"))
2093 (sha256
2094 (base32
7e495384 2095 "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
fbf38b09 2096 (build-system ocaml-build-system)
564cf93f
JL
2097 (arguments
2098 `(#:tests? #f
2099 #:build-flags (list "build")
2100 #:phases
2101 (modify-phases %standard-phases
2102 (delete 'configure))))
2103 (native-inputs
2104 `(("ocamlbuild" ,ocamlbuild)
2105 ("opam" ,opam)))
2106 (propagated-inputs
2107 `(("topkg" ,ocaml-topkg)
2108 ("astring" ,ocaml-astring)))
fbf38b09
JL
2109 (home-page "http://erratique.ch/software/fpath")
2110 (synopsis "File system paths for OCaml")
2111 (description "Fpath is an OCaml module for handling file system paths with
2112POSIX or Windows conventions. Fpath processes paths without accessing the
2113file system and is independent from any system library.")
2114 (license license:isc)))
33e0702d
JL
2115
2116(define-public ocaml-bos
2117 (package
2118 (name "ocaml-bos")
a1034ea0 2119 (version "0.2.0")
33e0702d
JL
2120 (source (origin
2121 (method url-fetch)
2122 (uri (string-append "http://erratique.ch/software/bos/releases/"
2123 "bos-" version ".tbz"))
2124 (sha256
2125 (base32
a1034ea0 2126 "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"))))
33e0702d 2127 (build-system ocaml-build-system)
564cf93f
JL
2128 (arguments
2129 `(#:tests? #f
2130 #:build-flags (list "build")
2131 #:phases
2132 (modify-phases %standard-phases
2133 (delete 'configure))))
2134 (native-inputs
2135 `(("ocamlbuild" ,ocamlbuild)
2136 ("opam" ,opam)))
2137 (propagated-inputs
2138 `(("topkg" ,ocaml-topkg)
2139 ("astring" ,ocaml-astring)
2140 ("fmt" ,ocaml-fmt)
2141 ("fpath" ,ocaml-fpath)
2142 ("logs" ,ocaml-logs)
2143 ("rresult" ,ocaml-rresult)))
33e0702d
JL
2144 (home-page "http://erratique.ch/software/bos")
2145 (synopsis "Basic OS interaction for OCaml")
2146 (description "Bos provides support for basic and robust interaction with
2147the operating system in OCaml. It has functions to access the process
2148environment, parse command line arguments, interact with the file system and
2149run command line programs.")
2150 (license license:isc)))
036b8579
JL
2151
2152(define-public ocaml-xmlm
2153 (package
2154 (name "ocaml-xmlm")
564cf93f 2155 (version "1.3.0")
036b8579
JL
2156 (source (origin
2157 (method url-fetch)
2158 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2159 "xmlm-" version ".tbz"))
2160 (sha256
2161 (base32
564cf93f 2162 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
036b8579 2163 (build-system ocaml-build-system)
564cf93f
JL
2164 (arguments
2165 `(#:tests? #f
2166 #:build-flags (list "build")
2167 #:phases
2168 (modify-phases %standard-phases
2169 (delete 'configure))))
2170 (native-inputs
2171 `(("ocamlbuild" ,ocamlbuild)
2172 ("ocaml-topkg" ,ocaml-topkg)
2173 ("opam" ,opam)))
036b8579
JL
2174 (home-page "http://erratique.ch/software/xmlm")
2175 (synopsis "Streaming XML codec for OCaml")
2176 (description "Xmlm is a streaming codec to decode and encode the XML data
2177format. It can process XML documents without a complete in-memory
2178representation of the data.")
2179 (license license:isc)))
6e9b678e 2180
87858bc5 2181(define-public ocaml4.07-gen
5a4003f4 2182 (package
87858bc5 2183 (name "ocaml4.07-gen")
5a4003f4
JL
2184 (version "0.5.2")
2185 (source (origin
5045821e
EF
2186 (method git-fetch)
2187 (uri (git-reference
2188 (url "https://github.com/c-cube/gen")
2189 (commit version)))
2190 (file-name (git-file-name name version))
5a4003f4
JL
2191 (sha256
2192 (base32
5045821e 2193 "1h9g508rnj2j8va5nvhamzscp954vrkh0hdf4pn3d10pcfyslfg2"))))
5a4003f4
JL
2194 (build-system dune-build-system)
2195 (arguments
2196 `(#:tests? #f; no tests
87858bc5
JL
2197 #:package "gen"
2198 #:ocaml ,ocaml-4.07
339c752d
JL
2199 #:findlib ,ocaml4.07-findlib
2200 #:dune ,ocaml4.07-dune))
5a4003f4 2201 (propagated-inputs
87858bc5 2202 `(("ocaml-odoc" ,ocaml4.07-odoc)))
5a4003f4 2203 (native-inputs
87858bc5
JL
2204 `(("ocaml-qtest" ,(package-with-ocaml4.07 ocaml-qtest))
2205 ("ocaml-qcheck" ,(package-with-ocaml4.07 ocaml-qcheck))))
5a4003f4
JL
2206 (home-page "https://github.com/c-cube/gen/")
2207 (synopsis "Iterators for OCaml, both restartable and consumable")
2208 (description "Gen implements iterators of OCaml, that are both restartable
2209and consumable.")
2210 (license license:bsd-2)))
2211
87858bc5 2212(define-public ocaml4.07-sedlex
98a468ff 2213 (package
87858bc5 2214 (name "ocaml4.07-sedlex")
98a468ff
JL
2215 (version "2.1")
2216 (source (origin
2217 (method git-fetch)
2218 (uri (git-reference
2219 (url "https://github.com/ocaml-community/sedlex")
2220 (commit (string-append "v" version))))
2221 (file-name (git-file-name name version))
2222 (sha256
2223 (base32
2224 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
2225 (build-system dune-build-system)
2226 (arguments
2227 `(#:tests? #f; no tests
2228 #:package "sedlex"
2229 #:phases
2230 (modify-phases %standard-phases
2231 (add-before 'build 'copy-resources
2232 (lambda* (#:key inputs #:allow-other-keys)
2233 (with-directory-excursion "src/generator/data"
2234 (for-each
2235 (lambda (file)
2236 (copy-file (assoc-ref inputs file) file))
2237 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
2238 "PropList.txt")))
2239 #t))
2240 (add-before 'build 'chmod
2241 (lambda _
2242 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
87858bc5
JL
2243 #t)))
2244 #:ocaml ,ocaml-4.07
339c752d
JL
2245 #:findlib ,ocaml4.07-findlib
2246 #:dune ,ocaml4.07-dune))
98a468ff 2247 (native-inputs
87858bc5 2248 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
98a468ff 2249 (propagated-inputs
87858bc5
JL
2250 `(("ocaml-gen" ,ocaml4.07-gen)
2251 ("ocaml-ppx-tools-versioned"
2252 ,(package-with-ocaml4.07 ocaml-ppx-tools-versioned))
2253 ("ocaml-uchar" ,(package-with-ocaml4.07 ocaml-uchar))))
98a468ff
JL
2254 ;; These three files are needed by src/generator/data/dune, but would be
2255 ;; downloaded using curl at build time.
2256 (inputs
2257 `(("DerivedCoreProperties.txt"
2258 ,(origin
2259 (method url-fetch)
2260 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
2261 (sha256
2262 (base32
2263 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
2264 ("DerivedGeneralCategory.txt"
2265 ,(origin
2266 (method url-fetch)
2267 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
2268 (sha256
2269 (base32
2270 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
2271 ("PropList.txt"
2272 ,(origin
2273 (method url-fetch)
2274 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2275 (sha256
2276 (base32
2277 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
d8bf501e 2278 (home-page "https://www.cduce.org/download.html#side")
98a468ff
JL
2279 (synopsis "Lexer generator for Unicode and OCaml")
2280 (description "Lexer generator for Unicode and OCaml.")
2281 (license license:expat)))
2282
33f16b9a
JL
2283(define-public ocaml-uchar
2284 (package
2285 (name "ocaml-uchar")
f0dece30 2286 (version "0.0.2")
33f16b9a
JL
2287 (source
2288 (origin
2289 (method url-fetch)
2290 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2291 version "/uchar-" version ".tbz"))
2292 (sha256 (base32
f0dece30 2293 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
33f16b9a 2294 (build-system ocaml-build-system)
564cf93f
JL
2295 (arguments
2296 `(#:tests? #f
2297 #:build-flags (list "native=true" "native-dynlink=true")
2298 #:phases
2299 (modify-phases %standard-phases
2300 (delete 'configure))))
2301 (native-inputs
2302 `(("ocamlbuild" ,ocamlbuild)
2303 ("opam" ,opam)))
33f16b9a
JL
2304 (home-page "https://github.com/ocaml/uchar")
2305 (synopsis "Compatibility library for OCaml's Uchar module")
2306 (description "The uchar package provides a compatibility library for the
2307`Uchar` module introduced in OCaml 4.03.")
2308 (license license:lgpl2.1)))
84290923
JL
2309
2310(define-public ocaml-uutf
2311 (package
2312 (name "ocaml-uutf")
564cf93f 2313 (version "1.0.1")
84290923
JL
2314 (source (origin
2315 (method url-fetch)
2316 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2317 "uutf-" version ".tbz"))
2318 (sha256
2319 (base32
564cf93f 2320 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
84290923 2321 (build-system ocaml-build-system)
564cf93f
JL
2322 (arguments
2323 `(#:tests? #f
2324 #:build-flags (list "build")
2325 #:phases
2326 (modify-phases %standard-phases
2327 (delete 'configure))))
2328 (native-inputs
2329 `(("ocamlbuild" ,ocamlbuild)
2330 ("opam" ,opam)
2331 ("topkg" ,ocaml-topkg)))
2332 (propagated-inputs
2333 `(("uchar" ,ocaml-uchar)
2334 ("cmdliner" ,ocaml-cmdliner)))
84290923
JL
2335 (home-page "http://erratique.ch/software/uutf")
2336 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2337 (description "Uutf is a non-blocking streaming codec to decode and encode
2338the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2339work character by character without blocking on IO. Decoders perform character
2340position tracking and support newline normalization.
2341
2342Functions are also provided to fold over the characters of UTF encoded OCaml
2343string values and to directly encode characters in OCaml Buffer.t values.")
2344 (license license:isc)))
800ab1fb
JL
2345
2346(define-public ocaml-jsonm
2347 (package
2348 (name "ocaml-jsonm")
564cf93f 2349 (version "1.0.1")
800ab1fb
JL
2350 (source (origin
2351 (method url-fetch)
2352 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2353 "jsonm-" version ".tbz"))
2354 (sha256
2355 (base32
564cf93f 2356 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
800ab1fb 2357 (build-system ocaml-build-system)
564cf93f
JL
2358 (arguments
2359 `(#:tests? #f
2360 #:build-flags (list "build")
2361 #:phases
2362 (modify-phases %standard-phases
2363 (delete 'configure))))
2364 (native-inputs
2365 `(("ocamlbuild" ,ocamlbuild)
2366 ("opam" ,opam)
2367 ("topkg" ,ocaml-topkg)))
2368 (propagated-inputs
2369 `(("uutf" ,ocaml-uutf)
2370 ("cmdliner" ,ocaml-cmdliner)))
800ab1fb
JL
2371 (home-page "http://erratique.ch/software/jsonm")
2372 (synopsis "Non-blocking streaming JSON codec for OCaml")
2373 (description "Jsonm is a non-blocking streaming codec to decode and encode
2374the JSON data format. It can process JSON text without blocking on IO and
2375without a complete in-memory representation of the data.")
2376 (license license:isc)))
fd6e260e
JL
2377
2378(define-public ocaml-ocurl
2379 (package
2380 (name "ocaml-ocurl")
1ac2bf05 2381 (version "0.9.1")
fd6e260e
JL
2382 (source (origin
2383 (method url-fetch)
2384 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2385 version ".tar.gz"))
2386 (sha256
2387 (base32
1ac2bf05 2388 "0n621cxb9012pj280c7821qqsdhypj8qy9qgrah79dkh6a8h2py6"))))
fd6e260e 2389 (build-system ocaml-build-system)
564cf93f
JL
2390 (arguments
2391 `(#:phases
2392 (modify-phases %standard-phases
2393 (add-before 'configure 'fix-/bin/sh
2394 (lambda* (#:key inputs #:allow-other-keys)
2395 (substitute* "configure"
2396 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2397 (native-inputs
2398 `(("pkg-config" ,pkg-config)))
fd6e260e
JL
2399 (inputs `(("curl" ,curl)))
2400 (home-page "http://ocurl.forge.ocamlcore.org/")
2401 (synopsis "OCaml bindings for libcurl")
2402 (description "Client-side URL transfer library, supporting HTTP and a
2403multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2404 (license license:isc)))
5d08f98d
JL
2405
2406(define-public ocaml-base64
2407 (package
2408 (name "ocaml-base64")
bd2ad4a1 2409 (version "3.4.0")
5d08f98d 2410 (source (origin
3617d4f9
JL
2411 (method git-fetch)
2412 (uri (git-reference
2413 (url "https://github.com/mirage/ocaml-base64")
2414 (commit (string-append "v" version))))
2415 (file-name (git-file-name name version))
5d08f98d
JL
2416 (sha256
2417 (base32
bd2ad4a1 2418 "0aa1m1sr8p1hgc10p96mij7p22r3qcysvzy6fz2jqamfgswchgqc"))))
3617d4f9 2419 (build-system dune-build-system)
bd2ad4a1
JL
2420 (arguments
2421 `(#:phases
2422 (modify-phases %standard-phases
2423 (add-before 'build 'fix-dune
2424 (lambda _
2425 ;; This package expects dune 2, which unbundled its configurator
2426 ;; module. We still use dune 1, so we need to let it know we need
2427 ;; its internal module.
2428 (substitute* "config/dune"
2429 (("dune-configurator") "dune.configurator"))
2430 #t)))))
5d08f98d 2431 (native-inputs
3617d4f9
JL
2432 `(("ocaml-alcotest" ,ocaml-alcotest)
2433 ("ocaml-bos" ,ocaml-bos)
2434 ("ocaml-rresult" ,ocaml-rresult)))
5d08f98d
JL
2435 (home-page "https://github.com/mirage/ocaml-base64")
2436 (synopsis "Base64 encoding for OCaml")
2437 (description "Base64 is a group of similar binary-to-text encoding schemes
2438that represent binary data in an ASCII string format by translating it into a
2439radix-64 representation. It is specified in RFC 4648.")
2440 (license license:isc)))
c590f1ae
JL
2441
2442(define-public ocamlify
2443 (package
2444 (name "ocamlify")
2d3370c4 2445 (version "0.0.2")
4a7243fc
TGR
2446 (source
2447 (origin
2448 (method url-fetch)
2449 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
2450 version "/ocamlify-" version ".tar.gz"))
2451 (sha256
2d3370c4 2452 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
c590f1ae 2453 (build-system ocaml-build-system)
c590f1ae 2454 (arguments
83e8fceb
JL
2455 `(#:tests? #f; no tests
2456 #:phases
c590f1ae 2457 (modify-phases %standard-phases
83e8fceb
JL
2458 (delete 'configure)
2459 (replace 'build
2460 ;; This package uses pre-generated setup.ml by oasis, but is
2461 ;; a dependency of oasis. the pre-generated setup.ml is broken
2462 ;; with recent versions of OCaml, so we perform a bootstrap instead.
2d3370c4 2463 (lambda _
83e8fceb
JL
2464 (substitute* "src/OCamlifyConfig.ml.ab"
2465 (("$pkg_version") ,version))
2466 (rename-file "src/OCamlifyConfig.ml.ab" "src/OCamlifyConfig.ml")
2467 (with-directory-excursion "src"
2468 (invoke "ocamlc" "OCamlifyConfig.ml" "ocamlify.ml" "-o"
2469 "ocamlify"))
2d3370c4 2470 #t))
83e8fceb 2471 (replace 'install
6e494267 2472 (lambda* (#:key outputs #:allow-other-keys)
83e8fceb
JL
2473 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
2474 (mkdir-p bin)
2475 (install-file "src/ocamlify" bin)
2476 #t))))))
c590f1ae
JL
2477 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2478 (synopsis "Include files in OCaml code")
e49a6c82 2479 (description "OCamlify creates OCaml source code by including
c590f1ae
JL
2480whole files into OCaml string or string list. The code generated can be
2481compiled as a standard OCaml file. It allows embedding external resources as
2482OCaml code.")
2483 (license license:lgpl2.1+))); with the OCaml static compilation exception
41e8e079
JL
2484
2485(define-public omake
2486 (package
2487 (name "omake")
564cf93f 2488 (version "0.10.3")
41e8e079
JL
2489 (source (origin
2490 (method url-fetch)
2491 (uri (string-append "http://download.camlcity.org/download/"
2492 "omake-" version ".tar.gz"))
2493 (sha256
2494 (base32
564cf93f 2495 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
41e8e079
JL
2496 (patches (search-patches "omake-fix-non-determinism.patch"))))
2497 (build-system ocaml-build-system)
2498 (arguments
2499 `(#:make-flags
2500 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2501 #:tests? #f ; no test target
2502 #:phases
2503 (modify-phases %standard-phases
2504 (add-before 'configure 'fix-makefile
2505 (lambda* (#:key outputs #:allow-other-keys)
2506 (substitute* "mk/osconfig_unix.mk"
2507 (("CC = cc") "CC = gcc")))))))
2508 (native-inputs `(("hevea" ,hevea)))
2509 (home-page "http://projects.camlcity.org/projects/omake.html")
2510 (synopsis "Build system designed for scalability and portability")
2511 (description "Similar to make utilities you may have used, but it features
2512many additional enhancements, including:
2513
2514@enumerate
2515@item Support for projects spanning several directories or directory hierarchies.
2516@item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2517 with full support for incremental builds.
2518@item Dependency analysis takes the command lines into account — whenever the
2519 command line used to build a target changes, the target is considered
2520 out-of-date.
2521@item Fully scriptable, includes a library that providing support for standard
2522 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2523@end enumerate")
2524 (license (list license:lgpl2.1 ; libmojave
2525 license:expat ; OMake scripts
2526 license:gpl2)))) ; OMake itself, with ocaml linking exception
2527 ; see LICENSE.OMake
0e9e94b7
JL
2528
2529(define-public ocaml-batteries
2530 (package
2531 (name "ocaml-batteries")
242e9f0d 2532 (version "2.10.0")
0e9e94b7
JL
2533 (source (origin
2534 (method url-fetch)
564cf93f
JL
2535 (uri (string-append "https://github.com/ocaml-batteries-team/"
2536 "batteries-included/releases/download/v"
2537 version "/batteries-" version ".tar.gz"))
0e9e94b7
JL
2538 (sha256
2539 (base32
242e9f0d 2540 "08ghw87d56h1a6y1nnh3x2wy9xj25jqfk5sp6ma9nsyd37babb0h"))))
0e9e94b7
JL
2541 (build-system ocaml-build-system)
2542 (native-inputs
564cf93f 2543 `(("ocamlbuild" ,ocamlbuild)
af76eeda 2544 ("qtest" ,ocaml-qtest)))
564cf93f
JL
2545 (propagated-inputs
2546 `(("ocaml-num" ,ocaml-num)))
0e9e94b7
JL
2547 (arguments
2548 `(#:phases
2549 (modify-phases %standard-phases
2550 (delete 'check) ; tests are run by the build phase
850f7873
JL
2551 (add-before 'build 'fix-nondeterminism
2552 (lambda _
2553 (substitute* "setup.ml"
2554 (("Sys.readdir dirname")
2555 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
2556 #t))
0e9e94b7 2557 (replace 'build
564cf93f
JL
2558 (lambda* (#:key inputs outputs #:allow-other-keys)
2559 (let ((files
2560 (map (lambda (str)
2561 (substring str 0 (- (string-length str) 1)))
2562 (append
2563 (find-files "src" ".*.mliv")
2564 (find-files "src" ".*.mlv")
2565 (find-files "src" ".*.mlp")))))
2566 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2567 "-lflag" "-dllpath-all" files)
2568 (for-each (lambda (file)
2569 (copy-file (string-append "_build/" file) file))
2570 files))
2571 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2572 "-lflag" "-dllpath-all" "build/mkconf.byte")
2573 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2574 (invoke "make" "all")
2575 #t)))))
0e9e94b7
JL
2576 (home-page "http://batteries.forge.ocamlcore.org/")
2577 (synopsis "Development platform for the OCaml programming language")
2578 (description "Define a standard set of libraries which may be expected on
2579every compliant installation of OCaml and organize these libraries into a
2580hierarchy of modules.")
2581 (license license:lgpl2.1+)))
f8a12de1 2582
87858bc5 2583(define-public ocaml4.07-pcre
f8a12de1 2584 (package
87858bc5 2585 (name "ocaml4.07-pcre")
1e8439de 2586 (version "7.4.1")
f8a12de1 2587 (source (origin
1e8439de
JL
2588 (method git-fetch)
2589 (uri (git-reference
2590 (url "https://github.com/mmottl/pcre-ocaml")
2591 (commit version)))
2592 (file-name (git-file-name name version))
f8a12de1
JL
2593 (sha256
2594 (base32
1e8439de
JL
2595 "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
2596 (build-system dune-build-system)
f8a12de1 2597 (arguments
87858bc5
JL
2598 `(#:test-target "."
2599 #:ocaml ,ocaml-4.07
2600 #:findlib ,ocaml4.07-findlib
2601 #:dune ,ocaml4.07-dune))
f8a12de1 2602 (native-inputs
87858bc5 2603 `(("ocaml-base" ,ocaml4.07-base)
f8a12de1
JL
2604 ("pcre:bin" ,pcre "bin")))
2605 (propagated-inputs `(("pcre" ,pcre)))
2606 (home-page "https://mmottl.github.io/pcre-ocaml")
2607 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2608 (description "Pcre-ocaml offers library functions for string pattern
2609matching and substitution, similar to the functionality offered by the Perl
2610language.")
2611 (license license:lgpl2.1+))); with the OCaml link exception
3763eea7 2612
87858bc5 2613(define-public ocaml4.07-expect
3763eea7 2614 (package
87858bc5 2615 (name "ocaml4.07-expect")
564cf93f 2616 (version "0.0.6")
3763eea7
JL
2617 (source (origin
2618 (method url-fetch)
564cf93f 2619 (uri (ocaml-forge-uri name version 1736))
3763eea7
JL
2620 (sha256
2621 (base32
564cf93f
JL
2622 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2623 (arguments
87858bc5
JL
2624 `(#:tests? #f
2625 #:ocaml ,ocaml-4.07
2626 #:findlib ,ocaml4.07-findlib))
3763eea7
JL
2627 (build-system ocaml-build-system)
2628 (native-inputs
87858bc5
JL
2629 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))
2630 ("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
2631 ("ocaml-pcre" ,ocaml4.07-pcre)
2632 ("ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
2633 (propagated-inputs
2634 `(("batteries" ,(package-with-ocaml4.07 ocaml-batteries))))
3763eea7
JL
2635 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2636 (synopsis "Simple implementation of expect")
2637 (description "Help building unitary testing of interactive program. You
2638can match the question using a regular expression or a timeout.")
2639 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
77a515e9 2640
a21ea76f
JL
2641(define-public ocaml-stdlib-shims
2642 (package
2643 (name "ocaml-stdlib-shims")
2644 (version "0.1.0")
2645 (source (origin
2646 (method git-fetch)
2647 (uri (git-reference
2648 (url "https://github.com/ocaml/stdlib-shims")
2649 (commit version)))
2650 (file-name (git-file-name name version))
2651 (sha256
2652 (base32
2653 "007dwywsr5285z0np6a9nr0h8iqmyzfrlx6s5xaqcwj69zabsrjm"))))
2654 (build-system dune-build-system)
2655 (home-page "https://github.com/ocaml/stdlib-shims")
2656 (synopsis "OCaml stdlib features backport to older OCaml compilers")
2657 (description "This package backports some of the new stdlib features to
2658older compilers, such as the Stdlib module. This allows projects that require
2659compatibility with older compiler to use these new features in their code.")
2660 ;; with ocaml-linking exception
2661 (license license:lgpl2.1+)))
2662
bbe9915b 2663(define-public ocaml-fileutils
77a515e9 2664 (package
bbe9915b 2665 (name "ocaml-fileutils")
bee8c8ac 2666 (version "0.6.2")
77a515e9 2667 (source (origin
1fe01b70
JL
2668 (method git-fetch)
2669 (uri (git-reference
2670 (url "https://github.com/gildor478/ocaml-fileutils")
2671 (commit (string-append "v" version))))
2672 (file-name (git-file-name name version))
77a515e9
JL
2673 (sha256
2674 (base32
bee8c8ac
JL
2675 "01qf51b8pb7vyfba7y0kb7ajwj1950im25d7f59821zwsibns3d9"))))
2676 (build-system dune-build-system)
1fe01b70
JL
2677 (propagated-inputs
2678 `(("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
564cf93f 2679 (native-inputs
bee8c8ac 2680 `(("ocaml-ounit" ,ocaml-ounit)))
77a515e9
JL
2681 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2682 (synopsis "Pure OCaml functions to manipulate real file and filename")
2683 (description "Library to provide pure OCaml functions to manipulate real
2684file (POSIX like) and filename.")
2685 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
5eed45a8
JL
2686
2687(define-public ocaml-oasis
2688 (package
2689 (name "ocaml-oasis")
564cf93f 2690 (version "0.4.11")
5eed45a8
JL
2691 (source (origin
2692 (method url-fetch)
564cf93f 2693 (uri (ocaml-forge-uri name version 1757))
5eed45a8
JL
2694 (sha256
2695 (base32
564cf93f 2696 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
5eed45a8
JL
2697 (modules '((guix build utils)))
2698 (snippet
6cbee49d
MW
2699 '(begin
2700 (substitute* "test/test-main/Test.ml"
2701 ;; most of these tests fail because ld cannot find crti.o, but according
2702 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
564cf93f 2703 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
6cbee49d
MW
2704 (("TestBaseCompat.tests;") "")
2705 (("TestExamples.tests;") "")
2706 (("TestFull.tests;") "")
2707 (("TestPluginDevFiles.tests;") "")
2708 (("TestPluginInternal.tests;") "")
2709 (("TestPluginOCamlbuild.tests;") "")
2710 (("TestPluginOMake.tests;") ""))
2711 #t))))
5eed45a8 2712 (build-system ocaml-build-system)
564cf93f
JL
2713 (arguments
2714 `(#:tests? #f))
5eed45a8 2715 (native-inputs
564cf93f
JL
2716 `(("ocamlbuild" ,ocamlbuild)
2717 ("ocamlify" ,ocamlify)
2718 ("ocamlmod" ,ocamlmod)))
5eed45a8
JL
2719 (home-page "https://oasis.forge.ocamlcore.org")
2720 (synopsis "Integrates a configure, build, install system in OCaml projects")
2721 (description "OASIS is a tool to integrate a configure, build and install
2722system in your OCaml projects. It helps to create standard entry points in your
2723build system and allows external tools to analyse your project easily.")
2724 (license license:lgpl2.1+))) ; with ocaml static compilation exception
f95ebba5
JL
2725
2726(define-public ocaml-js-build-tools
2727 (package
2728 (name "ocaml-js-build-tools")
2729 (version "113.33.06")
2730 (source (janestreet-origin "js-build-tools" version
2731 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2732 (native-inputs
2733 `(("oasis" ,ocaml-oasis)
564cf93f 2734 ("ocamlbuild" ,ocamlbuild)
f95ebba5
JL
2735 ("opam" ,opam)))
2736 (build-system ocaml-build-system)
2737 (arguments janestreet-arguments)
2738 (home-page "https://github.com/janestreet/js-build-tools")
2739 (synopsis "Collection of tools to help building Jane Street Packages")
2740 (description "This package contains tools to help building Jane Street
2741packages, but can be used for other purposes. It contains:
2742@enumerate
2743@item an @command{oasis2opam-install} tool to produce a @file{.install} file
2744from the oasis build log
2745@item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2746@end enumerate")
2747 (license license:asl2.0)))
f5c8cf3b 2748
f6dde36a
JL
2749(define-public ocaml-cppo
2750 (package
2751 (name "ocaml-cppo")
f082c78c 2752 (version "1.6.6")
f6dde36a
JL
2753 (source
2754 (origin
f082c78c
JL
2755 (method git-fetch)
2756 (uri (git-reference
2757 (url "https://github.com/mjambon/cppo")
2758 (commit (string-append "v" version))))
2759 (file-name (git-file-name name version))
f6dde36a 2760 (sha256 (base32
f082c78c 2761 "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
48b27902 2762 (build-system dune-build-system)
f6dde36a 2763 (arguments
48b27902
JL
2764 `(#:tests? #f
2765 #:build-flags (list "--profile" "release")))
564cf93f 2766 (native-inputs
48b27902 2767 `(("ocamlbuild" ,ocamlbuild)))
f6dde36a
JL
2768 (home-page "https://github.com/mjambon/cppo")
2769 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2770 (description "Cppo is an equivalent of the C preprocessor for OCaml
7230f6d5 2771programs. It allows the definition of simple macros and file inclusion. Cppo is:
f6dde36a 2772@enumerate
7230f6d5 2773@item more OCaml-friendly than @command{cpp}
f6dde36a
JL
2774@item easy to learn without consulting a manual
2775@item reasonably fast
2776@item simple to install and to maintain.
2777@end enumerate")
2778 (license license:bsd-3)))
505394d1 2779
564cf93f
JL
2780(define-public ocaml-seq
2781 (package
2782 (name "ocaml-seq")
2783 (version "0.1")
f6a99fbf
TGR
2784 (source
2785 (origin
2786 (method git-fetch)
2787 (uri (git-reference
b0e7b699 2788 (url "https://github.com/c-cube/seq")
f6a99fbf
TGR
2789 (commit version)))
2790 (file-name (git-file-name name version))
2791 (sha256
2792 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
564cf93f
JL
2793 (build-system ocaml-build-system)
2794 (arguments
2795 `(#:tests? #f
2796 #:phases
2797 (modify-phases %standard-phases
2798 (delete 'configure)
2799 (delete 'build)
2800 (replace 'install
2801 (lambda* (#:key outputs #:allow-other-keys)
2802 (let ((install-dir (string-append (assoc-ref outputs "out")
2803 "/lib/ocaml/site-lib/seq")))
2804 (mkdir-p install-dir)
2805 (with-output-to-file (string-append install-dir "/META")
2806 (lambda _
2807 (display "name=\"seq\"
2808version=\"[distributed with ocaml]\"
2809description=\"dummy package for compatibility\"
2810requires=\"\"")))
f6a99fbf 2811 #t))))))
564cf93f
JL
2812 (home-page "https://github.com/c-cube/seq")
2813 (synopsis "OCaml's standard iterator type")
2814 (description "This package is a compatibility package for OCaml's
2815standard iterator type starting from 4.07.")
2816 (license license:lgpl2.1+)))
2817
f27522d6
JL
2818(define-public ocaml-re
2819 (package
2820 (name "ocaml-re")
58c3118f 2821 (version "1.9.0")
07c3711d
TGR
2822 (source
2823 (origin
2824 (method git-fetch)
2825 (uri (git-reference
b0e7b699 2826 (url "https://github.com/ocaml/ocaml-re")
07c3711d
TGR
2827 (commit version)))
2828 (file-name (git-file-name name version))
2829 (sha256
58c3118f 2830 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
d6fa189e 2831 (build-system dune-build-system)
564cf93f
JL
2832 (arguments
2833 `(#:tests? #f
d6fa189e 2834 #:build-flags (list "--profile" "release")))
564cf93f
JL
2835 (propagated-inputs
2836 `(("ocaml-seq" ,ocaml-seq)))
2837 (native-inputs
d6fa189e 2838 `(("ounit" ,ocaml-ounit)))
f27522d6
JL
2839 (home-page "https://github.com/ocaml/ocaml-re/")
2840 (synopsis "Regular expression library for OCaml")
2841 (description "Pure OCaml regular expressions with:
2842@enumerate
2843@item Perl-style regular expressions (module Re_perl)
2844@item Posix extended regular expressions (module Re_posix)
2845@item Emacs-style regular expressions (module Re_emacs)
2846@item Shell-style file globbing (module Re_glob)
2847@item Compatibility layer for OCaml's built-in Str module (module Re_str)
2848@end enumerate")
2849 (license license:expat)))
5cd47fb0 2850
9059d856
JL
2851(define-public ocaml-ocplib-endian
2852 (package
2853 (name "ocaml-ocplib-endian")
2854 (version "1.0")
2855 (source (origin
4d85a7dd
EF
2856 (method git-fetch)
2857 (uri (git-reference
2858 (url "https://github.com/OCamlPro/ocplib-endian/")
2859 (commit version)))
9059d856
JL
2860 (sha256
2861 (base32
4d85a7dd
EF
2862 "0s1ld3kavz892b8awyxyg1mr98h2g61gy9ci5v6yb49bsii6wicw"))
2863 (file-name (git-file-name name version))))
9059d856 2864 (build-system ocaml-build-system)
564cf93f
JL
2865 (native-inputs
2866 `(("cppo" ,ocaml-cppo)
2867 ("ocamlbuild" ,ocamlbuild)))
9059d856
JL
2868 (home-page "https://github.com/OCamlPro/ocplib-endian")
2869 (synopsis "Optimised functions to read and write int16/32/64 from strings
2870and bigarrays")
2871 (description "Optimised functions to read and write int16/32/64 from strings
2872and bigarrays, based on new primitives added in version 4.01. It works on
2873strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
2874big- and little-endian, with their unsafe counter-parts.")
2875 (license license:lgpl2.1)))
0090b895 2876
bbe9915b 2877(define-public ocaml-cstruct
0090b895 2878 (package
bbe9915b
JL
2879 (name "ocaml-cstruct")
2880 (version "4.0.0")
0090b895 2881 (source (origin
bbe9915b
JL
2882 (method git-fetch)
2883 (uri (git-reference
2884 (url "https://github.com/mirage/ocaml-cstruct")
2885 (commit (string-append "v" version))))
f1d4d79f 2886 (file-name (git-file-name name version))
0090b895
JL
2887 (sha256
2888 (base32
bbe9915b
JL
2889 "0m4bz0digcsc8l2msfikwcbi1y371kccx6xnkwrz212mf5mp98bv"))))
2890 (build-system dune-build-system)
0090b895 2891 (arguments
bbe9915b
JL
2892 `(#:package "cstruct"
2893 #:test-target "."))
0090b895 2894 (native-inputs
bbe9915b 2895 `(("ocaml-alcotest" ,ocaml-alcotest)))
0090b895
JL
2896 (home-page "https://github.com/mirage/ocaml-cstruct")
2897 (synopsis "Access C structures via a camlp4 extension")
2898 (description "Cstruct is a library and syntax extension to make it easier
2899to access C-like structures directly from OCaml. It supports both reading and
2900writing to these structures, and they are accessed via the Bigarray module.")
2901 (license license:isc)))
61bafd44 2902
bbe9915b 2903(define-public ocaml-hex
61bafd44 2904 (package
bbe9915b
JL
2905 (name "ocaml-hex")
2906 (version "1.4.0")
61bafd44 2907 (source (origin
bbe9915b
JL
2908 (method git-fetch)
2909 (uri (git-reference
2910 (url "https://github.com/mirage/ocaml-hex")
2911 (commit (string-append "v" version))))
2912 (file-name (git-file-name name version))
61bafd44
JL
2913 (sha256
2914 (base32
bbe9915b
JL
2915 "0c8nhibcwy0ykzca4jn3gqb8ylq21ff88y82gl60wyzijr64rn0q"))))
2916 (build-system dune-build-system)
564cf93f 2917 (arguments
bbe9915b 2918 `(#:test-target "."))
564cf93f 2919 (propagated-inputs
bbe9915b
JL
2920 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
2921 ("cstruct" ,ocaml-cstruct)))
61bafd44
JL
2922 (home-page "https://github.com/mirage/ocaml-hex/")
2923 (synopsis "Minimal library providing hexadecimal converters")
2924 (description "Hex is a minimal library providing hexadecimal converters.")
2925 (license license:isc)))
d163d97d 2926
87858bc5 2927(define-public ocaml4.07-ezjsonm
bf7bc0d6 2928 (package
87858bc5 2929 (name "ocaml4.07-ezjsonm")
bcc718be 2930 (version "1.1.0")
21b1845d
TGR
2931 (source
2932 (origin
2933 (method git-fetch)
2934 (uri (git-reference
b0e7b699 2935 (url "https://github.com/mirage/ezjsonm")
bcc718be 2936 (commit (string-append "v" version))))
21b1845d
TGR
2937 (file-name (git-file-name name version))
2938 (sha256
bcc718be 2939 (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
bbe9915b
JL
2940 (build-system dune-build-system)
2941 (arguments
2942 `(#:package "ezjsonm"
87858bc5
JL
2943 #:test-target "."
2944 #:ocaml ,ocaml-4.07
339c752d
JL
2945 #:findlib ,ocaml4.07-findlib
2946 #:dune ,ocaml4.07-dune))
bf7bc0d6 2947 (native-inputs
87858bc5 2948 `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))))
bf7bc0d6 2949 (propagated-inputs
87858bc5
JL
2950 `(("ocaml-hex" ,(package-with-ocaml4.07 ocaml-hex))
2951 ("ocaml-jsonm" ,(package-with-ocaml4.07 ocaml-jsonm))
2952 ("ocaml-sexplib" ,ocaml4.07-sexplib)))
bf7bc0d6
JL
2953 (home-page "https://github.com/mirage/ezjsonm/")
2954 (synopsis "Read and write JSON data")
2955 (description "Ezjsonm provides more convenient (but far less flexible) input
2956and output functions that go to and from [string] values than jsonm. This avoids
2957the need to write signal code, which is useful for quick scripts that manipulate
2958JSON.")
2959 (license license:isc)))
2960
87858bc5 2961(define-public ocaml4.07-uri
3dabefee 2962 (package
87858bc5 2963 (name "ocaml4.07-uri")
bbe9915b 2964 (version "2.2.0")
e4bb29dd
TGR
2965 (source
2966 (origin
2967 (method git-fetch)
2968 (uri (git-reference
b0e7b699 2969 (url "https://github.com/mirage/ocaml-uri")
e4bb29dd
TGR
2970 (commit (string-append "v" version))))
2971 (file-name (git-file-name name version))
2972 (sha256
bbe9915b
JL
2973 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
2974 (build-system dune-build-system)
564cf93f 2975 (arguments
58c3118f
JL
2976 `(#:test-target "."
2977 #:phases
2978 (modify-phases %standard-phases
2979 (add-before 'build 'update-deprecated
2980 (lambda _
2981 (substitute* "lib/uri.ml"
87858bc5
JL
2982 (("Re.get") "Re.Group.get")))))
2983 #:ocaml ,ocaml-4.07
339c752d
JL
2984 #:findlib ,ocaml4.07-findlib
2985 #:dune ,ocaml4.07-dune))
3dabefee 2986 (native-inputs
87858bc5
JL
2987 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
2988 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)))
3dabefee 2989 (propagated-inputs
87858bc5
JL
2990 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
2991 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)
2992 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3dabefee
JL
2993 (home-page "https://github.com/mirage/ocaml-uri")
2994 (synopsis "RFC3986 URI/URL parsing library")
2995 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
2996 (license license:isc)))
2997
6134aeb9
JL
2998(define-public ocaml-easy-format
2999 (package
3000 (name "ocaml-easy-format")
ce502774 3001 (version "1.3.2")
6134aeb9 3002 (source (origin
12c3f62a
JL
3003 (method git-fetch)
3004 (uri (git-reference
3005 (url "https://github.com/mjambon/easy-format")
ce502774 3006 (commit version)))
12c3f62a 3007 (file-name (git-file-name name version))
6134aeb9
JL
3008 (sha256
3009 (base32
ce502774 3010 "1fc95q2ypck6m6rv3kiawwilh5ac93v2hcp823mj608d5kj79xkb"))))
12c3f62a 3011 (build-system dune-build-system)
6134aeb9 3012 (arguments
8ff5f39a 3013 `(#:package "easy-format"
ce502774
JL
3014 #:phases
3015 (modify-phases %standard-phases
3016 (add-before 'build 'make-writable
3017 (lambda _
3018 (for-each
3019 (lambda (file)
3020 (chmod file #o644))
3021 (find-files "." "."))
3022 #t)))))
6134aeb9
JL
3023 (home-page "https://github.com/mjambon/easy-format")
3024 (synopsis "Interface to the Format module")
3025 (description "Easy-format is a high-level and functional interface to the
3026Format module of the OCaml standard library.")
3027 (license license:bsd-3)))
3028
87858bc5 3029(define-public ocaml4.07-piqilib
9c5dbbf0 3030 (package
87858bc5 3031 (name "ocaml4.07-piqilib")
05fe0a58 3032 (version "0.6.15")
677a88e0
TGR
3033 (source
3034 (origin
3035 (method git-fetch)
3036 (uri (git-reference
b0e7b699 3037 (url "https://github.com/alavrik/piqi")
677a88e0
TGR
3038 (commit (string-append "v" version))))
3039 (file-name (git-file-name name version))
3040 (sha256
05fe0a58 3041 (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
9c5dbbf0
JL
3042 (build-system ocaml-build-system)
3043 (arguments
3044 `(#:phases
3045 (modify-phases %standard-phases
3046 (add-before 'configure 'fix-ocamlpath
3047 (lambda _
3048 (substitute* '("Makefile" "make/Makefile.ocaml")
3049 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
3050 #t))
3051 (replace 'configure
3052 (lambda* (#:key outputs #:allow-other-keys)
3053 (let ((out (assoc-ref outputs "out")))
3054 (substitute* "make/OCamlMakefile"
3055 (("/bin/sh") (which "bash")))
564cf93f
JL
3056 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3057 (string-append out "/lib/ocaml/site-lib")))
3058 #t))
9c5dbbf0
JL
3059 (add-after 'build 'build-ocaml
3060 (lambda* (#:key outputs #:allow-other-keys)
564cf93f
JL
3061 (invoke "make" "ocaml")
3062 #t))
9c5dbbf0
JL
3063 (add-after 'install 'install-ocaml
3064 (lambda* (#:key outputs #:allow-other-keys)
564cf93f
JL
3065 (invoke "make" "ocaml-install")
3066 #t))
9c5dbbf0
JL
3067 (add-after 'install-ocaml 'link-stubs
3068 (lambda* (#:key outputs #:allow-other-keys)
3069 (let* ((out (assoc-ref outputs "out"))
3070 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3071 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3072 (mkdir-p stubs)
3073 (symlink (string-append lib "/dllpiqilib_stubs.so")
3074 (string-append stubs "/dllpiqilib_stubs.so"))
87858bc5
JL
3075 #t))))
3076 #:ocaml ,ocaml-4.07
3077 #:findlib ,ocaml4.07-findlib))
9c5dbbf0 3078 (native-inputs
05fe0a58 3079 `(("which" ,which)))
9c5dbbf0 3080 (propagated-inputs
87858bc5
JL
3081 `(("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm))
3082 ("ocaml-sedlex" ,ocaml4.07-sedlex)
3083 ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))
3084 ("ocaml-base64" ,(package-with-ocaml4.07 ocaml-base64))))
9c5dbbf0
JL
3085 (home-page "http://piqi.org")
3086 (synopsis "Data serialization and conversion library")
3087 (description "Piqilib is the common library used by the piqi command-line
3088tool and piqi-ocaml.")
3089 (license license:asl2.0)))
3090
88b1533c
JL
3091(define-public ocaml-uuidm
3092 (package
3093 (name "ocaml-uuidm")
3094 (version "0.9.6")
3095 (source (origin
3096 (method url-fetch)
3097 (uri (string-append "http://erratique.ch/software/uuidm/"
3098 "releases/uuidm-" version ".tbz"))
3099 (sha256
3100 (base32
3101 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
3102 (build-system ocaml-build-system)
3103 (arguments
3104 `(#:build-flags
3105 (list "build" "--tests" "true" "--with-cmdliner" "true")
3106 #:phases
3107 (modify-phases %standard-phases
3108 (delete 'configure))))
3109 (native-inputs
564cf93f
JL
3110 `(("ocamlbuild" ,ocamlbuild)
3111 ("opam" ,opam)))
88b1533c
JL
3112 (propagated-inputs
3113 `(("cmdliner" ,ocaml-cmdliner)
3114 ("topkg" ,ocaml-topkg)))
3115 (home-page "http://erratique.ch/software/uuidm")
3116 (synopsis "Universally unique identifiers for OCaml")
3117 (description "Uuidm is an OCaml module implementing 128 bits universally
3118unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
3119and 4 (random based) according to RFC 4122.")
3120 (license license:isc)))
3121
8a238180
JL
3122(define-public ocaml-graph
3123 (package
3124 (name "ocaml-graph")
564cf93f 3125 (version "1.8.8")
8a238180
JL
3126 (source (origin
3127 (method url-fetch)
3128 (uri (string-append "http://ocamlgraph.lri.fr/download/"
3129 "ocamlgraph-" version ".tar.gz"))
3130 (sha256
3131 (base32
564cf93f 3132 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
8a238180
JL
3133 (build-system ocaml-build-system)
3134 (arguments
3135 `(#:install-target "install-findlib"
564cf93f 3136 #:tests? #f
8a238180
JL
3137 #:phases
3138 (modify-phases %standard-phases
3139 (add-before 'configure 'set-shell
3140 (lambda* (#:key inputs #:allow-other-keys)
3141 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
3142 "/bin/sh")))))))
3143 (inputs `(("lablgtk" ,lablgtk)))
8737666a 3144 (properties `((upstream-name . "ocamlgraph")))
8a238180
JL
3145 (home-page "http://ocamlgraph.lri.fr/")
3146 (synopsis "Graph library for OCaml")
3147 (description "OCamlgraph is a generic graph library for OCaml.")
3148 (license license:lgpl2.1)))
3149
87858bc5 3150(define-public ocaml4.07-piqi
fc3d70ae 3151 (package
87858bc5 3152 (name "ocaml4.07-piqi")
c8b309ec 3153 (version "0.7.7")
fc3d70ae 3154 (source (origin
2d84ef32
EF
3155 (method git-fetch)
3156 (uri (git-reference
3157 (url "https://github.com/alavrik/piqi-ocaml")
3158 (commit (string-append "v" version))))
3159 (file-name (git-file-name name version))
fc3d70ae
JL
3160 (sha256
3161 (base32
2d84ef32 3162 "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"))))
fc3d70ae
JL
3163 (build-system ocaml-build-system)
3164 (arguments
3165 `(#:make-flags
3166 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
3167 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
3168 "/bin/sh"))
3169 #:phases
3170 (modify-phases %standard-phases
2d84ef32
EF
3171 (add-after 'unpack 'make-files-writable
3172 (lambda _
3173 (for-each make-file-writable (find-files "."))
3174 #t))
87858bc5
JL
3175 (delete 'configure))
3176 #:ocaml ,ocaml-4.07
3177 #:findlib ,ocaml4.07-findlib))
fc3d70ae
JL
3178 (native-inputs
3179 `(("which" ,which)
3180 ("protobuf" ,protobuf))) ; for tests
3181 (propagated-inputs
87858bc5
JL
3182 `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
3183 ("ocaml-piqilib" ,ocaml4.07-piqilib)
3184 ("ocaml-stdlib-shims" ,(package-with-ocaml4.07 ocaml-stdlib-shims))))
fc3d70ae
JL
3185 (home-page "https://github.com/alavrik/piqi-ocaml")
3186 (synopsis "Protocol serialization system for OCaml")
3187 (description "Piqi is a multi-format data serialization system for OCaml.
3188It provides a uniform interface for serializing OCaml data structures to JSON,
3189XML and Protocol Buffers formats.")
3190 (license license:asl2.0)))
3191
cd1562ef
JL
3192(define-public bap
3193 (package
3194 (name "bap")
523cbfbd 3195 (version "2.0.0")
cd1562ef
JL
3196 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
3197 (source (origin
bbe9915b
JL
3198 (method git-fetch)
3199 (uri (git-reference
3200 (url home-page)
3201 (commit (string-append "v" version))))
3202 (file-name (git-file-name name version))
cd1562ef
JL
3203 (sha256
3204 (base32
523cbfbd 3205 "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
cd1562ef
JL
3206 (build-system ocaml-build-system)
3207 (native-inputs
87858bc5 3208 `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
67b5785e 3209 ("clang" ,clang-3.8)
87858bc5 3210 ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
cd1562ef 3211 (propagated-inputs
87858bc5
JL
3212 `(("camlzip" ,(package-with-ocaml4.07 camlzip))
3213 ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
3214 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
3215 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
3216 ("ocaml-ezjsonm" ,ocaml4.07-ezjsonm)
3217 ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
3218 ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
3219 ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
3220 ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
3221 ("ocaml-piqi" ,ocaml4.07-piqi)
3222 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
523cbfbd 3223 ("ocaml-utop" ,ocaml4.07-utop)
87858bc5
JL
3224 ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
3225 ("ocaml-uri" ,ocaml4.07-uri)
3226 ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
bbe9915b 3227 (inputs
523cbfbd
JL
3228 `(("gmp" ,gmp)
3229 ("llvm" ,llvm-3.8)
3230 ("ncurses" ,ncurses)))
cd1562ef 3231 (arguments
bbe9915b 3232 `(#:use-make? #t
cd1562ef
JL
3233 #:phases
3234 (modify-phases %standard-phases
523cbfbd
JL
3235 (add-before 'configure 'fix-ncurses
3236 (lambda _
3237 (substitute* "oasis/llvm"
3238 (("-lcurses") "-lncurses"))
3239 #t))
cd1562ef 3240 (replace 'configure
564cf93f 3241 (lambda* (#:key outputs inputs #:allow-other-keys)
bbe9915b
JL
3242 ;; add write for user, to prevent a failure in the install phase
3243 (for-each
3244 (lambda (file)
3245 (let ((stat (stat file)))
3246 (chmod file (+ #o200 (stat:mode stat)))))
3247 (find-files "." "."))
564cf93f
JL
3248 (invoke "./configure" "--prefix"
3249 (assoc-ref outputs "out")
3250 "--libdir"
3251 (string-append
3252 (assoc-ref outputs "out")
3253 "/lib/ocaml/site-lib")
3254 "--with-llvm-version=3.8"
3255 "--with-llvm-config=llvm-config"
87858bc5
JL
3256 "--enable-everything"))))
3257 #:ocaml ,ocaml-4.07
3258 #:findlib ,ocaml4.07-findlib))
cd1562ef
JL
3259 (synopsis "Binary Analysis Platform")
3260 (description "Binary Analysis Platform is a framework for writing program
3261analysis tools, that target binary files. The framework consists of a plethora
3262of libraries, plugins, and frontends. The libraries provide code reusability,
3263the plugins facilitate extensibility, and the frontends serve as entry points.")
3264 (license license:expat)))
3265
408091d5
JL
3266(define-public ocaml-camomile
3267 (package
3268 (name "ocaml-camomile")
a468fc5e 3269 (version "1.0.2")
408091d5
JL
3270 (home-page "https://github.com/yoriyuki/Camomile")
3271 (source (origin
3272 (method url-fetch)
564cf93f
JL
3273 (uri (string-append home-page "/releases/download/" version
3274 "/camomile-" version ".tbz"))
408091d5
JL
3275 (sha256
3276 (base32
a468fc5e 3277 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
426e629e 3278 (build-system dune-build-system)
408091d5 3279 (arguments
a468fc5e 3280 `(#:build-flags (list "--profile" "release")
62151321 3281 #:test-target "camomile-test"
a468fc5e 3282 #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
62151321
JL
3283 #:phases
3284 (modify-phases %standard-phases
3285 (add-before 'build 'fix-usr-share
3286 (lambda* (#:key outputs #:allow-other-keys)
a468fc5e 3287 (substitute* '("Camomile/dune" "configure.ml")
62151321
JL
3288 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
3289 #t)))))
408091d5
JL
3290 (synopsis "Comprehensive Unicode library")
3291 (description "Camomile is a Unicode library for OCaml. Camomile provides
3292Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
3293200 encodings, collation and locale-sensitive case mappings, and more. The
3294library is currently designed for Unicode Standard 3.2.")
3295 ;; with an exception for linked libraries to use a different license
3296 (license license:lgpl2.0+)))
3297
87858bc5 3298(define-public ocaml4.07-charinfo-width
e6033051 3299 (package
87858bc5 3300 (name "ocaml4.07-charinfo-width")
e6033051
JL
3301 (version "1.1.0")
3302 (source (origin
3303 (method url-fetch)
ca12352a
EF
3304 (uri (string-append "https://bitbucket.org/zandoye/charinfo_width"
3305 "/get/" version ".tar.gz"))
3306 (file-name (string-append name "-" version ".tar.gz"))
e6033051
JL
3307 (sha256
3308 (base32
3309 "00bv4p1yqs8y0z4z07wd9w9yyv669dikp9b04dcjbwpiy2wy0086"))))
3310 (build-system dune-build-system)
87858bc5
JL
3311 (arguments
3312 `(#:ocaml ,ocaml-4.07
339c752d
JL
3313 #:findlib ,ocaml4.07-findlib
3314 #:dune ,ocaml4.07-dune))
e6033051 3315 (propagated-inputs
87858bc5
JL
3316 `(("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
3317 ("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))))
e6033051 3318 (native-inputs
87858bc5 3319 `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
e6033051
JL
3320 (properties
3321 `((upstream-name . "charInfo_width")))
3322 (home-page "https://bitbucket.org/zandoye/charinfo_width/")
3323 (synopsis "Determine column width for a character")
3324 (description "This module is implements purely in OCaml a character width
3325function that follows the prototype of POSIX's wcwidth.")
3326 (license license:expat)))
3327
87858bc5 3328(define-public ocaml4.07-zed
cd4abd29 3329 (package
87858bc5 3330 (name "ocaml4.07-zed")
1a0d41b3 3331 (version "2.0.3")
f4f3e8ce
TGR
3332 (source
3333 (origin
3334 (method git-fetch)
3335 (uri (git-reference
b0e7b699 3336 (url "https://github.com/diml/zed")
f4f3e8ce
TGR
3337 (commit version)))
3338 (file-name (git-file-name name version))
3339 (sha256
1a0d41b3 3340 (base32 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
0705f389 3341 (build-system dune-build-system)
cd4abd29 3342 (arguments
0a8eb685 3343 `(#:test-target "."
87858bc5 3344 #:ocaml ,ocaml-4.07
339c752d
JL
3345 #:findlib ,ocaml4.07-findlib
3346 #:dune ,ocaml4.07-dune))
cd4abd29 3347 (propagated-inputs
87858bc5
JL
3348 `(("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))
3349 ("ocaml-charinfo-width" ,ocaml4.07-charinfo-width)
3350 ("ocaml-react" ,(package-with-ocaml4.07 ocaml-react))))
cd4abd29
PK
3351 (home-page "https://github.com/diml/zed")
3352 (synopsis "Abstract engine for text editing in OCaml")
3353 (description "Zed is an abstract engine for text edition. It can be used
3354to write text editors, edition widgets, readlines, etc. You just have to
3355connect an engine to your inputs and rendering functions to get an editor.")
3356 (license license:bsd-3)))
3357
87858bc5 3358(define-public ocaml4.07-lambda-term
e88ff71c 3359 (package
87858bc5 3360 (name "ocaml4.07-lambda-term")
1a0d41b3 3361 (version "2.0.2")
e88ff71c
PK
3362 (source
3363 (origin
fd2582bd
TGR
3364 (method git-fetch)
3365 (uri (git-reference
b0e7b699 3366 (url "https://github.com/diml/lambda-term")
fd2582bd
TGR
3367 (commit version)))
3368 (file-name (git-file-name name version))
e88ff71c 3369 (sha256
1a0d41b3 3370 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
34d5314e 3371 (build-system dune-build-system)
e88ff71c 3372 (arguments
34d5314e 3373 `(#:build-flags (list "--profile" "release")
87858bc5
JL
3374 #:tests? #f
3375 #:ocaml ,ocaml-4.07
339c752d
JL
3376 #:findlib ,ocaml4.07-findlib
3377 #:dune ,ocaml4.07-dune))
e88ff71c 3378 (propagated-inputs
87858bc5
JL
3379 `(("ocaml-lwt" ,(package-with-ocaml4.07 ocaml-lwt))
3380 ("ocaml-lwt-log" ,(package-with-ocaml4.07 ocaml-lwt-log))
3381 ("ocaml-lwt-react" ,(package-with-ocaml4.07 ocaml-lwt-react))
3382 ("ocaml-zed" ,ocaml4.07-zed)))
6c89e066
JL
3383 (inputs
3384 `(("libev" ,libev)))
e88ff71c
PK
3385 (home-page "https://github.com/diml/lambda-term")
3386 (synopsis "Terminal manipulation library for OCaml")
3387 (description "Lambda-Term is a cross-platform library for manipulating the
3388terminal. It provides an abstraction for keys, mouse events, colors, as well as
3389a set of widgets to write curses-like applications. The main objective of
3390Lambda-Term is to provide a higher level functional interface to terminal
3391manipulation than, for example, ncurses, by providing a native OCaml interface
3392instead of bindings to a C library.")
3393 (license license:bsd-3)))
3394
87858bc5 3395(define-public ocaml4.07-utop
90ab26fa 3396 (package
87858bc5 3397 (name "ocaml4.07-utop")
3bc6b9bb 3398 (version "2.4.3")
7848205b
TGR
3399 (source
3400 (origin
3401 (method git-fetch)
3402 (uri (git-reference
b0e7b699 3403 (url "https://github.com/ocaml-community/utop")
7848205b
TGR
3404 (commit version)))
3405 (file-name (git-file-name name version))
3406 (sha256
3bc6b9bb 3407 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
0705f389 3408 (build-system dune-build-system)
90ab26fa 3409 (arguments
3b90075a 3410 `(#:test-target "."
87858bc5 3411 #:ocaml ,ocaml-4.07
339c752d
JL
3412 #:findlib ,ocaml4.07-findlib
3413 #:dune ,ocaml4.07-dune))
90ab26fa 3414 (native-inputs
87858bc5 3415 `(("cppo" ,(package-with-ocaml4.07 ocaml-cppo))))
90ab26fa 3416 (propagated-inputs
87858bc5
JL
3417 `(("lambda-term" ,ocaml4.07-lambda-term)
3418 ("lwt" ,(package-with-ocaml4.07 ocaml-lwt))
3419 ("react" ,(package-with-ocaml4.07 ocaml-react))
3420 ("camomile" ,(package-with-ocaml4.07 ocaml-camomile))
3421 ("zed" ,ocaml4.07-zed)))
1614c633 3422 (home-page "https://github.com/ocaml-community/utop")
90ab26fa
PK
3423 (synopsis "Improved interface to the OCaml toplevel")
3424 (description "UTop is an improved toplevel for OCaml. It can run in a
3425terminal or in Emacs. It supports line editing, history, real-time and context
3426sensitive completion, colors, and more.")
3427 (license license:bsd-3)))
3428
edac5354
PK
3429(define-public ocaml-integers
3430 (package
3431 (name "ocaml-integers")
273ba255 3432 (version "0.3.0")
edac5354
PK
3433 (home-page "https://github.com/ocamllabs/ocaml-integers")
3434 (source (origin
3435 (method url-fetch)
3436 (uri (string-append home-page
3437 "/releases/download/v0.2.2/integers-"
3438 version ".tbz"))
3439 (file-name (string-append name "-" version ".tbz"))
3440 (sha256
3441 (base32
3442 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
3443 (build-system ocaml-build-system)
3444 (arguments
3445 `(#:tests? #f; no tests
3446 #:build-flags (list "build")
3447 #:phases
3448 (modify-phases %standard-phases
3449 (delete 'configure))))
564cf93f
JL
3450 (native-inputs
3451 `(("ocamlbuild" ,ocamlbuild)))
edac5354 3452 (inputs
bff6739d 3453 `(("topkg" ,ocaml-topkg)
c695fb76 3454 ("opam" ,opam)))
edac5354
PK
3455 (synopsis "Various signed and unsigned integer types for OCaml")
3456 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
3457and 64-bit signed and unsigned integer types, together with aliases such as
3458long and size_t whose sizes depend on the host platform.")
3459 (license license:expat)))
3460
69d08bb1
PK
3461(define-public ocaml-ctypes
3462 (package
3463 (name "ocaml-ctypes")
564cf93f 3464 (version "0.14.0")
69d08bb1
PK
3465 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
3466 (source (origin
c8f16c7f
EF
3467 (method git-fetch)
3468 (uri (git-reference
3469 (url home-page)
3470 (commit version)))
3471 (file-name (git-file-name name version))
69d08bb1
PK
3472 (sha256
3473 (base32
c8f16c7f 3474 "1b2q3h63ngf4x9qp65qwapf2dg9q0mcdah6qjm2q0c7v2p5vysv9"))))
69d08bb1
PK
3475 (build-system ocaml-build-system)
3476 (arguments
564cf93f
JL
3477 `(#:tests? #f; require an old lwt
3478 #:make-flags
69d08bb1
PK
3479 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
3480 #:phases
3481 (modify-phases %standard-phases
c8f16c7f
EF
3482 (add-after 'unpack 'make-writable
3483 (lambda _
3484 (for-each
3485 (lambda (file)
3486 (let ((stat (stat file)))
3487 (chmod file (+ #o200 (stat:mode stat)))))
3488 (find-files "." "."))
3489 #t))
69d08bb1
PK
3490 (delete 'configure))))
3491 (native-inputs
3492 `(("pkg-config" ,pkg-config)))
3493 (inputs
3494 `(("libffi" ,libffi)
3495 ("ounit" ,ocaml-ounit)
3496 ("integers" ,ocaml-integers)
3497 ("lwt" ,ocaml-lwt)
3498 ("topkg" ,ocaml-topkg)
c695fb76 3499 ("opam" ,opam)))
69d08bb1
PK
3500 (synopsis "Library for binding to C libraries using pure OCaml")
3501 (description "Ctypes is a library for binding to C libraries using pure
3502OCaml. The primary aim is to make writing C extensions as straightforward as
3503possible. The core of ctypes is a set of combinators for describing the
3504structure of C types -- numeric types, arrays, pointers, structs, unions and
3505functions. You can use these combinators to describe the types of the
3506functions that you want to call, then bind directly to those functions -- all
3507without writing or generating any C!")
3508 (license license:expat)))
3509
c98c8237
PK
3510(define-public ocaml-ocb-stubblr
3511 (package
3512 (name "ocaml-ocb-stubblr")
3513 (version "0.1.1")
3514 (home-page "https://github.com/pqwy/ocb-stubblr")
3515 (source (origin
3516 (method url-fetch)
3517 (uri (string-append
3518 home-page "/releases/download/v0.1.1/ocb-stubblr-"
3519 version ".tbz"))
3520 (file-name (string-append name "-" version ".tbz"))
3521 (sha256
3522 (base32
3523 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
3524 (build-system ocaml-build-system)
3525 (arguments
bff6739d 3526 `(#:build-flags (list "build" "--tests" "true")
c98c8237
PK
3527 #:phases
3528 (modify-phases %standard-phases
70a57011
JL
3529 (delete 'configure)
3530 (add-before 'build 'fix-for-guix
3531 (lambda _
3532 (substitute* "src/ocb_stubblr.ml"
3533 ;; Do not fail when opam is not present or initialized
3534 (("error_msgf \"error running opam\"") "\"\"")
3535 ;; Guix doesn't have cc, but it has gcc
3536 (("\"cc\"") "\"gcc\""))
3537 #t)))))
c98c8237
PK
3538 (inputs
3539 `(("topkg" ,ocaml-topkg)
c695fb76 3540 ("opam" ,opam)))
c98c8237 3541 (native-inputs
564cf93f
JL
3542 `(("astring" ,ocaml-astring)
3543 ("ocamlbuild" ,ocamlbuild)))
c98c8237
PK
3544 (synopsis "OCamlbuild plugin for C stubs")
3545 (description "Ocb-stubblr is about ten lines of code that you need to
3546repeat over, over, over and over again if you are using ocamlbuild to build
3547OCaml projects that contain C stubs.")
3548 (license license:isc)))
3549
a9e9fd15
PK
3550(define-public ocaml-tsdl
3551 (package
3552 (name "ocaml-tsdl")
786886d1 3553 (version "0.9.7")
2d1e0646 3554 (home-page "https://erratique.ch/software/tsdl")
a9e9fd15
PK
3555 (source (origin
3556 (method url-fetch)
3557 (uri (string-append home-page "/releases/tsdl-"
3558 version ".tbz"))
3559 (file-name (string-append name "-" version ".tar.gz"))
3560 (sha256
3561 (base32
786886d1 3562 "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"))))
a9e9fd15
PK
3563 (build-system ocaml-build-system)
3564 (arguments
3565 `(#:build-flags '("build")
3566 #:tests? #f; tests require a display device
3567 #:phases
3568 (modify-phases %standard-phases
3569 (delete 'configure))))
3570 (native-inputs
564cf93f 3571 `(("ocamlbuild" ,ocamlbuild)
9f5a3ba6 3572 ("ocaml-astring" ,ocaml-astring)
564cf93f 3573 ("opam" ,opam)
a9e9fd15
PK
3574 ("pkg-config" ,pkg-config)))
3575 (inputs
bff6739d 3576 `(("topkg" ,ocaml-topkg)
a9e9fd15
PK
3577 ("sdl2" ,sdl2)
3578 ("integers" ,ocaml-integers)
3579 ("ctypes" ,ocaml-ctypes)))
3580 (synopsis "Thin bindings to SDL for OCaml")
3581 (description "Tsdl is an OCaml library providing thin bindings to the
3582cross-platform SDL C library.")
3583 (license license:isc)))
3584
5895696e
GH
3585(define-public dedukti
3586 (package
3587 (name "dedukti")
3588 (version "2.6.0")
3589 (home-page "https://deducteam.github.io/")
3590 (source
3591 (origin
3592 (method git-fetch)
3593 (uri (git-reference
b0e7b699 3594 (url "https://github.com/deducteam/dedukti")
5895696e
GH
3595 (commit (string-append "v" version))))
3596 (file-name (git-file-name name version))
3597 (sha256
3598 (base32
3599 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
3600 (inputs
3601 `(("menhir" ,ocaml-menhir)))
3602 (native-inputs
3603 `(("ocamlbuild" ,ocamlbuild)))
3604 (build-system ocaml-build-system)
3605 (arguments
3606 `(#:phases
3607 (modify-phases %standard-phases
3608 (delete 'configure)
3609 (replace 'build
3610 (lambda _
3611 (invoke "make")
912f4400 3612 #t))
5895696e
GH
3613 (replace 'check
3614 (lambda _
3615 (invoke "make" "tests")
912f4400 3616 #t))
5895696e
GH
3617 (add-before 'install 'set-binpath
3618 ;; Change binary path in the makefile
3619 (lambda _
3620 (let ((out (assoc-ref %outputs "out")))
3621 (substitute* "GNUmakefile"
3622 (("BINDIR = (.*)$")
3623 (string-append "BINDIR = " out "/bin"))))
912f4400
JL
3624 #t))
3625 (replace 'install
3626 (lambda _
3627 (invoke "make" "install")
3628 #t)))))
5895696e
GH
3629 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
3630the λ-calculus")
3631 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
3632theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
3633dependent types. The λΠ-calculus modulo theory is itself an extension of the
3634λΠ-calculus where the context contains variable declaration as well as rewrite
3635rules. This system is not designed to develop proofs, but to check proofs
3636developed in other systems. In particular, it enjoys a minimalistic syntax.")
3637 (license license:cecill-c)))
2939fe7b 3638
db1eb632
LC
3639(define-public emacs-dedukti-mode
3640 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
3641 (package
3642 (name "emacs-dedukti-mode")
3643 (version (git-version "0" "0" commit))
3644 (home-page "https://github.com/rafoo/dedukti-mode")
3645 (source (origin
3646 (method git-fetch)
3647 (uri (git-reference
3648 (url home-page)
3649 (commit commit)))
3650 (sha256
3651 (base32
3652 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
3653 (file-name (git-file-name name version))))
3654 (inputs
3655 `(("dedukti" ,dedukti)))
3656 (build-system emacs-build-system)
3657 (arguments
3658 '(#:phases
3659 (modify-phases %standard-phases
3660 (add-before 'install 'patch-dkpath
3661 (lambda _
3662 (let ((dkcheck-path (which "dkcheck")))
3663 (substitute* "dedukti-mode.el"
3664 (("dedukti-path \"(.*)\"")
3665 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
3666 (synopsis "Emacs major mode for Dedukti files")
3667 (description "This package provides an Emacs major mode for editing
3668Dedukti files.")
3669 (license license:cecill-b))))
3670
3671(define-public emacs-flycheck-dedukti
3672 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
3673 (package
3674 (name "emacs-flycheck-dedukti")
3675 (version (git-version "0" "0" commit))
3676 (home-page "https://github.com/rafoo/flycheck-dedukti")
3677 (source (origin
3678 (method git-fetch)
3679 (uri (git-reference
3680 (url home-page)
3681 (commit commit)))
3682 (sha256
3683 (base32
3684 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
3685 (file-name (git-file-name name version))))
3686 (build-system emacs-build-system)
3687 (inputs
3688 `(("dedukti-mode" ,emacs-dedukti-mode)
3689 ("flycheck-mode" ,emacs-flycheck)))
3690 (synopsis "Flycheck integration for the dedukti language")
3691 (description "This package provides a frontend for Flycheck to perform
3692syntax checking on dedukti files.")
3693 (license license:cecill-b))))
3694
87858bc5 3695(define-public ocaml4.07-ppx-inline-test
308d72bf 3696 (package
87858bc5 3697 (name "ocaml4.07-ppx-inline-test")
b7ebcb04 3698 (version "0.12.0")
308d72bf
GH
3699 (home-page "https://github.com/janestreet/ppx_inline_test")
3700 (source
3701 (origin
3702 (method git-fetch)
3703 (uri (git-reference
3704 (url (string-append home-page ".git"))
3705 (commit (string-append "v" version))))
3706 (file-name (git-file-name name version))
3707 (sha256
3708 (base32
b7ebcb04 3709 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
308d72bf
GH
3710 (build-system dune-build-system)
3711 (arguments
3712 ;see home page README for further information
87858bc5
JL
3713 `(#:tests? #f
3714 #:ocaml ,ocaml-4.07
339c752d
JL
3715 #:findlib ,ocaml4.07-findlib
3716 #:dune ,ocaml4.07-dune))
308d72bf 3717 (inputs
87858bc5
JL
3718 `(("ocaml-base" ,ocaml4.07-base)
3719 ("ocaml-migrate-parsetree"
3720 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
c49b94a5 3721 ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
87858bc5
JL
3722 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)
3723 ("ocaml-stdio" ,ocaml4.07-stdio)
3724 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
b7ebcb04 3725 (properties `((upstream-name . "ppx_inline_test")))
308d72bf
GH
3726 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3727 (description "This package contains a syntax extension for writing
3728in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
3729collection.")
3730 (license license:expat)))
3731
7195c4f2
GH
3732(define-public ocaml-bindlib
3733 (package
3734 (name "ocaml-bindlib")
3735 (version "5.0.1")
3736 (source
3737 (origin
3738 (method git-fetch)
3739 (uri (git-reference
b0e7b699 3740 (url "https://github.com/rlepigre/ocaml-bindlib")
7195c4f2
GH
3741 (commit (string-append "ocaml-bindlib_" version))))
3742 (file-name (git-file-name name version))
3743 (sha256
3744 (base32
3745 "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
3746 (build-system ocaml-build-system)
3747 (arguments
3748 `(#:tests? #f ;no tests
3749 #:use-make? #t
3750 #:phases
3751 (modify-phases %standard-phases
3752 (delete 'configure)
3753 (replace 'build
3754 (lambda _
3755 (invoke "make")))
3756 (replace 'install
3757 (lambda _
3758 (invoke "make" "install"))))))
3759 (native-inputs
3760 `(("ocamlbuild" ,ocamlbuild)
3761 ("ocaml-findlib" ,ocaml-findlib)))
3762 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
3763 (synopsis "OCaml Bindlib library for bound variables")
3764 (description "Bindlib is a library allowing the manipulation of data
3765structures with bound variables. It is particularly useful when writing ASTs
3766for programming languages, but also for manipulating terms of the λ-calculus
3767or quantified formulas.")
3768 (license license:gpl3+)))
3769
87858bc5 3770(define-public ocaml4.07-earley
70c7d025 3771 (package
87858bc5 3772 (name "ocaml4.07-earley")
70c7d025
GH
3773 (version "2.0.0")
3774 (home-page "https://github.com/rlepigre/ocaml-earley")
3775 (source
3776 (origin
3777 (method git-fetch)
3778 (uri (git-reference
3779 (url (string-append home-page ".git"))
3780 (commit version)))
3781 (file-name (git-file-name name version))
3782 (sha256
3783 (base32
3784 "18k7bi7krc4bvqnhijz1q0pfr0nfahghfjifci8rh1q4i5zd0xz5"))))
3785 (build-system dune-build-system)
3786 (arguments
87858bc5
JL
3787 `(#:test-target "."
3788 #:ocaml ,ocaml-4.07
339c752d
JL
3789 #:findlib ,ocaml4.07-findlib
3790 #:dune ,ocaml4.07-dune))
70c7d025
GH
3791 (synopsis "Parsing library based on Earley Algorithm")
3792 (description "Earley is a parser combinator library base on Earley's
3793algorithm. It is intended to be used in conjunction with an OCaml syntax
3794extension which allows the definition of parsers inside the language. There
3795is also support for writing OCaml syntax extensions in a camlp4 style.")
3796 (license license:cecill-b)))
3797
8213db7c
GH
3798(define-public ocaml-timed
3799 (package
3800 (name "ocaml-timed")
3801 (version "1.0")
3802 (home-page "https://github.com/rlepigre/ocaml-timed")
3803 (source (origin
3804 (method git-fetch)
3805 (uri (git-reference
3806 (url (string-append home-page ".git"))
3807 (commit (string-append name "_" version))))
3808 (sha256
3809 (base32
3810 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
3811 (file-name (git-file-name name version))))
3812 (build-system ocaml-build-system)
3813 (arguments
3814 '(#:phases
3815 (modify-phases %standard-phases
3816 (delete 'configure)
3817 (replace 'build
3818 (lambda _
3819 (invoke "make")))
3820 (replace 'install
3821 (lambda _
3822 (invoke "make" "install")))
3823 (replace 'check
3824 (lambda _
3825 (invoke "make" "tests"))))))
3826 (synopsis "Timed references for imperative state")
3827 (description "Timed references for imperative state. This module provides
3828an alternative type for references (or mutable cells) supporting undo/redo
3829operations. In particular, an abstract notion of time is used to capture the
3830state of the references at any given point, so that it can be restored. Note
3831that usual reference operations only have a constant time / memory overhead
3832(compared to those of the standard library).
3833
3834Moreover, we provide an alternative implementation based on the references
3835of the standard library (Pervasives module). However, it is less efficient
3836than the first one.")
3837 (license license:expat)))
3838
2939fe7b
GH
3839(define-public ocaml-biniou
3840 (package
3841 (name "ocaml-biniou")
8dfe8fee 3842 (version "1.2.1")
2939fe7b
GH
3843 (home-page "https://github.com/mjambon/biniou")
3844 (source
3845 (origin
3846 (method git-fetch)
3847 (uri (git-reference
3848 (url (string-append home-page ".git"))
8dfe8fee 3849 (commit version)))
2939fe7b
GH
3850 (file-name (git-file-name name version))
3851 (sha256
3852 (base32
8dfe8fee 3853 "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
2939fe7b 3854 (build-system dune-build-system)
8dfe8fee
JL
3855 (arguments
3856 `(#:phases
3857 (modify-phases %standard-phases
3858 (add-before 'build 'make-writable
3859 (lambda _
3860 (for-each
3861 (lambda (file)
3862 (chmod file #o644))
3863 (find-files "." "."))
3864 #t)))))
2939fe7b
GH
3865 (inputs
3866 `(("ocaml-easy-format" ,ocaml-easy-format)))
3867 (native-inputs
3868 `(("which" ,which)))
3869 (synopsis "Data format designed for speed, safety, ease of use and backward
3870compatibility")
3871 (description "Biniou (pronounced \"be new\" is a binary data format
3872designed for speed, safety, ease of use and backward compatibility as
3873protocols evolve. Biniou is vastly equivalent to JSON in terms of
3874functionality but allows implementations several times faster (4 times faster
3875than yojson), with 25-35% space savings.")
3876 (license license:bsd-3)))
2e951707
GH
3877
3878(define-public ocaml-yojson
3879 (package
3880 (name "ocaml-yojson")
373a2a07 3881 (version "1.7.0")
2e951707
GH
3882 (home-page "https://github.com/ocaml-community/yojson")
3883 (source
3884 (origin
3885 (method git-fetch)
3886 (uri (git-reference
3887 (url (string-append home-page ".git"))
373a2a07 3888 (commit version)))
2e951707
GH
3889 (file-name (git-file-name name version))
3890 (sha256
3891 (base32
373a2a07 3892 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
2e951707 3893 (build-system dune-build-system)
912f4400
JL
3894 (arguments
3895 `(#:test-target "."))
2e951707
GH
3896 (inputs
3897 `(("ocaml-biniou" ,ocaml-biniou)
912f4400
JL
3898 ("ocaml-easy-format" ,ocaml-easy-format)))
3899 (native-inputs
373a2a07
JL
3900 `(("ocaml-alcotest" ,ocaml-alcotest)
3901 ("ocaml-cppo" ,ocaml-cppo)))
2e951707
GH
3902 (synopsis "Low-level JSON library for OCaml")
3903 (description "Yojson is an optimized parsing and printing library for the
3904JSON format. It addresses a few shortcomings of json-wheel including 2x
3905speedup, polymorphic variants and optional syntax for tuples and variants.
3906@code{ydump} is a pretty printing command-line program provided with the
3907yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
3908serializers and deserializers from type definitions.")
3909 (license license:bsd-3)))
1d209d06
GH
3910
3911(define-public ocaml-craml
3912 (package
3913 (name "ocaml-craml")
3914 (version "1.0.0")
3915 (home-page "https://github.com/realworldocaml/craml")
3916 (source
3917 (origin
3918 (method git-fetch)
3919 (uri (git-reference
3920 (url (string-append home-page ".git"))
3921 (commit version)))
3922 (file-name (git-file-name name version))
3923 (sha256
3924 (base32
3925 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
3926 (build-system dune-build-system)
33917795
JL
3927 (arguments
3928 `(#:phases
3929 (modify-phases %standard-phases
3930 (add-before 'build 'upgrade
3931 (lambda _
3932 (invoke "dune" "upgrade")
3933 #t)))))
1d209d06
GH
3934 (inputs
3935 `(("ocaml-fmt" ,ocaml-fmt)
3936 ("ocaml-astring" ,ocaml-astring)
3937 ("ocaml-logs" ,ocaml-logs)
3938 ("ocaml-cmdliner" ,ocaml-cmdliner)))
3939 (synopsis
3940 "CRAM-testing framework for testing command line applications")
3941 (description "CRAM is a is functional testing framework for command line
3942applications. @code{craml} is freely inspired by the
3943Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
3944format}. @code{craml} is released as a single binary (called @code{craml}).")
3945 (license license:isc)))
59a07504 3946
87858bc5 3947(define-public ocaml4.07-merlin
64d25f0b 3948 (package
87858bc5 3949 (name "ocaml4.07-merlin")
64d25f0b
GH
3950 (version "3.2.2")
3951 (home-page "https://ocaml.github.io/merlin/")
3952 (source
3953 (origin
3954 (method git-fetch)
3955 (uri (git-reference
b0e7b699 3956 (url "https://github.com/ocaml/merlin")
64d25f0b
GH
3957 (commit (string-append "v" version))))
3958 (file-name (git-file-name name version))
3959 (sha256
3960 (base32
3961 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
3962 (build-system dune-build-system)
3963 (inputs
87858bc5
JL
3964 `(("ocaml-biniou" ,(package-with-ocaml4.07 ocaml-biniou))
3965 ("ocaml-yojson" ,(package-with-ocaml4.07 ocaml-yojson))
3966 ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))))
64d25f0b
GH
3967 (native-inputs
3968 `(("ocaml-findlib" ,ocaml-findlib)))
3969 (arguments
1f4b4022 3970 `(#:package "merlin"
87858bc5
JL
3971 #:tests? #f ;; Errors in tests in version 3.2.2
3972 #:ocaml ,ocaml-4.07
339c752d
JL
3973 #:findlib ,ocaml4.07-findlib
3974 #:dune ,ocaml4.07-dune))
64d25f0b
GH
3975 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
3976 (description "Merlin is an editor service that provides modern IDE
3977features for OCaml. Emacs and Vim support is provided out-of-the-box.
3978External contributors added support for Visual Studio Code, Sublime Text and
3979Atom.")
3980 (license license:expat)))
3981
87858bc5 3982(define-public ocaml4.07-gsl
59a07504 3983 (package
87858bc5 3984 (name "ocaml4.07-gsl")
8fd89788 3985 (version "1.24.0")
59a07504
LC
3986 (source
3987 (origin
3988 (method url-fetch)
3989 (uri
3990 (string-append
3991 "https://github.com/mmottl/gsl-ocaml/releases/download/"
3992 version "/gsl-" version ".tbz"))
3993 (sha256
3994 (base32
8fd89788
JL
3995 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
3996 (build-system dune-build-system)
3997 (arguments
3998 `(#:test-target "."
3999 #:phases
4000 (modify-phases %standard-phases
4001 (add-after 'unpack 'fix-gsl-directory
4002 (lambda* (#:key inputs #:allow-other-keys)
4003 (substitute* "src/config/discover.ml"
4004 (("/usr") (assoc-ref inputs "gsl")))
87858bc5
JL
4005 #t)))
4006 #:ocaml ,ocaml-4.07
4007 #:findlib ,ocaml4.07-findlib
4008 #:dune ,ocaml4.07-dune))
59a07504
LC
4009 (inputs
4010 `(("gsl" ,gsl)))
8fd89788 4011 (propagated-inputs
87858bc5
JL
4012 `(("ocaml-base" ,ocaml4.07-base)
4013 ("ocaml-stdio" ,ocaml4.07-stdio)))
59a07504
LC
4014 (home-page "https://mmottl.github.io/gsl-ocaml")
4015 (synopsis "Bindings to the GNU Scientific Library")
4016 (description
4017 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4018the OCaml language.")
4019 (license license:gpl3+)))
4020
87858bc5 4021(define-public ocaml4.07-gsl-1
ddb5dc08 4022 (package
87858bc5 4023 (inherit ocaml4.07-gsl)
ddb5dc08
RW
4024 (version "1.19.3")
4025 (source (origin
4026 (method url-fetch)
4027 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
4028 "/releases/download/v"
4029 version "/gsl-ocaml-" version ".tar.gz"))
4030 (sha256
4031 (base32
4032 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
4033 (build-system ocaml-build-system)
4034 (inputs
4035 `(("gsl" ,gsl)))
4036 (native-inputs
87858bc5
JL
4037 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
4038 (arguments
4039 `(#:ocaml ,ocaml-4.07
4040 #:findlib ,ocaml4.07-findlib))
ddb5dc08
RW
4041 (propagated-inputs '())))
4042
59a07504
LC
4043(define-public cubicle
4044 (package
4045 (name "cubicle")
4046 (version "1.1.2")
4047 (source (origin
4048 (method url-fetch)
4049 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4050 version ".tar.gz"))
4051 (sha256
4052 (base32
4053 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4054 (build-system gnu-build-system)
4055 (native-inputs
4056 `(("automake" ,automake)
4057 ("ocaml" ,ocaml)
4058 ("which" ,(@@ (gnu packages base) which))))
4059 (propagated-inputs
4060 `(("ocaml-num" ,ocaml-num)
4061 ("z3" ,z3)))
4062 (arguments
4063 `(#:configure-flags (list "--with-z3")
4064 #:make-flags (list "QUIET=")
4065 #:tests? #f
4066 #:phases
4067 (modify-phases %standard-phases
4068 (add-before 'configure 'configure-for-release
4069 (lambda _
4070 (substitute* "Makefile.in"
4071 (("SVNREV=") "#SVNREV="))
4072 #t))
4073 (add-before 'configure 'fix-/bin/sh
4074 (lambda _
4075 (substitute* "configure"
4076 (("-/bin/sh") (string-append "-" (which "sh"))))
4077 #t))
4078 (add-before 'configure 'fix-smt-z3wrapper.ml
4079 (lambda _
4080 (substitute* "Makefile.in"
4081 (("\\\\n") ""))
4082 #t))
4083 (add-before 'configure 'fix-ocaml-num
4084 (lambda* (#:key inputs #:allow-other-keys)
4085 (substitute* "Makefile.in"
4086 (("= \\$\\(FUNCTORYLIB\\)")
4087 (string-append "= -I "
4088 (assoc-ref inputs "ocaml-num")
4089 "/lib/ocaml/site-lib"
4090 " $(FUNCTORYLIB)")))
4091 #t)))))
4092 (home-page "http://cubicle.lri.fr/")
4093 (synopsis "Model checker for array-based systems")
4094 (description "Cubicle is a model checker for verifying safety properties
4095of array-based systems. This is a syntactically restricted class of
4096parametrized transition systems with states represented as arrays indexed by
4097an arbitrary number of processes. Cache coherence protocols and mutual
4098exclusion algorithms are typical examples of such systems.")
4099 (license license:asl2.0)))
5fa01e8a 4100
87858bc5 4101(define-public ocaml4.07-sexplib0
5fa01e8a 4102 (package
87858bc5 4103 (name "ocaml4.07-sexplib0")
5fa01e8a
GH
4104 (version "0.11.0")
4105 (home-page "https://github.com/janestreet/sexplib0")
4106 (source
4107 (origin
4108 (method git-fetch)
4109 (uri (git-reference
4110 (url (string-append home-page ".git"))
4111 (commit (string-append "v" version))))
4112 (file-name (git-file-name name version))
4113 (sha256
4114 (base32
4115 "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
4116 (build-system dune-build-system)
4117 (arguments
87858bc5
JL
4118 `(#:tests? #f ;no tests
4119 #:ocaml ,ocaml-4.07
339c752d
JL
4120 #:findlib ,ocaml4.07-findlib
4121 #:dune ,ocaml4.07-dune))
5fa01e8a
GH
4122 (synopsis "Library containing the definition of S-expressions and some
4123base converters")
4124 (description "Part of Jane Street's Core library The Core suite of
4125libraries is an industrial strength alternative to OCaml's standard library
4126that was developed by Jane Street, the largest industrial user of OCaml.")
4127(license license:expat)))
7726124a 4128
87858bc5 4129(define-public ocaml4.07-parsexp
7726124a 4130 (package
87858bc5 4131 (name "ocaml4.07-parsexp")
7726124a
GH
4132 (version "0.11.0")
4133 (home-page "https://github.com/janestreet/parsexp")
4134 (source
4135 (origin
4136 (method git-fetch)
4137 (uri (git-reference
4138 (url (string-append home-page ".git"))
4139 (commit (string-append "v" version))))
4140 (file-name (git-file-name name version))
4141 (sha256
4142 (base32
4143 "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
4144 (build-system dune-build-system)
87858bc5
JL
4145 (arguments
4146 `(#:ocaml ,ocaml-4.07
339c752d
JL
4147 #:findlib ,ocaml4.07-findlib
4148 #:dune ,ocaml4.07-dune))
7726124a 4149 (inputs
87858bc5 4150 `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
7726124a
GH
4151 (synopsis "S-expression parsing library")
4152 (description
4153 "This library provides generic parsers for parsing S-expressions from
4154strings or other medium.
4155
4156The library is focused on performances but still provide full generic
4157parsers that can be used with strings, bigstrings, lexing buffers,
4158character streams or any other sources effortlessly.
4159
4160It provides three different class of parsers:
4161@itemize
4162@item
4163the normal parsers, producing [Sexp.t] or [Sexp.t list] values
4164@item
4165the parsers with positions, building compact position sequences so
4166that one can recover original positions in order to report properly
4167located errors at little cost
4168@item
4169the Concrete Syntax Tree parsers, produce values of type
4170@code{Parsexp.Cst.t} which record the concrete layout of the s-expression
4171syntax, including comments
4172@end itemize
4173
4174This library is portable and doesn't provide IO functions. To read
4175s-expressions from files or other external sources, you should use
4176parsexp_io.")
4177 (license license:expat)))
7cca1fd4 4178
87858bc5 4179(define-public ocaml4.07-sexplib
7cca1fd4 4180 (package
87858bc5 4181 (name "ocaml4.07-sexplib")
7cca1fd4
GH
4182 (version "0.11.0")
4183 (home-page "https://github.com/janestreet/sexplib")
4184 (source
4185 (origin
4186 (method git-fetch)
4187 (uri (git-reference
4188 (url (string-append home-page ".git"))
4189 (commit (string-append "v" version))))
4190 (file-name (git-file-name name version))
4191 (sha256
4192 (base32
4193 "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
4194 (build-system dune-build-system)
87858bc5
JL
4195 (arguments
4196 `(#:ocaml ,ocaml-4.07
339c752d
JL
4197 #:findlib ,ocaml4.07-findlib
4198 #:dune ,ocaml4.07-dune))
7e12b4c2 4199 (propagated-inputs
87858bc5
JL
4200 `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
4201 ("ocaml-parsexp" ,ocaml4.07-parsexp)
4202 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
7cca1fd4
GH
4203 (synopsis
4204 "Library for serializing OCaml values to and from S-expressions")
4205 (description
4206 "This package is part of Jane Street's Core library. Sexplib contains
4207functionality for parsing and pretty-printing s-expressions.")
4208 (license license:expat)))
22074259 4209
87858bc5 4210(define-public ocaml4.07-base
22074259 4211 (package
87858bc5 4212 (name "ocaml4.07-base")
22074259
GH
4213 (version "0.11.1")
4214 (home-page "https://github.com/janestreet/base")
4215 (source
4216 (origin
4217 (method git-fetch)
4218 (uri (git-reference
4219 (url (string-append home-page ".git"))
4220 (commit (string-append "v" version))))
4221 (file-name (git-file-name name version))
4222 (sha256
4223 (base32
4224 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
4225 (build-system dune-build-system)
7e12b4c2 4226 (propagated-inputs
87858bc5 4227 `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
22074259
GH
4228 (arguments
4229 `(#:phases
4230 (modify-phases %standard-phases
4231 (replace 'build
4232 ;; make warnings non fatal (jbuilder behaviour)
4233 (lambda _
87858bc5
JL
4234 (invoke "dune" "build" "@install" "--profile=release"))))
4235 #:ocaml ,ocaml-4.07
339c752d
JL
4236 #:findlib ,ocaml4.07-findlib
4237 #:dune ,ocaml4.07-dune))
22074259
GH
4238 (synopsis
4239 "Full standard library replacement for OCaml")
4240 (description
4241 "Base is a complete and portable alternative to the OCaml standard
4242library. It provides all standard functionalities one would expect
4243from a language standard library. It uses consistent conventions
4244across all of its module.
4245
4246Base aims to be usable in any context. As a result system dependent
4247features such as I/O are not offered by Base. They are instead
4248provided by companion libraries such as
4249@url{https://github.com/janestreet/stdio, ocaml-stdio}.")
4250 (license license:expat)))
ac06a773 4251
c49b94a5 4252(define-public ocaml4.07-compiler-libs
ac06a773 4253 (package
c49b94a5 4254 (name "ocaml4.07-compiler-libs")
ac06a773
GH
4255 (version "0.11.0")
4256 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
4257 (source
4258 (origin
4259 (method git-fetch)
4260 (uri (git-reference
4261 (url (string-append home-page ".git"))
4262 (commit (string-append "v" version))))
4263 (file-name (git-file-name name version))
4264 (sha256
4265 (base32
4266 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
4267 (build-system dune-build-system)
4268 (arguments
c49b94a5
JL
4269 `(#:tests? #f ;no tests
4270 #:ocaml ,ocaml-4.07
4271 #:findlib ,ocaml4.07-findlib
4272 #:dune ,ocaml4.07-dune))
d9faae62 4273 (properties `((upstream-name . "ocaml-compiler-libs")))
ac06a773 4274 (synopsis "Compiler libraries repackaged")
37c5b197 4275 (description "This package simply repackages the OCaml compiler libraries
ac06a773
GH
4276so they don't expose everything at toplevel. For instance, @code{Ast_helper}
4277is now @code{Ocaml_common.Ast_helper}.")
4278 (license license:expat)))
b5bab81c 4279
87858bc5 4280(define-public ocaml4.07-stdio
b5bab81c 4281 (package
87858bc5 4282 (name "ocaml4.07-stdio")
b5bab81c
GH
4283 (version "0.11.0")
4284 (home-page "https://github.com/janestreet/stdio")
4285 (source
4286 (origin
4287 (method git-fetch)
4288 (uri (git-reference
4289 (url (string-append home-page ".git"))
4290 (commit (string-append "v" version))))
4291 (file-name (git-file-name name version))
4292 (sha256
4293 (base32
4294 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
4295 (build-system dune-build-system)
7e12b4c2 4296 (propagated-inputs
87858bc5
JL
4297 `(("ocaml-base" ,ocaml4.07-base)
4298 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
b5bab81c 4299 (arguments
87858bc5
JL
4300 `(#:tests? #f ;no tests
4301 #:ocaml ,ocaml-4.07
339c752d
JL
4302 #:findlib ,ocaml4.07-findlib
4303 #:dune ,ocaml4.07-dune))
b5bab81c
GH
4304 (synopsis "Standard IO library for OCaml")
4305 (description
4306 "Stdio implements simple input/output functionalities for OCaml. It
4307re-exports the input/output functions of the OCaml standard libraries using
4308a more consistent API.")
4309 (license license:expat)))
3f623d00
GH
4310
4311(define-public ocaml-ppx-derivers
4312 (package
4313 (name "ocaml-ppx-derivers")
1e5937c8 4314 (version "1.2.1")
3f623d00
GH
4315 (home-page
4316 "https://github.com/ocaml-ppx/ppx_derivers")
4317 (source
4318 (origin
4319 (method git-fetch)
4320 (uri (git-reference
4321 (url (string-append home-page ".git"))
4322 (commit version)))
4323 (file-name (git-file-name name version))
4324 (sha256
4325 (base32
1e5937c8 4326 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
3f623d00
GH
4327 (build-system dune-build-system)
4328 (arguments
4329 '(#:tests? #f)) ;no tests
51e52f47 4330 (properties `((upstream-name . "ppx_derivers")))
3f623d00
GH
4331 (synopsis "Shared @code{@@deriving} plugin registry")
4332 (description
4333 "Ppx_derivers is a tiny package whose sole purpose is to allow
4334ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
4335as part of the same ocaml-migrate-parsetree driver.")
4336 (license license:bsd-3)))
4d390cad 4337
87858bc5 4338(define-public ocaml4.07-ppxlib
4d390cad 4339 (package
87858bc5 4340 (name "ocaml4.07-ppxlib")
b0529038 4341 (version "0.6.0")
4d390cad
GH
4342 (home-page "https://github.com/ocaml-ppx/ppxlib")
4343 (source
4344 (origin
4345 (method git-fetch)
4346 (uri (git-reference
4347 (url (string-append home-page ".git"))
4348 (commit version)))
4349 (file-name (git-file-name name version))
4350 (sha256
4351 (base32
b0529038 4352 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
4d390cad 4353 (build-system dune-build-system)
7e12b4c2 4354 (propagated-inputs
87858bc5 4355 `(("ocaml-base" ,ocaml4.07-base)
c49b94a5 4356 ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
87858bc5
JL
4357 ("ocaml-migrate-parsetree"
4358 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4359 ("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
4360 ("ocaml-stdio" ,ocaml4.07-stdio)
4361 ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
4362 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
4d390cad 4363 (arguments
87858bc5 4364 `(#:phases
4d390cad
GH
4365 (modify-phases %standard-phases
4366 (add-before 'check 'set-topfind
4367 (lambda* (#:key inputs #:allow-other-keys)
4368 ;; add the line #directory ".." at the top of each file
4369 ;; using #use "topfind";; to be able to find topfind
7e12b4c2 4370 (let* ((findlib-path (assoc-ref inputs "findlib"))
4d390cad
GH
4371 (findlib-libdir
4372 (string-append findlib-path "/lib/ocaml/site-lib")))
4373 (substitute* '("test/base/test.ml"
b0529038 4374 "test/code_path/test.ml"
4d390cad
GH
4375 "test/deriving/test.ml"
4376 "test/driver/attributes/test.ml"
4377 "test/driver/non-compressible-suffix/test.ml"
4378 "test/driver/transformations/test.ml")
4379 (("#use \"topfind\";;" all)
4380 (string-append "#directory \"" findlib-libdir "\"\n"
4381 all))))
87858bc5
JL
4382 #t)))
4383 #:ocaml ,ocaml-4.07
339c752d
JL
4384 #:findlib ,ocaml4.07-findlib
4385 #:dune ,ocaml4.07-dune))
4d390cad
GH
4386 (synopsis
4387 "Base library and tools for ppx rewriters")
4388 (description
4389 "A comprehensive toolbox for ppx development. It features:
4390@itemize
4391@item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
4392independent of the version of OCaml;
4393@item a library for library for ppx rewriters in general, and type-driven code
4394generators in particular;
4395@item
4396a feature-full driver for OCaml AST transformers;
4397@item a quotation mechanism allowing to write values representing the
4398OCaml AST in the OCaml syntax;
4399@item a generator of open recursion classes from type definitions.
4400@end itemize")
4401 (license license:expat)))
c16c8bb6 4402
87858bc5 4403(define-public ocaml4.07-ppx-compare
c16c8bb6 4404 (package
87858bc5 4405 (name "ocaml4.07-ppx-compare")
c16c8bb6
JL
4406 (version "0.11.1")
4407 (source (origin
4408 (method git-fetch)
4409 (uri (git-reference
b0e7b699 4410 (url "https://github.com/janestreet/ppx_compare")
c16c8bb6
JL
4411 (commit (string-append "v" version))))
4412 (file-name (git-file-name name version))
4413 (sha256
4414 (base32
4415 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
4416 (build-system dune-build-system)
4417 (propagated-inputs
87858bc5
JL
4418 `(("ocaml-base" ,ocaml4.07-base)
4419 ("ocaml-migrate-parsetree"
4420 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4421 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4422 (arguments
4423 `(#:ocaml ,ocaml-4.07
339c752d
JL
4424 #:findlib ,ocaml4.07-findlib
4425 #:dune ,ocaml4.07-dune))
c16c8bb6
JL
4426 (properties `((upstream-name . "ppx_compare")))
4427 (home-page "https://github.com/janestreet/ppx_compare")
4428 (synopsis "Generation of comparison functions from types")
4429 (description "Generation of fast comparison functions from type expressions
4430and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
4431from type representations. The scaffolded functions are usually much faster
4432than ocaml's Pervasives.compare. Scaffolding functions also gives you more
4433flexibility by allowing you to override them for a specific type and more safety
4434by making sure that you only compare comparable values.")
4435 (license license:asl2.0)))
143685fd 4436
87858bc5 4437(define-public ocaml4.07-fieldslib
143685fd 4438 (package
87858bc5 4439 (name "ocaml4.07-fieldslib")
143685fd
JL
4440 (version "0.11.0")
4441 (source (origin
4442 (method url-fetch)
4443 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4444 (version-major+minor version) "/files/"
4445 "fieldslib-v" version ".tar.gz"))
4446 (sha256
4447 (base32
4448 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))))
4449 (build-system dune-build-system)
4450 (arguments
4451 ;; No tests
87858bc5
JL
4452 `(#:tests? #f
4453 #:ocaml ,ocaml-4.07
339c752d
JL
4454 #:findlib ,ocaml4.07-findlib
4455 #:dune ,ocaml4.07-dune))
143685fd 4456 (propagated-inputs
87858bc5
JL
4457 `(("ocaml-base" ,ocaml4.07-base)
4458 ("ocaml-migrate-parsetree"
4459 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4460 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
143685fd
JL
4461 (properties `((upstream-name . "fieldslib")))
4462 (home-page "https://github.com/janestreet/fieldslib")
4463 (synopsis "Syntax extension to record fields")
4464 (description "Syntax extension to define first class values representing
4465record fields, to get and set record fields, iterate and fold over all fields
4466of a record and create new record values.")
4467 (license license:asl2.0)))
d9f8433e 4468
87858bc5 4469(define-public ocaml4.07-variantslib
d9f8433e 4470 (package
87858bc5 4471 (name "ocaml4.07-variantslib")
d9f8433e
JL
4472 (version "0.11.0")
4473 (source (origin
4474 (method url-fetch)
4475 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4476 (version-major+minor version)
4477 "/files/variantslib-v" version ".tar.gz"))
4478 (sha256
4479 (base32
4480 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
4481 (build-system dune-build-system)
4482 (arguments
4483 ;; No tests
87858bc5
JL
4484 `(#:tests? #f
4485 #:ocaml ,ocaml-4.07
339c752d
JL
4486 #:findlib ,ocaml4.07-findlib
4487 #:dune ,ocaml4.07-dune))
d9f8433e 4488 (propagated-inputs
87858bc5
JL
4489 `(("ocaml-base" ,ocaml4.07-base)
4490 ("ocaml-migrate-parsetree"
4491 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4492 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
d9f8433e
JL
4493 (properties `((upstream-name . "variantslib")))
4494 (home-page "https://github.com/janestreet/variantslib")
4495 (synopsis "OCaml variants as first class values")
4496 (description "The Core suite of libraries is an alternative to OCaml's
4497standard library.")
4498 (license license:asl2.0)))
7b685486 4499
87858bc5 4500(define-public ocaml4.07-ppx-fields-conv
7b685486 4501 (package
87858bc5 4502 (name "ocaml4.07-ppx-fields-conv")
7b685486
JL
4503 (version "0.11.0")
4504 (source (origin
4505 (method url-fetch)
4506 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4507 (version-major+minor version)
4508 "/files/ppx_fields_conv-v" version ".tar.gz"))
4509 (sha256
4510 (base32
4511 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
4512 (build-system dune-build-system)
4513 (propagated-inputs
87858bc5
JL
4514 `(("ocaml-base" ,ocaml4.07-base)
4515 ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
4516 ("ocaml-migrate-parsetree"
4517 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4518 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4519 (arguments
4520 `(#:ocaml ,ocaml-4.07
339c752d
JL
4521 #:findlib ,ocaml4.07-findlib
4522 #:dune ,ocaml4.07-dune))
7b685486
JL
4523 (properties `((upstream-name . "ppx_fields_conv")))
4524 (home-page "https://github.com/janestreet/ppx_fields_conv")
4525 (synopsis "Generation of accessor and iteration functions for ocaml records")
4526 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
4527first class values representing record fields, and additional routines, to get
4528and set record fields, iterate and fold over all fields of a record and create
4529new record values.")
4530 (license license:asl2.0)))
c7cf165e 4531
87858bc5 4532(define-public ocaml4.07-ppx-sexp-conv
c7cf165e 4533 (package
87858bc5 4534 (name "ocaml4.07-ppx-sexp-conv")
c7cf165e
JL
4535 (version "0.11.2")
4536 (source (origin
4537 (method git-fetch)
4538 (uri (git-reference
b0e7b699 4539 (url "https://github.com/janestreet/ppx_sexp_conv")
c7cf165e
JL
4540 (commit (string-append "v" version))))
4541 (file-name (git-file-name name version))
4542 (sha256
4543 (base32
4544 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
4545 (build-system dune-build-system)
4546 (propagated-inputs
87858bc5
JL
4547 `(("ocaml-base" ,ocaml4.07-base)
4548 ("ocaml-migrate-parsetree"
4549 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4550 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4551 (arguments
4552 `(#:ocaml ,ocaml-4.07
339c752d
JL
4553 #:findlib ,ocaml4.07-findlib
4554 #:dune ,ocaml4.07-dune))
c7cf165e
JL
4555 (properties `((upstream-name . "ppx_sexp_conv")))
4556 (home-page "https://github.com/janestreet/ppx_sexp_conv")
4557 (synopsis "Generation of S-expression conversion functions from type definitions")
4558 (description "This package generates S-expression conversion functions from type
4559definitions.")
4560 (license license:asl2.0)))
7523674c 4561
87858bc5 4562(define-public ocaml4.07-ppx-variants-conv
7523674c 4563 (package
87858bc5 4564 (name "ocaml4.07-ppx-variants-conv")
7523674c
JL
4565 (version "0.11.1")
4566 (source (origin
4567 (method git-fetch)
4568 (uri (git-reference
b0e7b699 4569 (url "https://github.com/janestreet/ppx_variants_conv")
7523674c
JL
4570 (commit (string-append "v" version))))
4571 (file-name (git-file-name name version))
4572 (sha256
4573 (base32
4574 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
4575 (build-system dune-build-system)
4576 (propagated-inputs
87858bc5
JL
4577 `(("ocaml-base" ,ocaml4.07-base)
4578 ("ocaml-variantslib" ,ocaml4.07-variantslib)
4579 ("ocaml-migrate-parsetree"
4580 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4581 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4582 (arguments
4583 `(#:ocaml ,ocaml-4.07
339c752d
JL
4584 #:findlib ,ocaml4.07-findlib
4585 #:dune ,ocaml4.07-dune))
7523674c
JL
4586 (properties
4587 `((upstream-name . "ppx_variants_conv")))
4588 (home-page
4589 "https://github.com/janestreet/ppx_variants_conv")
4590 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
4591 (description
7230f6d5 4592 "This package generates accessors and iteration functions for OCaml
7523674c
JL
4593variant types.")
4594 (license license:asl2.0)))
e6f08ec9 4595
87858bc5 4596(define-public ocaml4.07-ppx-custom-printf
e6f08ec9 4597 (package
87858bc5 4598 (name "ocaml4.07-ppx-custom-printf")
e6f08ec9
JL
4599 (version "0.11.0")
4600 (source (origin
4601 (method url-fetch)
4602 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4603 (version-major+minor version)
4604 "/files/ppx_custom_printf-v" version ".tar.gz"))
4605 (sha256
4606 (base32
4607 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
4608 (build-system dune-build-system)
4609 (propagated-inputs
87858bc5
JL
4610 `(("ocaml-base" ,ocaml4.07-base)
4611 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4612 ("ocaml-migrate-parsetree"
4613 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4614 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4615 (arguments
4616 `(#:ocaml ,ocaml-4.07
339c752d
JL
4617 #:findlib ,ocaml4.07-findlib
4618 #:dune ,ocaml4.07-dune))
e6f08ec9
JL
4619 (properties `((upstream-name . "ppx_custom_printf")))
4620 (home-page "https://github.com/janestreet/ppx_custom_printf")
4621 (synopsis "Printf-style format-strings for user-defined string conversion")
4622 (description "Extensions to printf-style format-strings for user-defined
4623string conversion.")
4624 (license license:asl2.0)))
a0584d6c 4625
87858bc5 4626(define-public ocaml4.07-bin-prot
a0584d6c 4627 (package
87858bc5 4628 (name "ocaml4.07-bin-prot")
a0584d6c
JL
4629 (version "0.11.0")
4630 (source (origin
4631 (method url-fetch)
4632 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4633 (version-major+minor version)
4634 "/files/bin_prot-v" version ".tar.gz"))
4635 (sha256
4636 (base32
4637 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
4638 (build-system dune-build-system)
4639 (inputs
87858bc5
JL
4640 `(("ocaml-base" ,ocaml4.07-base)
4641 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
4642 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
4643 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
4644 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4645 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
4646 ("ocaml-migrate-parsetree"
4647 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
4648 (arguments
4649 `(#:ocaml ,ocaml-4.07
339c752d
JL
4650 #:findlib ,ocaml4.07-findlib
4651 #:dune ,ocaml4.07-dune))
a0584d6c
JL
4652 (properties `((upstream-name . "bin_prot")))
4653 (home-page "https://github.com/janestreet/bin_prot")
4654 (synopsis "Binary protocol generator")
4655 (description "This library contains functionality for reading and writing
4656OCaml-values in a type-safe binary protocol. It is extremely efficient,
4657typically supporting type-safe marshalling and unmarshalling of even highly
4658structured values at speeds sufficient to saturate a gigabit connection. The
4659protocol is also heavily optimized for size, making it ideal for long-term
4660storage of large amounts of data.")
4661 (license (list
4662 license:asl2.0
4663 license:bsd-3))))
49b01fa3
JL
4664
4665(define-public ocaml-octavius
4666 (package
4667 (name "ocaml-octavius")
89651117 4668 (version "1.2.2")
49b01fa3
JL
4669 (source (origin
4670 (method git-fetch)
4671 (uri (git-reference
4672 (url "https://github.com/ocaml-doc/octavius")
4673 (commit (string-append "v" version))))
4674 (file-name (git-file-name name version))
4675 (sha256
4676 (base32
89651117 4677 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
49b01fa3 4678 (build-system dune-build-system)
89651117
JL
4679 (arguments
4680 `(#:phases
4681 (modify-phases %standard-phases
4682 (add-before 'build 'make-writable
4683 (lambda _
4684 (for-each (lambda (file)
4685 (chmod file #o644))
4686 (find-files "." "."))
4687 #t)))))
49b01fa3
JL
4688 (properties `((upstream-name . "octavius")))
4689 (home-page "https://github.com/ocaml-doc/octavius")
4690 (synopsis "Ocamldoc comment syntax parser")
4691 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
4692 (license license:isc)))
6692f652 4693
87858bc5 4694(define-public ocaml4.07-ppx-hash
6692f652 4695 (package
87858bc5 4696 (name "ocaml4.07-ppx-hash")
6692f652
JL
4697 (version "0.11.1")
4698 (source (origin
4699 (method git-fetch)
4700 (uri (git-reference
b0e7b699 4701 (url "https://github.com/janestreet/ppx_hash")
6692f652 4702 (commit (string-append "v" version))))
3a75925e 4703 (file-name (git-file-name name version))
6692f652
JL
4704 (sha256
4705 (base32
4706 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
4707 (build-system dune-build-system)
4708 (propagated-inputs
87858bc5
JL
4709 `(("ocaml-base" ,ocaml4.07-base)
4710 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
4711 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4712 ("ocaml-migrate-parsetree"
4713 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4714 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4715 (arguments
4716 `(#:ocaml ,ocaml-4.07
339c752d
JL
4717 #:findlib ,ocaml4.07-findlib
4718 #:dune ,ocaml4.07-dune))
6692f652
JL
4719 (properties `((upstream-name . "ppx_hash")))
4720 (home-page "https://github.com/janestreet/ppx_hash")
4721 (synopsis "Generation of hash functions from type expressions and definitions")
74ee98ee 4722 (description "This package is a collection of ppx rewriters that generate
6692f652
JL
4723hash functions from type exrpessions and definitions.")
4724 (license license:asl2.0)))
db67f569 4725
87858bc5 4726(define-public ocaml4.07-ppx-enumerate
db67f569 4727 (package
87858bc5 4728 (name "ocaml4.07-ppx-enumerate")
db67f569
JL
4729 (version "0.11.1")
4730 (source (origin
4731 (method git-fetch)
4732 (uri (git-reference
b0e7b699 4733 (url "https://github.com/janestreet/ppx_enumerate")
db67f569 4734 (commit (string-append "v" version))))
4a6de002 4735 (file-name (git-file-name name version))
db67f569
JL
4736 (sha256
4737 (base32
4738 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
4739 (build-system dune-build-system)
4740 (arguments
87858bc5
JL
4741 `(#:tests? #f; no test suite
4742 #:ocaml ,ocaml-4.07
339c752d
JL
4743 #:findlib ,ocaml4.07-findlib
4744 #:dune ,ocaml4.07-dune))
db67f569 4745 (propagated-inputs
87858bc5
JL
4746 `(("ocaml-base" ,ocaml4.07-base)
4747 ("ocaml-migrate-parsetree"
4748 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4749 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
db67f569
JL
4750 (properties `((upstream-name . "ppx_enumerate")))
4751 (home-page "https://github.com/janestreet/ppx_enumerate")
4752 (synopsis "Generate a list containing all values of a finite type")
4753 (description "Ppx_enumerate is a ppx rewriter which generates a definition
4754for the list of all values of a type (for a type which only has finitely
4755many values).")
4756 (license license:asl2.0)))
b42afab2 4757
87858bc5 4758(define-public ocaml4.07-ppx-bench
b42afab2 4759 (package
87858bc5 4760 (name "ocaml4.07-ppx-bench")
b42afab2
JL
4761 (version "0.11.0")
4762 (source (origin
4763 (method url-fetch)
4764 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4765 (version-major+minor version)
4766 "/files/ppx_bench-v" version ".tar.gz"))
4767 (sha256
4768 (base32
4769 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
4770 (build-system dune-build-system)
4771 (arguments
4772 ;; No tests
87858bc5
JL
4773 `(#:tests? #f
4774 #:ocaml ,ocaml-4.07
339c752d
JL
4775 #:findlib ,ocaml4.07-findlib
4776 #:dune ,ocaml4.07-dune))
b42afab2 4777 (propagated-inputs
87858bc5
JL
4778 `(("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
4779 ("ocaml-migrate-parsetree"
4780 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4781 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
b42afab2
JL
4782 (properties `((upstream-name . "ppx_bench")))
4783 (home-page "https://github.com/janestreet/ppx_bench")
4784 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
4785 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
4786 (license license:asl2.0)))
164b06da 4787
87858bc5 4788(define-public ocaml4.07-ppx-here
164b06da 4789 (package
87858bc5 4790 (name "ocaml4.07-ppx-here")
164b06da
JL
4791 (version "0.11.0")
4792 (source (origin
4793 (method url-fetch)
4794 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4795 (version-major+minor version)
4796 "/files/ppx_here-v" version ".tar.gz"))
4797 (sha256
4798 (base32
4799 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))))
4800 (build-system dune-build-system)
4801 (arguments
4802 ;; broken tests
87858bc5
JL
4803 `(#:tests? #f
4804 #:ocaml ,ocaml-4.07
339c752d
JL
4805 #:findlib ,ocaml4.07-findlib
4806 #:dune ,ocaml4.07-dune))
164b06da 4807 (propagated-inputs
87858bc5
JL
4808 `(("ocaml-base" ,ocaml4.07-base)
4809 ("ocaml-migrate-parsetree"
4810 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4811 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
164b06da
JL
4812 (properties `((upstream-name . "ppx_here")))
4813 (home-page "https://github.com/janestreet/ppx_here")
4814 (synopsis "Expands [%here] into its location")
4815 (description
4816 "Part of the Jane Street's PPX rewriters collection.")
4817 (license license:asl2.0)))
a58118ca 4818
87858bc5 4819(define-public ocaml4.07-typerep
a58118ca 4820 (package
87858bc5 4821 (name "ocaml4.07-typerep")
a58118ca
JL
4822 (version "0.11.0")
4823 (source (origin
4824 (method url-fetch)
4825 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4826 (version-major+minor version)
4827 "/files/typerep-v" version ".tar.gz"))
4828 (sha256
4829 (base32
4830 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
4831 (build-system dune-build-system)
4832 (arguments
87858bc5
JL
4833 `(#:tests? #f
4834 #:ocaml ,ocaml-4.07
339c752d
JL
4835 #:findlib ,ocaml4.07-findlib
4836 #:dune ,ocaml4.07-dune))
87858bc5 4837 (propagated-inputs `(("ocaml-base" ,ocaml4.07-base)))
a58118ca
JL
4838 (home-page "https://github.com/janestreet/typerep")
4839 (synopsis "Typerep is a library for runtime types")
4840 (description "Typerep is a library for runtime types.")
4841 (license license:asl2.0)))
e9328150 4842
87858bc5 4843(define-public ocaml4.07-ppx-sexp-value
e9328150 4844 (package
87858bc5 4845 (name "ocaml4.07-ppx-sexp-value")
e9328150
JL
4846 (version "0.11.0")
4847 (source (origin
4848 (method url-fetch)
4849 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4850 (version-major+minor version)
4851 "/files/ppx_sexp_value-v" version ".tar.gz"))
4852 (sha256
4853 (base32
4854 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
4855 (build-system dune-build-system)
87858bc5
JL
4856 (arguments
4857 `(#:ocaml ,ocaml-4.07
339c752d
JL
4858 #:findlib ,ocaml4.07-findlib
4859 #:dune ,ocaml4.07-dune))
e9328150 4860 (propagated-inputs
87858bc5
JL
4861 `(("ocaml-base" ,ocaml4.07-base)
4862 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
4863 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4864 ("ocaml-migrate-parsetree"
4865 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4866 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
e9328150
JL
4867 (properties `((upstream-name . "ppx_sexp_value")))
4868 (home-page "https://github.com/janestreet/ppx_sexp_value")
4869 (synopsis "Simplify building s-expressions from ocaml values")
4870 (description "A ppx rewriter that simplifies building s-expressions from
4871ocaml values.")
4872 (license license:asl2.0)))
44a2ceca 4873
87858bc5 4874(define-public ocaml4.07-ppx-sexp-message
44a2ceca 4875 (package
87858bc5 4876 (name "ocaml4.07-ppx-sexp-message")
44a2ceca
JL
4877 (version "0.11.0")
4878 (source (origin
4879 (method url-fetch)
4880 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4881 (version-major+minor version)
4882 "/files/ppx_sexp_message-v" version ".tar.gz"))
4883 (sha256
4884 (base32
4885 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
4886 (build-system dune-build-system)
87858bc5
JL
4887 (arguments
4888 `(#:ocaml ,ocaml-4.07
339c752d
JL
4889 #:findlib ,ocaml4.07-findlib
4890 #:dune ,ocaml4.07-dune))
44a2ceca 4891 (propagated-inputs
87858bc5
JL
4892 `(("ocaml-base" ,ocaml4.07-base)
4893 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
4894 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4895 ("ocaml-migrate-parsetree"
4896 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4897 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
44a2ceca
JL
4898 (properties `((upstream-name . "ppx_sexp_message")))
4899 (home-page "https://github.com/janestreet/ppx_sexp_message")
4900 (synopsis "A ppx rewriter for easy construction of s-expressions")
4901 (description "Ppx_sexp_message aims to ease the creation of s-expressions
4902in OCaml. This is mainly motivated by writing error and debugging messages,
4903where one needs to construct a s-expression based on various element of the
4904context such as function arguments.")
4905 (license license:asl2.0)))
6a114001 4906
87858bc5 4907(define-public ocaml4.07-ppx-pipebang
6a114001 4908 (package
87858bc5 4909 (name "ocaml4.07-ppx-pipebang")
6a114001
JL
4910 (version "0.11.0")
4911 (source (origin
4912 (method url-fetch)
4913 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4914 (version-major+minor version)
4915 "/files/ppx_pipebang-v" version ".tar.gz"))
4916 (sha256
4917 (base32
4918 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
4919 (build-system dune-build-system)
4920 (arguments
4921 ;; No tests
87858bc5
JL
4922 `(#:tests? #f
4923 #:ocaml ,ocaml-4.07
339c752d
JL
4924 #:findlib ,ocaml4.07-findlib
4925 #:dune ,ocaml4.07-dune))
6a114001 4926 (propagated-inputs
87858bc5
JL
4927 `(("ocaml-migrate-parsetree"
4928 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4929 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
6a114001
JL
4930 (properties `((upstream-name . "ppx_pipebang")))
4931 (home-page "https://github.com/janestreet/ppx_pipebang")
4932 (synopsis "Inline reverse application operators `|>` and `|!`")
4933 (description "A ppx rewriter that inlines reverse application operators
4934@code{|>} and @code{|!}.")
4935 (license license:asl2.0)))
3f4ecf66 4936
87858bc5 4937(define-public ocaml4.07-ppx-optional
3f4ecf66 4938 (package
87858bc5 4939 (name "ocaml4.07-ppx-optional")
3f4ecf66
JL
4940 (version "0.11.0")
4941 (source (origin
4942 (method url-fetch)
4943 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4944 (version-major+minor version)
4945 "/files/ppx_optional-v" version ".tar.gz"))
4946 (sha256
4947 (base32
4948 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))))
4949 (build-system dune-build-system)
4950 (arguments
4951 ;; No tests
87858bc5
JL
4952 `(#:tests? #f
4953 #:ocaml ,ocaml-4.07
339c752d
JL
4954 #:findlib ,ocaml4.07-findlib
4955 #:dune ,ocaml4.07-dune))
3f4ecf66 4956 (propagated-inputs
87858bc5
JL
4957 `(("ocaml-base" ,ocaml4.07-base)
4958 ("ocaml-migrate-parsetree"
4959 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4960 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
3f4ecf66
JL
4961 (properties `((upstream-name . "ppx_optional")))
4962 (home-page "https://github.com/janestreet/ppx_optional")
4963 (synopsis "Pattern matching on flat options")
4964 (description
4965 "A ppx rewriter that rewrites simple match statements with an if then
4966else expression.")
4967 (license license:asl2.0)))
79967eea 4968
87858bc5 4969(define-public ocaml4.07-ppx-optcomp
79967eea 4970 (package
87858bc5 4971 (name "ocaml4.07-ppx-optcomp")
79967eea
JL
4972 (version "0.11.0")
4973 (source (origin
4974 (method url-fetch)
4975 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4976 (version-major+minor version)
4977 "/files/ppx_optcomp-v" version ".tar.gz"))
4978 (sha256
4979 (base32
4980 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))))
4981 (build-system dune-build-system)
87858bc5
JL
4982 (arguments
4983 `(#:ocaml ,ocaml-4.07
339c752d
JL
4984 #:findlib ,ocaml4.07-findlib
4985 #:dune ,ocaml4.07-dune))
79967eea 4986 (propagated-inputs
87858bc5
JL
4987 `(("ocaml-base" ,ocaml4.07-base)
4988 ("ocaml-stdio" ,ocaml4.07-stdio)
4989 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
79967eea
JL
4990 (properties `((upstream-name . "ppx_optcomp")))
4991 (home-page "https://github.com/janestreet/ppx_optcomp")
4992 (synopsis "Optional compilation for OCaml")
4993 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
4994used to handle optional compilations of pieces of code depending of the word
4995size, the version of the compiler, ...")
4996 (license license:asl2.0)))
1365ae47 4997
87858bc5 4998(define-public ocaml4.07-ppx-let
1365ae47 4999 (package
87858bc5 5000 (name "ocaml4.07-ppx-let")
1365ae47
JL
5001 (version "0.11.0")
5002 (source (origin
5003 (method url-fetch)
5004 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5005 (version-major+minor version)
5006 "/files/ppx_let-v" version ".tar.gz"))
5007 (sha256
5008 (base32
5009 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))))
5010 (build-system dune-build-system)
87858bc5
JL
5011 (arguments
5012 `(#:ocaml ,ocaml-4.07
339c752d
JL
5013 #:findlib ,ocaml4.07-findlib
5014 #:dune ,ocaml4.07-dune))
1365ae47 5015 (propagated-inputs
87858bc5
JL
5016 `(("ocaml-base" ,ocaml4.07-base)
5017 ("ocaml-migrate-parsetree"
5018 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5019 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
1365ae47
JL
5020 (properties `((upstream-name . "ppx_let")))
5021 (home-page "https://github.com/janestreet/ppx_let")
5022 (synopsis "Monadic let-bindings")
5023 (description "A ppx rewriter for monadic and applicative let bindings,
5024match expressions, and if expressions.")
5025 (license license:asl2.0)))
6018802d 5026
87858bc5 5027(define-public ocaml4.07-ppx-fail
6018802d 5028 (package
87858bc5 5029 (name "ocaml4.07-ppx-fail")
6018802d
JL
5030 (version "0.11.0")
5031 (source (origin
5032 (method url-fetch)
5033 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5034 (version-major+minor version)
5035 "/files/ppx_fail-v" version ".tar.gz"))
5036 (sha256
5037 (base32
5038 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
5039 (build-system dune-build-system)
87858bc5
JL
5040 (arguments
5041 `(#:ocaml ,ocaml-4.07
339c752d
JL
5042 #:findlib ,ocaml4.07-findlib
5043 #:dune ,ocaml4.07-dune))
6018802d 5044 (propagated-inputs
87858bc5
JL
5045 `(("ocaml-base" ,ocaml4.07-base)
5046 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5047 ("ocaml-migrate-parsetree"
5048 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5049 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
6018802d
JL
5050 (properties `((upstream-name . "ppx_fail")))
5051 (home-page "https://github.com/janestreet/ppx_fail")
5052 (synopsis "Add location to calls to failwiths")
5053 (description "Syntax extension that makes [failwiths] always include a
5054position.")
5055 (license license:asl2.0)))
7ec9a45d 5056
87858bc5 5057(define-public ocaml4.07-ppx-assert
7ec9a45d 5058 (package
87858bc5 5059 (name "ocaml4.07-ppx-assert")
7ec9a45d
JL
5060 (version "0.11.0")
5061 (source (origin
5062 (method url-fetch)
5063 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5064 (version-major+minor version)
5065 "/files/ppx_assert-v" version ".tar.gz"))
5066 (sha256
5067 (base32
5068 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))))
5069 (build-system dune-build-system)
87858bc5
JL
5070 (arguments
5071 `(#:ocaml ,ocaml-4.07
339c752d
JL
5072 #:findlib ,ocaml4.07-findlib
5073 #:dune ,ocaml4.07-dune))
7ec9a45d 5074 (propagated-inputs
87858bc5
JL
5075 `(("ocaml-base" ,ocaml4.07-base)
5076 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5077 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5078 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5079 ("ocaml-migrate-parsetree"
5080 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5081 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
7ec9a45d
JL
5082 (properties `((upstream-name . "ppx_assert")))
5083 (home-page "https://github.com/janestreet/ppx_assert")
5084 (synopsis "Assert-like extension nodes that raise useful errors on failure")
5085 (description "This package contains assert-like extension nodes that raise
5086useful errors on failure.")
5087 (license license:asl2.0)))
4e4e5fb1 5088
87858bc5 5089(define-public ocaml4.07-ppx-expect
4e4e5fb1 5090 (package
87858bc5 5091 (name "ocaml4.07-ppx-expect")
b7ebcb04 5092 (version "0.12.0")
4e4e5fb1
JL
5093 (source (origin
5094 (method git-fetch)
5095 (uri (git-reference
b0e7b699 5096 (url "https://github.com/janestreet/ppx_expect")
4e4e5fb1
JL
5097 (commit (string-append "v" version))))
5098 (file-name (git-file-name name version))
5099 (sha256
5100 (base32
b7ebcb04 5101 "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"))))
4e4e5fb1
JL
5102 (build-system dune-build-system)
5103 (arguments
47ef85b5 5104 `(#:ocaml ,ocaml-4.07
339c752d
JL
5105 #:findlib ,ocaml4.07-findlib
5106 #:dune ,ocaml4.07-dune))
4e4e5fb1 5107 (propagated-inputs
87858bc5
JL
5108 `(("ocaml-base" ,ocaml4.07-base)
5109 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5110 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5111 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
5112 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
5113 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5114 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5115 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5116 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
5117 ("ocaml-stdio" ,ocaml4.07-stdio)
5118 ("ocaml-migrate-parsetree"
5119 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5120 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)
5121 ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
4e4e5fb1
JL
5122 (properties `((upstream-name . "ppx_expect")))
5123 (home-page "https://github.com/janestreet/ppx_expect")
5124 (synopsis "Cram like framework for OCaml")
5125 (description "Expect-test is a framework for writing tests in OCaml, similar
5126to Cram. Expect-tests mimics the existing inline tests framework with the
5127@code{let%expect_test} construct. The body of an expect-test can contain
5128output-generating code, interleaved with @code{%expect} extension expressions
5129to denote the expected output.")
5130 (license license:asl2.0)))
f4304c1d 5131
87858bc5 5132(define-public ocaml4.07-ppx-js-style
f4304c1d 5133 (package
87858bc5 5134 (name "ocaml4.07-ppx-js-style")
f4304c1d
JL
5135 (version "0.11.0")
5136 (source (origin
5137 (method url-fetch)
5138 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5139 (version-major+minor version)
5140 "/files/ppx_js_style-v" version ".tar.gz"))
5141 (sha256
5142 (base32
5143 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))))
5144 (build-system dune-build-system)
5145 (arguments
5146 ;; No tests
87858bc5
JL
5147 `(#:tests? #f
5148 #:ocaml ,ocaml-4.07
339c752d
JL
5149 #:findlib ,ocaml4.07-findlib
5150 #:dune ,ocaml4.07-dune))
f4304c1d 5151 (propagated-inputs
87858bc5
JL
5152 `(("ocaml-base" ,ocaml4.07-base)
5153 ("ocaml-migrate-parsetree"
5154 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5155 ("ocaml-octavius" ,(package-with-ocaml4.07 ocaml-octavius))
5156 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
f4304c1d
JL
5157 (properties `((upstream-name . "ppx_js_style")))
5158 (home-page "https://github.com/janestreet/ppx_js_style")
5159 (synopsis "Code style checker for Jane Street Packages")
d38ccbb0 5160 (description "This package is a no-op ppx rewriter. It is used as a
f4304c1d
JL
5161@code{lint} tool to enforce some coding conventions across all Jane Street
5162packages.")
5163 (license license:asl2.0)))
48ad1181 5164
87858bc5 5165(define-public ocaml4.07-ppx-typerep-conv
48ad1181 5166 (package
87858bc5 5167 (name "ocaml4.07-ppx-typerep-conv")
48ad1181
JL
5168 (version "0.11.1")
5169 (source (origin
5170 (method git-fetch)
5171 (uri (git-reference
b0e7b699 5172 (url "https://github.com/janestreet/ppx_typerep_conv")
48ad1181 5173 (commit (string-append "v" version))))
7026f6b2 5174 (file-name (git-file-name name version))
48ad1181
JL
5175 (sha256
5176 (base32
5177 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
5178 (build-system dune-build-system)
5179 (arguments
87858bc5
JL
5180 `(#:test-target "."
5181 #:ocaml ,ocaml-4.07
339c752d
JL
5182 #:findlib ,ocaml4.07-findlib
5183 #:dune ,ocaml4.07-dune))
48ad1181 5184 (propagated-inputs
87858bc5
JL
5185 `(("ocaml-base" ,ocaml4.07-base)
5186 ("ocaml-typerep" ,ocaml4.07-typerep)
5187 ("ocaml-migrate-parsetree"
5188 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5189 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
48ad1181
JL
5190 (properties `((upstream-name . "ppx_typerep_conv")))
5191 (home-page "https://github.com/janestreet/ppx_typerep_conv")
5192 (synopsis "Generation of runtime types from type declarations")
5193 (description "This package can automatically generate runtime types
5194from type definitions.")
5195 (license license:asl2.0)))
d13b9c5f 5196
87858bc5 5197(define-public ocaml4.07-ppx-base
d13b9c5f 5198 (package
87858bc5 5199 (name "ocaml4.07-ppx-base")
d13b9c5f
JL
5200 (version "0.11.0")
5201 (source (origin
5202 (method url-fetch)
5203 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5204 (version-major+minor version)
5205 "/files/ppx_base-v" version ".tar.gz"))
5206 (sha256
5207 (base32
5208 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))))
5209 (build-system dune-build-system)
5210 (arguments
87858bc5
JL
5211 `(#:test-target "."
5212 #:ocaml ,ocaml-4.07
339c752d
JL
5213 #:findlib ,ocaml4.07-findlib
5214 #:dune ,ocaml4.07-dune))
d13b9c5f 5215 (propagated-inputs
87858bc5
JL
5216 `(("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5217 ("ocaml-ppx-enumerate" ,ocaml4.07-ppx-enumerate)
5218 ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
5219 ("ocaml-ppx-js-style" ,ocaml4.07-ppx-js-style)
5220 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5221 ("ocaml-migrate-parsetree"
5222 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5223 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
d13b9c5f
JL
5224 (properties `((upstream-name . "ppx_base")))
5225 (home-page "https://github.com/janestreet/ppx_base")
5226 (synopsis "Base set of ppx rewriters")
5227 (description "Ppx_base is the set of ppx rewriters used for Base.
5228
5229Note that Base doesn't need ppx to build, it is only used as a
5230verification tool.")
5231 (license license:asl2.0)))
7bd4b85e 5232
87858bc5 5233(define-public ocaml4.07-ppx-bin-prot
7bd4b85e 5234 (package
87858bc5 5235 (name "ocaml4.07-ppx-bin-prot")
7bd4b85e
JL
5236 (version "0.11.1")
5237 (source (origin
5238 (method git-fetch)
5239 (uri (git-reference
b0e7b699 5240 (url "https://github.com/janestreet/ppx_bin_prot")
7bd4b85e
JL
5241 (commit (string-append "v" version))))
5242 (file-name (git-file-name name version))
5243 (sha256
5244 (base32
5245 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
5246 (build-system dune-build-system)
5247 (arguments
5248 ;; Cyclic dependency with ocaml-ppx-jane
87858bc5
JL
5249 `(#:tests? #f
5250 #:ocaml ,ocaml-4.07
339c752d
JL
5251 #:findlib ,ocaml4.07-findlib
5252 #:dune ,ocaml4.07-dune))
7bd4b85e 5253 (propagated-inputs
87858bc5
JL
5254 `(("ocaml-base" ,ocaml4.07-base)
5255 ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
5256 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5257 ("ocaml-migrate-parsetree"
5258 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5259 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
7bd4b85e
JL
5260 (properties `((upstream-name . "ppx_bin_prot")))
5261 (home-page "https://github.com/janestreet/ppx_bin_prot")
5262 (synopsis "Generation of bin_prot readers and writers from types")
5263 (description "Generation of binary serialization and deserialization
5264functions from type definitions.")
5265 (license license:asl2.0)))
255f1cae 5266
87858bc5 5267(define-public ocaml4.07-ppx-jane
255f1cae 5268 (package
87858bc5 5269 (name "ocaml4.07-ppx-jane")
255f1cae
JL
5270 (version "0.11.0")
5271 (source (origin
5272 (method url-fetch)
5273 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5274 (version-major+minor version)
5275 "/files/ppx_jane-v" version ".tar.gz"))
5276 (sha256
5277 (base32
5278 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
5279 (build-system dune-build-system)
5280 (arguments
87858bc5
JL
5281 `(#:test-target "."
5282 #:ocaml ,ocaml-4.07
339c752d
JL
5283 #:findlib ,ocaml4.07-findlib
5284 #:dune ,ocaml4.07-dune))
255f1cae 5285 (propagated-inputs
87858bc5
JL
5286 `(("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5287 ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
5288 ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
5289 ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
5290 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
5291 ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
5292 ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
5293 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
5294 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5295 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5296 ("ocaml-ppx-let" ,ocaml4.07-ppx-let)
5297 ("ocaml-ppx-optcomp" ,ocaml4.07-ppx-optcomp)
5298 ("ocaml-ppx-optional" ,ocaml4.07-ppx-optional)
5299 ("ocaml-ppx-pipebang" ,ocaml4.07-ppx-pipebang)
5300 ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
5301 ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
5302 ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
5303 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
5304 ("ocaml-migrate-parsetree"
5305 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5306 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
255f1cae
JL
5307 (properties `((upstream-name . "ppx_jane")))
5308 (home-page "https://github.com/janestreet/ppx_jane")
5309 (synopsis "Standard Jane Street ppx rewriters")
5310 (description "This package installs a ppx-jane executable, which is a ppx
5311driver including all standard Jane Street ppx rewriters.")
5312 (license license:asl2.0)))
5995e6d1 5313
87858bc5 5314(define-public ocaml4.07-splittable-random
5995e6d1 5315 (package
87858bc5 5316 (name "ocaml4.07-splittable-random")
5995e6d1
JL
5317 (version "0.11.0")
5318 (source (origin
5319 (method url-fetch)
5320 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5321 (version-major+minor version)
5322 "/files/splittable_random-v" version ".tar.gz"))
5323 (sha256
5324 (base32
5325 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
5326 (build-system dune-build-system)
87858bc5
JL
5327 (arguments
5328 `(#:ocaml ,ocaml-4.07
339c752d
JL
5329 #:findlib ,ocaml4.07-findlib
5330 #:dune ,ocaml4.07-dune))
5995e6d1 5331 (propagated-inputs
87858bc5
JL
5332 `(("ocaml-base" ,ocaml4.07-base)
5333 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5334 ("ocaml-migrate-parsetree"
5335 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
5995e6d1
JL
5336 (properties `((upstream-name . "splittable_random")))
5337 (home-page "https://github.com/janestreet/splittable_random")
5338 (synopsis "PRNG that can be split into independent streams")
e88fd8be
CB
5339 (description "This package provides a splittable
5340@acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
5341be used as a stream of random values; it can also be split to produce a
5342second, independent stream of random values.
5995e6d1
JL
5343
5344This library implements a splittable pseudo-random number generator that sacrifices
5345cryptographic-quality randomness in favor of performance.")
5346 (license license:asl2.0)))
dc361a25 5347
f2df5a4b 5348(define-public ocaml4.07-jane-street-headers
dc361a25 5349 (package
f2df5a4b 5350 (name "ocaml4.07-jane-street-headers")
dc361a25
JL
5351 (version "0.11.0")
5352 (source (origin
5353 (method url-fetch)
5354 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5355 (version-major+minor version)
5356 "/files/jane-street-headers-v" version ".tar.gz"))
5357 (sha256
5358 (base32
5359 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
5360 (build-system dune-build-system)
5361 (arguments
f2df5a4b
JL
5362 `(#:test-target "."
5363 #:ocaml ,ocaml-4.07
5364 #:findlib ,ocaml4.07-findlib
5365 #:dune ,ocaml4.07-dune))
dc361a25
JL
5366 (home-page "https://github.com/janestreet/jane-street-headers")
5367 (synopsis "Jane Street C header files")
5368 (description "This package provides C header files shared between the
5369various Jane Street packages.")
5370 (license license:asl2.0)))
3e3d5ffc 5371
87858bc5 5372(define-public ocaml4.07-configurator
3e3d5ffc 5373 (package
87858bc5 5374 (name "ocaml4.07-configurator")
3e3d5ffc
JL
5375 (version "0.11.0")
5376 (source (origin
5377 (method url-fetch)
5378 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5379 (version-major+minor version)
5380 "/files/configurator-v" version ".tar.gz"))
5381 (sha256
5382 (base32
5383 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
5384 (build-system dune-build-system)
5385 (arguments
5386 ;; No tests
87858bc5
JL
5387 `(#:tests? #f
5388 #:ocaml ,ocaml-4.07
339c752d
JL
5389 #:findlib ,ocaml4.07-findlib
5390 #:dune ,ocaml4.07-dune))
3e3d5ffc 5391 (propagated-inputs
87858bc5
JL
5392 `(("ocaml-base" ,ocaml4.07-base)
5393 ("ocaml-stdio" ,ocaml4.07-stdio)))
3e3d5ffc
JL
5394 (home-page "https://github.com/janestreet/configurator")
5395 (synopsis "Helper library for gathering system configuration")
5396 (description "Configurator is a small library that helps writing OCaml
5397scripts that test features available on the system, in order to generate config.h
5398files for instance.
5399
5400Configurator allows one to:
5401@itemize
5402@item test if a C program compiles
5403@item query pkg-config
5404@item import #define from OCaml header files
5405@item generate config.h file
5406@end itemize")
5407 (license license:asl2.0)))
9e81db80 5408
87858bc5 5409(define-public ocaml4.07-spawn
9e81db80 5410 (package
87858bc5 5411 (name "ocaml4.07-spawn")
f9caa17b 5412 (version "0.13.0")
9e81db80
JL
5413 (source (origin
5414 (method git-fetch)
5415 (uri (git-reference
b0e7b699 5416 (url "https://github.com/janestreet/spawn")
9e81db80 5417 (commit (string-append "v" version))))
f9caa17b 5418 (file-name (git-file-name name version))
9e81db80
JL
5419 (sha256
5420 (base32
f9caa17b 5421 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
9e81db80
JL
5422 (build-system dune-build-system)
5423 (arguments
5424 `(#:phases
5425 (modify-phases %standard-phases
5426 (add-before 'check 'fix-tests
5427 (lambda _
5428 (substitute* "test/tests.ml"
5429 (("/bin/pwd") (which "pwd"))
5430 (("/bin/echo") (which "echo")))
87858bc5
JL
5431 #t)))
5432 #:ocaml ,ocaml-4.07
339c752d
JL
5433 #:findlib ,ocaml4.07-findlib
5434 #:dune ,ocaml4.07-dune))
9e81db80 5435 (native-inputs
87858bc5 5436 `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
9e81db80
JL
5437 (home-page "https://github.com/janestreet/spawn")
5438 (synopsis "Spawning sub-processes")
5439 (description
5440 "Spawn is a small library exposing only one functionality: spawning sub-process.
5441
5442It has three main goals:
5443
5444@itemize
5445@item provide missing features of Unix.create_process such as providing a
5446working directory,
5447@item provide better errors when a system call fails in the
5448sub-process. For instance if a command is not found, you get a proper
5449@code{Unix.Unix_error} exception,
5450@item improve performances by using vfork when available. It is often
5451claimed that nowadays fork is as fast as vfork, however in practice
5452fork takes time proportional to the process memory while vfork is
5453constant time. In application using a lot of memory, vfork can be
1d5d0447
CB
5454thousands of times faster than fork.
5455@end itemize")
9e81db80 5456 (license license:asl2.0)))
514b5420 5457
87858bc5 5458(define-public ocaml4.07-core
514b5420 5459 (package
87858bc5 5460 (name "ocaml4.07-core")
514b5420
JL
5461 (version "0.11.3")
5462 (source (origin
5463 (method git-fetch)
5464 (uri (git-reference
b0e7b699 5465 (url "https://github.com/janestreet/core")
514b5420 5466 (commit (string-append "v" version))))
fbd08d42 5467 (file-name (git-file-name name version))
514b5420
JL
5468 (sha256
5469 (base32
5470 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
5471 (build-system dune-build-system)
5472 (arguments
0f1362f0
JL
5473 `(#:package "core"
5474 #:tests? #f; Require a cyclic dependency: core_extended
87858bc5 5475 #:ocaml ,ocaml-4.07
339c752d
JL
5476 #:findlib ,ocaml4.07-findlib
5477 #:dune ,ocaml4.07-dune))
514b5420 5478 (propagated-inputs
87858bc5
JL
5479 `(("ocaml-base" ,ocaml4.07-base)
5480 ("ocaml-configurator" ,ocaml4.07-configurator)
5481 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
5482 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5483 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5484 ("ocaml-sexplib" ,ocaml4.07-sexplib)
5485 ("ocaml-spawn" ,ocaml4.07-spawn)
5486 ("ocaml-stdio" ,ocaml4.07-stdio)
5487 ("ocaml-migrate-parsetree"
5488 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5489 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
514b5420
JL
5490 (home-page "https://github.com/janestreet/core")
5491 (synopsis "Alternative to OCaml's standard library")
5492 (description "The Core suite of libraries is an alternative to OCaml's
5493standard library that was developed by Jane Street.")
5494 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
5495 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
5496 (license license:asl2.0)))
8baa5c8b 5497
87858bc5 5498(define-public ocaml4.07-core-kernel
8baa5c8b 5499 (package
87858bc5 5500 (name "ocaml4.07-core-kernel")
8baa5c8b
JL
5501 (version "0.11.1")
5502 (source (origin
5503 (method git-fetch)
5504 (uri (git-reference
b0e7b699 5505 (url "https://github.com/janestreet/core_kernel")
8baa5c8b
JL
5506 (commit (string-append "v" version))))
5507 (file-name (git-file-name name version))
5508 (sha256
5509 (base32
5510 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
5511 (build-system dune-build-system)
5512 (arguments
5513 ;; Cyclic dependency with ocaml-core
87858bc5
JL
5514 `(#:tests? #f
5515 #:ocaml ,ocaml-4.07
339c752d
JL
5516 #:findlib ,ocaml4.07-findlib
5517 #:dune ,ocaml4.07-dune))
8baa5c8b 5518 (propagated-inputs
87858bc5
JL
5519 `(("ocaml-base" ,ocaml4.07-base)
5520 ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
5521 ("ocaml-configurator" ,ocaml4.07-configurator)
5522 ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
f2df5a4b 5523 ("ocaml-jane-street-headers" ,ocaml4.07-jane-street-headers)
87858bc5
JL
5524 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5525 ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
5526 ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
5527 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5528 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5529 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5530 ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
5531 ("ocaml-sexplib" ,ocaml4.07-sexplib)
5532 ("ocaml-splittable-random" ,ocaml4.07-splittable-random)
5533 ("ocaml-stdio" ,ocaml4.07-stdio)
5534 ("ocaml-typerep" ,ocaml4.07-typerep)
5535 ("ocaml-variantslib" ,ocaml4.07-variantslib)
5536 ("ocaml-migrate-parsetree"
5537 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
8baa5c8b
JL
5538 (properties `((upstream-name . "core_kernel")))
5539 (home-page "https://github.com/janestreet/core_kernel")
5540 (synopsis "Portable standard library for OCaml")
5541 (description "Core is an alternative to the OCaml standard library.
5542
5543Core_kernel is the system-independent part of Core. It is aimed for cases when
5544the full Core is not available, such as in Javascript.")
5545 (license (list
5546 ;; this package and parts of OCaml, relicensed by janestreet
5547 license:asl2.0
5548 ;; MLton and sjs
5549 license:expat))))
38089b54 5550
5551(define-public ocaml-markup
5552 (package
5553 (name "ocaml-markup")
5aa573d8 5554 (version "0.8.2")
38089b54 5555 (home-page "https://github.com/aantron/markup.ml")
5556 (source
5557 (origin
5558 (method git-fetch)
5559 (uri (git-reference
5560 (url (string-append home-page ".git"))
5561 (commit version)))
5562 (file-name (git-file-name name version))
5563 (sha256
5564 (base32
5aa573d8 5565 "13zcrwzjmifniv3bvjbkd2ah8wwa3ld75bxh1d8hrzdvfxzh9szn"))))
38089b54 5566 (build-system dune-build-system)
5aa573d8
JL
5567 (arguments
5568 `(#:package "markup"))
5569 (inputs
5570 `(("libev" ,libev)))
b3419c40
JL
5571 (propagated-inputs
5572 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
5573 ("ocaml-uchar" ,ocaml-uchar)
38089b54 5574 ("ocaml-uutf" ,ocaml-uutf)
5575 ("ocaml-lwt" ,ocaml-lwt)))
5aa573d8
JL
5576 (native-inputs
5577 `(("ocaml-ounit" ,ocaml-ounit)
5578 ("pkg-config" ,pkg-config)))
38089b54 5579 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
5580 (description "Markup.ml provides an HTML parser and an XML parser. The
5581parsers are wrapped in a simple interface: they are functions that transform
5582byte streams to parsing signal streams. Streams can be manipulated in various
5583ways, such as processing by fold, filter, and map, assembly into DOM tree
5584structures, or serialization back to HTML or XML.
5585
5586Both parsers are based on their respective standards. The HTML parser, in
5587particular, is based on the state machines defined in HTML5.
5588
5589The parsers are error-recovering by default, and accept fragments. This makes
5590it very easy to get a best-effort parse of some input. The parsers can,
5591however, be easily configured to be strict, and to accept only full documents.
5592
5593Apart from this, the parsers are streaming (do not build up a document in
5594memory), non-blocking (can be used with threading libraries), lazy (do not
5595consume input unless the signal stream is being read), and process the input in
5596a single pass. They automatically detect the character encoding of the input
5597stream, and convert everything to UTF-8.")
5598 (license license:bsd-3)))
e2506afc 5599
5600(define-public ocaml-tyxml
5601 (package
5602 (name "ocaml-tyxml")
5603 (version "4.3.0")
5604 (source
5605 (origin
5606 (method git-fetch)
5607 (uri (git-reference
b0e7b699 5608 (url "https://github.com/ocsigen/tyxml")
e2506afc 5609 (commit version)))
5610 (file-name (git-file-name name version))
5611 (sha256
5612 (base32
5613 "0wv19xipkj8l2sks1h53105ywbjwk7q93fb7b8al4a2g9wr109c0"))))
5614 (build-system dune-build-system)
5615 (inputs
5616 `(("ocaml-re" ,ocaml-re)
5617 ("ocaml-seq" ,ocaml-seq)
5618 ("ocaml-uutf" ,ocaml-uutf)
5619 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5620 ("ocaml-markup" ,ocaml-markup)))
5621 (native-inputs
5622 `(("ocaml-alcotest" ,ocaml-alcotest)))
32fd3e9c 5623 (arguments `(#:package "tyxml"))
e2506afc 5624 (home-page "https://github.com/ocsigen/tyxml/")
5625 (synopsis "TyXML is a library for building correct HTML and SVG documents")
5626 (description "TyXML provides a set of convenient combinators that uses the
5627OCaml type system to ensure the validity of the generated documents. TyXML can
5628be used with any representation of HTML and SVG: the textual one, provided
5629directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
5630(@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
5631also create your own representation and use it to instantiate a new set of
5632combinators.")
5633 (license license:lgpl2.1)))
908a2ee0 5634
5635(define-public ocaml-bisect-ppx
5636 (package
5637 (name "ocaml-bisect-ppx")
2e038f36 5638 (version "1.4.2")
908a2ee0 5639 (source
5640 (origin
5641 (method git-fetch)
5642 (uri (git-reference
b0e7b699 5643 (url "https://github.com/aantron/bisect_ppx")
908a2ee0 5644 (commit version)))
5645 (file-name (git-file-name name version))
5646 (sha256
5647 (base32
2e038f36 5648 "0900vli5kw7s5kdam0n4cqsfsfqb7mdb3azn3i55595gilg1vyn8"))))
908a2ee0 5649 (build-system dune-build-system)
b3419c40 5650 (propagated-inputs
908a2ee0 5651 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
5652 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5653 ("ocaml-ounit" ,ocaml-ounit)))
8cc6a876
JL
5654 (arguments
5655 `(#:phases
5656 (modify-phases %standard-phases
5657 (add-before 'build 'fix-deprecated
5658 (lambda _
5659 ;; Fixed upstream in 22dd1ad9a0c9629f60599c22d82c6488394d6d32, but
5660 ;; not in a release yet.
5661 (substitute* "src/ppx/instrument.ml"
5662 (("module Ast = Ast_405")
5663 "module Ast = Migrate_parsetree.Ast_405
5664module Ast_405 = Ast"))
5665 #t)))))
908a2ee0 5666 (home-page "https://github.com/aantron/bisect_ppx")
5667 (synopsis "Code coverage for OCaml")
5668 (description "Bisect_ppx helps you test thoroughly. It is a small
5669preprocessor that inserts instrumentation at places in your code, such as
5670if-then-else and match expressions. After you run tests, Bisect_ppx gives a
5671nice HTML report showing which places were visited and which were missed.
5672
5673Usage is simple - add package bisect_ppx when building tests, run your tests,
5674then run the Bisect_ppx report tool on the generated visitation files.")
5675 (license license:mpl2.0)))
2f8e77be 5676
87858bc5 5677(define-public ocaml4.07-odoc
2f8e77be 5678 (package
87858bc5 5679 (name "ocaml4.07-odoc")
520dc743 5680 (version "1.4.2")
2f8e77be 5681 (source
5682 (origin
5683 (method git-fetch)
5684 (uri (git-reference
5685 (url "https://github.com/ocaml/odoc")
5686 (commit version)))
5687 (file-name (git-file-name name version))
5688 (sha256
520dc743 5689 (base32 "0rvhx139jx6wmlfz355mja6mk03x4swq1xxvk5ky6jzhalq3cf5i"))))
2f8e77be 5690 (build-system dune-build-system)
87858bc5
JL
5691 (arguments
5692 `(#:ocaml ,ocaml-4.07
5693 #:findlib ,ocaml4.07-findlib
5694 #:dune ,ocaml4.07-dune))
2f8e77be 5695 (inputs
87858bc5
JL
5696 `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))
5697 ("ocaml-markup" ,(package-with-ocaml4.07 ocaml-markup))
5698 ("ocaml-sexplib" ,ocaml4.07-sexplib)
5699 ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
5700 ("ocaml-uutf" ,(package-with-ocaml4.07 ocaml-uutf))))
2f8e77be 5701 (native-inputs
87858bc5
JL
5702 `(("ocaml-astring" ,(package-with-ocaml4.07 ocaml-astring))
5703 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
5704 ("ocaml-cppo" ,(package-with-ocaml4.07 ocaml-cppo))
5705 ("ocaml-fpath" ,(package-with-ocaml4.07 ocaml-fpath))
5706 ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
5707 ("ocaml-tyxml" ,(package-with-ocaml4.07 ocaml-tyxml))
5708 ("ocaml-bisect-ppx" ,(package-with-ocaml4.07 ocaml-bisect-ppx))))
2f8e77be 5709 (home-page "https://github.com/ocaml/odoc")
5710 (synopsis "OCaml documentation generator")
5711 (description "Odoc is a documentation generator for OCaml. It reads
5712@emph{doc comments}, delimited with @code{(** ... *)}, and outputs
5713@acronym{HTML}.
5714
5715Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
5716advantage over ocamldoc is an accurate cross-referencer, which handles the
5717complexity of the OCaml module system.")
5718 (license license:isc)))
eb1ebabf 5719
87858bc5 5720(define-public ocaml4.07-fftw3
2e26dd69 5721 (package
87858bc5 5722 (name "ocaml4.07-fftw3")
2e26dd69
BG
5723 (version "0.8.4")
5724 (source
5725 (origin
5726 (method git-fetch)
5727 (uri (git-reference
b0e7b699 5728 (url "https://github.com/Chris00/fftw-ocaml")
2e26dd69
BG
5729 (commit version)))
5730 (file-name (git-file-name name version))
5731 (sha256
5732 (base32
5733 "0l66yagjkwdcib6q55wd8wiap50vi23qiahkghlvm28z7nvbclfk"))))
5734 (build-system dune-build-system)
5735 (arguments
5736 `(#:tests? #t
87858bc5
JL
5737 #:test-target "tests"
5738 #:ocaml ,ocaml-4.07
5739 #:findlib ,ocaml4.07-findlib
5740 #:dune ,ocaml4.07-dune))
2e26dd69
BG
5741 (propagated-inputs
5742 `(("fftw" ,fftw)
5743 ("fftwf" ,fftwf)))
5744 (native-inputs
87858bc5
JL
5745 `(("ocaml-cppo" ,(package-with-ocaml4.07 ocaml-cppo))
5746 ("ocaml-lacaml" ,ocaml4.07-lacaml)))
2e26dd69
BG
5747 (home-page
5748 "https://github.com/Chris00/fftw-ocaml")
5749 (synopsis
5750 "Bindings to FFTW3")
5751 (description
5752 "Bindings providing OCaml support for the seminal Fast Fourier Transform
5753library FFTW.")
5754 (license license:lgpl2.1))) ; with static linking exception.
5755
87858bc5 5756(define-public ocaml4.07-lacaml
eb1ebabf 5757 (package
87858bc5 5758 (name "ocaml4.07-lacaml")
eb1ebabf
BG
5759 (version "11.0.5")
5760 (source
5761 (origin
5762 (method git-fetch)
5763 (uri (git-reference
b0e7b699 5764 (url "https://github.com/mmottl/lacaml")
eb1ebabf
BG
5765 (commit version)))
5766 (file-name (git-file-name name version))
5767 (sha256
5768 (base32
5769 "180yb79a3qgx067qcpm50q12hrimjygf06rgkzbish9d1zfm670c"))))
5770 (build-system dune-build-system)
5771 (arguments
87858bc5
JL
5772 `(#:tests? #f ; No test target.
5773 #:ocaml ,ocaml-4.07
5774 #:findlib ,ocaml4.07-findlib
5775 #:dune ,ocaml4.07-dune))
eb1ebabf
BG
5776 (native-inputs
5777 `(("openblas" ,openblas)
5778 ("lapack" ,lapack)
87858bc5
JL
5779 ("ocaml-base" ,ocaml4.07-base)
5780 ("ocaml-stdio" ,ocaml4.07-stdio)))
eb1ebabf
BG
5781 (home-page "https://mmottl.github.io/lacaml/")
5782 (synopsis
5783 "OCaml-bindings to BLAS and LAPACK")
5784 (description
5785 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
5786LAPACK-library (Linear Algebra routines). It also contains many additional
5787convenience functions for vectors and matrices.")
5788 (license license:lgpl2.1)))
136919ba
BG
5789
5790(define-public ocaml-cairo2
5791 (package
5792 (name "ocaml-cairo2")
5793 (version "0.6.1")
5794 (source (origin
5795 (method git-fetch)
5796 (uri (git-reference
b0e7b699 5797 (url "https://github.com/Chris00/ocaml-cairo")
136919ba
BG
5798 (commit version)))
5799 (file-name (git-file-name name version))
0ada181a
BG
5800 (patches
5801 (search-patches
5802 ;; NOTE: This patch will be obsolete on the
5803 ;; next tagged release. Remove it at that
5804 ;; point.
5805 "ocaml-cairo2-caml_ba_array-fix.patch"))
136919ba
BG
5806 (sha256
5807 (base32
5808 "0wzysis9fa850s68qh8vrvqc6svgllhwra3kzll2ibv0wmdqrich"))))
5809 (build-system dune-build-system)
5810 (arguments
0ada181a 5811 `(#:test-target "tests"))
136919ba
BG
5812 (inputs
5813 `(("cairo" ,cairo)
5814 ("gtk+-2" ,gtk+-2)
5815 ("lablgtk" ,lablgtk)))
5816 (native-inputs
5817 `(("pkg-config" ,pkg-config)))
5818 (home-page "https://github.com/Chris00/ocaml-cairo")
5819 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
5820 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
5821with support for multiple output devices. Currently supported output targets
5822include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
5823and SVG file output.")
5824 (license license:lgpl3+)))
d977e243
BG
5825
5826(define-public lablgtk3
5827 (package
5828 (name "lablgtk")
cab2ddb4 5829 (version "3.1.1")
d977e243
BG
5830 (source (origin
5831 (method git-fetch)
5832 (uri (git-reference
b0e7b699 5833 (url "https://github.com/garrigue/lablgtk")
d977e243
BG
5834 (commit version)))
5835 (file-name (git-file-name name version))
5836 (sha256
5837 (base32
cab2ddb4 5838 "11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
d977e243
BG
5839 (build-system dune-build-system)
5840 (arguments
5841 `(#:tests? #t
5842 #:test-target "."
5843 #:phases
5844 (modify-phases %standard-phases
5845 (add-before 'build 'make-writable
5846 (lambda _
5847 (for-each (lambda (file)
5848 (chmod file #o644))
5849 (find-files "." "."))
5850 #t)))))
5851 (propagated-inputs
5852 `(("ocaml-cairo2" ,ocaml-cairo2)))
5853 (inputs
5854 `(("camlp5" ,camlp5)
5855 ("gtk+" ,gtk+)
5856 ("gtksourceview-3" ,gtksourceview-3)
5857 ("gtkspell3" ,gtkspell3)))
5858 (native-inputs
5859 `(("pkg-config" ,pkg-config)))
5860 (home-page "https://github.com/garrigue/lablgtk")
5861 (synopsis "OCaml interface to GTK+3")
5862 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
5863provides a strongly-typed object-oriented interface that is compatible with the
5864dynamic typing of GTK+. Most widgets and methods are available. LablGtk
5865also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
5866LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
5867generate OCaml code from .glade files), libpanel, librsvg and quartz.")
5868 ;; Version 2 only, with linking exception.
5869 (license license:lgpl2.0)))