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