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