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