gnu: laby: Update to 0.7.0.
[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
87858bc5 247(define-public ocaml ocaml-4.09)
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
59fa09e1 1485 `(#:test-target "."))
564cf93f
JL
1486 (propagated-inputs
1487 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
c949a4eb 1488 (properties `((upstream-name . "ppx_tools_versioned")))
564cf93f
JL
1489 (home-page "https://github.com/let-def/ppx_tools_versioned")
1490 (synopsis "Variant of ppx_tools")
1491 (description "This package is a variant of ppx_tools based on
1492ocaml-migrate-parsetree")
1493 (license license:expat)))
1494
44c23cb8
JL
1495(define-public ocaml-bitstring
1496 (package
1497 (name "ocaml-bitstring")
564cf93f 1498 (version "3.1.0")
44c23cb8
JL
1499 (source (origin
1500 (method url-fetch)
564cf93f
JL
1501 (uri (string-append "https://bitbucket.org/thanatonauts/bitstring/"
1502 "get/v" version ".tar.gz"))
0aee7fdc 1503 (file-name (string-append name "-" version ".tar.gz"))
44c23cb8
JL
1504 (sha256
1505 (base32
564cf93f 1506 "15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
f93246a5 1507 (build-system dune-build-system)
44c23cb8 1508 (native-inputs
24b199fd 1509 `(("time" ,time)
44c23cb8 1510 ("autoconf" ,autoconf)
24b199fd 1511 ("automake" ,automake)))
44c23cb8 1512 (propagated-inputs
24b199fd 1513 `(("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
44c23cb8 1514 (arguments
93304a0c 1515 `(#:package "bitstring"
33917795
JL
1516 #:tests? #f; Tests fail to build
1517 #:phases
1518 (modify-phases %standard-phases
1519 (add-before 'build 'upgrade
1520 (lambda _
1521 (invoke "dune" "upgrade")
1522 #t)))))
564cf93f
JL
1523 (home-page "https://github.com/xguerin/bitstring")
1524 (synopsis "Bitstrings and bitstring matching for OCaml")
1525 (description "Adds Erlang-style bitstrings and matching over bitstrings as
1526a syntax extension and library for OCaml. You can use this module to both parse
1527and generate binary formats, files and protocols. Bitstring handling is added
1528as primitives to the language, making it exceptionally simple to use and very
1529powerful.")
1530 (license license:isc)))
1531
704b990c
JL
1532(define-public ocaml-result
1533 (package
1534 (name "ocaml-result")
bc92fd22 1535 (version "1.5")
704b990c 1536 (source (origin
22cd6a1d
JL
1537 (method git-fetch)
1538 (uri (git-reference
1539 (url "https://github.com/janestreet/result")
1540 (commit version)))
1541 (file-name (git-file-name name version))
704b990c
JL
1542 (sha256
1543 (base32
bc92fd22 1544 "166laj8qk7466sdl037c6cjs4ac571hglw4l5qpyll6df07h6a7q"))))
22cd6a1d 1545 (build-system dune-build-system)
704b990c 1546 (arguments
33917795
JL
1547 `(#:test-target "."
1548 #:dune ,dune-bootstrap))
6ed2741a 1549 (properties `((ocaml4.09-variant . ,(delay ocaml4.09-result))))
704b990c
JL
1550 (home-page "https://github.com/janestreet/result")
1551 (synopsis "Compatibility Result module")
1552 (description "Uses the new result type defined in OCaml >= 4.03 while
1553staying compatible with older version of OCaml should use the Result module
1554defined in this library.")
1555 (license license:bsd-3)))
6ed2741a
JL
1556
1557(define-public ocaml4.09-result
1558 (package
1559 (inherit ocaml-result)
1560 (name "ocaml4.09-result")
1561 (arguments
1562 `(#:test-target "."
1563 #:dune ,ocaml4.09-dune-bootstrap
1564 #:ocaml ,ocaml-4.09
1565 #:findlib ,ocaml4.09-findlib))))
564cf93f 1566
a359c727
JL
1567(define-public ocaml-topkg
1568 (package
1569 (name "ocaml-topkg")
eddfd11d 1570 (version "1.0.0")
a359c727
JL
1571 (source (origin
1572 (method url-fetch)
1573 (uri (string-append "http://erratique.ch/software/topkg/releases/"
1574 "topkg-" version ".tbz"))
1575 (sha256
1576 (base32
eddfd11d 1577 "1df61vw6v5bg2mys045682ggv058yqkqb67w7r2gz85crs04d5fw"))))
a359c727
JL
1578 (build-system ocaml-build-system)
1579 (native-inputs
564cf93f
JL
1580 `(("opam" ,opam)
1581 ("ocamlbuild" ,ocamlbuild)))
a359c727
JL
1582 (propagated-inputs
1583 `(("result" ,ocaml-result)))
1584 (arguments
1585 `(#:tests? #f
1586 #:build-flags '("build")
1587 #:phases
1588 (modify-phases %standard-phases
1589 (delete 'configure))))
1590 (home-page "http://erratique.ch/software/topkg")
1591 (synopsis "Transitory OCaml software packager")
1592 (description "Topkg is a packager for distributing OCaml software. It
1593provides an API to describe the files a package installs in a given build
1594configuration and to specify information about the package's distribution,
1595creation and publication procedures.")
1596 (license license:isc)))
564cf93f 1597
63147e5e
JL
1598(define-public ocaml-rresult
1599 (package
1600 (name "ocaml-rresult")
1601 (version "0.5.0")
1602 (source (origin
1603 (method url-fetch)
1604 (uri (string-append "http://erratique.ch/software/rresult/releases/"
1605 "rresult-" version ".tbz"))
1606 (sha256
1607 (base32
1608 "1xxycxhdhaq8p9vhwi93s2mlxjwgm44fcxybx5vghzgbankz9yhm"))))
1609 (build-system ocaml-build-system)
1610 (native-inputs
564cf93f
JL
1611 `(("opam" ,opam)
1612 ("ocamlbuild" ,ocamlbuild)))
63147e5e
JL
1613 (propagated-inputs
1614 `(("topkg" ,ocaml-topkg)))
1615 (arguments
1616 `(#:tests? #f
1617 #:build-flags '("build")
1618 #:phases
1619 (modify-phases %standard-phases
1620 (delete 'configure))))
1621 (home-page "http://erratique.ch/software/rresult")
1622 (synopsis "Result value combinators for OCaml")
1623 (description "Handle computation results and errors in an explicit and
1624declarative manner, without resorting to exceptions. It defines combinators
1625to operate on the result type available from OCaml 4.03 in the standard
1626library.")
1627 (license license:isc)))
eb1ba731 1628
87858bc5 1629(define-public ocaml4.07-sqlite3
0c4dbdc2 1630 (package
87858bc5 1631 (name "ocaml4.07-sqlite3")
fbf786bd 1632 (version "4.4.1")
0c4dbdc2
BW
1633 (source
1634 (origin
fbf786bd
JL
1635 (method git-fetch)
1636 (uri (git-reference
1637 (url "https://github.com/mmottl/sqlite3-ocaml")
1638 (commit version)))
1639 (file-name (git-file-name name version))
0c4dbdc2
BW
1640 (sha256
1641 (base32
fbf786bd
JL
1642 "1536agm5fgcqysszhpd3kmw7lkc5n5ni7gmlyglrbvmnmrwf3av2"))))
1643 (build-system dune-build-system)
87858bc5
JL
1644 (arguments
1645 `(#:ocaml ,ocaml-4.07
db194f71
JL
1646 #:findlib ,ocaml4.07-findlib
1647 #:dune ,ocaml4.07-dune))
0c4dbdc2 1648 (native-inputs
87858bc5
JL
1649 `(("ocaml-base" ,ocaml4.07-base)
1650 ("ocaml-stdio" ,ocaml4.07-stdio)
564cf93f 1651 ("pkg-config" ,pkg-config)))
0c4dbdc2
BW
1652 (inputs
1653 `(("sqlite" ,sqlite)))
1654 (home-page "https://mmottl.github.io/sqlite3-ocaml")
1655 (synopsis "SQLite3 Bindings for OCaml")
1656 (description
1657 "SQLite3-OCaml is an OCaml library with bindings to the SQLite3 client
1658API. Sqlite3 is a self-contained, serverless, zero-configuration,
1659transactional SQL database engine with outstanding performance for many use
1660cases. These bindings are written in a way that enables a friendly
1661coexistence with the old (version 2) SQLite and its OCaml wrapper
1662@code{ocaml-sqlite}.")
1663 (license license:expat)))
1664
91df9eae
BW
1665(define-public ocaml-csv
1666 (package
1667 (name "ocaml-csv")
5696fbd9 1668 (version "2.3")
91df9eae
BW
1669 (source
1670 (origin
e58d05c3
JL
1671 (method git-fetch)
1672 (uri (git-reference
1673 (url "https://github.com/Chris00/ocaml-csv")
1674 (commit version)))
1675 (file-name (git-file-name name version))
91df9eae
BW
1676 (sha256
1677 (base32
5696fbd9 1678 "19k48517s8y1zb91a1312a0n94cbh5i5dixndcrqjmf87kkz61zx"))))
e58d05c3
JL
1679 (build-system dune-build-system)
1680 (arguments
1681 `(#:package "csv"
1682 #:test-target "."))
91df9eae
BW
1683 (home-page "https://github.com/Chris00/ocaml-csv")
1684 (synopsis "Pure OCaml functions to read and write CSV")
1685 (description
1686 "@dfn{Comma separated values} (CSV) is a simple tabular format supported
1687by all major spreadsheets. This library implements pure OCaml functions to
1688read and write files in this format as well as some convenience functions to
1689manipulate such data.")
5696fbd9
JL
1690 ;; This is LGPLv2.1 with an exception that allows packages statically-linked
1691 ;; against the library to be released under any terms.
1692 (license license:lgpl2.1)))
91df9eae 1693
eb1ba731
JL
1694(define-public ocaml-mtime
1695 (package
1696 (name "ocaml-mtime")
853af25e 1697 (version "1.1.0")
eb1ba731
JL
1698 (source (origin
1699 (method url-fetch)
1700 (uri (string-append "http://erratique.ch/software/mtime/releases/"
1701 "mtime-" version ".tbz"))
1702 (sha256
1703 (base32
853af25e 1704 "1qb4ljwirrc3g8brh97s76rjky2cpmy7zm87y7iqd6pxix52ydk3"))))
eb1ba731
JL
1705 (build-system ocaml-build-system)
1706 (native-inputs
564cf93f
JL
1707 `(("ocamlbuild" ,ocamlbuild)
1708 ("opam" ,opam)))
eb1ba731
JL
1709 (propagated-inputs
1710 `(("topkg" ,ocaml-topkg)))
1711 (arguments
1712 `(#:tests? #f
853af25e 1713 #:build-flags (list "build" "--with-js_of_ocaml" "false")
eb1ba731
JL
1714 #:phases
1715 (modify-phases %standard-phases
1716 (delete 'configure))))
1717 (home-page "http://erratique.ch/software/mtime")
1718 (synopsis "Monotonic wall-clock time for OCaml")
2bf52398 1719 (description "Access monotonic wall-clock time. It measures time
eb1ba731
JL
1720spans without being subject to operating system calendar time adjustments.")
1721 (license license:isc)))
6548e53f
JL
1722
1723(define-public ocaml-cmdliner
1724 (package
1725 (name "ocaml-cmdliner")
b6bba90e 1726 (version "1.0.3")
6548e53f
JL
1727 (source (origin
1728 (method url-fetch)
1729 (uri (string-append "http://erratique.ch/software/cmdliner/releases/"
1730 "cmdliner-" version ".tbz"))
1731 (sha256
1732 (base32
b6bba90e 1733 "0g3w4hvc1cx9x2yp5aqn6m2rl8lf9x1dn754hfq8m1sc1102lxna"))))
6548e53f 1734 (build-system ocaml-build-system)
ca53346d
GH
1735 (inputs
1736 `(("ocaml-result" ,ocaml-result)))
6548e53f 1737 (native-inputs
b6bba90e 1738 `(("ocamlbuild" ,ocamlbuild)))
6548e53f
JL
1739 (arguments
1740 `(#:tests? #f
b6bba90e
JL
1741 #:make-flags (list (string-append "LIBDIR=" (assoc-ref %outputs "out")
1742 "/lib/ocaml/site-lib/cmdliner"))
6548e53f
JL
1743 #:phases
1744 (modify-phases %standard-phases
6c79cee2
JL
1745 (delete 'configure)
1746 (add-before 'build 'fix-source-file-order
1747 (lambda _
1748 (substitute* "build.ml"
1749 (("Sys.readdir dir")
1750 "let a = Sys.readdir dir in Array.sort String.compare a; a"))
1751 #t)))))
6548e53f
JL
1752 (home-page "http://erratique.ch/software/cmdliner")
1753 (synopsis "Declarative definition of command line interfaces for OCaml")
1754 (description "Cmdliner is a module for the declarative definition of command
1755line interfaces. It provides a simple and compositional mechanism to convert
1756command line arguments to OCaml values and pass them to your functions. The
1757module automatically handles syntax errors, help messages and UNIX man page
1758generation. It supports programs with single or multiple commands and respects
1759most of the POSIX and GNU conventions.")
1760 (license license:bsd-3)))
beeb2d41
JL
1761
1762(define-public ocaml-fmt
1763 (package
1764 (name "ocaml-fmt")
0a86b93f 1765 (version "0.8.9")
beeb2d41
JL
1766 (source
1767 (origin
1768 (method url-fetch)
1769 (uri (string-append "http://erratique.ch/software/fmt/releases/fmt-"
1770 version ".tbz"))
1771 (sha256 (base32
0a86b93f 1772 "0gkkkj4x678vxdda4xaw2dd44qjacavsvn5nx8gydfwah6pjbkxk"))))
beeb2d41 1773 (build-system ocaml-build-system)
564cf93f
JL
1774 (native-inputs
1775 `(("ocamlbuild" ,ocamlbuild)
1776 ("opam" ,opam)
1777 ("topkg" ,ocaml-topkg)))
1778 (propagated-inputs
0a86b93f
JL
1779 `(("cmdliner" ,ocaml-cmdliner)
1780 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
1781 ("ocaml-uchar" ,ocaml-uchar)))
beeb2d41
JL
1782 (arguments `(#:tests? #f
1783 #:build-flags (list "build" "--with-base-unix" "true"
1784 "--with-cmdliner" "true")
1785 #:phases
1786 (modify-phases %standard-phases
1787 (delete 'configure))))
1788 (home-page "http://erratique.ch/software/fmt")
1789 (synopsis "OCaml Format pretty-printer combinators")
1790 (description "Fmt exposes combinators to devise Format pretty-printing
1791functions.")
1792 (license license:isc)))
f46bceb6
JL
1793
1794(define-public ocaml-astring
1795 (package
1796 (name "ocaml-astring")
1797 (version "0.8.3")
1798 (source
1799 (origin
1800 (method url-fetch)
1801 (uri (string-append "http://erratique.ch/software/astring/releases/astring-"
1802 version ".tbz"))
1803 (sha256 (base32
1804 "0ixjwc3plrljvj24za3l9gy0w30lsbggp8yh02lwrzw61ls4cri0"))))
1805 (build-system ocaml-build-system)
564cf93f
JL
1806 (native-inputs
1807 `(("ocamlbuild" ,ocamlbuild)
1808 ("opam" ,opam)
1809 ("topkg" ,ocaml-topkg)))
1810 (arguments
1811 `(#:tests? #f
1812 #:build-flags (list "build")
1813 #:phases
1814 (modify-phases %standard-phases
1815 (delete 'configure))))
f46bceb6
JL
1816 (home-page "http://erratique.ch/software/astring")
1817 (synopsis "Alternative String module for OCaml")
1818 (description "Astring exposes an alternative String module for OCaml. This
1819module balances minimality and expressiveness for basic, index-free, string
1820processing and provides types and functions for substrings, string sets and
1821string maps. The String module exposed by Astring has exception safe functions,
1822removes deprecated and rarely used functions, alters some signatures and names,
1823adds a few missing functions and fully exploits OCaml's newfound string
1824immutability.")
1825 (license license:isc)))
69705efe
JL
1826
1827(define-public ocaml-alcotest
1828 (package
1829 (name "ocaml-alcotest")
01ec666e 1830 (version "1.0.0")
69705efe
JL
1831 (source (origin
1832 (method url-fetch)
1833 (uri (string-append "https://github.com/mirage/alcotest/releases/"
1834 "download/" version "/alcotest-" version ".tbz"))
1835 (sha256
1836 (base32
01ec666e 1837 "1a43ilhwnj58pq3bi78ni46l9wh6klmmgfc93i94mvyx48bzzayx"))))
23c8a97a 1838 (build-system dune-build-system)
564cf93f 1839 (arguments
23c8a97a
JL
1840 `(#:package "alcotest"
1841 #:test-target "."))
564cf93f 1842 (native-inputs
23c8a97a 1843 `(("ocamlbuild" ,ocamlbuild)))
564cf93f 1844 (propagated-inputs
23c8a97a
JL
1845 `(("ocaml-astring" ,ocaml-astring)
1846 ("ocaml-cmdliner" ,ocaml-cmdliner)
1847 ("ocaml-fmt" ,ocaml-fmt)
01ec666e
JL
1848 ("ocaml-re" ,ocaml-re)
1849 ("ocaml-stdlib-shims" ,ocaml-stdlib-shims)
1850 ("ocaml-uuidm" ,ocaml-uuidm)
1851 ("ocaml-uutf" ,ocaml-uutf)))
69705efe
JL
1852 (home-page "https://github.com/mirage/alcotest")
1853 (synopsis "Lightweight OCaml test framework")
1854 (description "Alcotest exposes simple interface to perform unit tests. It
1855exposes a simple TESTABLE module type, a check function to assert test
1856predicates and a run function to perform a list of unit -> unit test callbacks.
1857Alcotest provides a quiet and colorful output where only faulty runs are fully
1858displayed at the end of the run (with the full logs ready to inspect), with a
1859simple (yet expressive) query language to select the tests to run.")
1860 (license license:isc)))
0a7b43a8 1861
87858bc5 1862(define-public ocaml4.07-ppx-tools
0a7b43a8 1863 (package
87858bc5 1864 (name "ocaml4.07-ppx-tools")
564cf93f 1865 (version "5.1+4.06.0")
0a7b43a8 1866 (source
ef59cf9d
TGR
1867 (origin
1868 (method git-fetch)
1869 (uri (git-reference
b0e7b699 1870 (url "https://github.com/alainfrisch/ppx_tools")
ef59cf9d 1871 (commit version)))
9e6cce44 1872 (file-name (git-file-name name version))
ef59cf9d
TGR
1873 (sha256 (base32
1874 "1ww4cspdpgjjsgiv71s0im5yjkr3544x96wsq1vpdacq7dr7zwiw"))))
0a7b43a8 1875 (build-system ocaml-build-system)
564cf93f
JL
1876 (arguments
1877 `(#:phases (modify-phases %standard-phases (delete 'configure))
87858bc5
JL
1878 #:tests? #f
1879 #:ocaml ,ocaml-4.07
1880 #:findlib ,ocaml4.07-findlib))
d4857001 1881 (properties `((upstream-name . "ppx_tools")))
0a7b43a8
JL
1882 (home-page "https://github.com/alainfrisch/ppx_tools")
1883 (synopsis "Tools for authors of ppx rewriters and other syntactic tools")
1884 (description "Tools for authors of ppx rewriters and other syntactic tools.")
1885 (license license:expat)))
1342fce1
JL
1886
1887(define-public ocaml-react
1888 (package
1889 (name "ocaml-react")
d7d41026 1890 (version "1.2.1")
1342fce1
JL
1891 (source
1892 (origin
1893 (method url-fetch)
1894 (uri (string-append "http://erratique.ch/software/react/releases/react-"
1895 version ".tbz"))
1896 (sha256 (base32
d7d41026 1897 "1aj8w79gdd9xnrbz7s5p8glcb4pmimi8jp9f439dqnf6ih3mqb3v"))))
1342fce1 1898 (build-system ocaml-build-system)
564cf93f
JL
1899 (native-inputs
1900 `(("ocamlbuild" ,ocamlbuild)
d7d41026
JL
1901 ("opam" ,opam)
1902 ("ocaml-topkg" ,ocaml-topkg)))
564cf93f
JL
1903 (arguments
1904 `(#:tests? #f
d7d41026 1905 #:build-flags (list "build")
564cf93f
JL
1906 #:phases
1907 (modify-phases %standard-phases
1908 (delete 'configure))))
1342fce1
JL
1909 (home-page "http://erratique.ch/software/react")
1910 (synopsis "Declarative events and signals for OCaml")
1911 (description "React is an OCaml module for functional reactive programming
1912(FRP). It provides support to program with time varying values: declarative
1913events and signals. React doesn't define any primitive event or signal, it
1914lets the client choose the concrete timeline.")
1915 (license license:bsd-3)))
37f17e2a
JL
1916
1917(define-public ocaml-ssl
1918 (package
1919 (name "ocaml-ssl")
4a8a0d85 1920 (version "0.5.9")
37f17e2a
JL
1921 (source
1922 (origin
8ae540a2
TGR
1923 (method git-fetch)
1924 (uri (git-reference
b0e7b699 1925 (url "https://github.com/savonet/ocaml-ssl")
8ae540a2
TGR
1926 (commit version)))
1927 (file-name (git-file-name name version))
37f17e2a 1928 (sha256 (base32
4a8a0d85 1929 "04h02rvzrwp886n5hsx84rnc9b150iggy38g5v1x1rwz3pkdnmf0"))))
b858c5ac 1930 (build-system dune-build-system)
564cf93f 1931 (arguments
b858c5ac 1932 `(#:test-target "."))
564cf93f
JL
1933 (native-inputs
1934 `(("autoconf" ,autoconf)
1935 ("automake" ,automake)
1936 ("which" ,which)))
37f17e2a
JL
1937 (propagated-inputs `(("openssl" ,openssl)))
1938 (home-page "https://github.com/savonet/ocaml-ssl/")
1939 (synopsis "OCaml bindings for OpenSSL")
36dba63b
TGR
1940 (description
1941 "OCaml-SSL is a set of bindings for OpenSSL, a library for communicating
1942through Transport Layer Security (@dfn{TLS}) encrypted connections.")
37f17e2a 1943 (license license:lgpl2.1)))
1fdfbadf 1944
2624921a
JL
1945(define-public ocaml-mmap
1946 (package
1947 (name "ocaml-mmap")
1948 (version "1.1.0")
1949 (source (origin
1950 (method git-fetch)
1951 (uri (git-reference
1952 (url "https://github.com/mirage/mmap")
1953 (commit (string-append "v" version))))
0f654e63 1954 (file-name (git-file-name name version))
2624921a
JL
1955 (sha256
1956 (base32
1957 "1jaismy5d1bhbbanysmr2k79px0yv6ya265dri3949nha1l23i60"))))
1958 (build-system dune-build-system)
1959 (home-page "https://github.com/mirage/mmap")
1960 (synopsis "File mapping for OCaml")
1961 (description "This project provides a @command{Mmap.map_file} function
1962for mapping files in memory. This function is the same as the
a6d35eb4 1963@command{Unix.map_file} function added in OCaml >= 4.06.")
2624921a
JL
1964 (license (list license:qpl license:lgpl2.0))))
1965
1fdfbadf
JL
1966(define-public ocaml-lwt
1967 (package
1968 (name "ocaml-lwt")
16829d3b 1969 (version "5.1.1")
1fdfbadf
JL
1970 (source
1971 (origin
8684575a
EF
1972 (method git-fetch)
1973 (uri (git-reference
1974 (url "https://github.com/ocsigen/lwt")
1975 (commit version)))
1976 (file-name (git-file-name name version))
1fdfbadf 1977 (sha256 (base32
8684575a 1978 "1nl7rdnwfdhwcsm5zpay1nr9y5cbapd9x1qzily7zk9ab4v52m8g"))))
f880b03b 1979 (build-system dune-build-system)
1fdfbadf 1980 (arguments
16829d3b 1981 `(#:package "lwt"))
564cf93f 1982 (native-inputs
16829d3b
JL
1983 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
1984 ("ocaml-cppo" ,ocaml-cppo)
1985 ("pkg-config" ,pkg-config)))
564cf93f
JL
1986 (inputs
1987 `(("libev" ,libev)
1988 ("glib" ,glib)))
1989 (propagated-inputs
16829d3b
JL
1990 `(("ocaml-mmap" ,ocaml-mmap)
1991 ("ocaml-ocplib-endian" ,ocaml-ocplib-endian)
1992 ("ocaml-result" ,ocaml-result)
1993 ("ocaml-seq" ,ocaml-seq)))
1fdfbadf
JL
1994 (home-page "https://github.com/ocsigen/lwt")
1995 (synopsis "Cooperative threads and I/O in monadic style")
1996 (description "Lwt provides typed, composable cooperative threads. These
1997make it easy to run normally-blocking I/O operations concurrently in a single
1998process. Also, in many cases, Lwt threads can interact without the need for
1999locks or other synchronization primitives.")
2000 (license license:lgpl2.1)))
9dc7dcb2 2001
d77310cc
JL
2002(define-public ocaml-lwt-react
2003 (package
2004 (inherit ocaml-lwt)
2005 (name "ocaml-lwt-react")
2006 (version "1.1.3")
2007 (source (origin
2008 (method git-fetch)
2009 (uri (git-reference
2010 (url "https://github.com/ocsigen/lwt")
2011 ;; Version from opam
2012 (commit "4.3.0")))
2013 (file-name (git-file-name name version))
2014 (sha256
2015 (base32
2016 "0f7036srqz7zmnz0n164734smgkrqz78r1i35cg30x31kkr3pnn4"))))
2017 (arguments
2018 `(#:package "lwt_react"))
2019 (properties `((upstream-name . "lwt_react")))
2020 (propagated-inputs
2021 `(("ocaml-lwt" ,ocaml-lwt)
2022 ("ocaml-react" ,ocaml-react)))))
2023
564cf93f
JL
2024(define-public ocaml-lwt-log
2025 (package
2026 (name "ocaml-lwt-log")
72b2e2ea
JL
2027 (version "1.1.1")
2028 (source (origin
2029 (method git-fetch)
2030 (uri (git-reference
2031 (url "https://github.com/aantron/lwt_log")
2032 (commit version)))
2033 (file-name (git-file-name name version))
2034 (sha256
2035 (base32
2036 "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"))))
5d071263 2037 (build-system dune-build-system)
564cf93f 2038 (arguments
2d00625f 2039 `(#:tests? #f)); require lwt_ppx
564cf93f
JL
2040 (propagated-inputs
2041 `(("lwt" ,ocaml-lwt)))
f08b235d 2042 (properties `((upstream-name . "lwt_log")))
564cf93f
JL
2043 (home-page "https://github.com/aantron/lwt_log")
2044 (synopsis "Logging library")
2045 (description "This package provides a deprecated logging component for
2046ocaml lwt.")
2047 (license license:lgpl2.1)))
2048
9dc7dcb2
JL
2049(define-public ocaml-logs
2050 (package
2051 (name "ocaml-logs")
276be8f2 2052 (version "0.7.0")
9dc7dcb2
JL
2053 (source (origin
2054 (method url-fetch)
2055 (uri (string-append "http://erratique.ch/software/logs/releases/"
2056 "logs-" version ".tbz"))
2057 (sha256
2058 (base32
276be8f2 2059 "1jnmd675wmsmdwyb5mx5b0ac66g4c6gpv5s4mrx2j6pb0wla1x46"))))
9dc7dcb2 2060 (build-system ocaml-build-system)
564cf93f
JL
2061 (arguments
2062 `(#:tests? #f
2063 #:build-flags (list "build" "--with-js_of_ocaml" "false")
2064 #:phases
2065 (modify-phases %standard-phases
2066 (delete 'configure))))
2067 (native-inputs
2068 `(("ocamlbuild" ,ocamlbuild)
2069 ("opam" ,opam)))
2070 (propagated-inputs
2071 `(("fmt" ,ocaml-fmt)
2072 ("lwt" ,ocaml-lwt)
2073 ("mtime" ,ocaml-mtime)
2074 ("result" ,ocaml-result)
2075 ("cmdliner" ,ocaml-cmdliner)
2076 ("topkg" ,ocaml-topkg)))
9dc7dcb2
JL
2077 (home-page "http://erratique.ch/software/logs")
2078 (synopsis "Logging infrastructure for OCaml")
2079 (description "Logs provides a logging infrastructure for OCaml. Logging is
2080performed on sources whose reporting level can be set independently. Log
2081message report is decoupled from logging and is handled by a reporter.")
2082 (license license:isc)))
fbf38b09
JL
2083
2084(define-public ocaml-fpath
2085 (package
2086 (name "ocaml-fpath")
7e495384 2087 (version "0.7.2")
fbf38b09
JL
2088 (source (origin
2089 (method url-fetch)
2090 (uri (string-append "http://erratique.ch/software/fpath/releases/"
2091 "fpath-" version ".tbz"))
2092 (sha256
2093 (base32
7e495384 2094 "1hr05d8bpqmqcfdavn4rjk9rxr7v2zl84866f5knjifrm60sxqic"))))
fbf38b09 2095 (build-system ocaml-build-system)
564cf93f
JL
2096 (arguments
2097 `(#:tests? #f
2098 #:build-flags (list "build")
2099 #:phases
2100 (modify-phases %standard-phases
2101 (delete 'configure))))
2102 (native-inputs
2103 `(("ocamlbuild" ,ocamlbuild)
2104 ("opam" ,opam)))
2105 (propagated-inputs
2106 `(("topkg" ,ocaml-topkg)
2107 ("astring" ,ocaml-astring)))
fbf38b09
JL
2108 (home-page "http://erratique.ch/software/fpath")
2109 (synopsis "File system paths for OCaml")
2110 (description "Fpath is an OCaml module for handling file system paths with
2111POSIX or Windows conventions. Fpath processes paths without accessing the
2112file system and is independent from any system library.")
2113 (license license:isc)))
33e0702d
JL
2114
2115(define-public ocaml-bos
2116 (package
2117 (name "ocaml-bos")
a1034ea0 2118 (version "0.2.0")
33e0702d
JL
2119 (source (origin
2120 (method url-fetch)
2121 (uri (string-append "http://erratique.ch/software/bos/releases/"
2122 "bos-" version ".tbz"))
2123 (sha256
2124 (base32
a1034ea0 2125 "1s10iqx8rgnxr5n93lf4blwirjf8nlm272yg5sipr7lsr35v49wc"))))
33e0702d 2126 (build-system ocaml-build-system)
564cf93f
JL
2127 (arguments
2128 `(#:tests? #f
2129 #:build-flags (list "build")
2130 #:phases
2131 (modify-phases %standard-phases
2132 (delete 'configure))))
2133 (native-inputs
2134 `(("ocamlbuild" ,ocamlbuild)
2135 ("opam" ,opam)))
2136 (propagated-inputs
2137 `(("topkg" ,ocaml-topkg)
2138 ("astring" ,ocaml-astring)
2139 ("fmt" ,ocaml-fmt)
2140 ("fpath" ,ocaml-fpath)
2141 ("logs" ,ocaml-logs)
2142 ("rresult" ,ocaml-rresult)))
33e0702d
JL
2143 (home-page "http://erratique.ch/software/bos")
2144 (synopsis "Basic OS interaction for OCaml")
2145 (description "Bos provides support for basic and robust interaction with
2146the operating system in OCaml. It has functions to access the process
2147environment, parse command line arguments, interact with the file system and
2148run command line programs.")
2149 (license license:isc)))
036b8579
JL
2150
2151(define-public ocaml-xmlm
2152 (package
2153 (name "ocaml-xmlm")
564cf93f 2154 (version "1.3.0")
036b8579
JL
2155 (source (origin
2156 (method url-fetch)
2157 (uri (string-append "http://erratique.ch/software/xmlm/releases/"
2158 "xmlm-" version ".tbz"))
2159 (sha256
2160 (base32
564cf93f 2161 "1rrdxg5kh9zaqmgapy9bhdqyxbbvxxib3bdfg1vhw4rrkp1z0x8n"))))
036b8579 2162 (build-system ocaml-build-system)
564cf93f
JL
2163 (arguments
2164 `(#:tests? #f
2165 #:build-flags (list "build")
2166 #:phases
2167 (modify-phases %standard-phases
2168 (delete 'configure))))
2169 (native-inputs
2170 `(("ocamlbuild" ,ocamlbuild)
2171 ("ocaml-topkg" ,ocaml-topkg)
2172 ("opam" ,opam)))
036b8579
JL
2173 (home-page "http://erratique.ch/software/xmlm")
2174 (synopsis "Streaming XML codec for OCaml")
2175 (description "Xmlm is a streaming codec to decode and encode the XML data
2176format. It can process XML documents without a complete in-memory
2177representation of the data.")
2178 (license license:isc)))
6e9b678e 2179
87858bc5 2180(define-public ocaml4.07-gen
5a4003f4 2181 (package
87858bc5 2182 (name "ocaml4.07-gen")
5a4003f4
JL
2183 (version "0.5.2")
2184 (source (origin
5045821e
EF
2185 (method git-fetch)
2186 (uri (git-reference
2187 (url "https://github.com/c-cube/gen")
2188 (commit version)))
2189 (file-name (git-file-name name version))
5a4003f4
JL
2190 (sha256
2191 (base32
5045821e 2192 "1h9g508rnj2j8va5nvhamzscp954vrkh0hdf4pn3d10pcfyslfg2"))))
5a4003f4
JL
2193 (build-system dune-build-system)
2194 (arguments
2195 `(#:tests? #f; no tests
87858bc5
JL
2196 #:package "gen"
2197 #:ocaml ,ocaml-4.07
339c752d
JL
2198 #:findlib ,ocaml4.07-findlib
2199 #:dune ,ocaml4.07-dune))
5a4003f4 2200 (propagated-inputs
87858bc5 2201 `(("ocaml-odoc" ,ocaml4.07-odoc)))
5a4003f4 2202 (native-inputs
87858bc5
JL
2203 `(("ocaml-qtest" ,(package-with-ocaml4.07 ocaml-qtest))
2204 ("ocaml-qcheck" ,(package-with-ocaml4.07 ocaml-qcheck))))
5a4003f4
JL
2205 (home-page "https://github.com/c-cube/gen/")
2206 (synopsis "Iterators for OCaml, both restartable and consumable")
2207 (description "Gen implements iterators of OCaml, that are both restartable
2208and consumable.")
2209 (license license:bsd-2)))
2210
87858bc5 2211(define-public ocaml4.07-sedlex
98a468ff 2212 (package
87858bc5 2213 (name "ocaml4.07-sedlex")
98a468ff
JL
2214 (version "2.1")
2215 (source (origin
2216 (method git-fetch)
2217 (uri (git-reference
2218 (url "https://github.com/ocaml-community/sedlex")
2219 (commit (string-append "v" version))))
2220 (file-name (git-file-name name version))
2221 (sha256
2222 (base32
2223 "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
2224 (build-system dune-build-system)
2225 (arguments
2226 `(#:tests? #f; no tests
2227 #:package "sedlex"
2228 #:phases
2229 (modify-phases %standard-phases
2230 (add-before 'build 'copy-resources
2231 (lambda* (#:key inputs #:allow-other-keys)
2232 (with-directory-excursion "src/generator/data"
2233 (for-each
2234 (lambda (file)
2235 (copy-file (assoc-ref inputs file) file))
2236 '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
2237 "PropList.txt")))
2238 #t))
2239 (add-before 'build 'chmod
2240 (lambda _
2241 (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
87858bc5
JL
2242 #t)))
2243 #:ocaml ,ocaml-4.07
339c752d
JL
2244 #:findlib ,ocaml4.07-findlib
2245 #:dune ,ocaml4.07-dune))
98a468ff 2246 (native-inputs
87858bc5 2247 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
98a468ff 2248 (propagated-inputs
87858bc5
JL
2249 `(("ocaml-gen" ,ocaml4.07-gen)
2250 ("ocaml-ppx-tools-versioned"
2251 ,(package-with-ocaml4.07 ocaml-ppx-tools-versioned))
2252 ("ocaml-uchar" ,(package-with-ocaml4.07 ocaml-uchar))))
98a468ff
JL
2253 ;; These three files are needed by src/generator/data/dune, but would be
2254 ;; downloaded using curl at build time.
2255 (inputs
2256 `(("DerivedCoreProperties.txt"
2257 ,(origin
2258 (method url-fetch)
2259 (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
2260 (sha256
2261 (base32
2262 "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
2263 ("DerivedGeneralCategory.txt"
2264 ,(origin
2265 (method url-fetch)
2266 (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
2267 (sha256
2268 (base32
2269 "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
2270 ("PropList.txt"
2271 ,(origin
2272 (method url-fetch)
2273 (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
2274 (sha256
2275 (base32
2276 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
d8bf501e 2277 (home-page "https://www.cduce.org/download.html#side")
98a468ff
JL
2278 (synopsis "Lexer generator for Unicode and OCaml")
2279 (description "Lexer generator for Unicode and OCaml.")
2280 (license license:expat)))
2281
33f16b9a
JL
2282(define-public ocaml-uchar
2283 (package
2284 (name "ocaml-uchar")
f0dece30 2285 (version "0.0.2")
33f16b9a
JL
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (string-append "https://github.com/ocaml/uchar/releases/download/v"
2290 version "/uchar-" version ".tbz"))
2291 (sha256 (base32
f0dece30 2292 "1w2saw7zanf9m9ffvz2lvcxvlm118pws2x1wym526xmydhqpyfa7"))))
33f16b9a 2293 (build-system ocaml-build-system)
564cf93f
JL
2294 (arguments
2295 `(#:tests? #f
2296 #:build-flags (list "native=true" "native-dynlink=true")
2297 #:phases
2298 (modify-phases %standard-phases
2299 (delete 'configure))))
2300 (native-inputs
2301 `(("ocamlbuild" ,ocamlbuild)
2302 ("opam" ,opam)))
33f16b9a
JL
2303 (home-page "https://github.com/ocaml/uchar")
2304 (synopsis "Compatibility library for OCaml's Uchar module")
2305 (description "The uchar package provides a compatibility library for the
2306`Uchar` module introduced in OCaml 4.03.")
2307 (license license:lgpl2.1)))
84290923
JL
2308
2309(define-public ocaml-uutf
2310 (package
2311 (name "ocaml-uutf")
564cf93f 2312 (version "1.0.1")
84290923
JL
2313 (source (origin
2314 (method url-fetch)
2315 (uri (string-append "http://erratique.ch/software/uutf/releases/"
2316 "uutf-" version ".tbz"))
2317 (sha256
2318 (base32
564cf93f 2319 "1gp96dcggq7s84934vimxh89caaxa77lqiff1yywbwkilkkjcfqj"))))
84290923 2320 (build-system ocaml-build-system)
564cf93f
JL
2321 (arguments
2322 `(#:tests? #f
2323 #:build-flags (list "build")
2324 #:phases
2325 (modify-phases %standard-phases
2326 (delete 'configure))))
2327 (native-inputs
2328 `(("ocamlbuild" ,ocamlbuild)
2329 ("opam" ,opam)
2330 ("topkg" ,ocaml-topkg)))
2331 (propagated-inputs
2332 `(("uchar" ,ocaml-uchar)
2333 ("cmdliner" ,ocaml-cmdliner)))
84290923
JL
2334 (home-page "http://erratique.ch/software/uutf")
2335 (synopsis "Non-blocking streaming Unicode codec for OCaml")
2336 (description "Uutf is a non-blocking streaming codec to decode and encode
2337the UTF-8, UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently
2338work character by character without blocking on IO. Decoders perform character
2339position tracking and support newline normalization.
2340
2341Functions are also provided to fold over the characters of UTF encoded OCaml
2342string values and to directly encode characters in OCaml Buffer.t values.")
2343 (license license:isc)))
800ab1fb
JL
2344
2345(define-public ocaml-jsonm
2346 (package
2347 (name "ocaml-jsonm")
564cf93f 2348 (version "1.0.1")
800ab1fb
JL
2349 (source (origin
2350 (method url-fetch)
2351 (uri (string-append "http://erratique.ch/software/jsonm/releases/"
2352 "jsonm-" version ".tbz"))
2353 (sha256
2354 (base32
564cf93f 2355 "1176dcmxb11fnw49b7yysvkjh0kpzx4s48lmdn5psq9vshp5c29w"))))
800ab1fb 2356 (build-system ocaml-build-system)
564cf93f
JL
2357 (arguments
2358 `(#:tests? #f
2359 #:build-flags (list "build")
2360 #:phases
2361 (modify-phases %standard-phases
2362 (delete 'configure))))
2363 (native-inputs
2364 `(("ocamlbuild" ,ocamlbuild)
2365 ("opam" ,opam)
2366 ("topkg" ,ocaml-topkg)))
2367 (propagated-inputs
2368 `(("uutf" ,ocaml-uutf)
2369 ("cmdliner" ,ocaml-cmdliner)))
800ab1fb
JL
2370 (home-page "http://erratique.ch/software/jsonm")
2371 (synopsis "Non-blocking streaming JSON codec for OCaml")
2372 (description "Jsonm is a non-blocking streaming codec to decode and encode
2373the JSON data format. It can process JSON text without blocking on IO and
2374without a complete in-memory representation of the data.")
2375 (license license:isc)))
fd6e260e
JL
2376
2377(define-public ocaml-ocurl
2378 (package
2379 (name "ocaml-ocurl")
1ac2bf05 2380 (version "0.9.1")
fd6e260e
JL
2381 (source (origin
2382 (method url-fetch)
2383 (uri (string-append "http://ygrek.org.ua/p/release/ocurl/ocurl-"
2384 version ".tar.gz"))
2385 (sha256
2386 (base32
1ac2bf05 2387 "0n621cxb9012pj280c7821qqsdhypj8qy9qgrah79dkh6a8h2py6"))))
fd6e260e 2388 (build-system ocaml-build-system)
564cf93f
JL
2389 (arguments
2390 `(#:phases
2391 (modify-phases %standard-phases
2392 (add-before 'configure 'fix-/bin/sh
2393 (lambda* (#:key inputs #:allow-other-keys)
2394 (substitute* "configure"
2395 (("-/bin/sh") (string-append "-" (which "bash")))))))))
2396 (native-inputs
2397 `(("pkg-config" ,pkg-config)))
fd6e260e
JL
2398 (inputs `(("curl" ,curl)))
2399 (home-page "http://ocurl.forge.ocamlcore.org/")
2400 (synopsis "OCaml bindings for libcurl")
2401 (description "Client-side URL transfer library, supporting HTTP and a
2402multitude of other network protocols (FTP/SMTP/RTSP/etc).")
2403 (license license:isc)))
5d08f98d
JL
2404
2405(define-public ocaml-base64
2406 (package
2407 (name "ocaml-base64")
bd2ad4a1 2408 (version "3.4.0")
5d08f98d 2409 (source (origin
3617d4f9
JL
2410 (method git-fetch)
2411 (uri (git-reference
2412 (url "https://github.com/mirage/ocaml-base64")
2413 (commit (string-append "v" version))))
2414 (file-name (git-file-name name version))
5d08f98d
JL
2415 (sha256
2416 (base32
bd2ad4a1 2417 "0aa1m1sr8p1hgc10p96mij7p22r3qcysvzy6fz2jqamfgswchgqc"))))
3617d4f9 2418 (build-system dune-build-system)
bd2ad4a1
JL
2419 (arguments
2420 `(#:phases
2421 (modify-phases %standard-phases
2422 (add-before 'build 'fix-dune
2423 (lambda _
2424 ;; This package expects dune 2, which unbundled its configurator
2425 ;; module. We still use dune 1, so we need to let it know we need
2426 ;; its internal module.
2427 (substitute* "config/dune"
2428 (("dune-configurator") "dune.configurator"))
2429 #t)))))
5d08f98d 2430 (native-inputs
3617d4f9
JL
2431 `(("ocaml-alcotest" ,ocaml-alcotest)
2432 ("ocaml-bos" ,ocaml-bos)
2433 ("ocaml-rresult" ,ocaml-rresult)))
5d08f98d
JL
2434 (home-page "https://github.com/mirage/ocaml-base64")
2435 (synopsis "Base64 encoding for OCaml")
2436 (description "Base64 is a group of similar binary-to-text encoding schemes
2437that represent binary data in an ASCII string format by translating it into a
2438radix-64 representation. It is specified in RFC 4648.")
2439 (license license:isc)))
c590f1ae
JL
2440
2441(define-public ocamlify
2442 (package
2443 (name "ocamlify")
2d3370c4 2444 (version "0.0.2")
4a7243fc
TGR
2445 (source
2446 (origin
2447 (method url-fetch)
2448 (uri (string-append "https://download.ocamlcore.org/ocamlify/ocamlify/"
2449 version "/ocamlify-" version ".tar.gz"))
2450 (sha256
2d3370c4 2451 (base32 "1f0fghvlbfryf5h3j4as7vcqrgfjb4c8abl5y0y5h069vs4kp5ii"))))
c590f1ae 2452 (build-system ocaml-build-system)
c590f1ae 2453 (arguments
6e494267 2454 `(#:phases
c590f1ae 2455 (modify-phases %standard-phases
2d3370c4
TGR
2456 (add-after 'unpack 'disable-safe-string
2457 ;; Work around ‘Error: This expression has type string but an
2458 ;; expression was expected of type bytes’ since OCaml 4.06.
2459 (lambda _
2460 (setenv "OCAMLPARAM" "safe-string=0,_")
2461 #t))
4a7243fc 2462 (delete 'check) ; tests are run during the build
6e494267
JL
2463 (replace 'configure
2464 (lambda* (#:key outputs #:allow-other-keys)
2465 (invoke "ocaml" "setup.ml" "-configure" "--prefix"
2466 (assoc-ref outputs "out")))))))
2467 (native-inputs
2468 `(("ocamlbuild" ,ocamlbuild)))
c590f1ae
JL
2469 (home-page "https://forge.ocamlcore.org/projects/ocamlify")
2470 (synopsis "Include files in OCaml code")
e49a6c82 2471 (description "OCamlify creates OCaml source code by including
c590f1ae
JL
2472whole files into OCaml string or string list. The code generated can be
2473compiled as a standard OCaml file. It allows embedding external resources as
2474OCaml code.")
2475 (license license:lgpl2.1+))); with the OCaml static compilation exception
41e8e079
JL
2476
2477(define-public omake
2478 (package
2479 (name "omake")
564cf93f 2480 (version "0.10.3")
41e8e079
JL
2481 (source (origin
2482 (method url-fetch)
2483 (uri (string-append "http://download.camlcity.org/download/"
2484 "omake-" version ".tar.gz"))
2485 (sha256
2486 (base32
564cf93f 2487 "07bdg1h5i7qnlv9xq81ad5hfypl10hxm771h4rjyl5cn8plhfcgz"))
41e8e079
JL
2488 (patches (search-patches "omake-fix-non-determinism.patch"))))
2489 (build-system ocaml-build-system)
2490 (arguments
2491 `(#:make-flags
2492 (list (string-append "PREFIX=" (assoc-ref %outputs "out")))
2493 #:tests? #f ; no test target
2494 #:phases
2495 (modify-phases %standard-phases
2496 (add-before 'configure 'fix-makefile
2497 (lambda* (#:key outputs #:allow-other-keys)
2498 (substitute* "mk/osconfig_unix.mk"
2499 (("CC = cc") "CC = gcc")))))))
2500 (native-inputs `(("hevea" ,hevea)))
2501 (home-page "http://projects.camlcity.org/projects/omake.html")
2502 (synopsis "Build system designed for scalability and portability")
2503 (description "Similar to make utilities you may have used, but it features
2504many additional enhancements, including:
2505
2506@enumerate
2507@item Support for projects spanning several directories or directory hierarchies.
2508@item Fast, reliable, automated, scriptable dependency analysis using MD5 digests,
2509 with full support for incremental builds.
2510@item Dependency analysis takes the command lines into account — whenever the
2511 command line used to build a target changes, the target is considered
2512 out-of-date.
2513@item Fully scriptable, includes a library that providing support for standard
2514 tasks in C, C++, OCaml, and LaTeX projects, or a mixture thereof.
2515@end enumerate")
2516 (license (list license:lgpl2.1 ; libmojave
2517 license:expat ; OMake scripts
2518 license:gpl2)))) ; OMake itself, with ocaml linking exception
2519 ; see LICENSE.OMake
0e9e94b7
JL
2520
2521(define-public ocaml-batteries
2522 (package
2523 (name "ocaml-batteries")
242e9f0d 2524 (version "2.10.0")
0e9e94b7
JL
2525 (source (origin
2526 (method url-fetch)
564cf93f
JL
2527 (uri (string-append "https://github.com/ocaml-batteries-team/"
2528 "batteries-included/releases/download/v"
2529 version "/batteries-" version ".tar.gz"))
0e9e94b7
JL
2530 (sha256
2531 (base32
242e9f0d 2532 "08ghw87d56h1a6y1nnh3x2wy9xj25jqfk5sp6ma9nsyd37babb0h"))))
0e9e94b7
JL
2533 (build-system ocaml-build-system)
2534 (native-inputs
564cf93f 2535 `(("ocamlbuild" ,ocamlbuild)
af76eeda 2536 ("qtest" ,ocaml-qtest)))
564cf93f
JL
2537 (propagated-inputs
2538 `(("ocaml-num" ,ocaml-num)))
0e9e94b7
JL
2539 (arguments
2540 `(#:phases
2541 (modify-phases %standard-phases
2542 (delete 'check) ; tests are run by the build phase
850f7873
JL
2543 (add-before 'build 'fix-nondeterminism
2544 (lambda _
2545 (substitute* "setup.ml"
2546 (("Sys.readdir dirname")
2547 "let a = Sys.readdir dirname in Array.sort String.compare a; a"))
2548 #t))
0e9e94b7 2549 (replace 'build
564cf93f
JL
2550 (lambda* (#:key inputs outputs #:allow-other-keys)
2551 (let ((files
2552 (map (lambda (str)
2553 (substring str 0 (- (string-length str) 1)))
2554 (append
2555 (find-files "src" ".*.mliv")
2556 (find-files "src" ".*.mlv")
2557 (find-files "src" ".*.mlp")))))
2558 (apply invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2559 "-lflag" "-dllpath-all" files)
2560 (for-each (lambda (file)
2561 (copy-file (string-append "_build/" file) file))
2562 files))
2563 (invoke "ocamlbuild" "-no-links" "-use-ocamlfind" "-I" "num"
2564 "-lflag" "-dllpath-all" "build/mkconf.byte")
2565 (copy-file "_build/build/mkconf.byte" "build/mkconf.byte")
2566 (invoke "make" "all")
2567 #t)))))
0e9e94b7
JL
2568 (home-page "http://batteries.forge.ocamlcore.org/")
2569 (synopsis "Development platform for the OCaml programming language")
2570 (description "Define a standard set of libraries which may be expected on
2571every compliant installation of OCaml and organize these libraries into a
2572hierarchy of modules.")
2573 (license license:lgpl2.1+)))
f8a12de1 2574
87858bc5 2575(define-public ocaml4.07-pcre
f8a12de1 2576 (package
87858bc5 2577 (name "ocaml4.07-pcre")
1e8439de 2578 (version "7.4.1")
f8a12de1 2579 (source (origin
1e8439de
JL
2580 (method git-fetch)
2581 (uri (git-reference
2582 (url "https://github.com/mmottl/pcre-ocaml")
2583 (commit version)))
2584 (file-name (git-file-name name version))
f8a12de1
JL
2585 (sha256
2586 (base32
1e8439de
JL
2587 "11sd8g668h48790lamz0riw9jgnfkaif5qdfa0akcndwa6aj07jf"))))
2588 (build-system dune-build-system)
f8a12de1 2589 (arguments
87858bc5
JL
2590 `(#:test-target "."
2591 #:ocaml ,ocaml-4.07
2592 #:findlib ,ocaml4.07-findlib
2593 #:dune ,ocaml4.07-dune))
f8a12de1 2594 (native-inputs
87858bc5 2595 `(("ocaml-base" ,ocaml4.07-base)
f8a12de1
JL
2596 ("pcre:bin" ,pcre "bin")))
2597 (propagated-inputs `(("pcre" ,pcre)))
2598 (home-page "https://mmottl.github.io/pcre-ocaml")
2599 (synopsis "Bindings to the Perl Compatibility Regular Expressions library")
2600 (description "Pcre-ocaml offers library functions for string pattern
2601matching and substitution, similar to the functionality offered by the Perl
2602language.")
2603 (license license:lgpl2.1+))); with the OCaml link exception
3763eea7 2604
87858bc5 2605(define-public ocaml4.07-expect
3763eea7 2606 (package
87858bc5 2607 (name "ocaml4.07-expect")
564cf93f 2608 (version "0.0.6")
3763eea7
JL
2609 (source (origin
2610 (method url-fetch)
564cf93f 2611 (uri (ocaml-forge-uri name version 1736))
3763eea7
JL
2612 (sha256
2613 (base32
564cf93f
JL
2614 "098qvg9d4yrqzr5ax291y3whrpax0m3sx4gi6is0mblc96r9yqk0"))))
2615 (arguments
87858bc5
JL
2616 `(#:tests? #f
2617 #:ocaml ,ocaml-4.07
2618 #:findlib ,ocaml4.07-findlib))
3763eea7
JL
2619 (build-system ocaml-build-system)
2620 (native-inputs
87858bc5
JL
2621 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))
2622 ("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
2623 ("ocaml-pcre" ,ocaml4.07-pcre)
2624 ("ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
2625 (propagated-inputs
2626 `(("batteries" ,(package-with-ocaml4.07 ocaml-batteries))))
3763eea7
JL
2627 (home-page "https://forge.ocamlcore.org/projects/ocaml-expect/")
2628 (synopsis "Simple implementation of expect")
2629 (description "Help building unitary testing of interactive program. You
2630can match the question using a regular expression or a timeout.")
2631 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
77a515e9 2632
a21ea76f
JL
2633(define-public ocaml-stdlib-shims
2634 (package
2635 (name "ocaml-stdlib-shims")
2636 (version "0.1.0")
2637 (source (origin
2638 (method git-fetch)
2639 (uri (git-reference
2640 (url "https://github.com/ocaml/stdlib-shims")
2641 (commit version)))
2642 (file-name (git-file-name name version))
2643 (sha256
2644 (base32
2645 "007dwywsr5285z0np6a9nr0h8iqmyzfrlx6s5xaqcwj69zabsrjm"))))
2646 (build-system dune-build-system)
2647 (home-page "https://github.com/ocaml/stdlib-shims")
2648 (synopsis "OCaml stdlib features backport to older OCaml compilers")
2649 (description "This package backports some of the new stdlib features to
2650older compilers, such as the Stdlib module. This allows projects that require
2651compatibility with older compiler to use these new features in their code.")
2652 ;; with ocaml-linking exception
2653 (license license:lgpl2.1+)))
2654
bbe9915b 2655(define-public ocaml-fileutils
77a515e9 2656 (package
bbe9915b 2657 (name "ocaml-fileutils")
bee8c8ac 2658 (version "0.6.2")
77a515e9 2659 (source (origin
1fe01b70
JL
2660 (method git-fetch)
2661 (uri (git-reference
2662 (url "https://github.com/gildor478/ocaml-fileutils")
2663 (commit (string-append "v" version))))
2664 (file-name (git-file-name name version))
77a515e9
JL
2665 (sha256
2666 (base32
bee8c8ac
JL
2667 "01qf51b8pb7vyfba7y0kb7ajwj1950im25d7f59821zwsibns3d9"))))
2668 (build-system dune-build-system)
1fe01b70
JL
2669 (propagated-inputs
2670 `(("ocaml-stdlib-shims" ,ocaml-stdlib-shims)))
564cf93f 2671 (native-inputs
bee8c8ac 2672 `(("ocaml-ounit" ,ocaml-ounit)))
77a515e9
JL
2673 (home-page "http://ocaml-fileutils.forge.ocamlcore.org")
2674 (synopsis "Pure OCaml functions to manipulate real file and filename")
2675 (description "Library to provide pure OCaml functions to manipulate real
2676file (POSIX like) and filename.")
2677 (license license:lgpl2.1+))) ; with the OCaml static compilation exception
5eed45a8
JL
2678
2679(define-public ocaml-oasis
2680 (package
2681 (name "ocaml-oasis")
564cf93f 2682 (version "0.4.11")
5eed45a8
JL
2683 (source (origin
2684 (method url-fetch)
564cf93f 2685 (uri (ocaml-forge-uri name version 1757))
5eed45a8
JL
2686 (sha256
2687 (base32
564cf93f 2688 "0bn13mzfa98dq3y0jwzzndl55mnywaxv693z6f1rlvpdykp3vdqq"))
5eed45a8
JL
2689 (modules '((guix build utils)))
2690 (snippet
6cbee49d
MW
2691 '(begin
2692 (substitute* "test/test-main/Test.ml"
2693 ;; most of these tests fail because ld cannot find crti.o, but according
2694 ;; to the log file, the environment variables {LD_,}LIBRARY_PATH
564cf93f 2695 ;; are set correctly when LD_LIBRARY_PATH is defined beforhand.
6cbee49d
MW
2696 (("TestBaseCompat.tests;") "")
2697 (("TestExamples.tests;") "")
2698 (("TestFull.tests;") "")
2699 (("TestPluginDevFiles.tests;") "")
2700 (("TestPluginInternal.tests;") "")
2701 (("TestPluginOCamlbuild.tests;") "")
2702 (("TestPluginOMake.tests;") ""))
2703 #t))))
5eed45a8 2704 (build-system ocaml-build-system)
564cf93f
JL
2705 (arguments
2706 `(#:tests? #f))
5eed45a8 2707 (native-inputs
564cf93f
JL
2708 `(("ocamlbuild" ,ocamlbuild)
2709 ("ocamlify" ,ocamlify)
2710 ("ocamlmod" ,ocamlmod)))
5eed45a8
JL
2711 (home-page "https://oasis.forge.ocamlcore.org")
2712 (synopsis "Integrates a configure, build, install system in OCaml projects")
2713 (description "OASIS is a tool to integrate a configure, build and install
2714system in your OCaml projects. It helps to create standard entry points in your
2715build system and allows external tools to analyse your project easily.")
2716 (license license:lgpl2.1+))) ; with ocaml static compilation exception
f95ebba5
JL
2717
2718(define-public ocaml-js-build-tools
2719 (package
2720 (name "ocaml-js-build-tools")
2721 (version "113.33.06")
2722 (source (janestreet-origin "js-build-tools" version
2723 "0r8z4fz8iy5y6hkdlkpwf6rk4qigcr3dzyv35585xgg2ahf12zy6"))
2724 (native-inputs
2725 `(("oasis" ,ocaml-oasis)
564cf93f 2726 ("ocamlbuild" ,ocamlbuild)
f95ebba5
JL
2727 ("opam" ,opam)))
2728 (build-system ocaml-build-system)
2729 (arguments janestreet-arguments)
2730 (home-page "https://github.com/janestreet/js-build-tools")
2731 (synopsis "Collection of tools to help building Jane Street Packages")
2732 (description "This package contains tools to help building Jane Street
2733packages, but can be used for other purposes. It contains:
2734@enumerate
2735@item an @command{oasis2opam-install} tool to produce a @file{.install} file
2736from the oasis build log
2737@item a @code{js_build_tools} ocamlbuild plugin with various goodies.
2738@end enumerate")
2739 (license license:asl2.0)))
f5c8cf3b 2740
f6dde36a
JL
2741(define-public ocaml-cppo
2742 (package
2743 (name "ocaml-cppo")
f082c78c 2744 (version "1.6.6")
f6dde36a
JL
2745 (source
2746 (origin
f082c78c
JL
2747 (method git-fetch)
2748 (uri (git-reference
2749 (url "https://github.com/mjambon/cppo")
2750 (commit (string-append "v" version))))
2751 (file-name (git-file-name name version))
f6dde36a 2752 (sha256 (base32
f082c78c 2753 "1smcc0l6fh2n0y6bp96c69j5nw755jja99w0b206wx3yb2m4w2hs"))))
48b27902 2754 (build-system dune-build-system)
f6dde36a 2755 (arguments
48b27902
JL
2756 `(#:tests? #f
2757 #:build-flags (list "--profile" "release")))
564cf93f 2758 (native-inputs
48b27902 2759 `(("ocamlbuild" ,ocamlbuild)))
f6dde36a
JL
2760 (home-page "https://github.com/mjambon/cppo")
2761 (synopsis "Equivalent of the C preprocessor for OCaml programs")
2762 (description "Cppo is an equivalent of the C preprocessor for OCaml
7230f6d5 2763programs. It allows the definition of simple macros and file inclusion. Cppo is:
f6dde36a 2764@enumerate
7230f6d5 2765@item more OCaml-friendly than @command{cpp}
f6dde36a
JL
2766@item easy to learn without consulting a manual
2767@item reasonably fast
2768@item simple to install and to maintain.
2769@end enumerate")
2770 (license license:bsd-3)))
505394d1 2771
564cf93f
JL
2772(define-public ocaml-seq
2773 (package
2774 (name "ocaml-seq")
2775 (version "0.1")
f6a99fbf
TGR
2776 (source
2777 (origin
2778 (method git-fetch)
2779 (uri (git-reference
b0e7b699 2780 (url "https://github.com/c-cube/seq")
f6a99fbf
TGR
2781 (commit version)))
2782 (file-name (git-file-name name version))
2783 (sha256
2784 (base32 "1cjpsc7q76yfgq9iyvswxgic4kfq2vcqdlmxjdjgd4lx87zvcwrv"))))
564cf93f
JL
2785 (build-system ocaml-build-system)
2786 (arguments
2787 `(#:tests? #f
2788 #:phases
2789 (modify-phases %standard-phases
2790 (delete 'configure)
2791 (delete 'build)
2792 (replace 'install
2793 (lambda* (#:key outputs #:allow-other-keys)
2794 (let ((install-dir (string-append (assoc-ref outputs "out")
2795 "/lib/ocaml/site-lib/seq")))
2796 (mkdir-p install-dir)
2797 (with-output-to-file (string-append install-dir "/META")
2798 (lambda _
2799 (display "name=\"seq\"
2800version=\"[distributed with ocaml]\"
2801description=\"dummy package for compatibility\"
2802requires=\"\"")))
f6a99fbf 2803 #t))))))
564cf93f
JL
2804 (home-page "https://github.com/c-cube/seq")
2805 (synopsis "OCaml's standard iterator type")
2806 (description "This package is a compatibility package for OCaml's
2807standard iterator type starting from 4.07.")
2808 (license license:lgpl2.1+)))
2809
f27522d6
JL
2810(define-public ocaml-re
2811 (package
2812 (name "ocaml-re")
58c3118f 2813 (version "1.9.0")
07c3711d
TGR
2814 (source
2815 (origin
2816 (method git-fetch)
2817 (uri (git-reference
b0e7b699 2818 (url "https://github.com/ocaml/ocaml-re")
07c3711d
TGR
2819 (commit version)))
2820 (file-name (git-file-name name version))
2821 (sha256
58c3118f 2822 (base32 "07ycb103mr4mrkxfd63cwlsn023xvcjp0ra0k7n2gwrg0mwxmfss"))))
d6fa189e 2823 (build-system dune-build-system)
564cf93f
JL
2824 (arguments
2825 `(#:tests? #f
d6fa189e 2826 #:build-flags (list "--profile" "release")))
564cf93f
JL
2827 (propagated-inputs
2828 `(("ocaml-seq" ,ocaml-seq)))
2829 (native-inputs
d6fa189e 2830 `(("ounit" ,ocaml-ounit)))
f27522d6
JL
2831 (home-page "https://github.com/ocaml/ocaml-re/")
2832 (synopsis "Regular expression library for OCaml")
2833 (description "Pure OCaml regular expressions with:
2834@enumerate
2835@item Perl-style regular expressions (module Re_perl)
2836@item Posix extended regular expressions (module Re_posix)
2837@item Emacs-style regular expressions (module Re_emacs)
2838@item Shell-style file globbing (module Re_glob)
2839@item Compatibility layer for OCaml's built-in Str module (module Re_str)
2840@end enumerate")
2841 (license license:expat)))
5cd47fb0 2842
9059d856
JL
2843(define-public ocaml-ocplib-endian
2844 (package
2845 (name "ocaml-ocplib-endian")
2846 (version "1.0")
2847 (source (origin
4d85a7dd
EF
2848 (method git-fetch)
2849 (uri (git-reference
2850 (url "https://github.com/OCamlPro/ocplib-endian/")
2851 (commit version)))
9059d856
JL
2852 (sha256
2853 (base32
4d85a7dd
EF
2854 "0s1ld3kavz892b8awyxyg1mr98h2g61gy9ci5v6yb49bsii6wicw"))
2855 (file-name (git-file-name name version))))
9059d856 2856 (build-system ocaml-build-system)
564cf93f
JL
2857 (native-inputs
2858 `(("cppo" ,ocaml-cppo)
2859 ("ocamlbuild" ,ocamlbuild)))
9059d856
JL
2860 (home-page "https://github.com/OCamlPro/ocplib-endian")
2861 (synopsis "Optimised functions to read and write int16/32/64 from strings
2862and bigarrays")
2863 (description "Optimised functions to read and write int16/32/64 from strings
2864and bigarrays, based on new primitives added in version 4.01. It works on
2865strings, bytes and bigstring (Bigarrys of chars), and provides submodules for
2866big- and little-endian, with their unsafe counter-parts.")
2867 (license license:lgpl2.1)))
0090b895 2868
bbe9915b 2869(define-public ocaml-cstruct
0090b895 2870 (package
bbe9915b
JL
2871 (name "ocaml-cstruct")
2872 (version "4.0.0")
0090b895 2873 (source (origin
bbe9915b
JL
2874 (method git-fetch)
2875 (uri (git-reference
2876 (url "https://github.com/mirage/ocaml-cstruct")
2877 (commit (string-append "v" version))))
f1d4d79f 2878 (file-name (git-file-name name version))
0090b895
JL
2879 (sha256
2880 (base32
bbe9915b
JL
2881 "0m4bz0digcsc8l2msfikwcbi1y371kccx6xnkwrz212mf5mp98bv"))))
2882 (build-system dune-build-system)
0090b895 2883 (arguments
bbe9915b
JL
2884 `(#:package "cstruct"
2885 #:test-target "."))
0090b895 2886 (native-inputs
bbe9915b 2887 `(("ocaml-alcotest" ,ocaml-alcotest)))
0090b895
JL
2888 (home-page "https://github.com/mirage/ocaml-cstruct")
2889 (synopsis "Access C structures via a camlp4 extension")
2890 (description "Cstruct is a library and syntax extension to make it easier
2891to access C-like structures directly from OCaml. It supports both reading and
2892writing to these structures, and they are accessed via the Bigarray module.")
2893 (license license:isc)))
61bafd44 2894
bbe9915b 2895(define-public ocaml-hex
61bafd44 2896 (package
bbe9915b
JL
2897 (name "ocaml-hex")
2898 (version "1.4.0")
61bafd44 2899 (source (origin
bbe9915b
JL
2900 (method git-fetch)
2901 (uri (git-reference
2902 (url "https://github.com/mirage/ocaml-hex")
2903 (commit (string-append "v" version))))
2904 (file-name (git-file-name name version))
61bafd44
JL
2905 (sha256
2906 (base32
bbe9915b
JL
2907 "0c8nhibcwy0ykzca4jn3gqb8ylq21ff88y82gl60wyzijr64rn0q"))))
2908 (build-system dune-build-system)
564cf93f 2909 (arguments
bbe9915b 2910 `(#:test-target "."))
564cf93f 2911 (propagated-inputs
bbe9915b
JL
2912 `(("ocaml-bigarray-compat" ,ocaml-bigarray-compat)
2913 ("cstruct" ,ocaml-cstruct)))
61bafd44
JL
2914 (home-page "https://github.com/mirage/ocaml-hex/")
2915 (synopsis "Minimal library providing hexadecimal converters")
2916 (description "Hex is a minimal library providing hexadecimal converters.")
2917 (license license:isc)))
d163d97d 2918
87858bc5 2919(define-public ocaml4.07-ezjsonm
bf7bc0d6 2920 (package
87858bc5 2921 (name "ocaml4.07-ezjsonm")
bcc718be 2922 (version "1.1.0")
21b1845d
TGR
2923 (source
2924 (origin
2925 (method git-fetch)
2926 (uri (git-reference
b0e7b699 2927 (url "https://github.com/mirage/ezjsonm")
bcc718be 2928 (commit (string-append "v" version))))
21b1845d
TGR
2929 (file-name (git-file-name name version))
2930 (sha256
bcc718be 2931 (base32 "064j9pzy01p3dv947khqyn7fkjbs3jmrqsg8limb4abnlaqxxs2s"))))
bbe9915b
JL
2932 (build-system dune-build-system)
2933 (arguments
2934 `(#:package "ezjsonm"
87858bc5
JL
2935 #:test-target "."
2936 #:ocaml ,ocaml-4.07
339c752d
JL
2937 #:findlib ,ocaml4.07-findlib
2938 #:dune ,ocaml4.07-dune))
bf7bc0d6 2939 (native-inputs
87858bc5 2940 `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))))
bf7bc0d6 2941 (propagated-inputs
87858bc5
JL
2942 `(("ocaml-hex" ,(package-with-ocaml4.07 ocaml-hex))
2943 ("ocaml-jsonm" ,(package-with-ocaml4.07 ocaml-jsonm))
2944 ("ocaml-sexplib" ,ocaml4.07-sexplib)))
bf7bc0d6
JL
2945 (home-page "https://github.com/mirage/ezjsonm/")
2946 (synopsis "Read and write JSON data")
2947 (description "Ezjsonm provides more convenient (but far less flexible) input
2948and output functions that go to and from [string] values than jsonm. This avoids
2949the need to write signal code, which is useful for quick scripts that manipulate
2950JSON.")
2951 (license license:isc)))
2952
87858bc5 2953(define-public ocaml4.07-uri
3dabefee 2954 (package
87858bc5 2955 (name "ocaml4.07-uri")
bbe9915b 2956 (version "2.2.0")
e4bb29dd
TGR
2957 (source
2958 (origin
2959 (method git-fetch)
2960 (uri (git-reference
b0e7b699 2961 (url "https://github.com/mirage/ocaml-uri")
e4bb29dd
TGR
2962 (commit (string-append "v" version))))
2963 (file-name (git-file-name name version))
2964 (sha256
bbe9915b
JL
2965 (base32 "1ppbav41mszpjcl0zi3fyg958cxyfs57i7kvha4ds9ydn89bjmrh"))))
2966 (build-system dune-build-system)
564cf93f 2967 (arguments
58c3118f
JL
2968 `(#:test-target "."
2969 #:phases
2970 (modify-phases %standard-phases
2971 (add-before 'build 'update-deprecated
2972 (lambda _
2973 (substitute* "lib/uri.ml"
87858bc5
JL
2974 (("Re.get") "Re.Group.get")))))
2975 #:ocaml ,ocaml-4.07
339c752d
JL
2976 #:findlib ,ocaml4.07-findlib
2977 #:dune ,ocaml4.07-dune))
3dabefee 2978 (native-inputs
87858bc5
JL
2979 `(("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))
2980 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)))
3dabefee 2981 (propagated-inputs
87858bc5
JL
2982 `(("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
2983 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)
2984 ("ocaml-stringext" ,(package-with-ocaml4.07 ocaml-stringext))))
3dabefee
JL
2985 (home-page "https://github.com/mirage/ocaml-uri")
2986 (synopsis "RFC3986 URI/URL parsing library")
2987 (description "OCaml-uri is a library for parsing URI/URL in the RFC3986 format.")
2988 (license license:isc)))
2989
6134aeb9
JL
2990(define-public ocaml-easy-format
2991 (package
2992 (name "ocaml-easy-format")
ce502774 2993 (version "1.3.2")
6134aeb9 2994 (source (origin
12c3f62a
JL
2995 (method git-fetch)
2996 (uri (git-reference
2997 (url "https://github.com/mjambon/easy-format")
ce502774 2998 (commit version)))
12c3f62a 2999 (file-name (git-file-name name version))
6134aeb9
JL
3000 (sha256
3001 (base32
ce502774 3002 "1fc95q2ypck6m6rv3kiawwilh5ac93v2hcp823mj608d5kj79xkb"))))
12c3f62a 3003 (build-system dune-build-system)
6134aeb9 3004 (arguments
8ff5f39a 3005 `(#:package "easy-format"
ce502774
JL
3006 #:phases
3007 (modify-phases %standard-phases
3008 (add-before 'build 'make-writable
3009 (lambda _
3010 (for-each
3011 (lambda (file)
3012 (chmod file #o644))
3013 (find-files "." "."))
3014 #t)))))
6134aeb9
JL
3015 (home-page "https://github.com/mjambon/easy-format")
3016 (synopsis "Interface to the Format module")
3017 (description "Easy-format is a high-level and functional interface to the
3018Format module of the OCaml standard library.")
3019 (license license:bsd-3)))
3020
87858bc5 3021(define-public ocaml4.07-piqilib
9c5dbbf0 3022 (package
87858bc5 3023 (name "ocaml4.07-piqilib")
05fe0a58 3024 (version "0.6.15")
677a88e0
TGR
3025 (source
3026 (origin
3027 (method git-fetch)
3028 (uri (git-reference
b0e7b699 3029 (url "https://github.com/alavrik/piqi")
677a88e0
TGR
3030 (commit (string-append "v" version))))
3031 (file-name (git-file-name name version))
3032 (sha256
05fe0a58 3033 (base32 "0v04hs85xv6d4ysqxyv1dik34dx49yab9shpi4x7iv19qlzl7csb"))))
9c5dbbf0
JL
3034 (build-system ocaml-build-system)
3035 (arguments
3036 `(#:phases
3037 (modify-phases %standard-phases
3038 (add-before 'configure 'fix-ocamlpath
3039 (lambda _
3040 (substitute* '("Makefile" "make/Makefile.ocaml")
3041 (("OCAMLPATH := ") "OCAMLPATH := $(OCAMLPATH):"))
3042 #t))
3043 (replace 'configure
3044 (lambda* (#:key outputs #:allow-other-keys)
3045 (let ((out (assoc-ref outputs "out")))
3046 (substitute* "make/OCamlMakefile"
3047 (("/bin/sh") (which "bash")))
564cf93f
JL
3048 (invoke "./configure" "--prefix" out "--ocaml-libdir"
3049 (string-append out "/lib/ocaml/site-lib")))
3050 #t))
9c5dbbf0
JL
3051 (add-after 'build 'build-ocaml
3052 (lambda* (#:key outputs #:allow-other-keys)
564cf93f
JL
3053 (invoke "make" "ocaml")
3054 #t))
9c5dbbf0
JL
3055 (add-after 'install 'install-ocaml
3056 (lambda* (#:key outputs #:allow-other-keys)
564cf93f
JL
3057 (invoke "make" "ocaml-install")
3058 #t))
9c5dbbf0
JL
3059 (add-after 'install-ocaml 'link-stubs
3060 (lambda* (#:key outputs #:allow-other-keys)
3061 (let* ((out (assoc-ref outputs "out"))
3062 (stubs (string-append out "/lib/ocaml/site-lib/stubslibs"))
3063 (lib (string-append out "/lib/ocaml/site-lib/piqilib")))
3064 (mkdir-p stubs)
3065 (symlink (string-append lib "/dllpiqilib_stubs.so")
3066 (string-append stubs "/dllpiqilib_stubs.so"))
87858bc5
JL
3067 #t))))
3068 #:ocaml ,ocaml-4.07
3069 #:findlib ,ocaml4.07-findlib))
9c5dbbf0 3070 (native-inputs
05fe0a58 3071 `(("which" ,which)))
9c5dbbf0 3072 (propagated-inputs
87858bc5
JL
3073 `(("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm))
3074 ("ocaml-sedlex" ,ocaml4.07-sedlex)
3075 ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))
3076 ("ocaml-base64" ,(package-with-ocaml4.07 ocaml-base64))))
9c5dbbf0
JL
3077 (home-page "http://piqi.org")
3078 (synopsis "Data serialization and conversion library")
3079 (description "Piqilib is the common library used by the piqi command-line
3080tool and piqi-ocaml.")
3081 (license license:asl2.0)))
3082
88b1533c
JL
3083(define-public ocaml-uuidm
3084 (package
3085 (name "ocaml-uuidm")
3086 (version "0.9.6")
3087 (source (origin
3088 (method url-fetch)
3089 (uri (string-append "http://erratique.ch/software/uuidm/"
3090 "releases/uuidm-" version ".tbz"))
3091 (sha256
3092 (base32
3093 "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc"))))
3094 (build-system ocaml-build-system)
3095 (arguments
3096 `(#:build-flags
3097 (list "build" "--tests" "true" "--with-cmdliner" "true")
3098 #:phases
3099 (modify-phases %standard-phases
3100 (delete 'configure))))
3101 (native-inputs
564cf93f
JL
3102 `(("ocamlbuild" ,ocamlbuild)
3103 ("opam" ,opam)))
88b1533c
JL
3104 (propagated-inputs
3105 `(("cmdliner" ,ocaml-cmdliner)
3106 ("topkg" ,ocaml-topkg)))
3107 (home-page "http://erratique.ch/software/uuidm")
3108 (synopsis "Universally unique identifiers for OCaml")
3109 (description "Uuidm is an OCaml module implementing 128 bits universally
3110unique identifiers (UUIDs) version 3, 5 (named based with MD5, SHA-1 hashing)
3111and 4 (random based) according to RFC 4122.")
3112 (license license:isc)))
3113
8a238180
JL
3114(define-public ocaml-graph
3115 (package
3116 (name "ocaml-graph")
564cf93f 3117 (version "1.8.8")
8a238180
JL
3118 (source (origin
3119 (method url-fetch)
3120 (uri (string-append "http://ocamlgraph.lri.fr/download/"
3121 "ocamlgraph-" version ".tar.gz"))
3122 (sha256
3123 (base32
564cf93f 3124 "0m9g16wrrr86gw4fz2fazrh8nkqms0n863w7ndcvrmyafgxvxsnr"))))
8a238180
JL
3125 (build-system ocaml-build-system)
3126 (arguments
3127 `(#:install-target "install-findlib"
564cf93f 3128 #:tests? #f
8a238180
JL
3129 #:phases
3130 (modify-phases %standard-phases
3131 (add-before 'configure 'set-shell
3132 (lambda* (#:key inputs #:allow-other-keys)
3133 (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
3134 "/bin/sh")))))))
3135 (inputs `(("lablgtk" ,lablgtk)))
8737666a 3136 (properties `((upstream-name . "ocamlgraph")))
8a238180
JL
3137 (home-page "http://ocamlgraph.lri.fr/")
3138 (synopsis "Graph library for OCaml")
3139 (description "OCamlgraph is a generic graph library for OCaml.")
3140 (license license:lgpl2.1)))
3141
87858bc5 3142(define-public ocaml4.07-piqi
fc3d70ae 3143 (package
87858bc5 3144 (name "ocaml4.07-piqi")
c8b309ec 3145 (version "0.7.7")
fc3d70ae 3146 (source (origin
2d84ef32
EF
3147 (method git-fetch)
3148 (uri (git-reference
3149 (url "https://github.com/alavrik/piqi-ocaml")
3150 (commit (string-append "v" version))))
3151 (file-name (git-file-name name version))
fc3d70ae
JL
3152 (sha256
3153 (base32
2d84ef32 3154 "1913jpsb8mvqi8609j4g4sm5jhg50dq0xqxgy8nmvknfryyc89nm"))))
fc3d70ae
JL
3155 (build-system ocaml-build-system)
3156 (arguments
3157 `(#:make-flags
3158 (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))
3159 (string-append "SHELL=" (assoc-ref %build-inputs "bash")
3160 "/bin/sh"))
3161 #:phases
3162 (modify-phases %standard-phases
2d84ef32
EF
3163 (add-after 'unpack 'make-files-writable
3164 (lambda _
3165 (for-each make-file-writable (find-files "."))
3166 #t))
87858bc5
JL
3167 (delete 'configure))
3168 #:ocaml ,ocaml-4.07
3169 #:findlib ,ocaml4.07-findlib))
fc3d70ae
JL
3170 (native-inputs
3171 `(("which" ,which)
3172 ("protobuf" ,protobuf))) ; for tests
3173 (propagated-inputs
87858bc5
JL
3174 `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
3175 ("ocaml-piqilib" ,ocaml4.07-piqilib)
3176 ("ocaml-stdlib-shims" ,(package-with-ocaml4.07 ocaml-stdlib-shims))))
fc3d70ae
JL
3177 (home-page "https://github.com/alavrik/piqi-ocaml")
3178 (synopsis "Protocol serialization system for OCaml")
3179 (description "Piqi is a multi-format data serialization system for OCaml.
3180It provides a uniform interface for serializing OCaml data structures to JSON,
3181XML and Protocol Buffers formats.")
3182 (license license:asl2.0)))
3183
cd1562ef
JL
3184(define-public bap
3185 (package
3186 (name "bap")
523cbfbd 3187 (version "2.0.0")
cd1562ef
JL
3188 (home-page "https://github.com/BinaryAnalysisPlatform/bap")
3189 (source (origin
bbe9915b
JL
3190 (method git-fetch)
3191 (uri (git-reference
3192 (url home-page)
3193 (commit (string-append "v" version))))
3194 (file-name (git-file-name name version))
cd1562ef
JL
3195 (sha256
3196 (base32
523cbfbd 3197 "0lb9xkfp67wjjqr75p6krivmjra7l5673236v9ny4gp0xi0755bk"))))
cd1562ef
JL
3198 (build-system ocaml-build-system)
3199 (native-inputs
87858bc5 3200 `(("ocaml-oasis" ,(package-with-ocaml4.07 ocaml-oasis))
67b5785e 3201 ("clang" ,clang-3.8)
87858bc5 3202 ("ocaml-ounit" ,(package-with-ocaml4.07 ocaml-ounit))))
cd1562ef 3203 (propagated-inputs
87858bc5
JL
3204 `(("camlzip" ,(package-with-ocaml4.07 camlzip))
3205 ("ocaml-bitstring" ,(package-with-ocaml4.07 ocaml-bitstring))
3206 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
3207 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
3208 ("ocaml-ezjsonm" ,ocaml4.07-ezjsonm)
3209 ("ocaml-fileutils" ,(package-with-ocaml4.07 ocaml-fileutils))
3210 ("ocaml-frontc" ,(package-with-ocaml4.07 ocaml-frontc))
3211 ("ocaml-graph" ,(package-with-ocaml4.07 ocaml-graph))
3212 ("ocaml-ocurl" ,(package-with-ocaml4.07 ocaml-ocurl))
3213 ("ocaml-piqi" ,ocaml4.07-piqi)
3214 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
523cbfbd 3215 ("ocaml-utop" ,ocaml4.07-utop)
87858bc5
JL
3216 ("ocaml-uuidm" ,(package-with-ocaml4.07 ocaml-uuidm))
3217 ("ocaml-uri" ,ocaml4.07-uri)
3218 ("ocaml-zarith" ,(package-with-ocaml4.07 ocaml-zarith))))
bbe9915b 3219 (inputs
523cbfbd
JL
3220 `(("gmp" ,gmp)
3221 ("llvm" ,llvm-3.8)
3222 ("ncurses" ,ncurses)))
cd1562ef 3223 (arguments
bbe9915b 3224 `(#:use-make? #t
cd1562ef
JL
3225 #:phases
3226 (modify-phases %standard-phases
523cbfbd
JL
3227 (add-before 'configure 'fix-ncurses
3228 (lambda _
3229 (substitute* "oasis/llvm"
3230 (("-lcurses") "-lncurses"))
3231 #t))
cd1562ef 3232 (replace 'configure
564cf93f 3233 (lambda* (#:key outputs inputs #:allow-other-keys)
bbe9915b
JL
3234 ;; add write for user, to prevent a failure in the install phase
3235 (for-each
3236 (lambda (file)
3237 (let ((stat (stat file)))
3238 (chmod file (+ #o200 (stat:mode stat)))))
3239 (find-files "." "."))
564cf93f
JL
3240 (invoke "./configure" "--prefix"
3241 (assoc-ref outputs "out")
3242 "--libdir"
3243 (string-append
3244 (assoc-ref outputs "out")
3245 "/lib/ocaml/site-lib")
3246 "--with-llvm-version=3.8"
3247 "--with-llvm-config=llvm-config"
87858bc5
JL
3248 "--enable-everything"))))
3249 #:ocaml ,ocaml-4.07
3250 #:findlib ,ocaml4.07-findlib))
cd1562ef
JL
3251 (synopsis "Binary Analysis Platform")
3252 (description "Binary Analysis Platform is a framework for writing program
3253analysis tools, that target binary files. The framework consists of a plethora
3254of libraries, plugins, and frontends. The libraries provide code reusability,
3255the plugins facilitate extensibility, and the frontends serve as entry points.")
3256 (license license:expat)))
3257
408091d5
JL
3258(define-public ocaml-camomile
3259 (package
3260 (name "ocaml-camomile")
a468fc5e 3261 (version "1.0.2")
408091d5
JL
3262 (home-page "https://github.com/yoriyuki/Camomile")
3263 (source (origin
3264 (method url-fetch)
564cf93f
JL
3265 (uri (string-append home-page "/releases/download/" version
3266 "/camomile-" version ".tbz"))
408091d5
JL
3267 (sha256
3268 (base32
a468fc5e 3269 "0chn7ldqb3wyf95yhmsxxq65cif56smgz1mhhc7m0dpwmyq1k97h"))))
426e629e 3270 (build-system dune-build-system)
408091d5 3271 (arguments
a468fc5e 3272 `(#:build-flags (list "--profile" "release")
62151321 3273 #:test-target "camomile-test"
a468fc5e 3274 #:tests? #f; Tests fail, see https://github.com/yoriyuki/Camomile/issues/82
62151321
JL
3275 #:phases
3276 (modify-phases %standard-phases
3277 (add-before 'build 'fix-usr-share
3278 (lambda* (#:key outputs #:allow-other-keys)
a468fc5e 3279 (substitute* '("Camomile/dune" "configure.ml")
62151321
JL
3280 (("/usr/share") (string-append (assoc-ref outputs "out") "/share")))
3281 #t)))))
408091d5
JL
3282 (synopsis "Comprehensive Unicode library")
3283 (description "Camomile is a Unicode library for OCaml. Camomile provides
3284Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about
3285200 encodings, collation and locale-sensitive case mappings, and more. The
3286library is currently designed for Unicode Standard 3.2.")
3287 ;; with an exception for linked libraries to use a different license
3288 (license license:lgpl2.0+)))
3289
87858bc5 3290(define-public ocaml4.07-charinfo-width
e6033051 3291 (package
87858bc5 3292 (name "ocaml4.07-charinfo-width")
e6033051
JL
3293 (version "1.1.0")
3294 (source (origin
3295 (method url-fetch)
ca12352a
EF
3296 (uri (string-append "https://bitbucket.org/zandoye/charinfo_width"
3297 "/get/" version ".tar.gz"))
3298 (file-name (string-append name "-" version ".tar.gz"))
e6033051
JL
3299 (sha256
3300 (base32
3301 "00bv4p1yqs8y0z4z07wd9w9yyv669dikp9b04dcjbwpiy2wy0086"))))
3302 (build-system dune-build-system)
87858bc5
JL
3303 (arguments
3304 `(#:ocaml ,ocaml-4.07
339c752d
JL
3305 #:findlib ,ocaml4.07-findlib
3306 #:dune ,ocaml4.07-dune))
e6033051 3307 (propagated-inputs
87858bc5
JL
3308 `(("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
3309 ("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))))
e6033051 3310 (native-inputs
87858bc5 3311 `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
e6033051
JL
3312 (properties
3313 `((upstream-name . "charInfo_width")))
3314 (home-page "https://bitbucket.org/zandoye/charinfo_width/")
3315 (synopsis "Determine column width for a character")
3316 (description "This module is implements purely in OCaml a character width
3317function that follows the prototype of POSIX's wcwidth.")
3318 (license license:expat)))
3319
87858bc5 3320(define-public ocaml4.07-zed
cd4abd29 3321 (package
87858bc5 3322 (name "ocaml4.07-zed")
1a0d41b3 3323 (version "2.0.3")
f4f3e8ce
TGR
3324 (source
3325 (origin
3326 (method git-fetch)
3327 (uri (git-reference
b0e7b699 3328 (url "https://github.com/diml/zed")
f4f3e8ce
TGR
3329 (commit version)))
3330 (file-name (git-file-name name version))
3331 (sha256
1a0d41b3 3332 (base32 "0pa9awinqr0plp4b2az78dwpvh01pwaljnn5ydg8mc6hi7rmir55"))))
0705f389 3333 (build-system dune-build-system)
cd4abd29 3334 (arguments
0a8eb685 3335 `(#:test-target "."
87858bc5 3336 #:ocaml ,ocaml-4.07
339c752d
JL
3337 #:findlib ,ocaml4.07-findlib
3338 #:dune ,ocaml4.07-dune))
cd4abd29 3339 (propagated-inputs
87858bc5
JL
3340 `(("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile))
3341 ("ocaml-charinfo-width" ,ocaml4.07-charinfo-width)
3342 ("ocaml-react" ,(package-with-ocaml4.07 ocaml-react))))
cd4abd29
PK
3343 (home-page "https://github.com/diml/zed")
3344 (synopsis "Abstract engine for text editing in OCaml")
3345 (description "Zed is an abstract engine for text edition. It can be used
3346to write text editors, edition widgets, readlines, etc. You just have to
3347connect an engine to your inputs and rendering functions to get an editor.")
3348 (license license:bsd-3)))
3349
87858bc5 3350(define-public ocaml4.07-lambda-term
e88ff71c 3351 (package
87858bc5 3352 (name "ocaml4.07-lambda-term")
1a0d41b3 3353 (version "2.0.2")
e88ff71c
PK
3354 (source
3355 (origin
fd2582bd
TGR
3356 (method git-fetch)
3357 (uri (git-reference
b0e7b699 3358 (url "https://github.com/diml/lambda-term")
fd2582bd
TGR
3359 (commit version)))
3360 (file-name (git-file-name name version))
e88ff71c 3361 (sha256
1a0d41b3 3362 (base32 "0zcjy6fvf0d3i2ssz96asl889n3r6bplyzk7xvb2s3dkxbgcisyy"))))
34d5314e 3363 (build-system dune-build-system)
e88ff71c 3364 (arguments
34d5314e 3365 `(#:build-flags (list "--profile" "release")
87858bc5
JL
3366 #:tests? #f
3367 #:ocaml ,ocaml-4.07
339c752d
JL
3368 #:findlib ,ocaml4.07-findlib
3369 #:dune ,ocaml4.07-dune))
e88ff71c 3370 (propagated-inputs
87858bc5
JL
3371 `(("ocaml-lwt" ,(package-with-ocaml4.07 ocaml-lwt))
3372 ("ocaml-lwt-log" ,(package-with-ocaml4.07 ocaml-lwt-log))
3373 ("ocaml-lwt-react" ,(package-with-ocaml4.07 ocaml-lwt-react))
3374 ("ocaml-zed" ,ocaml4.07-zed)))
6c89e066
JL
3375 (inputs
3376 `(("libev" ,libev)))
e88ff71c
PK
3377 (home-page "https://github.com/diml/lambda-term")
3378 (synopsis "Terminal manipulation library for OCaml")
3379 (description "Lambda-Term is a cross-platform library for manipulating the
3380terminal. It provides an abstraction for keys, mouse events, colors, as well as
3381a set of widgets to write curses-like applications. The main objective of
3382Lambda-Term is to provide a higher level functional interface to terminal
3383manipulation than, for example, ncurses, by providing a native OCaml interface
3384instead of bindings to a C library.")
3385 (license license:bsd-3)))
3386
87858bc5 3387(define-public ocaml4.07-utop
90ab26fa 3388 (package
87858bc5 3389 (name "ocaml4.07-utop")
3bc6b9bb 3390 (version "2.4.3")
7848205b
TGR
3391 (source
3392 (origin
3393 (method git-fetch)
3394 (uri (git-reference
b0e7b699 3395 (url "https://github.com/ocaml-community/utop")
7848205b
TGR
3396 (commit version)))
3397 (file-name (git-file-name name version))
3398 (sha256
3bc6b9bb 3399 (base32 "1bl4943qpi3qy152dbdm5glhx19zsiylmn4rcxi8l66g58hikyjp"))))
0705f389 3400 (build-system dune-build-system)
90ab26fa 3401 (arguments
3b90075a 3402 `(#:test-target "."
87858bc5 3403 #:ocaml ,ocaml-4.07
339c752d
JL
3404 #:findlib ,ocaml4.07-findlib
3405 #:dune ,ocaml4.07-dune))
90ab26fa 3406 (native-inputs
87858bc5 3407 `(("cppo" ,(package-with-ocaml4.07 ocaml-cppo))))
90ab26fa 3408 (propagated-inputs
87858bc5
JL
3409 `(("lambda-term" ,ocaml4.07-lambda-term)
3410 ("lwt" ,(package-with-ocaml4.07 ocaml-lwt))
3411 ("react" ,(package-with-ocaml4.07 ocaml-react))
3412 ("camomile" ,(package-with-ocaml4.07 ocaml-camomile))
3413 ("zed" ,ocaml4.07-zed)))
1614c633 3414 (home-page "https://github.com/ocaml-community/utop")
90ab26fa
PK
3415 (synopsis "Improved interface to the OCaml toplevel")
3416 (description "UTop is an improved toplevel for OCaml. It can run in a
3417terminal or in Emacs. It supports line editing, history, real-time and context
3418sensitive completion, colors, and more.")
3419 (license license:bsd-3)))
3420
edac5354
PK
3421(define-public ocaml-integers
3422 (package
3423 (name "ocaml-integers")
273ba255 3424 (version "0.3.0")
edac5354
PK
3425 (home-page "https://github.com/ocamllabs/ocaml-integers")
3426 (source (origin
3427 (method url-fetch)
3428 (uri (string-append home-page
3429 "/releases/download/v0.2.2/integers-"
3430 version ".tbz"))
3431 (file-name (string-append name "-" version ".tbz"))
3432 (sha256
3433 (base32
3434 "08b1ljw88ny3l0mdq6xmffjk8anfc77igryva5jz1p6f4f746ywk"))))
3435 (build-system ocaml-build-system)
3436 (arguments
3437 `(#:tests? #f; no tests
3438 #:build-flags (list "build")
3439 #:phases
3440 (modify-phases %standard-phases
3441 (delete 'configure))))
564cf93f
JL
3442 (native-inputs
3443 `(("ocamlbuild" ,ocamlbuild)))
edac5354 3444 (inputs
bff6739d 3445 `(("topkg" ,ocaml-topkg)
c695fb76 3446 ("opam" ,opam)))
edac5354
PK
3447 (synopsis "Various signed and unsigned integer types for OCaml")
3448 (description "The ocaml-integers library provides a number of 8-, 16-, 32-
3449and 64-bit signed and unsigned integer types, together with aliases such as
3450long and size_t whose sizes depend on the host platform.")
3451 (license license:expat)))
3452
69d08bb1
PK
3453(define-public ocaml-ctypes
3454 (package
3455 (name "ocaml-ctypes")
564cf93f 3456 (version "0.14.0")
69d08bb1
PK
3457 (home-page "https://github.com/ocamllabs/ocaml-ctypes")
3458 (source (origin
c8f16c7f
EF
3459 (method git-fetch)
3460 (uri (git-reference
3461 (url home-page)
3462 (commit version)))
3463 (file-name (git-file-name name version))
69d08bb1
PK
3464 (sha256
3465 (base32
c8f16c7f 3466 "1b2q3h63ngf4x9qp65qwapf2dg9q0mcdah6qjm2q0c7v2p5vysv9"))))
69d08bb1
PK
3467 (build-system ocaml-build-system)
3468 (arguments
564cf93f
JL
3469 `(#:tests? #f; require an old lwt
3470 #:make-flags
69d08bb1
PK
3471 (list (string-append "INSTALL_HEADERS = $(wildcard $($(PROJECT).dir)/*.h)"))
3472 #:phases
3473 (modify-phases %standard-phases
c8f16c7f
EF
3474 (add-after 'unpack 'make-writable
3475 (lambda _
3476 (for-each
3477 (lambda (file)
3478 (let ((stat (stat file)))
3479 (chmod file (+ #o200 (stat:mode stat)))))
3480 (find-files "." "."))
3481 #t))
69d08bb1
PK
3482 (delete 'configure))))
3483 (native-inputs
3484 `(("pkg-config" ,pkg-config)))
3485 (inputs
3486 `(("libffi" ,libffi)
3487 ("ounit" ,ocaml-ounit)
3488 ("integers" ,ocaml-integers)
3489 ("lwt" ,ocaml-lwt)
3490 ("topkg" ,ocaml-topkg)
c695fb76 3491 ("opam" ,opam)))
69d08bb1
PK
3492 (synopsis "Library for binding to C libraries using pure OCaml")
3493 (description "Ctypes is a library for binding to C libraries using pure
3494OCaml. The primary aim is to make writing C extensions as straightforward as
3495possible. The core of ctypes is a set of combinators for describing the
3496structure of C types -- numeric types, arrays, pointers, structs, unions and
3497functions. You can use these combinators to describe the types of the
3498functions that you want to call, then bind directly to those functions -- all
3499without writing or generating any C!")
3500 (license license:expat)))
3501
c98c8237
PK
3502(define-public ocaml-ocb-stubblr
3503 (package
3504 (name "ocaml-ocb-stubblr")
3505 (version "0.1.1")
3506 (home-page "https://github.com/pqwy/ocb-stubblr")
3507 (source (origin
3508 (method url-fetch)
3509 (uri (string-append
3510 home-page "/releases/download/v0.1.1/ocb-stubblr-"
3511 version ".tbz"))
3512 (file-name (string-append name "-" version ".tbz"))
3513 (sha256
3514 (base32
3515 "167b7x1j21mkviq8dbaa0nmk4rps2ilvzwx02igsc2706784z72f"))))
3516 (build-system ocaml-build-system)
3517 (arguments
bff6739d 3518 `(#:build-flags (list "build" "--tests" "true")
c98c8237
PK
3519 #:phases
3520 (modify-phases %standard-phases
70a57011
JL
3521 (delete 'configure)
3522 (add-before 'build 'fix-for-guix
3523 (lambda _
3524 (substitute* "src/ocb_stubblr.ml"
3525 ;; Do not fail when opam is not present or initialized
3526 (("error_msgf \"error running opam\"") "\"\"")
3527 ;; Guix doesn't have cc, but it has gcc
3528 (("\"cc\"") "\"gcc\""))
3529 #t)))))
c98c8237
PK
3530 (inputs
3531 `(("topkg" ,ocaml-topkg)
c695fb76 3532 ("opam" ,opam)))
c98c8237 3533 (native-inputs
564cf93f
JL
3534 `(("astring" ,ocaml-astring)
3535 ("ocamlbuild" ,ocamlbuild)))
c98c8237
PK
3536 (synopsis "OCamlbuild plugin for C stubs")
3537 (description "Ocb-stubblr is about ten lines of code that you need to
3538repeat over, over, over and over again if you are using ocamlbuild to build
3539OCaml projects that contain C stubs.")
3540 (license license:isc)))
3541
a9e9fd15
PK
3542(define-public ocaml-tsdl
3543 (package
3544 (name "ocaml-tsdl")
786886d1 3545 (version "0.9.7")
2d1e0646 3546 (home-page "https://erratique.ch/software/tsdl")
a9e9fd15
PK
3547 (source (origin
3548 (method url-fetch)
3549 (uri (string-append home-page "/releases/tsdl-"
3550 version ".tbz"))
3551 (file-name (string-append name "-" version ".tar.gz"))
3552 (sha256
3553 (base32
786886d1 3554 "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f"))))
a9e9fd15
PK
3555 (build-system ocaml-build-system)
3556 (arguments
3557 `(#:build-flags '("build")
3558 #:tests? #f; tests require a display device
3559 #:phases
3560 (modify-phases %standard-phases
3561 (delete 'configure))))
3562 (native-inputs
564cf93f 3563 `(("ocamlbuild" ,ocamlbuild)
9f5a3ba6 3564 ("ocaml-astring" ,ocaml-astring)
564cf93f 3565 ("opam" ,opam)
a9e9fd15
PK
3566 ("pkg-config" ,pkg-config)))
3567 (inputs
bff6739d 3568 `(("topkg" ,ocaml-topkg)
a9e9fd15
PK
3569 ("sdl2" ,sdl2)
3570 ("integers" ,ocaml-integers)
3571 ("ctypes" ,ocaml-ctypes)))
3572 (synopsis "Thin bindings to SDL for OCaml")
3573 (description "Tsdl is an OCaml library providing thin bindings to the
3574cross-platform SDL C library.")
3575 (license license:isc)))
3576
5895696e
GH
3577(define-public dedukti
3578 (package
3579 (name "dedukti")
3580 (version "2.6.0")
3581 (home-page "https://deducteam.github.io/")
3582 (source
3583 (origin
3584 (method git-fetch)
3585 (uri (git-reference
b0e7b699 3586 (url "https://github.com/deducteam/dedukti")
5895696e
GH
3587 (commit (string-append "v" version))))
3588 (file-name (git-file-name name version))
3589 (sha256
3590 (base32
3591 "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
3592 (inputs
3593 `(("menhir" ,ocaml-menhir)))
3594 (native-inputs
3595 `(("ocamlbuild" ,ocamlbuild)))
3596 (build-system ocaml-build-system)
3597 (arguments
3598 `(#:phases
3599 (modify-phases %standard-phases
3600 (delete 'configure)
3601 (replace 'build
3602 (lambda _
3603 (invoke "make")
912f4400 3604 #t))
5895696e
GH
3605 (replace 'check
3606 (lambda _
3607 (invoke "make" "tests")
912f4400 3608 #t))
5895696e
GH
3609 (add-before 'install 'set-binpath
3610 ;; Change binary path in the makefile
3611 (lambda _
3612 (let ((out (assoc-ref %outputs "out")))
3613 (substitute* "GNUmakefile"
3614 (("BINDIR = (.*)$")
3615 (string-append "BINDIR = " out "/bin"))))
912f4400
JL
3616 #t))
3617 (replace 'install
3618 (lambda _
3619 (invoke "make" "install")
3620 #t)))))
5895696e
GH
3621 (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
3622the λ-calculus")
3623 (description "Dedukti is a proof-checker for the λΠ-calculus modulo
3624theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
3625dependent types. The λΠ-calculus modulo theory is itself an extension of the
3626λΠ-calculus where the context contains variable declaration as well as rewrite
3627rules. This system is not designed to develop proofs, but to check proofs
3628developed in other systems. In particular, it enjoys a minimalistic syntax.")
3629 (license license:cecill-c)))
2939fe7b 3630
db1eb632
LC
3631(define-public emacs-dedukti-mode
3632 (let ((commit "d7c3505a1046187de3c3aeb144455078d514594e"))
3633 (package
3634 (name "emacs-dedukti-mode")
3635 (version (git-version "0" "0" commit))
3636 (home-page "https://github.com/rafoo/dedukti-mode")
3637 (source (origin
3638 (method git-fetch)
3639 (uri (git-reference
3640 (url home-page)
3641 (commit commit)))
3642 (sha256
3643 (base32
3644 "1842wikq24c8rg0ac84vb1qby9ng1nssxswyyni4kq85lng5lcrp"))
3645 (file-name (git-file-name name version))))
3646 (inputs
3647 `(("dedukti" ,dedukti)))
3648 (build-system emacs-build-system)
3649 (arguments
3650 '(#:phases
3651 (modify-phases %standard-phases
3652 (add-before 'install 'patch-dkpath
3653 (lambda _
3654 (let ((dkcheck-path (which "dkcheck")))
3655 (substitute* "dedukti-mode.el"
3656 (("dedukti-path \"(.*)\"")
3657 (string-append "dedukti-path \"" dkcheck-path "\"")))))))))
3658 (synopsis "Emacs major mode for Dedukti files")
3659 (description "This package provides an Emacs major mode for editing
3660Dedukti files.")
3661 (license license:cecill-b))))
3662
3663(define-public emacs-flycheck-dedukti
3664 (let ((commit "3dbff5646355f39d57a3ec514f560a6b0082a1cd"))
3665 (package
3666 (name "emacs-flycheck-dedukti")
3667 (version (git-version "0" "0" commit))
3668 (home-page "https://github.com/rafoo/flycheck-dedukti")
3669 (source (origin
3670 (method git-fetch)
3671 (uri (git-reference
3672 (url home-page)
3673 (commit commit)))
3674 (sha256
3675 (base32
3676 "1ffpxnwl3wx244n44mbw81g00nhnykd0lnid29f4aw1av7w6nw8l"))
3677 (file-name (git-file-name name version))))
3678 (build-system emacs-build-system)
3679 (inputs
3680 `(("dedukti-mode" ,emacs-dedukti-mode)
3681 ("flycheck-mode" ,emacs-flycheck)))
3682 (synopsis "Flycheck integration for the dedukti language")
3683 (description "This package provides a frontend for Flycheck to perform
3684syntax checking on dedukti files.")
3685 (license license:cecill-b))))
3686
87858bc5 3687(define-public ocaml4.07-ppx-inline-test
308d72bf 3688 (package
87858bc5 3689 (name "ocaml4.07-ppx-inline-test")
b7ebcb04 3690 (version "0.12.0")
308d72bf
GH
3691 (home-page "https://github.com/janestreet/ppx_inline_test")
3692 (source
3693 (origin
3694 (method git-fetch)
3695 (uri (git-reference
3696 (url (string-append home-page ".git"))
3697 (commit (string-append "v" version))))
3698 (file-name (git-file-name name version))
3699 (sha256
3700 (base32
b7ebcb04 3701 "0nyz411zim94pzbxm2l2v2l9jishcxwvxhh142792g2s18r4vn50"))))
308d72bf
GH
3702 (build-system dune-build-system)
3703 (arguments
3704 ;see home page README for further information
87858bc5
JL
3705 `(#:tests? #f
3706 #:ocaml ,ocaml-4.07
339c752d
JL
3707 #:findlib ,ocaml4.07-findlib
3708 #:dune ,ocaml4.07-dune))
308d72bf 3709 (inputs
87858bc5
JL
3710 `(("ocaml-base" ,ocaml4.07-base)
3711 ("ocaml-migrate-parsetree"
3712 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
c49b94a5 3713 ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
87858bc5
JL
3714 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)
3715 ("ocaml-stdio" ,ocaml4.07-stdio)
3716 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
b7ebcb04 3717 (properties `((upstream-name . "ppx_inline_test")))
308d72bf
GH
3718 (synopsis "Syntax extension for writing in-line tests in ocaml code")
3719 (description "This package contains a syntax extension for writing
3720in-line tests in ocaml code. It is part of Jane Street's PPX rewriters
3721collection.")
3722 (license license:expat)))
3723
7195c4f2
GH
3724(define-public ocaml-bindlib
3725 (package
3726 (name "ocaml-bindlib")
3727 (version "5.0.1")
3728 (source
3729 (origin
3730 (method git-fetch)
3731 (uri (git-reference
b0e7b699 3732 (url "https://github.com/rlepigre/ocaml-bindlib")
7195c4f2
GH
3733 (commit (string-append "ocaml-bindlib_" version))))
3734 (file-name (git-file-name name version))
3735 (sha256
3736 (base32
3737 "1f8kr81w8vsi4gv61xn1qbc6zrzkjp8l9ix0942vjh4gjxc74v75"))))
3738 (build-system ocaml-build-system)
3739 (arguments
3740 `(#:tests? #f ;no tests
3741 #:use-make? #t
3742 #:phases
3743 (modify-phases %standard-phases
3744 (delete 'configure)
3745 (replace 'build
3746 (lambda _
3747 (invoke "make")))
3748 (replace 'install
3749 (lambda _
3750 (invoke "make" "install"))))))
3751 (native-inputs
3752 `(("ocamlbuild" ,ocamlbuild)
3753 ("ocaml-findlib" ,ocaml-findlib)))
3754 (home-page "https://rlepigre.github.io/ocaml-bindlib/")
3755 (synopsis "OCaml Bindlib library for bound variables")
3756 (description "Bindlib is a library allowing the manipulation of data
3757structures with bound variables. It is particularly useful when writing ASTs
3758for programming languages, but also for manipulating terms of the λ-calculus
3759or quantified formulas.")
3760 (license license:gpl3+)))
3761
87858bc5 3762(define-public ocaml4.07-earley
70c7d025 3763 (package
87858bc5 3764 (name "ocaml4.07-earley")
70c7d025
GH
3765 (version "2.0.0")
3766 (home-page "https://github.com/rlepigre/ocaml-earley")
3767 (source
3768 (origin
3769 (method git-fetch)
3770 (uri (git-reference
3771 (url (string-append home-page ".git"))
3772 (commit version)))
3773 (file-name (git-file-name name version))
3774 (sha256
3775 (base32
3776 "18k7bi7krc4bvqnhijz1q0pfr0nfahghfjifci8rh1q4i5zd0xz5"))))
3777 (build-system dune-build-system)
3778 (arguments
87858bc5
JL
3779 `(#:test-target "."
3780 #:ocaml ,ocaml-4.07
339c752d
JL
3781 #:findlib ,ocaml4.07-findlib
3782 #:dune ,ocaml4.07-dune))
70c7d025
GH
3783 (synopsis "Parsing library based on Earley Algorithm")
3784 (description "Earley is a parser combinator library base on Earley's
3785algorithm. It is intended to be used in conjunction with an OCaml syntax
3786extension which allows the definition of parsers inside the language. There
3787is also support for writing OCaml syntax extensions in a camlp4 style.")
3788 (license license:cecill-b)))
3789
8213db7c
GH
3790(define-public ocaml-timed
3791 (package
3792 (name "ocaml-timed")
3793 (version "1.0")
3794 (home-page "https://github.com/rlepigre/ocaml-timed")
3795 (source (origin
3796 (method git-fetch)
3797 (uri (git-reference
3798 (url (string-append home-page ".git"))
3799 (commit (string-append name "_" version))))
3800 (sha256
3801 (base32
3802 "0hfxz710faxy5yk97bkfnw87r732jcxxhmjppwrbfdb6pd0wks96"))
3803 (file-name (git-file-name name version))))
3804 (build-system ocaml-build-system)
3805 (arguments
3806 '(#:phases
3807 (modify-phases %standard-phases
3808 (delete 'configure)
3809 (replace 'build
3810 (lambda _
3811 (invoke "make")))
3812 (replace 'install
3813 (lambda _
3814 (invoke "make" "install")))
3815 (replace 'check
3816 (lambda _
3817 (invoke "make" "tests"))))))
3818 (synopsis "Timed references for imperative state")
3819 (description "Timed references for imperative state. This module provides
3820an alternative type for references (or mutable cells) supporting undo/redo
3821operations. In particular, an abstract notion of time is used to capture the
3822state of the references at any given point, so that it can be restored. Note
3823that usual reference operations only have a constant time / memory overhead
3824(compared to those of the standard library).
3825
3826Moreover, we provide an alternative implementation based on the references
3827of the standard library (Pervasives module). However, it is less efficient
3828than the first one.")
3829 (license license:expat)))
3830
2939fe7b
GH
3831(define-public ocaml-biniou
3832 (package
3833 (name "ocaml-biniou")
8dfe8fee 3834 (version "1.2.1")
2939fe7b
GH
3835 (home-page "https://github.com/mjambon/biniou")
3836 (source
3837 (origin
3838 (method git-fetch)
3839 (uri (git-reference
3840 (url (string-append home-page ".git"))
8dfe8fee 3841 (commit version)))
2939fe7b
GH
3842 (file-name (git-file-name name version))
3843 (sha256
3844 (base32
8dfe8fee 3845 "0x2kiy809n1j0yf32l7hj102y628jp5jdrkbi3z7ld8jq04h1790"))))
2939fe7b 3846 (build-system dune-build-system)
8dfe8fee
JL
3847 (arguments
3848 `(#:phases
3849 (modify-phases %standard-phases
3850 (add-before 'build 'make-writable
3851 (lambda _
3852 (for-each
3853 (lambda (file)
3854 (chmod file #o644))
3855 (find-files "." "."))
3856 #t)))))
2939fe7b
GH
3857 (inputs
3858 `(("ocaml-easy-format" ,ocaml-easy-format)))
3859 (native-inputs
3860 `(("which" ,which)))
3861 (synopsis "Data format designed for speed, safety, ease of use and backward
3862compatibility")
3863 (description "Biniou (pronounced \"be new\" is a binary data format
3864designed for speed, safety, ease of use and backward compatibility as
3865protocols evolve. Biniou is vastly equivalent to JSON in terms of
3866functionality but allows implementations several times faster (4 times faster
3867than yojson), with 25-35% space savings.")
3868 (license license:bsd-3)))
2e951707
GH
3869
3870(define-public ocaml-yojson
3871 (package
3872 (name "ocaml-yojson")
373a2a07 3873 (version "1.7.0")
2e951707
GH
3874 (home-page "https://github.com/ocaml-community/yojson")
3875 (source
3876 (origin
3877 (method git-fetch)
3878 (uri (git-reference
3879 (url (string-append home-page ".git"))
373a2a07 3880 (commit version)))
2e951707
GH
3881 (file-name (git-file-name name version))
3882 (sha256
3883 (base32
373a2a07 3884 "0zncsw8bgbkh1pfvfc7nh628hfj84lgx6jwhp9ashj3z1z0w3xjn"))))
2e951707 3885 (build-system dune-build-system)
912f4400
JL
3886 (arguments
3887 `(#:test-target "."))
2e951707
GH
3888 (inputs
3889 `(("ocaml-biniou" ,ocaml-biniou)
912f4400
JL
3890 ("ocaml-easy-format" ,ocaml-easy-format)))
3891 (native-inputs
373a2a07
JL
3892 `(("ocaml-alcotest" ,ocaml-alcotest)
3893 ("ocaml-cppo" ,ocaml-cppo)))
2e951707
GH
3894 (synopsis "Low-level JSON library for OCaml")
3895 (description "Yojson is an optimized parsing and printing library for the
3896JSON format. It addresses a few shortcomings of json-wheel including 2x
3897speedup, polymorphic variants and optional syntax for tuples and variants.
3898@code{ydump} is a pretty printing command-line program provided with the
3899yojson package. The program @code{atdgen} can be used to derive OCaml-JSON
3900serializers and deserializers from type definitions.")
3901 (license license:bsd-3)))
1d209d06
GH
3902
3903(define-public ocaml-craml
3904 (package
3905 (name "ocaml-craml")
3906 (version "1.0.0")
3907 (home-page "https://github.com/realworldocaml/craml")
3908 (source
3909 (origin
3910 (method git-fetch)
3911 (uri (git-reference
3912 (url (string-append home-page ".git"))
3913 (commit version)))
3914 (file-name (git-file-name name version))
3915 (sha256
3916 (base32
3917 "197xjp4vmzdymf2ndinw271ihpf45h04mx8gqj8ypspxdr5fj1a5"))))
3918 (build-system dune-build-system)
33917795
JL
3919 (arguments
3920 `(#:phases
3921 (modify-phases %standard-phases
3922 (add-before 'build 'upgrade
3923 (lambda _
3924 (invoke "dune" "upgrade")
3925 #t)))))
1d209d06
GH
3926 (inputs
3927 `(("ocaml-fmt" ,ocaml-fmt)
3928 ("ocaml-astring" ,ocaml-astring)
3929 ("ocaml-logs" ,ocaml-logs)
3930 ("ocaml-cmdliner" ,ocaml-cmdliner)))
3931 (synopsis
3932 "CRAM-testing framework for testing command line applications")
3933 (description "CRAM is a is functional testing framework for command line
3934applications. @code{craml} is freely inspired by the
3935Mercurial's @code{https://www.selenic.com/blog/?p=663, unified test
3936format}. @code{craml} is released as a single binary (called @code{craml}).")
3937 (license license:isc)))
59a07504 3938
87858bc5 3939(define-public ocaml4.07-merlin
64d25f0b 3940 (package
87858bc5 3941 (name "ocaml4.07-merlin")
64d25f0b
GH
3942 (version "3.2.2")
3943 (home-page "https://ocaml.github.io/merlin/")
3944 (source
3945 (origin
3946 (method git-fetch)
3947 (uri (git-reference
b0e7b699 3948 (url "https://github.com/ocaml/merlin")
64d25f0b
GH
3949 (commit (string-append "v" version))))
3950 (file-name (git-file-name name version))
3951 (sha256
3952 (base32
3953 "15ssgmwdxylbwhld9p1cq8x6kadxyhll5bfyf11dddj6cldna3hb"))))
3954 (build-system dune-build-system)
3955 (inputs
87858bc5
JL
3956 `(("ocaml-biniou" ,(package-with-ocaml4.07 ocaml-biniou))
3957 ("ocaml-yojson" ,(package-with-ocaml4.07 ocaml-yojson))
3958 ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format))))
64d25f0b
GH
3959 (native-inputs
3960 `(("ocaml-findlib" ,ocaml-findlib)))
3961 (arguments
1f4b4022 3962 `(#:package "merlin"
87858bc5
JL
3963 #:tests? #f ;; Errors in tests in version 3.2.2
3964 #:ocaml ,ocaml-4.07
339c752d
JL
3965 #:findlib ,ocaml4.07-findlib
3966 #:dune ,ocaml4.07-dune))
64d25f0b
GH
3967 (synopsis "Context sensitive completion for OCaml in Vim and Emacs")
3968 (description "Merlin is an editor service that provides modern IDE
3969features for OCaml. Emacs and Vim support is provided out-of-the-box.
3970External contributors added support for Visual Studio Code, Sublime Text and
3971Atom.")
3972 (license license:expat)))
3973
87858bc5 3974(define-public ocaml4.07-gsl
59a07504 3975 (package
87858bc5 3976 (name "ocaml4.07-gsl")
8fd89788 3977 (version "1.24.0")
59a07504
LC
3978 (source
3979 (origin
3980 (method url-fetch)
3981 (uri
3982 (string-append
3983 "https://github.com/mmottl/gsl-ocaml/releases/download/"
3984 version "/gsl-" version ".tbz"))
3985 (sha256
3986 (base32
8fd89788
JL
3987 "1l5zkkkg8sglsihrbf10ivq9s8xzl1y6ag89i4jqpnmi4m43fy34"))))
3988 (build-system dune-build-system)
3989 (arguments
3990 `(#:test-target "."
3991 #:phases
3992 (modify-phases %standard-phases
3993 (add-after 'unpack 'fix-gsl-directory
3994 (lambda* (#:key inputs #:allow-other-keys)
3995 (substitute* "src/config/discover.ml"
3996 (("/usr") (assoc-ref inputs "gsl")))
87858bc5
JL
3997 #t)))
3998 #:ocaml ,ocaml-4.07
3999 #:findlib ,ocaml4.07-findlib
4000 #:dune ,ocaml4.07-dune))
59a07504
LC
4001 (inputs
4002 `(("gsl" ,gsl)))
8fd89788 4003 (propagated-inputs
87858bc5
JL
4004 `(("ocaml-base" ,ocaml4.07-base)
4005 ("ocaml-stdio" ,ocaml4.07-stdio)))
59a07504
LC
4006 (home-page "https://mmottl.github.io/gsl-ocaml")
4007 (synopsis "Bindings to the GNU Scientific Library")
4008 (description
4009 "GSL-OCaml is an interface to the @dfn{GNU scientific library} (GSL) for
4010the OCaml language.")
4011 (license license:gpl3+)))
4012
87858bc5 4013(define-public ocaml4.07-gsl-1
ddb5dc08 4014 (package
87858bc5 4015 (inherit ocaml4.07-gsl)
ddb5dc08
RW
4016 (version "1.19.3")
4017 (source (origin
4018 (method url-fetch)
4019 (uri (string-append "https://github.com/mmottl/gsl-ocaml"
4020 "/releases/download/v"
4021 version "/gsl-ocaml-" version ".tar.gz"))
4022 (sha256
4023 (base32
4024 "0nzp43hp8pbjqkrxnwp5lgjrabxayf61h18fjaydi0s5faq6f3xh"))))
4025 (build-system ocaml-build-system)
4026 (inputs
4027 `(("gsl" ,gsl)))
4028 (native-inputs
87858bc5
JL
4029 `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild))))
4030 (arguments
4031 `(#:ocaml ,ocaml-4.07
4032 #:findlib ,ocaml4.07-findlib))
ddb5dc08
RW
4033 (propagated-inputs '())))
4034
59a07504
LC
4035(define-public cubicle
4036 (package
4037 (name "cubicle")
4038 (version "1.1.2")
4039 (source (origin
4040 (method url-fetch)
4041 (uri (string-append "http://cubicle.lri.fr/cubicle-"
4042 version ".tar.gz"))
4043 (sha256
4044 (base32
4045 "10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
4046 (build-system gnu-build-system)
4047 (native-inputs
4048 `(("automake" ,automake)
4049 ("ocaml" ,ocaml)
4050 ("which" ,(@@ (gnu packages base) which))))
4051 (propagated-inputs
4052 `(("ocaml-num" ,ocaml-num)
4053 ("z3" ,z3)))
4054 (arguments
4055 `(#:configure-flags (list "--with-z3")
4056 #:make-flags (list "QUIET=")
4057 #:tests? #f
4058 #:phases
4059 (modify-phases %standard-phases
4060 (add-before 'configure 'configure-for-release
4061 (lambda _
4062 (substitute* "Makefile.in"
4063 (("SVNREV=") "#SVNREV="))
4064 #t))
4065 (add-before 'configure 'fix-/bin/sh
4066 (lambda _
4067 (substitute* "configure"
4068 (("-/bin/sh") (string-append "-" (which "sh"))))
4069 #t))
4070 (add-before 'configure 'fix-smt-z3wrapper.ml
4071 (lambda _
4072 (substitute* "Makefile.in"
4073 (("\\\\n") ""))
4074 #t))
4075 (add-before 'configure 'fix-ocaml-num
4076 (lambda* (#:key inputs #:allow-other-keys)
4077 (substitute* "Makefile.in"
4078 (("= \\$\\(FUNCTORYLIB\\)")
4079 (string-append "= -I "
4080 (assoc-ref inputs "ocaml-num")
4081 "/lib/ocaml/site-lib"
4082 " $(FUNCTORYLIB)")))
4083 #t)))))
4084 (home-page "http://cubicle.lri.fr/")
4085 (synopsis "Model checker for array-based systems")
4086 (description "Cubicle is a model checker for verifying safety properties
4087of array-based systems. This is a syntactically restricted class of
4088parametrized transition systems with states represented as arrays indexed by
4089an arbitrary number of processes. Cache coherence protocols and mutual
4090exclusion algorithms are typical examples of such systems.")
4091 (license license:asl2.0)))
5fa01e8a 4092
87858bc5 4093(define-public ocaml4.07-sexplib0
5fa01e8a 4094 (package
87858bc5 4095 (name "ocaml4.07-sexplib0")
5fa01e8a
GH
4096 (version "0.11.0")
4097 (home-page "https://github.com/janestreet/sexplib0")
4098 (source
4099 (origin
4100 (method git-fetch)
4101 (uri (git-reference
4102 (url (string-append home-page ".git"))
4103 (commit (string-append "v" version))))
4104 (file-name (git-file-name name version))
4105 (sha256
4106 (base32
4107 "07v3ggyss7xhfv14bjk1n87sr42iqwj4cgjiv2lcdfkqk49i2bmi"))))
4108 (build-system dune-build-system)
4109 (arguments
87858bc5
JL
4110 `(#:tests? #f ;no tests
4111 #:ocaml ,ocaml-4.07
339c752d
JL
4112 #:findlib ,ocaml4.07-findlib
4113 #:dune ,ocaml4.07-dune))
5fa01e8a
GH
4114 (synopsis "Library containing the definition of S-expressions and some
4115base converters")
4116 (description "Part of Jane Street's Core library The Core suite of
4117libraries is an industrial strength alternative to OCaml's standard library
4118that was developed by Jane Street, the largest industrial user of OCaml.")
4119(license license:expat)))
7726124a 4120
87858bc5 4121(define-public ocaml4.07-parsexp
7726124a 4122 (package
87858bc5 4123 (name "ocaml4.07-parsexp")
7726124a
GH
4124 (version "0.11.0")
4125 (home-page "https://github.com/janestreet/parsexp")
4126 (source
4127 (origin
4128 (method git-fetch)
4129 (uri (git-reference
4130 (url (string-append home-page ".git"))
4131 (commit (string-append "v" version))))
4132 (file-name (git-file-name name version))
4133 (sha256
4134 (base32
4135 "1nyq23s5igd8cf3n4qxprjvhbmb6ighb3fy5mw7hxl0mdgsw5fvz"))))
4136 (build-system dune-build-system)
87858bc5
JL
4137 (arguments
4138 `(#:ocaml ,ocaml-4.07
339c752d
JL
4139 #:findlib ,ocaml4.07-findlib
4140 #:dune ,ocaml4.07-dune))
7726124a 4141 (inputs
87858bc5 4142 `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
7726124a
GH
4143 (synopsis "S-expression parsing library")
4144 (description
4145 "This library provides generic parsers for parsing S-expressions from
4146strings or other medium.
4147
4148The library is focused on performances but still provide full generic
4149parsers that can be used with strings, bigstrings, lexing buffers,
4150character streams or any other sources effortlessly.
4151
4152It provides three different class of parsers:
4153@itemize
4154@item
4155the normal parsers, producing [Sexp.t] or [Sexp.t list] values
4156@item
4157the parsers with positions, building compact position sequences so
4158that one can recover original positions in order to report properly
4159located errors at little cost
4160@item
4161the Concrete Syntax Tree parsers, produce values of type
4162@code{Parsexp.Cst.t} which record the concrete layout of the s-expression
4163syntax, including comments
4164@end itemize
4165
4166This library is portable and doesn't provide IO functions. To read
4167s-expressions from files or other external sources, you should use
4168parsexp_io.")
4169 (license license:expat)))
7cca1fd4 4170
87858bc5 4171(define-public ocaml4.07-sexplib
7cca1fd4 4172 (package
87858bc5 4173 (name "ocaml4.07-sexplib")
7cca1fd4
GH
4174 (version "0.11.0")
4175 (home-page "https://github.com/janestreet/sexplib")
4176 (source
4177 (origin
4178 (method git-fetch)
4179 (uri (git-reference
4180 (url (string-append home-page ".git"))
4181 (commit (string-append "v" version))))
4182 (file-name (git-file-name name version))
4183 (sha256
4184 (base32
4185 "1qfl0m04rpcjvc4yw1hzh6r16jpwmap0sa9ax6zjji67dz4szpyb"))))
4186 (build-system dune-build-system)
87858bc5
JL
4187 (arguments
4188 `(#:ocaml ,ocaml-4.07
339c752d
JL
4189 #:findlib ,ocaml4.07-findlib
4190 #:dune ,ocaml4.07-dune))
7e12b4c2 4191 (propagated-inputs
87858bc5
JL
4192 `(("ocaml-num" ,(package-with-ocaml4.07 ocaml-num))
4193 ("ocaml-parsexp" ,ocaml4.07-parsexp)
4194 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
7cca1fd4
GH
4195 (synopsis
4196 "Library for serializing OCaml values to and from S-expressions")
4197 (description
4198 "This package is part of Jane Street's Core library. Sexplib contains
4199functionality for parsing and pretty-printing s-expressions.")
4200 (license license:expat)))
22074259 4201
87858bc5 4202(define-public ocaml4.07-base
22074259 4203 (package
87858bc5 4204 (name "ocaml4.07-base")
22074259
GH
4205 (version "0.11.1")
4206 (home-page "https://github.com/janestreet/base")
4207 (source
4208 (origin
4209 (method git-fetch)
4210 (uri (git-reference
4211 (url (string-append home-page ".git"))
4212 (commit (string-append "v" version))))
4213 (file-name (git-file-name name version))
4214 (sha256
4215 (base32
4216 "0j6xb4265jr41vw4fjzak6yr8s30qrnzapnc6rl1dxy8bjai0nir"))))
4217 (build-system dune-build-system)
7e12b4c2 4218 (propagated-inputs
87858bc5 4219 `(("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
22074259
GH
4220 (arguments
4221 `(#:phases
4222 (modify-phases %standard-phases
4223 (replace 'build
4224 ;; make warnings non fatal (jbuilder behaviour)
4225 (lambda _
87858bc5
JL
4226 (invoke "dune" "build" "@install" "--profile=release"))))
4227 #:ocaml ,ocaml-4.07
339c752d
JL
4228 #:findlib ,ocaml4.07-findlib
4229 #:dune ,ocaml4.07-dune))
22074259
GH
4230 (synopsis
4231 "Full standard library replacement for OCaml")
4232 (description
4233 "Base is a complete and portable alternative to the OCaml standard
4234library. It provides all standard functionalities one would expect
4235from a language standard library. It uses consistent conventions
4236across all of its module.
4237
4238Base aims to be usable in any context. As a result system dependent
4239features such as I/O are not offered by Base. They are instead
4240provided by companion libraries such as
4241@url{https://github.com/janestreet/stdio, ocaml-stdio}.")
4242 (license license:expat)))
ac06a773 4243
c49b94a5 4244(define-public ocaml4.07-compiler-libs
ac06a773 4245 (package
c49b94a5 4246 (name "ocaml4.07-compiler-libs")
ac06a773
GH
4247 (version "0.11.0")
4248 (home-page "https://github.com/janestreet/ocaml-compiler-libs")
4249 (source
4250 (origin
4251 (method git-fetch)
4252 (uri (git-reference
4253 (url (string-append home-page ".git"))
4254 (commit (string-append "v" version))))
4255 (file-name (git-file-name name version))
4256 (sha256
4257 (base32
4258 "03jds7bszh8wwpfwxb3dg0gyr1j1872wxwx1xqhry5ir0i84bg0s"))))
4259 (build-system dune-build-system)
4260 (arguments
c49b94a5
JL
4261 `(#:tests? #f ;no tests
4262 #:ocaml ,ocaml-4.07
4263 #:findlib ,ocaml4.07-findlib
4264 #:dune ,ocaml4.07-dune))
d9faae62 4265 (properties `((upstream-name . "ocaml-compiler-libs")))
ac06a773 4266 (synopsis "Compiler libraries repackaged")
37c5b197 4267 (description "This package simply repackages the OCaml compiler libraries
ac06a773
GH
4268so they don't expose everything at toplevel. For instance, @code{Ast_helper}
4269is now @code{Ocaml_common.Ast_helper}.")
4270 (license license:expat)))
b5bab81c 4271
87858bc5 4272(define-public ocaml4.07-stdio
b5bab81c 4273 (package
87858bc5 4274 (name "ocaml4.07-stdio")
b5bab81c
GH
4275 (version "0.11.0")
4276 (home-page "https://github.com/janestreet/stdio")
4277 (source
4278 (origin
4279 (method git-fetch)
4280 (uri (git-reference
4281 (url (string-append home-page ".git"))
4282 (commit (string-append "v" version))))
4283 (file-name (git-file-name name version))
4284 (sha256
4285 (base32
4286 "1facajqhvq34g2wrg368y0ajxd6lrj5b3lyzyj0jhdmraxajjcwn"))))
4287 (build-system dune-build-system)
7e12b4c2 4288 (propagated-inputs
87858bc5
JL
4289 `(("ocaml-base" ,ocaml4.07-base)
4290 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
b5bab81c 4291 (arguments
87858bc5
JL
4292 `(#:tests? #f ;no tests
4293 #:ocaml ,ocaml-4.07
339c752d
JL
4294 #:findlib ,ocaml4.07-findlib
4295 #:dune ,ocaml4.07-dune))
b5bab81c
GH
4296 (synopsis "Standard IO library for OCaml")
4297 (description
4298 "Stdio implements simple input/output functionalities for OCaml. It
4299re-exports the input/output functions of the OCaml standard libraries using
4300a more consistent API.")
4301 (license license:expat)))
3f623d00
GH
4302
4303(define-public ocaml-ppx-derivers
4304 (package
4305 (name "ocaml-ppx-derivers")
1e5937c8 4306 (version "1.2.1")
3f623d00
GH
4307 (home-page
4308 "https://github.com/ocaml-ppx/ppx_derivers")
4309 (source
4310 (origin
4311 (method git-fetch)
4312 (uri (git-reference
4313 (url (string-append home-page ".git"))
4314 (commit version)))
4315 (file-name (git-file-name name version))
4316 (sha256
4317 (base32
1e5937c8 4318 "0yqvqw58hbx1a61wcpbnl9j30n495k23qmyy2xwczqs63mn2nkpn"))))
3f623d00
GH
4319 (build-system dune-build-system)
4320 (arguments
4321 '(#:tests? #f)) ;no tests
51e52f47 4322 (properties `((upstream-name . "ppx_derivers")))
3f623d00
GH
4323 (synopsis "Shared @code{@@deriving} plugin registry")
4324 (description
4325 "Ppx_derivers is a tiny package whose sole purpose is to allow
4326ppx_deriving and ppx_type_conv to inter-operate gracefully when linked
4327as part of the same ocaml-migrate-parsetree driver.")
4328 (license license:bsd-3)))
4d390cad 4329
87858bc5 4330(define-public ocaml4.07-ppxlib
4d390cad 4331 (package
87858bc5 4332 (name "ocaml4.07-ppxlib")
b0529038 4333 (version "0.6.0")
4d390cad
GH
4334 (home-page "https://github.com/ocaml-ppx/ppxlib")
4335 (source
4336 (origin
4337 (method git-fetch)
4338 (uri (git-reference
4339 (url (string-append home-page ".git"))
4340 (commit version)))
4341 (file-name (git-file-name name version))
4342 (sha256
4343 (base32
b0529038 4344 "0my9x7sxb329h0lzshppdaawiyfbaw6g5f41yiy7bhl071rnlvbv"))))
4d390cad 4345 (build-system dune-build-system)
7e12b4c2 4346 (propagated-inputs
87858bc5 4347 `(("ocaml-base" ,ocaml4.07-base)
c49b94a5 4348 ("ocaml-compiler-libs" ,ocaml4.07-compiler-libs)
87858bc5
JL
4349 ("ocaml-migrate-parsetree"
4350 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4351 ("ocaml-ppx-derivers" ,(package-with-ocaml4.07 ocaml-ppx-derivers))
4352 ("ocaml-stdio" ,ocaml4.07-stdio)
4353 ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
4354 ("ocaml-sexplib0" ,ocaml4.07-sexplib0)))
4d390cad 4355 (arguments
87858bc5 4356 `(#:phases
4d390cad
GH
4357 (modify-phases %standard-phases
4358 (add-before 'check 'set-topfind
4359 (lambda* (#:key inputs #:allow-other-keys)
4360 ;; add the line #directory ".." at the top of each file
4361 ;; using #use "topfind";; to be able to find topfind
7e12b4c2 4362 (let* ((findlib-path (assoc-ref inputs "findlib"))
4d390cad
GH
4363 (findlib-libdir
4364 (string-append findlib-path "/lib/ocaml/site-lib")))
4365 (substitute* '("test/base/test.ml"
b0529038 4366 "test/code_path/test.ml"
4d390cad
GH
4367 "test/deriving/test.ml"
4368 "test/driver/attributes/test.ml"
4369 "test/driver/non-compressible-suffix/test.ml"
4370 "test/driver/transformations/test.ml")
4371 (("#use \"topfind\";;" all)
4372 (string-append "#directory \"" findlib-libdir "\"\n"
4373 all))))
87858bc5
JL
4374 #t)))
4375 #:ocaml ,ocaml-4.07
339c752d
JL
4376 #:findlib ,ocaml4.07-findlib
4377 #:dune ,ocaml4.07-dune))
4d390cad
GH
4378 (synopsis
4379 "Base library and tools for ppx rewriters")
4380 (description
4381 "A comprehensive toolbox for ppx development. It features:
4382@itemize
4383@item an OCaml AST / parser / pretty-printer snapshot, to create a full frontend
4384independent of the version of OCaml;
4385@item a library for library for ppx rewriters in general, and type-driven code
4386generators in particular;
4387@item
4388a feature-full driver for OCaml AST transformers;
4389@item a quotation mechanism allowing to write values representing the
4390OCaml AST in the OCaml syntax;
4391@item a generator of open recursion classes from type definitions.
4392@end itemize")
4393 (license license:expat)))
c16c8bb6 4394
87858bc5 4395(define-public ocaml4.07-ppx-compare
c16c8bb6 4396 (package
87858bc5 4397 (name "ocaml4.07-ppx-compare")
c16c8bb6
JL
4398 (version "0.11.1")
4399 (source (origin
4400 (method git-fetch)
4401 (uri (git-reference
b0e7b699 4402 (url "https://github.com/janestreet/ppx_compare")
c16c8bb6
JL
4403 (commit (string-append "v" version))))
4404 (file-name (git-file-name name version))
4405 (sha256
4406 (base32
4407 "06bq4m1bsm4jlx4g7wh5m99qky7xm4c2g52kaz6pv25hdn5agi2m"))))
4408 (build-system dune-build-system)
4409 (propagated-inputs
87858bc5
JL
4410 `(("ocaml-base" ,ocaml4.07-base)
4411 ("ocaml-migrate-parsetree"
4412 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4413 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4414 (arguments
4415 `(#:ocaml ,ocaml-4.07
339c752d
JL
4416 #:findlib ,ocaml4.07-findlib
4417 #:dune ,ocaml4.07-dune))
c16c8bb6
JL
4418 (properties `((upstream-name . "ppx_compare")))
4419 (home-page "https://github.com/janestreet/ppx_compare")
4420 (synopsis "Generation of comparison functions from types")
4421 (description "Generation of fast comparison functions from type expressions
4422and definitions. Ppx_compare is a ppx rewriter that derives comparison functions
4423from type representations. The scaffolded functions are usually much faster
4424than ocaml's Pervasives.compare. Scaffolding functions also gives you more
4425flexibility by allowing you to override them for a specific type and more safety
4426by making sure that you only compare comparable values.")
4427 (license license:asl2.0)))
143685fd 4428
87858bc5 4429(define-public ocaml4.07-fieldslib
143685fd 4430 (package
87858bc5 4431 (name "ocaml4.07-fieldslib")
143685fd
JL
4432 (version "0.11.0")
4433 (source (origin
4434 (method url-fetch)
4435 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4436 (version-major+minor version) "/files/"
4437 "fieldslib-v" version ".tar.gz"))
4438 (sha256
4439 (base32
4440 "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388"))))
4441 (build-system dune-build-system)
4442 (arguments
4443 ;; No tests
87858bc5
JL
4444 `(#:tests? #f
4445 #:ocaml ,ocaml-4.07
339c752d
JL
4446 #:findlib ,ocaml4.07-findlib
4447 #:dune ,ocaml4.07-dune))
143685fd 4448 (propagated-inputs
87858bc5
JL
4449 `(("ocaml-base" ,ocaml4.07-base)
4450 ("ocaml-migrate-parsetree"
4451 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4452 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
143685fd
JL
4453 (properties `((upstream-name . "fieldslib")))
4454 (home-page "https://github.com/janestreet/fieldslib")
4455 (synopsis "Syntax extension to record fields")
4456 (description "Syntax extension to define first class values representing
4457record fields, to get and set record fields, iterate and fold over all fields
4458of a record and create new record values.")
4459 (license license:asl2.0)))
d9f8433e 4460
87858bc5 4461(define-public ocaml4.07-variantslib
d9f8433e 4462 (package
87858bc5 4463 (name "ocaml4.07-variantslib")
d9f8433e
JL
4464 (version "0.11.0")
4465 (source (origin
4466 (method url-fetch)
4467 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4468 (version-major+minor version)
4469 "/files/variantslib-v" version ".tar.gz"))
4470 (sha256
4471 (base32
4472 "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3"))))
4473 (build-system dune-build-system)
4474 (arguments
4475 ;; No tests
87858bc5
JL
4476 `(#:tests? #f
4477 #:ocaml ,ocaml-4.07
339c752d
JL
4478 #:findlib ,ocaml4.07-findlib
4479 #:dune ,ocaml4.07-dune))
d9f8433e 4480 (propagated-inputs
87858bc5
JL
4481 `(("ocaml-base" ,ocaml4.07-base)
4482 ("ocaml-migrate-parsetree"
4483 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4484 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
d9f8433e
JL
4485 (properties `((upstream-name . "variantslib")))
4486 (home-page "https://github.com/janestreet/variantslib")
4487 (synopsis "OCaml variants as first class values")
4488 (description "The Core suite of libraries is an alternative to OCaml's
4489standard library.")
4490 (license license:asl2.0)))
7b685486 4491
87858bc5 4492(define-public ocaml4.07-ppx-fields-conv
7b685486 4493 (package
87858bc5 4494 (name "ocaml4.07-ppx-fields-conv")
7b685486
JL
4495 (version "0.11.0")
4496 (source (origin
4497 (method url-fetch)
4498 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4499 (version-major+minor version)
4500 "/files/ppx_fields_conv-v" version ".tar.gz"))
4501 (sha256
4502 (base32
4503 "07zrd3qky2ppbfl55gpm90rvqa5860xgwcsvihrjmkrw6d0jirkc"))))
4504 (build-system dune-build-system)
4505 (propagated-inputs
87858bc5
JL
4506 `(("ocaml-base" ,ocaml4.07-base)
4507 ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
4508 ("ocaml-migrate-parsetree"
4509 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4510 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4511 (arguments
4512 `(#:ocaml ,ocaml-4.07
339c752d
JL
4513 #:findlib ,ocaml4.07-findlib
4514 #:dune ,ocaml4.07-dune))
7b685486
JL
4515 (properties `((upstream-name . "ppx_fields_conv")))
4516 (home-page "https://github.com/janestreet/ppx_fields_conv")
4517 (synopsis "Generation of accessor and iteration functions for ocaml records")
4518 (description "Ppx_fields_conv is a ppx rewriter that can be used to define
4519first class values representing record fields, and additional routines, to get
4520and set record fields, iterate and fold over all fields of a record and create
4521new record values.")
4522 (license license:asl2.0)))
c7cf165e 4523
87858bc5 4524(define-public ocaml4.07-ppx-sexp-conv
c7cf165e 4525 (package
87858bc5 4526 (name "ocaml4.07-ppx-sexp-conv")
c7cf165e
JL
4527 (version "0.11.2")
4528 (source (origin
4529 (method git-fetch)
4530 (uri (git-reference
b0e7b699 4531 (url "https://github.com/janestreet/ppx_sexp_conv")
c7cf165e
JL
4532 (commit (string-append "v" version))))
4533 (file-name (git-file-name name version))
4534 (sha256
4535 (base32
4536 "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9"))))
4537 (build-system dune-build-system)
4538 (propagated-inputs
87858bc5
JL
4539 `(("ocaml-base" ,ocaml4.07-base)
4540 ("ocaml-migrate-parsetree"
4541 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4542 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4543 (arguments
4544 `(#:ocaml ,ocaml-4.07
339c752d
JL
4545 #:findlib ,ocaml4.07-findlib
4546 #:dune ,ocaml4.07-dune))
c7cf165e
JL
4547 (properties `((upstream-name . "ppx_sexp_conv")))
4548 (home-page "https://github.com/janestreet/ppx_sexp_conv")
4549 (synopsis "Generation of S-expression conversion functions from type definitions")
4550 (description "This package generates S-expression conversion functions from type
4551definitions.")
4552 (license license:asl2.0)))
7523674c 4553
87858bc5 4554(define-public ocaml4.07-ppx-variants-conv
7523674c 4555 (package
87858bc5 4556 (name "ocaml4.07-ppx-variants-conv")
7523674c
JL
4557 (version "0.11.1")
4558 (source (origin
4559 (method git-fetch)
4560 (uri (git-reference
b0e7b699 4561 (url "https://github.com/janestreet/ppx_variants_conv")
7523674c
JL
4562 (commit (string-append "v" version))))
4563 (file-name (git-file-name name version))
4564 (sha256
4565 (base32
4566 "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd"))))
4567 (build-system dune-build-system)
4568 (propagated-inputs
87858bc5
JL
4569 `(("ocaml-base" ,ocaml4.07-base)
4570 ("ocaml-variantslib" ,ocaml4.07-variantslib)
4571 ("ocaml-migrate-parsetree"
4572 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4573 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4574 (arguments
4575 `(#:ocaml ,ocaml-4.07
339c752d
JL
4576 #:findlib ,ocaml4.07-findlib
4577 #:dune ,ocaml4.07-dune))
7523674c
JL
4578 (properties
4579 `((upstream-name . "ppx_variants_conv")))
4580 (home-page
4581 "https://github.com/janestreet/ppx_variants_conv")
4582 (synopsis "Generation of accessor and iteration functions for OCaml variant types")
4583 (description
7230f6d5 4584 "This package generates accessors and iteration functions for OCaml
7523674c
JL
4585variant types.")
4586 (license license:asl2.0)))
e6f08ec9 4587
87858bc5 4588(define-public ocaml4.07-ppx-custom-printf
e6f08ec9 4589 (package
87858bc5 4590 (name "ocaml4.07-ppx-custom-printf")
e6f08ec9
JL
4591 (version "0.11.0")
4592 (source (origin
4593 (method url-fetch)
4594 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4595 (version-major+minor version)
4596 "/files/ppx_custom_printf-v" version ".tar.gz"))
4597 (sha256
4598 (base32
4599 "11b73smf3g3bpd9lg014pr4rx285nk9mnk6g6464ph51jv0sqzhj"))))
4600 (build-system dune-build-system)
4601 (propagated-inputs
87858bc5
JL
4602 `(("ocaml-base" ,ocaml4.07-base)
4603 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4604 ("ocaml-migrate-parsetree"
4605 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4606 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4607 (arguments
4608 `(#:ocaml ,ocaml-4.07
339c752d
JL
4609 #:findlib ,ocaml4.07-findlib
4610 #:dune ,ocaml4.07-dune))
e6f08ec9
JL
4611 (properties `((upstream-name . "ppx_custom_printf")))
4612 (home-page "https://github.com/janestreet/ppx_custom_printf")
4613 (synopsis "Printf-style format-strings for user-defined string conversion")
4614 (description "Extensions to printf-style format-strings for user-defined
4615string conversion.")
4616 (license license:asl2.0)))
a0584d6c 4617
87858bc5 4618(define-public ocaml4.07-bin-prot
a0584d6c 4619 (package
87858bc5 4620 (name "ocaml4.07-bin-prot")
a0584d6c
JL
4621 (version "0.11.0")
4622 (source (origin
4623 (method url-fetch)
4624 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4625 (version-major+minor version)
4626 "/files/bin_prot-v" version ".tar.gz"))
4627 (sha256
4628 (base32
4629 "1rsd91gx36prj4whi76nsiz1bzpgal9nzyw3pxdz1alv4ilk2il6"))))
4630 (build-system dune-build-system)
4631 (inputs
87858bc5
JL
4632 `(("ocaml-base" ,ocaml4.07-base)
4633 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
4634 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
4635 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
4636 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4637 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
4638 ("ocaml-migrate-parsetree"
4639 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
4640 (arguments
4641 `(#:ocaml ,ocaml-4.07
339c752d
JL
4642 #:findlib ,ocaml4.07-findlib
4643 #:dune ,ocaml4.07-dune))
a0584d6c
JL
4644 (properties `((upstream-name . "bin_prot")))
4645 (home-page "https://github.com/janestreet/bin_prot")
4646 (synopsis "Binary protocol generator")
4647 (description "This library contains functionality for reading and writing
4648OCaml-values in a type-safe binary protocol. It is extremely efficient,
4649typically supporting type-safe marshalling and unmarshalling of even highly
4650structured values at speeds sufficient to saturate a gigabit connection. The
4651protocol is also heavily optimized for size, making it ideal for long-term
4652storage of large amounts of data.")
4653 (license (list
4654 license:asl2.0
4655 license:bsd-3))))
49b01fa3
JL
4656
4657(define-public ocaml-octavius
4658 (package
4659 (name "ocaml-octavius")
89651117 4660 (version "1.2.2")
49b01fa3
JL
4661 (source (origin
4662 (method git-fetch)
4663 (uri (git-reference
4664 (url "https://github.com/ocaml-doc/octavius")
4665 (commit (string-append "v" version))))
4666 (file-name (git-file-name name version))
4667 (sha256
4668 (base32
89651117 4669 "1c5m51xcn2jv42kjjpklr6g63sgx1k885wfdp1yr4wrmiaj9cbpx"))))
49b01fa3 4670 (build-system dune-build-system)
89651117
JL
4671 (arguments
4672 `(#:phases
4673 (modify-phases %standard-phases
4674 (add-before 'build 'make-writable
4675 (lambda _
4676 (for-each (lambda (file)
4677 (chmod file #o644))
4678 (find-files "." "."))
4679 #t)))))
49b01fa3
JL
4680 (properties `((upstream-name . "octavius")))
4681 (home-page "https://github.com/ocaml-doc/octavius")
4682 (synopsis "Ocamldoc comment syntax parser")
4683 (description "Octavius is a library to parse the `ocamldoc` comment syntax.")
4684 (license license:isc)))
6692f652 4685
87858bc5 4686(define-public ocaml4.07-ppx-hash
6692f652 4687 (package
87858bc5 4688 (name "ocaml4.07-ppx-hash")
6692f652
JL
4689 (version "0.11.1")
4690 (source (origin
4691 (method git-fetch)
4692 (uri (git-reference
b0e7b699 4693 (url "https://github.com/janestreet/ppx_hash")
6692f652 4694 (commit (string-append "v" version))))
3a75925e 4695 (file-name (git-file-name name version))
6692f652
JL
4696 (sha256
4697 (base32
4698 "1p0ic6aijxlrdggpmycj12q3cy9xksbq2vq727215maz4snvlf5p"))))
4699 (build-system dune-build-system)
4700 (propagated-inputs
87858bc5
JL
4701 `(("ocaml-base" ,ocaml4.07-base)
4702 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
4703 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4704 ("ocaml-migrate-parsetree"
4705 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4706 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
4707 (arguments
4708 `(#:ocaml ,ocaml-4.07
339c752d
JL
4709 #:findlib ,ocaml4.07-findlib
4710 #:dune ,ocaml4.07-dune))
6692f652
JL
4711 (properties `((upstream-name . "ppx_hash")))
4712 (home-page "https://github.com/janestreet/ppx_hash")
4713 (synopsis "Generation of hash functions from type expressions and definitions")
74ee98ee 4714 (description "This package is a collection of ppx rewriters that generate
6692f652
JL
4715hash functions from type exrpessions and definitions.")
4716 (license license:asl2.0)))
db67f569 4717
87858bc5 4718(define-public ocaml4.07-ppx-enumerate
db67f569 4719 (package
87858bc5 4720 (name "ocaml4.07-ppx-enumerate")
db67f569
JL
4721 (version "0.11.1")
4722 (source (origin
4723 (method git-fetch)
4724 (uri (git-reference
b0e7b699 4725 (url "https://github.com/janestreet/ppx_enumerate")
db67f569 4726 (commit (string-append "v" version))))
4a6de002 4727 (file-name (git-file-name name version))
db67f569
JL
4728 (sha256
4729 (base32
4730 "0spx9k1v7vjjb6sigbfs69yndgq76v114jhxvzjmffw7q989cyhr"))))
4731 (build-system dune-build-system)
4732 (arguments
87858bc5
JL
4733 `(#:tests? #f; no test suite
4734 #:ocaml ,ocaml-4.07
339c752d
JL
4735 #:findlib ,ocaml4.07-findlib
4736 #:dune ,ocaml4.07-dune))
db67f569 4737 (propagated-inputs
87858bc5
JL
4738 `(("ocaml-base" ,ocaml4.07-base)
4739 ("ocaml-migrate-parsetree"
4740 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4741 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
db67f569
JL
4742 (properties `((upstream-name . "ppx_enumerate")))
4743 (home-page "https://github.com/janestreet/ppx_enumerate")
4744 (synopsis "Generate a list containing all values of a finite type")
4745 (description "Ppx_enumerate is a ppx rewriter which generates a definition
4746for the list of all values of a type (for a type which only has finitely
4747many values).")
4748 (license license:asl2.0)))
b42afab2 4749
87858bc5 4750(define-public ocaml4.07-ppx-bench
b42afab2 4751 (package
87858bc5 4752 (name "ocaml4.07-ppx-bench")
b42afab2
JL
4753 (version "0.11.0")
4754 (source (origin
4755 (method url-fetch)
4756 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4757 (version-major+minor version)
4758 "/files/ppx_bench-v" version ".tar.gz"))
4759 (sha256
4760 (base32
4761 "0ys4pblbcjbk9dn073rqiwm7r6rc7fah03j7riklkwnb5n44andl"))))
4762 (build-system dune-build-system)
4763 (arguments
4764 ;; No tests
87858bc5
JL
4765 `(#:tests? #f
4766 #:ocaml ,ocaml-4.07
339c752d
JL
4767 #:findlib ,ocaml4.07-findlib
4768 #:dune ,ocaml4.07-dune))
b42afab2 4769 (propagated-inputs
87858bc5
JL
4770 `(("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
4771 ("ocaml-migrate-parsetree"
4772 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4773 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
b42afab2
JL
4774 (properties `((upstream-name . "ppx_bench")))
4775 (home-page "https://github.com/janestreet/ppx_bench")
4776 (synopsis "Syntax extension for writing in-line benchmarks in ocaml code")
4777 (description "Syntax extension for writing in-line benchmarks in ocaml code.")
4778 (license license:asl2.0)))
164b06da 4779
87858bc5 4780(define-public ocaml4.07-ppx-here
164b06da 4781 (package
87858bc5 4782 (name "ocaml4.07-ppx-here")
164b06da
JL
4783 (version "0.11.0")
4784 (source (origin
4785 (method url-fetch)
4786 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4787 (version-major+minor version)
4788 "/files/ppx_here-v" version ".tar.gz"))
4789 (sha256
4790 (base32
4791 "0wxcak3ay4jpigm3pfdcpr65qw4hxfa8whhkryhcd8gy71x056z5"))))
4792 (build-system dune-build-system)
4793 (arguments
4794 ;; broken tests
87858bc5
JL
4795 `(#:tests? #f
4796 #:ocaml ,ocaml-4.07
339c752d
JL
4797 #:findlib ,ocaml4.07-findlib
4798 #:dune ,ocaml4.07-dune))
164b06da 4799 (propagated-inputs
87858bc5
JL
4800 `(("ocaml-base" ,ocaml4.07-base)
4801 ("ocaml-migrate-parsetree"
4802 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4803 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
164b06da
JL
4804 (properties `((upstream-name . "ppx_here")))
4805 (home-page "https://github.com/janestreet/ppx_here")
4806 (synopsis "Expands [%here] into its location")
4807 (description
4808 "Part of the Jane Street's PPX rewriters collection.")
4809 (license license:asl2.0)))
a58118ca 4810
87858bc5 4811(define-public ocaml4.07-typerep
a58118ca 4812 (package
87858bc5 4813 (name "ocaml4.07-typerep")
a58118ca
JL
4814 (version "0.11.0")
4815 (source (origin
4816 (method url-fetch)
4817 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4818 (version-major+minor version)
4819 "/files/typerep-v" version ".tar.gz"))
4820 (sha256
4821 (base32
4822 "1zi7hy0prpgzqhr4lkacr04wvlvbp21jfbdfvffhrm6cd400rb5v"))))
4823 (build-system dune-build-system)
4824 (arguments
87858bc5
JL
4825 `(#:tests? #f
4826 #:ocaml ,ocaml-4.07
339c752d
JL
4827 #:findlib ,ocaml4.07-findlib
4828 #:dune ,ocaml4.07-dune))
87858bc5 4829 (propagated-inputs `(("ocaml-base" ,ocaml4.07-base)))
a58118ca
JL
4830 (home-page "https://github.com/janestreet/typerep")
4831 (synopsis "Typerep is a library for runtime types")
4832 (description "Typerep is a library for runtime types.")
4833 (license license:asl2.0)))
e9328150 4834
87858bc5 4835(define-public ocaml4.07-ppx-sexp-value
e9328150 4836 (package
87858bc5 4837 (name "ocaml4.07-ppx-sexp-value")
e9328150
JL
4838 (version "0.11.0")
4839 (source (origin
4840 (method url-fetch)
4841 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4842 (version-major+minor version)
4843 "/files/ppx_sexp_value-v" version ".tar.gz"))
4844 (sha256
4845 (base32
4846 "1xnalfrln6k5khsyxvxkg6v32q8fpr4cqamsjqfih29jdv486xrs"))))
4847 (build-system dune-build-system)
87858bc5
JL
4848 (arguments
4849 `(#:ocaml ,ocaml-4.07
339c752d
JL
4850 #:findlib ,ocaml4.07-findlib
4851 #:dune ,ocaml4.07-dune))
e9328150 4852 (propagated-inputs
87858bc5
JL
4853 `(("ocaml-base" ,ocaml4.07-base)
4854 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
4855 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4856 ("ocaml-migrate-parsetree"
4857 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4858 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
e9328150
JL
4859 (properties `((upstream-name . "ppx_sexp_value")))
4860 (home-page "https://github.com/janestreet/ppx_sexp_value")
4861 (synopsis "Simplify building s-expressions from ocaml values")
4862 (description "A ppx rewriter that simplifies building s-expressions from
4863ocaml values.")
4864 (license license:asl2.0)))
44a2ceca 4865
87858bc5 4866(define-public ocaml4.07-ppx-sexp-message
44a2ceca 4867 (package
87858bc5 4868 (name "ocaml4.07-ppx-sexp-message")
44a2ceca
JL
4869 (version "0.11.0")
4870 (source (origin
4871 (method url-fetch)
4872 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4873 (version-major+minor version)
4874 "/files/ppx_sexp_message-v" version ".tar.gz"))
4875 (sha256
4876 (base32
4877 "1yh440za0w9cvrbxbmqacir8715kdaw6sw24ys9xj80av9nqpiw7"))))
4878 (build-system dune-build-system)
87858bc5
JL
4879 (arguments
4880 `(#:ocaml ,ocaml-4.07
339c752d
JL
4881 #:findlib ,ocaml4.07-findlib
4882 #:dune ,ocaml4.07-dune))
44a2ceca 4883 (propagated-inputs
87858bc5
JL
4884 `(("ocaml-base" ,ocaml4.07-base)
4885 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
4886 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
4887 ("ocaml-migrate-parsetree"
4888 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4889 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
44a2ceca
JL
4890 (properties `((upstream-name . "ppx_sexp_message")))
4891 (home-page "https://github.com/janestreet/ppx_sexp_message")
4892 (synopsis "A ppx rewriter for easy construction of s-expressions")
4893 (description "Ppx_sexp_message aims to ease the creation of s-expressions
4894in OCaml. This is mainly motivated by writing error and debugging messages,
4895where one needs to construct a s-expression based on various element of the
4896context such as function arguments.")
4897 (license license:asl2.0)))
6a114001 4898
87858bc5 4899(define-public ocaml4.07-ppx-pipebang
6a114001 4900 (package
87858bc5 4901 (name "ocaml4.07-ppx-pipebang")
6a114001
JL
4902 (version "0.11.0")
4903 (source (origin
4904 (method url-fetch)
4905 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4906 (version-major+minor version)
4907 "/files/ppx_pipebang-v" version ".tar.gz"))
4908 (sha256
4909 (base32
4910 "1wrrzlb4kdvkkcmzi01fw25jar38r2jlnyn0i6pn4z0lq4gpm9m0"))))
4911 (build-system dune-build-system)
4912 (arguments
4913 ;; No tests
87858bc5
JL
4914 `(#:tests? #f
4915 #:ocaml ,ocaml-4.07
339c752d
JL
4916 #:findlib ,ocaml4.07-findlib
4917 #:dune ,ocaml4.07-dune))
6a114001 4918 (propagated-inputs
87858bc5
JL
4919 `(("ocaml-migrate-parsetree"
4920 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4921 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
6a114001
JL
4922 (properties `((upstream-name . "ppx_pipebang")))
4923 (home-page "https://github.com/janestreet/ppx_pipebang")
4924 (synopsis "Inline reverse application operators `|>` and `|!`")
4925 (description "A ppx rewriter that inlines reverse application operators
4926@code{|>} and @code{|!}.")
4927 (license license:asl2.0)))
3f4ecf66 4928
87858bc5 4929(define-public ocaml4.07-ppx-optional
3f4ecf66 4930 (package
87858bc5 4931 (name "ocaml4.07-ppx-optional")
3f4ecf66
JL
4932 (version "0.11.0")
4933 (source (origin
4934 (method url-fetch)
4935 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4936 (version-major+minor version)
4937 "/files/ppx_optional-v" version ".tar.gz"))
4938 (sha256
4939 (base32
4940 "1z8z2bga95k2vksljljfglg10vygkjd24kn1b37sk4z3nmp47x0h"))))
4941 (build-system dune-build-system)
4942 (arguments
4943 ;; No tests
87858bc5
JL
4944 `(#:tests? #f
4945 #:ocaml ,ocaml-4.07
339c752d
JL
4946 #:findlib ,ocaml4.07-findlib
4947 #:dune ,ocaml4.07-dune))
3f4ecf66 4948 (propagated-inputs
87858bc5
JL
4949 `(("ocaml-base" ,ocaml4.07-base)
4950 ("ocaml-migrate-parsetree"
4951 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
4952 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
3f4ecf66
JL
4953 (properties `((upstream-name . "ppx_optional")))
4954 (home-page "https://github.com/janestreet/ppx_optional")
4955 (synopsis "Pattern matching on flat options")
4956 (description
4957 "A ppx rewriter that rewrites simple match statements with an if then
4958else expression.")
4959 (license license:asl2.0)))
79967eea 4960
87858bc5 4961(define-public ocaml4.07-ppx-optcomp
79967eea 4962 (package
87858bc5 4963 (name "ocaml4.07-ppx-optcomp")
79967eea
JL
4964 (version "0.11.0")
4965 (source (origin
4966 (method url-fetch)
4967 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4968 (version-major+minor version)
4969 "/files/ppx_optcomp-v" version ".tar.gz"))
4970 (sha256
4971 (base32
4972 "1bb52p2j2h4s9f06vrcpla80rj93jinnzq6jzilapyx9q068929i"))))
4973 (build-system dune-build-system)
87858bc5
JL
4974 (arguments
4975 `(#:ocaml ,ocaml-4.07
339c752d
JL
4976 #:findlib ,ocaml4.07-findlib
4977 #:dune ,ocaml4.07-dune))
79967eea 4978 (propagated-inputs
87858bc5
JL
4979 `(("ocaml-base" ,ocaml4.07-base)
4980 ("ocaml-stdio" ,ocaml4.07-stdio)
4981 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
79967eea
JL
4982 (properties `((upstream-name . "ppx_optcomp")))
4983 (home-page "https://github.com/janestreet/ppx_optcomp")
4984 (synopsis "Optional compilation for OCaml")
4985 (description "Ppx_optcomp stands for Optional Compilation. It is a tool
4986used to handle optional compilations of pieces of code depending of the word
4987size, the version of the compiler, ...")
4988 (license license:asl2.0)))
1365ae47 4989
87858bc5 4990(define-public ocaml4.07-ppx-let
1365ae47 4991 (package
87858bc5 4992 (name "ocaml4.07-ppx-let")
1365ae47
JL
4993 (version "0.11.0")
4994 (source (origin
4995 (method url-fetch)
4996 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
4997 (version-major+minor version)
4998 "/files/ppx_let-v" version ".tar.gz"))
4999 (sha256
5000 (base32
5001 "1wdfw6w4xbg97a35yg6bif9gggxniy9ddnrjfw1a0inkl2yamxkj"))))
5002 (build-system dune-build-system)
87858bc5
JL
5003 (arguments
5004 `(#:ocaml ,ocaml-4.07
339c752d
JL
5005 #:findlib ,ocaml4.07-findlib
5006 #:dune ,ocaml4.07-dune))
1365ae47 5007 (propagated-inputs
87858bc5
JL
5008 `(("ocaml-base" ,ocaml4.07-base)
5009 ("ocaml-migrate-parsetree"
5010 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5011 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
1365ae47
JL
5012 (properties `((upstream-name . "ppx_let")))
5013 (home-page "https://github.com/janestreet/ppx_let")
5014 (synopsis "Monadic let-bindings")
5015 (description "A ppx rewriter for monadic and applicative let bindings,
5016match expressions, and if expressions.")
5017 (license license:asl2.0)))
6018802d 5018
87858bc5 5019(define-public ocaml4.07-ppx-fail
6018802d 5020 (package
87858bc5 5021 (name "ocaml4.07-ppx-fail")
6018802d
JL
5022 (version "0.11.0")
5023 (source (origin
5024 (method url-fetch)
5025 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5026 (version-major+minor version)
5027 "/files/ppx_fail-v" version ".tar.gz"))
5028 (sha256
5029 (base32
5030 "07plqsvljiwvngggfypwq55g46s5my55y45mvlmalrxyppzr03s8"))))
5031 (build-system dune-build-system)
87858bc5
JL
5032 (arguments
5033 `(#:ocaml ,ocaml-4.07
339c752d
JL
5034 #:findlib ,ocaml4.07-findlib
5035 #:dune ,ocaml4.07-dune))
6018802d 5036 (propagated-inputs
87858bc5
JL
5037 `(("ocaml-base" ,ocaml4.07-base)
5038 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5039 ("ocaml-migrate-parsetree"
5040 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5041 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
6018802d
JL
5042 (properties `((upstream-name . "ppx_fail")))
5043 (home-page "https://github.com/janestreet/ppx_fail")
5044 (synopsis "Add location to calls to failwiths")
5045 (description "Syntax extension that makes [failwiths] always include a
5046position.")
5047 (license license:asl2.0)))
7ec9a45d 5048
87858bc5 5049(define-public ocaml4.07-ppx-assert
7ec9a45d 5050 (package
87858bc5 5051 (name "ocaml4.07-ppx-assert")
7ec9a45d
JL
5052 (version "0.11.0")
5053 (source (origin
5054 (method url-fetch)
5055 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5056 (version-major+minor version)
5057 "/files/ppx_assert-v" version ".tar.gz"))
5058 (sha256
5059 (base32
5060 "17kd311n0l9f72gblf9kv8i5rghr106w37x4f0m5qwh6nlgl0j9k"))))
5061 (build-system dune-build-system)
87858bc5
JL
5062 (arguments
5063 `(#:ocaml ,ocaml-4.07
339c752d
JL
5064 #:findlib ,ocaml4.07-findlib
5065 #:dune ,ocaml4.07-dune))
7ec9a45d 5066 (propagated-inputs
87858bc5
JL
5067 `(("ocaml-base" ,ocaml4.07-base)
5068 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5069 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5070 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5071 ("ocaml-migrate-parsetree"
5072 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5073 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
7ec9a45d
JL
5074 (properties `((upstream-name . "ppx_assert")))
5075 (home-page "https://github.com/janestreet/ppx_assert")
5076 (synopsis "Assert-like extension nodes that raise useful errors on failure")
5077 (description "This package contains assert-like extension nodes that raise
5078useful errors on failure.")
5079 (license license:asl2.0)))
4e4e5fb1 5080
87858bc5 5081(define-public ocaml4.07-ppx-expect
4e4e5fb1 5082 (package
87858bc5 5083 (name "ocaml4.07-ppx-expect")
b7ebcb04 5084 (version "0.12.0")
4e4e5fb1
JL
5085 (source (origin
5086 (method git-fetch)
5087 (uri (git-reference
b0e7b699 5088 (url "https://github.com/janestreet/ppx_expect")
4e4e5fb1
JL
5089 (commit (string-append "v" version))))
5090 (file-name (git-file-name name version))
5091 (sha256
5092 (base32
b7ebcb04 5093 "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q"))))
4e4e5fb1
JL
5094 (build-system dune-build-system)
5095 (arguments
47ef85b5 5096 `(#:ocaml ,ocaml-4.07
339c752d
JL
5097 #:findlib ,ocaml4.07-findlib
5098 #:dune ,ocaml4.07-dune))
4e4e5fb1 5099 (propagated-inputs
87858bc5
JL
5100 `(("ocaml-base" ,ocaml4.07-base)
5101 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5102 ("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5103 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
5104 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
5105 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5106 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5107 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5108 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
5109 ("ocaml-stdio" ,ocaml4.07-stdio)
5110 ("ocaml-migrate-parsetree"
5111 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5112 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)
5113 ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))))
4e4e5fb1
JL
5114 (properties `((upstream-name . "ppx_expect")))
5115 (home-page "https://github.com/janestreet/ppx_expect")
5116 (synopsis "Cram like framework for OCaml")
5117 (description "Expect-test is a framework for writing tests in OCaml, similar
5118to Cram. Expect-tests mimics the existing inline tests framework with the
5119@code{let%expect_test} construct. The body of an expect-test can contain
5120output-generating code, interleaved with @code{%expect} extension expressions
5121to denote the expected output.")
5122 (license license:asl2.0)))
f4304c1d 5123
87858bc5 5124(define-public ocaml4.07-ppx-js-style
f4304c1d 5125 (package
87858bc5 5126 (name "ocaml4.07-ppx-js-style")
f4304c1d
JL
5127 (version "0.11.0")
5128 (source (origin
5129 (method url-fetch)
5130 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5131 (version-major+minor version)
5132 "/files/ppx_js_style-v" version ".tar.gz"))
5133 (sha256
5134 (base32
5135 "0z3fc55jdjhhsblla6z4fqc13kljpcz29q79rvs5h2vsraqrldr2"))))
5136 (build-system dune-build-system)
5137 (arguments
5138 ;; No tests
87858bc5
JL
5139 `(#:tests? #f
5140 #:ocaml ,ocaml-4.07
339c752d
JL
5141 #:findlib ,ocaml4.07-findlib
5142 #:dune ,ocaml4.07-dune))
f4304c1d 5143 (propagated-inputs
87858bc5
JL
5144 `(("ocaml-base" ,ocaml4.07-base)
5145 ("ocaml-migrate-parsetree"
5146 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5147 ("ocaml-octavius" ,(package-with-ocaml4.07 ocaml-octavius))
5148 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
f4304c1d
JL
5149 (properties `((upstream-name . "ppx_js_style")))
5150 (home-page "https://github.com/janestreet/ppx_js_style")
5151 (synopsis "Code style checker for Jane Street Packages")
d38ccbb0 5152 (description "This package is a no-op ppx rewriter. It is used as a
f4304c1d
JL
5153@code{lint} tool to enforce some coding conventions across all Jane Street
5154packages.")
5155 (license license:asl2.0)))
48ad1181 5156
87858bc5 5157(define-public ocaml4.07-ppx-typerep-conv
48ad1181 5158 (package
87858bc5 5159 (name "ocaml4.07-ppx-typerep-conv")
48ad1181
JL
5160 (version "0.11.1")
5161 (source (origin
5162 (method git-fetch)
5163 (uri (git-reference
b0e7b699 5164 (url "https://github.com/janestreet/ppx_typerep_conv")
48ad1181 5165 (commit (string-append "v" version))))
7026f6b2 5166 (file-name (git-file-name name version))
48ad1181
JL
5167 (sha256
5168 (base32
5169 "0a13dpfrrg0rsm8qni1bh7pqcda30l70z8r6yzi5a64bmwk7g5ah"))))
5170 (build-system dune-build-system)
5171 (arguments
87858bc5
JL
5172 `(#:test-target "."
5173 #:ocaml ,ocaml-4.07
339c752d
JL
5174 #:findlib ,ocaml4.07-findlib
5175 #:dune ,ocaml4.07-dune))
48ad1181 5176 (propagated-inputs
87858bc5
JL
5177 `(("ocaml-base" ,ocaml4.07-base)
5178 ("ocaml-typerep" ,ocaml4.07-typerep)
5179 ("ocaml-migrate-parsetree"
5180 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5181 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
48ad1181
JL
5182 (properties `((upstream-name . "ppx_typerep_conv")))
5183 (home-page "https://github.com/janestreet/ppx_typerep_conv")
5184 (synopsis "Generation of runtime types from type declarations")
5185 (description "This package can automatically generate runtime types
5186from type definitions.")
5187 (license license:asl2.0)))
d13b9c5f 5188
87858bc5 5189(define-public ocaml4.07-ppx-base
d13b9c5f 5190 (package
87858bc5 5191 (name "ocaml4.07-ppx-base")
d13b9c5f
JL
5192 (version "0.11.0")
5193 (source (origin
5194 (method url-fetch)
5195 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5196 (version-major+minor version)
5197 "/files/ppx_base-v" version ".tar.gz"))
5198 (sha256
5199 (base32
5200 "0aq206pg330jmj7lhcagiiwm3a0b3gsqm801m8ajd4ysyw7idkym"))))
5201 (build-system dune-build-system)
5202 (arguments
87858bc5
JL
5203 `(#:test-target "."
5204 #:ocaml ,ocaml-4.07
339c752d
JL
5205 #:findlib ,ocaml4.07-findlib
5206 #:dune ,ocaml4.07-dune))
d13b9c5f 5207 (propagated-inputs
87858bc5
JL
5208 `(("ocaml-ppx-compare" ,ocaml4.07-ppx-compare)
5209 ("ocaml-ppx-enumerate" ,ocaml4.07-ppx-enumerate)
5210 ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
5211 ("ocaml-ppx-js-style" ,ocaml4.07-ppx-js-style)
5212 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5213 ("ocaml-migrate-parsetree"
5214 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5215 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
d13b9c5f
JL
5216 (properties `((upstream-name . "ppx_base")))
5217 (home-page "https://github.com/janestreet/ppx_base")
5218 (synopsis "Base set of ppx rewriters")
5219 (description "Ppx_base is the set of ppx rewriters used for Base.
5220
5221Note that Base doesn't need ppx to build, it is only used as a
5222verification tool.")
5223 (license license:asl2.0)))
7bd4b85e 5224
87858bc5 5225(define-public ocaml4.07-ppx-bin-prot
7bd4b85e 5226 (package
87858bc5 5227 (name "ocaml4.07-ppx-bin-prot")
7bd4b85e
JL
5228 (version "0.11.1")
5229 (source (origin
5230 (method git-fetch)
5231 (uri (git-reference
b0e7b699 5232 (url "https://github.com/janestreet/ppx_bin_prot")
7bd4b85e
JL
5233 (commit (string-append "v" version))))
5234 (file-name (git-file-name name version))
5235 (sha256
5236 (base32
5237 "1h60i75bzvhna1axyn662gyrzhh441l79vl142d235i5x31dmnkz"))))
5238 (build-system dune-build-system)
5239 (arguments
5240 ;; Cyclic dependency with ocaml-ppx-jane
87858bc5
JL
5241 `(#:tests? #f
5242 #:ocaml ,ocaml-4.07
339c752d
JL
5243 #:findlib ,ocaml4.07-findlib
5244 #:dune ,ocaml4.07-dune))
7bd4b85e 5245 (propagated-inputs
87858bc5
JL
5246 `(("ocaml-base" ,ocaml4.07-base)
5247 ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
5248 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5249 ("ocaml-migrate-parsetree"
5250 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5251 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
7bd4b85e
JL
5252 (properties `((upstream-name . "ppx_bin_prot")))
5253 (home-page "https://github.com/janestreet/ppx_bin_prot")
5254 (synopsis "Generation of bin_prot readers and writers from types")
5255 (description "Generation of binary serialization and deserialization
5256functions from type definitions.")
5257 (license license:asl2.0)))
255f1cae 5258
87858bc5 5259(define-public ocaml4.07-ppx-jane
255f1cae 5260 (package
87858bc5 5261 (name "ocaml4.07-ppx-jane")
255f1cae
JL
5262 (version "0.11.0")
5263 (source (origin
5264 (method url-fetch)
5265 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5266 (version-major+minor version)
5267 "/files/ppx_jane-v" version ".tar.gz"))
5268 (sha256
5269 (base32
5270 "0lgppkw3aixrfnixihrsz2ipafv8fpvkdpy3pw8n0r615gg8x8la"))))
5271 (build-system dune-build-system)
5272 (arguments
87858bc5
JL
5273 `(#:test-target "."
5274 #:ocaml ,ocaml-4.07
339c752d
JL
5275 #:findlib ,ocaml4.07-findlib
5276 #:dune ,ocaml4.07-dune))
255f1cae 5277 (propagated-inputs
87858bc5
JL
5278 `(("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5279 ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
5280 ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench)
5281 ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot)
5282 ("ocaml-ppx-custom-printf" ,ocaml4.07-ppx-custom-printf)
5283 ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)
5284 ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail)
5285 ("ocaml-ppx-fields-conv" ,ocaml4.07-ppx-fields-conv)
5286 ("ocaml-ppx-here" ,ocaml4.07-ppx-here)
5287 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5288 ("ocaml-ppx-let" ,ocaml4.07-ppx-let)
5289 ("ocaml-ppx-optcomp" ,ocaml4.07-ppx-optcomp)
5290 ("ocaml-ppx-optional" ,ocaml4.07-ppx-optional)
5291 ("ocaml-ppx-pipebang" ,ocaml4.07-ppx-pipebang)
5292 ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
5293 ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value)
5294 ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv)
5295 ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv)
5296 ("ocaml-migrate-parsetree"
5297 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5298 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
255f1cae
JL
5299 (properties `((upstream-name . "ppx_jane")))
5300 (home-page "https://github.com/janestreet/ppx_jane")
5301 (synopsis "Standard Jane Street ppx rewriters")
5302 (description "This package installs a ppx-jane executable, which is a ppx
5303driver including all standard Jane Street ppx rewriters.")
5304 (license license:asl2.0)))
5995e6d1 5305
87858bc5 5306(define-public ocaml4.07-splittable-random
5995e6d1 5307 (package
87858bc5 5308 (name "ocaml4.07-splittable-random")
5995e6d1
JL
5309 (version "0.11.0")
5310 (source (origin
5311 (method url-fetch)
5312 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5313 (version-major+minor version)
5314 "/files/splittable_random-v" version ".tar.gz"))
5315 (sha256
5316 (base32
5317 "0l1wbd881mymlnpzlq5q53mmdz3g5d7qjhyc7lfaq1x0iaccn5lc"))))
5318 (build-system dune-build-system)
87858bc5
JL
5319 (arguments
5320 `(#:ocaml ,ocaml-4.07
339c752d
JL
5321 #:findlib ,ocaml4.07-findlib
5322 #:dune ,ocaml4.07-dune))
5995e6d1 5323 (propagated-inputs
87858bc5
JL
5324 `(("ocaml-base" ,ocaml4.07-base)
5325 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5326 ("ocaml-migrate-parsetree"
5327 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
5995e6d1
JL
5328 (properties `((upstream-name . "splittable_random")))
5329 (home-page "https://github.com/janestreet/splittable_random")
5330 (synopsis "PRNG that can be split into independent streams")
e88fd8be
CB
5331 (description "This package provides a splittable
5332@acronym{PRNG,pseudo-random number generator} functions like a PRNG that can
5333be used as a stream of random values; it can also be split to produce a
5334second, independent stream of random values.
5995e6d1
JL
5335
5336This library implements a splittable pseudo-random number generator that sacrifices
5337cryptographic-quality randomness in favor of performance.")
5338 (license license:asl2.0)))
dc361a25 5339
f2df5a4b 5340(define-public ocaml4.07-jane-street-headers
dc361a25 5341 (package
f2df5a4b 5342 (name "ocaml4.07-jane-street-headers")
dc361a25
JL
5343 (version "0.11.0")
5344 (source (origin
5345 (method url-fetch)
5346 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5347 (version-major+minor version)
5348 "/files/jane-street-headers-v" version ".tar.gz"))
5349 (sha256
5350 (base32
5351 "0afhzm08l9v883fhpqqh2lmy7az609pxif40bp7x1sk8c0yszqsh"))))
5352 (build-system dune-build-system)
5353 (arguments
f2df5a4b
JL
5354 `(#:test-target "."
5355 #:ocaml ,ocaml-4.07
5356 #:findlib ,ocaml4.07-findlib
5357 #:dune ,ocaml4.07-dune))
dc361a25
JL
5358 (home-page "https://github.com/janestreet/jane-street-headers")
5359 (synopsis "Jane Street C header files")
5360 (description "This package provides C header files shared between the
5361various Jane Street packages.")
5362 (license license:asl2.0)))
3e3d5ffc 5363
87858bc5 5364(define-public ocaml4.07-configurator
3e3d5ffc 5365 (package
87858bc5 5366 (name "ocaml4.07-configurator")
3e3d5ffc
JL
5367 (version "0.11.0")
5368 (source (origin
5369 (method url-fetch)
5370 (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v"
5371 (version-major+minor version)
5372 "/files/configurator-v" version ".tar.gz"))
5373 (sha256
5374 (base32
5375 "0kwgi3sh92v4n242dk5hgpwd85zzgnczgbkqi0q0kr6m93zgbf7p"))))
5376 (build-system dune-build-system)
5377 (arguments
5378 ;; No tests
87858bc5
JL
5379 `(#:tests? #f
5380 #:ocaml ,ocaml-4.07
339c752d
JL
5381 #:findlib ,ocaml4.07-findlib
5382 #:dune ,ocaml4.07-dune))
3e3d5ffc 5383 (propagated-inputs
87858bc5
JL
5384 `(("ocaml-base" ,ocaml4.07-base)
5385 ("ocaml-stdio" ,ocaml4.07-stdio)))
3e3d5ffc
JL
5386 (home-page "https://github.com/janestreet/configurator")
5387 (synopsis "Helper library for gathering system configuration")
5388 (description "Configurator is a small library that helps writing OCaml
5389scripts that test features available on the system, in order to generate config.h
5390files for instance.
5391
5392Configurator allows one to:
5393@itemize
5394@item test if a C program compiles
5395@item query pkg-config
5396@item import #define from OCaml header files
5397@item generate config.h file
5398@end itemize")
5399 (license license:asl2.0)))
9e81db80 5400
87858bc5 5401(define-public ocaml4.07-spawn
9e81db80 5402 (package
87858bc5 5403 (name "ocaml4.07-spawn")
f9caa17b 5404 (version "0.13.0")
9e81db80
JL
5405 (source (origin
5406 (method git-fetch)
5407 (uri (git-reference
b0e7b699 5408 (url "https://github.com/janestreet/spawn")
9e81db80 5409 (commit (string-append "v" version))))
f9caa17b 5410 (file-name (git-file-name name version))
9e81db80
JL
5411 (sha256
5412 (base32
f9caa17b 5413 "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf"))))
9e81db80
JL
5414 (build-system dune-build-system)
5415 (arguments
5416 `(#:phases
5417 (modify-phases %standard-phases
5418 (add-before 'check 'fix-tests
5419 (lambda _
5420 (substitute* "test/tests.ml"
5421 (("/bin/pwd") (which "pwd"))
5422 (("/bin/echo") (which "echo")))
87858bc5
JL
5423 #t)))
5424 #:ocaml ,ocaml-4.07
339c752d
JL
5425 #:findlib ,ocaml4.07-findlib
5426 #:dune ,ocaml4.07-dune))
9e81db80 5427 (native-inputs
87858bc5 5428 `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect)))
9e81db80
JL
5429 (home-page "https://github.com/janestreet/spawn")
5430 (synopsis "Spawning sub-processes")
5431 (description
5432 "Spawn is a small library exposing only one functionality: spawning sub-process.
5433
5434It has three main goals:
5435
5436@itemize
5437@item provide missing features of Unix.create_process such as providing a
5438working directory,
5439@item provide better errors when a system call fails in the
5440sub-process. For instance if a command is not found, you get a proper
5441@code{Unix.Unix_error} exception,
5442@item improve performances by using vfork when available. It is often
5443claimed that nowadays fork is as fast as vfork, however in practice
5444fork takes time proportional to the process memory while vfork is
5445constant time. In application using a lot of memory, vfork can be
1d5d0447
CB
5446thousands of times faster than fork.
5447@end itemize")
9e81db80 5448 (license license:asl2.0)))
514b5420 5449
87858bc5 5450(define-public ocaml4.07-core
514b5420 5451 (package
87858bc5 5452 (name "ocaml4.07-core")
514b5420
JL
5453 (version "0.11.3")
5454 (source (origin
5455 (method git-fetch)
5456 (uri (git-reference
b0e7b699 5457 (url "https://github.com/janestreet/core")
514b5420 5458 (commit (string-append "v" version))))
fbd08d42 5459 (file-name (git-file-name name version))
514b5420
JL
5460 (sha256
5461 (base32
5462 "0pzl8n09z4f3i7z2wq4cjxfqrr8mj6xcdp7rbg0nxap2zdhjgvrq"))))
5463 (build-system dune-build-system)
5464 (arguments
0f1362f0
JL
5465 `(#:package "core"
5466 #:tests? #f; Require a cyclic dependency: core_extended
87858bc5 5467 #:ocaml ,ocaml-4.07
339c752d
JL
5468 #:findlib ,ocaml4.07-findlib
5469 #:dune ,ocaml4.07-dune))
514b5420 5470 (propagated-inputs
87858bc5
JL
5471 `(("ocaml-base" ,ocaml4.07-base)
5472 ("ocaml-configurator" ,ocaml4.07-configurator)
5473 ("ocaml-core-kernel" ,ocaml4.07-core-kernel)
5474 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5475 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5476 ("ocaml-sexplib" ,ocaml4.07-sexplib)
5477 ("ocaml-spawn" ,ocaml4.07-spawn)
5478 ("ocaml-stdio" ,ocaml4.07-stdio)
5479 ("ocaml-migrate-parsetree"
5480 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))
5481 ("ocaml-ppxlib" ,ocaml4.07-ppxlib)))
514b5420
JL
5482 (home-page "https://github.com/janestreet/core")
5483 (synopsis "Alternative to OCaml's standard library")
5484 (description "The Core suite of libraries is an alternative to OCaml's
5485standard library that was developed by Jane Street.")
5486 ;; Also contains parts of OCaml, relicensed to asl2.0, as permitted
5487 ;; by OCaml's license for consortium members (see THIRD-PARTY.txt).
5488 (license license:asl2.0)))
8baa5c8b 5489
87858bc5 5490(define-public ocaml4.07-core-kernel
8baa5c8b 5491 (package
87858bc5 5492 (name "ocaml4.07-core-kernel")
8baa5c8b
JL
5493 (version "0.11.1")
5494 (source (origin
5495 (method git-fetch)
5496 (uri (git-reference
b0e7b699 5497 (url "https://github.com/janestreet/core_kernel")
8baa5c8b
JL
5498 (commit (string-append "v" version))))
5499 (file-name (git-file-name name version))
5500 (sha256
5501 (base32
5502 "1dg7ygy7i64c5gaakb1cp1b26p9ks81vbxmb8fd7jff2q60j2z2g"))))
5503 (build-system dune-build-system)
5504 (arguments
5505 ;; Cyclic dependency with ocaml-core
87858bc5
JL
5506 `(#:tests? #f
5507 #:ocaml ,ocaml-4.07
339c752d
JL
5508 #:findlib ,ocaml4.07-findlib
5509 #:dune ,ocaml4.07-dune))
8baa5c8b 5510 (propagated-inputs
87858bc5
JL
5511 `(("ocaml-base" ,ocaml4.07-base)
5512 ("ocaml-bin-prot" ,ocaml4.07-bin-prot)
5513 ("ocaml-configurator" ,ocaml4.07-configurator)
5514 ("ocaml-fieldslib" ,ocaml4.07-fieldslib)
f2df5a4b 5515 ("ocaml-jane-street-headers" ,ocaml4.07-jane-street-headers)
87858bc5
JL
5516 ("ocaml-ppx-assert" ,ocaml4.07-ppx-assert)
5517 ("ocaml-ppx-base" ,ocaml4.07-ppx-base)
5518 ("ocaml-ppx-hash" ,ocaml4.07-ppx-hash)
5519 ("ocaml-ppx-inline-test" ,ocaml4.07-ppx-inline-test)
5520 ("ocaml-ppx-jane" ,ocaml4.07-ppx-jane)
5521 ("ocaml-ppx-sexp-conv" ,ocaml4.07-ppx-sexp-conv)
5522 ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message)
5523 ("ocaml-sexplib" ,ocaml4.07-sexplib)
5524 ("ocaml-splittable-random" ,ocaml4.07-splittable-random)
5525 ("ocaml-stdio" ,ocaml4.07-stdio)
5526 ("ocaml-typerep" ,ocaml4.07-typerep)
5527 ("ocaml-variantslib" ,ocaml4.07-variantslib)
5528 ("ocaml-migrate-parsetree"
5529 ,(package-with-ocaml4.07 ocaml-migrate-parsetree))))
8baa5c8b
JL
5530 (properties `((upstream-name . "core_kernel")))
5531 (home-page "https://github.com/janestreet/core_kernel")
5532 (synopsis "Portable standard library for OCaml")
5533 (description "Core is an alternative to the OCaml standard library.
5534
5535Core_kernel is the system-independent part of Core. It is aimed for cases when
5536the full Core is not available, such as in Javascript.")
5537 (license (list
5538 ;; this package and parts of OCaml, relicensed by janestreet
5539 license:asl2.0
5540 ;; MLton and sjs
5541 license:expat))))
38089b54 5542
5543(define-public ocaml-markup
5544 (package
5545 (name "ocaml-markup")
5aa573d8 5546 (version "0.8.2")
38089b54 5547 (home-page "https://github.com/aantron/markup.ml")
5548 (source
5549 (origin
5550 (method git-fetch)
5551 (uri (git-reference
5552 (url (string-append home-page ".git"))
5553 (commit version)))
5554 (file-name (git-file-name name version))
5555 (sha256
5556 (base32
5aa573d8 5557 "13zcrwzjmifniv3bvjbkd2ah8wwa3ld75bxh1d8hrzdvfxzh9szn"))))
38089b54 5558 (build-system dune-build-system)
5aa573d8
JL
5559 (arguments
5560 `(#:package "markup"))
5561 (inputs
5562 `(("libev" ,libev)))
b3419c40
JL
5563 (propagated-inputs
5564 `(("ocaml-bisect-ppx" ,ocaml-bisect-ppx)
5565 ("ocaml-uchar" ,ocaml-uchar)
38089b54 5566 ("ocaml-uutf" ,ocaml-uutf)
5567 ("ocaml-lwt" ,ocaml-lwt)))
5aa573d8
JL
5568 (native-inputs
5569 `(("ocaml-ounit" ,ocaml-ounit)
5570 ("pkg-config" ,pkg-config)))
38089b54 5571 (synopsis "Error-recovering functional HTML5 and XML parsers and writers")
5572 (description "Markup.ml provides an HTML parser and an XML parser. The
5573parsers are wrapped in a simple interface: they are functions that transform
5574byte streams to parsing signal streams. Streams can be manipulated in various
5575ways, such as processing by fold, filter, and map, assembly into DOM tree
5576structures, or serialization back to HTML or XML.
5577
5578Both parsers are based on their respective standards. The HTML parser, in
5579particular, is based on the state machines defined in HTML5.
5580
5581The parsers are error-recovering by default, and accept fragments. This makes
5582it very easy to get a best-effort parse of some input. The parsers can,
5583however, be easily configured to be strict, and to accept only full documents.
5584
5585Apart from this, the parsers are streaming (do not build up a document in
5586memory), non-blocking (can be used with threading libraries), lazy (do not
5587consume input unless the signal stream is being read), and process the input in
5588a single pass. They automatically detect the character encoding of the input
5589stream, and convert everything to UTF-8.")
5590 (license license:bsd-3)))
e2506afc 5591
5592(define-public ocaml-tyxml
5593 (package
5594 (name "ocaml-tyxml")
5595 (version "4.3.0")
5596 (source
5597 (origin
5598 (method git-fetch)
5599 (uri (git-reference
b0e7b699 5600 (url "https://github.com/ocsigen/tyxml")
e2506afc 5601 (commit version)))
5602 (file-name (git-file-name name version))
5603 (sha256
5604 (base32
5605 "0wv19xipkj8l2sks1h53105ywbjwk7q93fb7b8al4a2g9wr109c0"))))
5606 (build-system dune-build-system)
5607 (inputs
5608 `(("ocaml-re" ,ocaml-re)
5609 ("ocaml-seq" ,ocaml-seq)
5610 ("ocaml-uutf" ,ocaml-uutf)
5611 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5612 ("ocaml-markup" ,ocaml-markup)))
5613 (native-inputs
5614 `(("ocaml-alcotest" ,ocaml-alcotest)))
32fd3e9c 5615 (arguments `(#:package "tyxml"))
e2506afc 5616 (home-page "https://github.com/ocsigen/tyxml/")
5617 (synopsis "TyXML is a library for building correct HTML and SVG documents")
5618 (description "TyXML provides a set of convenient combinators that uses the
5619OCaml type system to ensure the validity of the generated documents. TyXML can
5620be used with any representation of HTML and SVG: the textual one, provided
5621directly by this package, or DOM trees (@code{js_of_ocaml-tyxml}) virtual DOM
5622(@code{virtual-dom}) and reactive or replicated trees (@code{eliom}). You can
5623also create your own representation and use it to instantiate a new set of
5624combinators.")
5625 (license license:lgpl2.1)))
908a2ee0 5626
5627(define-public ocaml-bisect-ppx
5628 (package
5629 (name "ocaml-bisect-ppx")
2e038f36 5630 (version "1.4.2")
908a2ee0 5631 (source
5632 (origin
5633 (method git-fetch)
5634 (uri (git-reference
b0e7b699 5635 (url "https://github.com/aantron/bisect_ppx")
908a2ee0 5636 (commit version)))
5637 (file-name (git-file-name name version))
5638 (sha256
5639 (base32
2e038f36 5640 "0900vli5kw7s5kdam0n4cqsfsfqb7mdb3azn3i55595gilg1vyn8"))))
908a2ee0 5641 (build-system dune-build-system)
b3419c40 5642 (propagated-inputs
908a2ee0 5643 `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
5644 ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
5645 ("ocaml-ounit" ,ocaml-ounit)))
8cc6a876
JL
5646 (arguments
5647 `(#:phases
5648 (modify-phases %standard-phases
5649 (add-before 'build 'fix-deprecated
5650 (lambda _
5651 ;; Fixed upstream in 22dd1ad9a0c9629f60599c22d82c6488394d6d32, but
5652 ;; not in a release yet.
5653 (substitute* "src/ppx/instrument.ml"
5654 (("module Ast = Ast_405")
5655 "module Ast = Migrate_parsetree.Ast_405
5656module Ast_405 = Ast"))
5657 #t)))))
908a2ee0 5658 (home-page "https://github.com/aantron/bisect_ppx")
5659 (synopsis "Code coverage for OCaml")
5660 (description "Bisect_ppx helps you test thoroughly. It is a small
5661preprocessor that inserts instrumentation at places in your code, such as
5662if-then-else and match expressions. After you run tests, Bisect_ppx gives a
5663nice HTML report showing which places were visited and which were missed.
5664
5665Usage is simple - add package bisect_ppx when building tests, run your tests,
5666then run the Bisect_ppx report tool on the generated visitation files.")
5667 (license license:mpl2.0)))
2f8e77be 5668
87858bc5 5669(define-public ocaml4.07-odoc
2f8e77be 5670 (package
87858bc5 5671 (name "ocaml4.07-odoc")
520dc743 5672 (version "1.4.2")
2f8e77be 5673 (source
5674 (origin
5675 (method git-fetch)
5676 (uri (git-reference
5677 (url "https://github.com/ocaml/odoc")
5678 (commit version)))
5679 (file-name (git-file-name name version))
5680 (sha256
520dc743 5681 (base32 "0rvhx139jx6wmlfz355mja6mk03x4swq1xxvk5ky6jzhalq3cf5i"))))
2f8e77be 5682 (build-system dune-build-system)
87858bc5
JL
5683 (arguments
5684 `(#:ocaml ,ocaml-4.07
5685 #:findlib ,ocaml4.07-findlib
5686 #:dune ,ocaml4.07-dune))
2f8e77be 5687 (inputs
87858bc5
JL
5688 `(("ocaml-alcotest" ,(package-with-ocaml4.07 ocaml-alcotest))
5689 ("ocaml-markup" ,(package-with-ocaml4.07 ocaml-markup))
5690 ("ocaml-sexplib" ,ocaml4.07-sexplib)
5691 ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re))
5692 ("ocaml-uutf" ,(package-with-ocaml4.07 ocaml-uutf))))
2f8e77be 5693 (native-inputs
87858bc5
JL
5694 `(("ocaml-astring" ,(package-with-ocaml4.07 ocaml-astring))
5695 ("ocaml-cmdliner" ,(package-with-ocaml4.07 ocaml-cmdliner))
5696 ("ocaml-cppo" ,(package-with-ocaml4.07 ocaml-cppo))
5697 ("ocaml-fpath" ,(package-with-ocaml4.07 ocaml-fpath))
5698 ("ocaml-result" ,(package-with-ocaml4.07 ocaml-result))
5699 ("ocaml-tyxml" ,(package-with-ocaml4.07 ocaml-tyxml))
5700 ("ocaml-bisect-ppx" ,(package-with-ocaml4.07 ocaml-bisect-ppx))))
2f8e77be 5701 (home-page "https://github.com/ocaml/odoc")
5702 (synopsis "OCaml documentation generator")
5703 (description "Odoc is a documentation generator for OCaml. It reads
5704@emph{doc comments}, delimited with @code{(** ... *)}, and outputs
5705@acronym{HTML}.
5706
5707Text inside doc comments is marked up in ocamldoc syntax. Odoc's main
5708advantage over ocamldoc is an accurate cross-referencer, which handles the
5709complexity of the OCaml module system.")
5710 (license license:isc)))
eb1ebabf 5711
87858bc5 5712(define-public ocaml4.07-fftw3
2e26dd69 5713 (package
87858bc5 5714 (name "ocaml4.07-fftw3")
2e26dd69
BG
5715 (version "0.8.4")
5716 (source
5717 (origin
5718 (method git-fetch)
5719 (uri (git-reference
b0e7b699 5720 (url "https://github.com/Chris00/fftw-ocaml")
2e26dd69
BG
5721 (commit version)))
5722 (file-name (git-file-name name version))
5723 (sha256
5724 (base32
5725 "0l66yagjkwdcib6q55wd8wiap50vi23qiahkghlvm28z7nvbclfk"))))
5726 (build-system dune-build-system)
5727 (arguments
5728 `(#:tests? #t
87858bc5
JL
5729 #:test-target "tests"
5730 #:ocaml ,ocaml-4.07
5731 #:findlib ,ocaml4.07-findlib
5732 #:dune ,ocaml4.07-dune))
2e26dd69
BG
5733 (propagated-inputs
5734 `(("fftw" ,fftw)
5735 ("fftwf" ,fftwf)))
5736 (native-inputs
87858bc5
JL
5737 `(("ocaml-cppo" ,(package-with-ocaml4.07 ocaml-cppo))
5738 ("ocaml-lacaml" ,ocaml4.07-lacaml)))
2e26dd69
BG
5739 (home-page
5740 "https://github.com/Chris00/fftw-ocaml")
5741 (synopsis
5742 "Bindings to FFTW3")
5743 (description
5744 "Bindings providing OCaml support for the seminal Fast Fourier Transform
5745library FFTW.")
5746 (license license:lgpl2.1))) ; with static linking exception.
5747
87858bc5 5748(define-public ocaml4.07-lacaml
eb1ebabf 5749 (package
87858bc5 5750 (name "ocaml4.07-lacaml")
eb1ebabf
BG
5751 (version "11.0.5")
5752 (source
5753 (origin
5754 (method git-fetch)
5755 (uri (git-reference
b0e7b699 5756 (url "https://github.com/mmottl/lacaml")
eb1ebabf
BG
5757 (commit version)))
5758 (file-name (git-file-name name version))
5759 (sha256
5760 (base32
5761 "180yb79a3qgx067qcpm50q12hrimjygf06rgkzbish9d1zfm670c"))))
5762 (build-system dune-build-system)
5763 (arguments
87858bc5
JL
5764 `(#:tests? #f ; No test target.
5765 #:ocaml ,ocaml-4.07
5766 #:findlib ,ocaml4.07-findlib
5767 #:dune ,ocaml4.07-dune))
eb1ebabf
BG
5768 (native-inputs
5769 `(("openblas" ,openblas)
5770 ("lapack" ,lapack)
87858bc5
JL
5771 ("ocaml-base" ,ocaml4.07-base)
5772 ("ocaml-stdio" ,ocaml4.07-stdio)))
eb1ebabf
BG
5773 (home-page "https://mmottl.github.io/lacaml/")
5774 (synopsis
5775 "OCaml-bindings to BLAS and LAPACK")
5776 (description
5777 "Lacaml interfaces the BLAS-library (Basic Linear Algebra Subroutines) and
5778LAPACK-library (Linear Algebra routines). It also contains many additional
5779convenience functions for vectors and matrices.")
5780 (license license:lgpl2.1)))
136919ba
BG
5781
5782(define-public ocaml-cairo2
5783 (package
5784 (name "ocaml-cairo2")
5785 (version "0.6.1")
5786 (source (origin
5787 (method git-fetch)
5788 (uri (git-reference
b0e7b699 5789 (url "https://github.com/Chris00/ocaml-cairo")
136919ba
BG
5790 (commit version)))
5791 (file-name (git-file-name name version))
5792 (sha256
5793 (base32
5794 "0wzysis9fa850s68qh8vrvqc6svgllhwra3kzll2ibv0wmdqrich"))))
5795 (build-system dune-build-system)
5796 (arguments
5797 `(#:test-target "tests"))
5798 (inputs
5799 `(("cairo" ,cairo)
5800 ("gtk+-2" ,gtk+-2)
5801 ("lablgtk" ,lablgtk)))
5802 (native-inputs
5803 `(("pkg-config" ,pkg-config)))
5804 (home-page "https://github.com/Chris00/ocaml-cairo")
5805 (synopsis "Binding to Cairo, a 2D Vector Graphics Library")
5806 (description "Ocaml-cairo2 is a binding to Cairo, a 2D graphics library
5807with support for multiple output devices. Currently supported output targets
5808include the X Window System, Quartz, Win32, image buffers, PostScript, PDF,
5809and SVG file output.")
5810 (license license:lgpl3+)))
d977e243
BG
5811
5812(define-public lablgtk3
5813 (package
5814 (name "lablgtk")
5815 (version "3.0.beta8")
5816 (source (origin
5817 (method git-fetch)
5818 (uri (git-reference
b0e7b699 5819 (url "https://github.com/garrigue/lablgtk")
d977e243
BG
5820 (commit version)))
5821 (file-name (git-file-name name version))
5822 (sha256
5823 (base32
5824 "08pgwnia240i2rw1rbgiahg673kwa7b6bvhsg3z4b47xr5sh9pvz"))))
5825 (build-system dune-build-system)
5826 (arguments
5827 `(#:tests? #t
5828 #:test-target "."
5829 #:phases
5830 (modify-phases %standard-phases
5831 (add-before 'build 'make-writable
5832 (lambda _
5833 (for-each (lambda (file)
5834 (chmod file #o644))
5835 (find-files "." "."))
5836 #t)))))
5837 (propagated-inputs
5838 `(("ocaml-cairo2" ,ocaml-cairo2)))
5839 (inputs
5840 `(("camlp5" ,camlp5)
5841 ("gtk+" ,gtk+)
5842 ("gtksourceview-3" ,gtksourceview-3)
5843 ("gtkspell3" ,gtkspell3)))
5844 (native-inputs
5845 `(("pkg-config" ,pkg-config)))
5846 (home-page "https://github.com/garrigue/lablgtk")
5847 (synopsis "OCaml interface to GTK+3")
5848 (description "LablGtk is an OCaml interface to GTK+ 1.2, 2.x and 3.x. It
5849provides a strongly-typed object-oriented interface that is compatible with the
5850dynamic typing of GTK+. Most widgets and methods are available. LablGtk
5851also provides bindings to gdk-pixbuf, the GLArea widget (in combination with
5852LablGL), gnomecanvas, gnomeui, gtksourceview, gtkspell, libglade (and it can
5853generate OCaml code from .glade files), libpanel, librsvg and quartz.")
5854 ;; Version 2 only, with linking exception.
5855 (license license:lgpl2.0)))