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