ocaml.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. |
5 | ;;; |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
9 | ;;; your option) any later version. |
10 | ;;; |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | ;;; GNU General Public License for more details. |
15 | ;;; |
16 | ;;; You should have received a copy of the GNU General Public License |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18 | |
19 | (define-module (more packages ocaml) |
20 | #:use-module (guix packages) |
21 | #:use-module (guix download) |
22 | #:use-module (guix utils) |
23 | #:use-module (guix build-system gnu) |
24 | #:use-module (guix build-system ocaml) |
25 | #:use-module ((guix licenses) #:prefix license:) |
26 | #:use-module (gnu packages) |
27 | #:use-module (gnu packages base) |
28 | #:use-module (gnu packages emacs) |
29 | #:use-module (gnu packages llvm) |
30 | #:use-module (gnu packages multiprecision) |
31 | #:use-module (gnu packages ocaml) |
32 | #:use-module (gnu packages perl) |
33 | #:use-module (gnu packages protobuf) |
34 | #:use-module (gnu packages texinfo)) |
35 | |
36 | ;; Janestreet packages are found in a similar way and all need the same patch. |
37 | (define (janestreet-origin name version hash) |
38 | (origin (method url-fetch) |
39 | (uri (string-append "https://ocaml.janestreet.com/ocaml-core/" |
40 | (version-major+minor version) "/files/" |
41 | name "-" version ".tar.gz")) |
42 | (sha256 (base32 hash)) |
43 | (modules '((guix build utils))) |
44 | (snippet |
45 | (let ((pattern (string-append "lib/" name))) |
46 | `(begin |
47 | ;; install.ml contains an invalid reference to the ppx file and |
48 | ;; propagates this error to the generated META file. It |
49 | ;; looks for it in the "lib" directory, but it is installed in |
50 | ;; "lib/ocaml/site-lib/package". This substitute does not change |
51 | ;; this file for non ppx packages. |
52 | (substitute* "install.ml" |
53 | ((,pattern) (string-append "lib/ocaml/site-lib/" ,name))) |
54 | ;; The standard Makefile would try to install janestreet modules |
55 | ;; in OCaml's directory in the store, which is read-only. |
56 | (substitute* "Makefile" |
57 | (("--prefix") |
58 | "--libdir $(LIBDIR) --prefix"))))))) |
59 | |
60 | ;; They also require almost the same set of arguments |
61 | (define janestreet-arguments |
62 | `(#:use-make? #t |
63 | #:make-flags |
64 | (list (string-append "CONFIGUREFLAGS=--prefix " |
65 | (assoc-ref %outputs "out") |
66 | " --enable-tests") |
67 | (string-append "LIBDIR=" |
68 | (assoc-ref %outputs "out") |
69 | "/lib/ocaml/site-lib") |
70 | ;; for ocaml-bin-prot, otherwise ignored |
71 | (string-append "OCAML_TOPLEVEL_PATH=" |
72 | (assoc-ref %build-inputs "findlib") |
73 | "/lib/ocaml/site-lib")) |
74 | #:phases (modify-phases %standard-phases (delete 'configure)))) |
75 | |
76 | (define-public ocaml-sexplib |
77 | (package |
78 | (name "ocaml-sexplib") |
79 | (version "113.33.03") |
80 | (source (janestreet-origin "sexplib" version |
81 | "1ffjmj8if9lyv965cgn2ld1xv7g52qsr8mqflbm515ck1i8l2ima")) |
82 | (build-system ocaml-build-system) |
83 | (native-inputs |
84 | `(("js-build-tools" ,ocaml-js-build-tools) |
85 | ("opam" ,opam))) |
86 | (arguments janestreet-arguments) |
87 | (home-page "https://github.com/janestreet/sexplib") |
88 | (synopsis "Library for serializing OCaml values to and from S-expressions") |
89 | (description "Sexplib contains functionality for parsing and pretty-printing |
90 | s-expressions.") |
91 | (license license:asl2.0))) |
92 | |
93 | (define-public ocaml-typerep |
94 | (package |
95 | (name "ocaml-typerep") |
96 | (version "113.33.03") |
97 | (source (janestreet-origin "typerep" version |
98 | "1b9v5bmi824a9d4sx0f40ixq0yfcbiqxafg4a1jx95xg9199zafy")) |
99 | (native-inputs |
100 | `(("js-build-tools" ,ocaml-js-build-tools) |
101 | ("opam" ,opam))) |
102 | (build-system ocaml-build-system) |
103 | (arguments janestreet-arguments) |
104 | (home-page "https://github.com/janestreet/typerep") |
105 | (synopsis "Typerep is a library for runtime types") |
106 | (description "Typerep is a library for runtime types.") |
107 | (license license:asl2.0))) |
108 | |
109 | (define-public ocaml-variantslib |
110 | (package |
111 | (name "ocaml-variantslib") |
112 | (version "113.33.03") |
113 | (source (janestreet-origin "variantslib" version |
114 | "05vp799vl38fvl98ga5miwbzh09cnnpapi6q6gdvwyqi6w7s919n")) |
115 | (native-inputs |
116 | `(("js-build-tools" ,ocaml-js-build-tools) |
117 | ("opam" ,opam))) |
118 | (build-system ocaml-build-system) |
119 | (arguments janestreet-arguments) |
120 | (home-page "https://github.com/janestreet/variantslib") |
121 | (synopsis "OCaml variants as first class values") |
122 | (description "OCaml variants as first class values.") |
123 | (license license:asl2.0))) |
124 | |
125 | (define-public ocaml-ppx-sexp-conv |
126 | (package |
127 | (name "ocaml-ppx-sexp-conv") |
128 | (version "113.33.03") |
129 | (source (janestreet-origin "ppx_sexp_conv" version |
130 | "1rbj6d5dl625gdxih34xcrdvikci6h8i2dl9x3wraa4qrgishiw7")) |
131 | (build-system ocaml-build-system) |
132 | (native-inputs |
133 | `(("js-build-tools" ,ocaml-js-build-tools) |
134 | ("opam" ,opam) |
135 | ("ppx-core" ,ocaml-ppx-core))) |
136 | (propagated-inputs |
137 | `(("sexplib" ,ocaml-sexplib) |
138 | ("ppx-core" ,ocaml-ppx-core) |
139 | ("ppx-type-conv" ,ocaml-ppx-type-conv) |
140 | ("ppx-tools" ,ocaml-ppx-tools))) |
141 | (arguments janestreet-arguments) |
142 | (home-page "https://github.com/janestreet/ppx_sexp_conv") |
143 | (synopsis "Generation of S-expression conversion functions from type |
144 | definitions") |
145 | (description "Generation of S-expression conversion functions from type |
146 | definitions.") |
147 | (license license:asl2.0))) |
148 | |
149 | (define-public ocaml-ppx-variants-conv |
150 | (package |
151 | (name "ocaml-ppx-variants-conv") |
152 | (version "113.33.03") |
153 | (source (janestreet-origin "ppx_variants_conv" version |
154 | "0vnn2l1118cj72413d3f7frlw6yc09l8f64jlzkzbgb9bxpalx34")) |
155 | (build-system ocaml-build-system) |
156 | (native-inputs |
157 | `(("js-build-tools" ,ocaml-js-build-tools) |
158 | ("opam" ,opam))) |
159 | (propagated-inputs |
160 | `(("ppx-core" ,ocaml-ppx-core) |
161 | ("variantslib" ,ocaml-variantslib) |
162 | ("ppx-tools" ,ocaml-ppx-tools) |
163 | ("ppx-type-conv" ,ocaml-ppx-type-conv))) |
164 | (arguments janestreet-arguments) |
165 | (home-page "https://github.com/janestreet/ppx_variants_conv") |
166 | (synopsis "Generation of accessor and iteration functions for ocaml variant |
167 | types") |
168 | (description "Generation of accessor and iteration functions for ocaml |
169 | variant types.") |
170 | (license license:asl2.0))) |
171 | |
172 | (define-public ocaml-ppx-here |
173 | (package |
174 | (name "ocaml-ppx-here") |
175 | (version "113.33.03") |
176 | (source (janestreet-origin "ppx_here" version |
177 | "1ay8lfxi0qg3ib2zkwh4h0vqk3gjmxaz572gzab0bbxyqn3z86v7")) |
178 | (build-system ocaml-build-system) |
179 | (native-inputs |
180 | `(("js-build-tools" ,ocaml-js-build-tools) |
181 | ("opam" ,opam))) |
182 | (propagated-inputs |
183 | `(("ppx-driver" ,ocaml-ppx-driver) |
184 | ("ppx-core" ,ocaml-ppx-core))) |
185 | (arguments janestreet-arguments) |
186 | (home-page "https://github.com/janestreet/ppx_here") |
187 | (synopsis "Expands [%here] into its location") |
188 | (description "Expands [%here] into its location.") |
189 | (license license:asl2.0))) |
190 | |
191 | (define-public ocaml-ppx-assert |
192 | (package |
193 | (name "ocaml-ppx-assert") |
194 | (version "113.33.03") |
195 | (source |
196 | (origin |
197 | (inherit (janestreet-origin "ppx_assert" version |
198 | "1k5kxmqkibp5fk25pgz81f3c1r4mgvb5byzf6bnmxd24y60wn46p")) |
199 | (modules '((guix build utils))) |
200 | (snippet |
201 | (let ((pattern (string-append "lib/" name))) |
202 | `(begin |
203 | ;; install.ml contains an invalid reference to the ppx file and |
204 | ;; propagates this error to the generated META file. It |
205 | ;; looks for it in the "lib" directory, but it is installed in |
206 | ;; "lib/ocaml/site-lib/package". This substitute does not change |
207 | ;; this file for non ppx packages. |
208 | (substitute* "install.ml" |
209 | ((,pattern) (string-append "lib/ocaml/site-lib/" ,name))) |
210 | ;; The standard Makefile would try to install janestreet modules |
211 | ;; in OCaml's directory in the store, which is read-only. |
212 | (substitute* "Makefile" |
213 | (("--prefix") |
214 | "--libdir $(LIBDIR) --prefix")) |
215 | (substitute* "install.ml" |
216 | (("lib/ppx_assert") |
217 | "lib/ocaml/site-lib/ppx_assert"))))))) |
218 | (build-system ocaml-build-system) |
219 | (native-inputs |
220 | `(("js-build-tools" ,ocaml-js-build-tools) |
221 | ("opam" ,opam))) |
222 | (propagated-inputs |
223 | `(("ppx-compare" ,ocaml-ppx-compare) |
224 | ("ppx-core" ,ocaml-ppx-core) |
225 | ("ppx-driver" ,ocaml-ppx-driver) |
226 | ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
227 | ("ppx-tools" ,ocaml-ppx-tools) |
228 | ("ppx-type-conv" ,ocaml-ppx-type-conv) |
229 | ("ppx-sexplib" ,ocaml-sexplib) |
230 | ("ppx-here" ,ocaml-ppx-here))) |
231 | (arguments janestreet-arguments) |
232 | (home-page "https://github.com/janestreet/ppx_assert") |
233 | (synopsis "Assert-like extension nodes that raise useful errors on failure") |
234 | (description "Assert-like extension nodes that raise useful errors on failure.") |
235 | (license license:asl2.0))) |
236 | |
237 | (define-public ocaml-ppx-enumerate |
238 | (package |
239 | (name "ocaml-ppx-enumerate") |
240 | (version "113.33.03") |
241 | (source (janestreet-origin "ppx_enumerate" version |
242 | "15g7yfv9wg2h9r6k6q1zrhygmsl4xrfn25mrb0i4czjjivzmxjh4")) |
243 | (build-system ocaml-build-system) |
244 | (native-inputs |
245 | `(("js-build-tools" ,ocaml-js-build-tools) |
246 | ("opam" ,opam))) |
247 | (propagated-inputs |
248 | `(("ppx-tools" ,ocaml-ppx-tools) |
249 | ("ppx-type-conv" ,ocaml-ppx-type-conv) |
250 | ("ppx-core" ,ocaml-ppx-core))) |
251 | (arguments janestreet-arguments) |
252 | (home-page "https://github.com/janestreet/ppx_enumerate") |
253 | (synopsis "Generate a list containing all values of a finite type") |
254 | (description "Ppx_enumerate is a ppx rewriter which generates a definition |
255 | for the list of all values of a type (for a type which only has finitely |
256 | many values).") |
257 | (license license:asl2.0))) |
258 | |
259 | (define-public ocaml-ppx-let |
260 | (package |
261 | (name "ocaml-ppx-let") |
262 | (version "113.33.03") |
263 | (source (janestreet-origin "ppx_let" version |
264 | "0gd6d3gdaqfwjcs7gaw1qxc30i584q6a86ndaj1bx1q63xqd6yx9")) |
265 | (build-system ocaml-build-system) |
266 | (native-inputs |
267 | `(("js-build-tools" ,ocaml-js-build-tools) |
268 | ("opam" ,opam))) |
269 | (propagated-inputs |
270 | `(("ppx-driver" ,ocaml-ppx-driver) |
271 | ("ppx-core" ,ocaml-ppx-core))) |
272 | (arguments janestreet-arguments) |
273 | (home-page "https://github.com/janestreet/ppx_let") |
274 | (synopsis "Monadic let-bindings") |
275 | (description "A ppx rewriter for monadic and applicative let bindings, |
276 | match expressions, and if expressions.") |
277 | (license license:asl2.0))) |
278 | |
279 | (define-public ocaml-ppx-typerep-conv |
280 | (package |
281 | (name "ocaml-ppx-typerep-conv") |
282 | (version "113.33.03") |
283 | (source (janestreet-origin "ppx_typerep_conv" version |
284 | "0g0xqm9s1b2jjvxb8yp69281q2s3bwz6sibn10fvgcdawpa0rmrg")) |
285 | (build-system ocaml-build-system) |
286 | (native-inputs |
287 | `(("js-build-tools" ,ocaml-js-build-tools) |
288 | ("opam" ,opam))) |
289 | (propagated-inputs |
290 | `(("ppx-tools" ,ocaml-ppx-tools) |
291 | ("ppx-type-conv" ,ocaml-ppx-type-conv) |
292 | ("ppx-core" ,ocaml-ppx-core) |
293 | ("typerep" ,ocaml-typerep))) |
294 | (arguments janestreet-arguments) |
295 | (home-page "https://github.com/janestreet/ppx_typerep_conv") |
296 | (synopsis "Generation of runtime types from type declarations") |
297 | (description "Automatic generation of runtime types from type definitions.") |
298 | (license license:asl2.0))) |
299 | |
300 | (define-public ocaml-ppx-sexp-value |
301 | (package |
302 | (name "ocaml-ppx-sexp-value") |
303 | (version "113.33.03") |
304 | (source (janestreet-origin "ppx_sexp_value" version |
305 | "0m3ag23mbqm0i2pv1dzilfks15ipa5q60mf57a0cd3p0pvarq10g")) |
306 | (build-system ocaml-build-system) |
307 | (native-inputs |
308 | `(("js-build-tools" ,ocaml-js-build-tools) |
309 | ("opam" ,opam))) |
310 | (propagated-inputs |
311 | `(("ppx-driver" ,ocaml-ppx-driver) |
312 | ("ppx-here" ,ocaml-ppx-here) |
313 | ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
314 | ("ppx-tools" ,ocaml-ppx-tools) |
315 | ("ppx-core" ,ocaml-ppx-core))) |
316 | (arguments janestreet-arguments) |
317 | (home-page "https://github.com/janestreet/ppx_sexp_value/") |
318 | (synopsis "Simplify building s-expressions from ocaml values") |
319 | (description "A ppx rewriter that simplifies building s-expressions from |
320 | ocaml values.") |
321 | (license license:asl2.0))) |
322 | |
323 | (define-public ocaml-ppx-pipebang |
324 | (package |
325 | (name "ocaml-ppx-pipebang") |
326 | (version "113.33.03") |
327 | (source (janestreet-origin "ppx_pipebang" version |
328 | "1965c7hymp26ncmjs0pfxi2s5jlj60z2c9b194lgcwxqiav56pcw")) |
329 | (build-system ocaml-build-system) |
330 | (native-inputs |
331 | `(("js-build-tools" ,ocaml-js-build-tools) |
332 | ("opam" ,opam))) |
333 | (propagated-inputs |
334 | `(("ppx-driver" ,ocaml-ppx-driver) |
335 | ("ppx-tools" ,ocaml-ppx-tools) |
336 | ("ppx-core" ,ocaml-ppx-core))) |
337 | (arguments janestreet-arguments) |
338 | (home-page "https://github.com/janestreet/ppx_pipebang/") |
339 | (synopsis "Inline reverse application operators `|>` and `|!`") |
340 | (description "A ppx rewriter that inlines reverse application operators |
341 | `|>` and `|!`.") |
342 | (license license:asl2.0))) |
343 | |
344 | (define-public ocaml-ppx-bin-prot |
345 | (package |
346 | (name "ocaml-ppx-bin-prot") |
347 | (version "113.33.03") |
348 | (source (janestreet-origin "ppx_bin_prot" version |
349 | "173kjv36giik11zgfvsbzwfbpr66dm2pcha9vf990jgzh8hqz39h")) |
350 | (build-system ocaml-build-system) |
351 | (native-inputs |
352 | `(("js-build-tools" ,ocaml-js-build-tools) |
353 | ("opam" ,opam))) |
354 | (propagated-inputs |
355 | `(("bin-prot" ,ocaml-bin-prot) |
356 | ("ppx-tools" ,ocaml-ppx-tools) |
357 | ("ppx-type-conv" ,ocaml-ppx-type-conv) |
358 | ("ppx-core" ,ocaml-ppx-core))) |
359 | (arguments janestreet-arguments) |
360 | (home-page "https://github.com/janestreet/ppx_bin_prot/") |
361 | (synopsis "Generation of bin_prot readers and writers from types") |
362 | (description "Generation of binary serialization and deserialization |
363 | functions from type definitions.") |
364 | (license license:asl2.0))) |
365 | |
366 | (define-public ocaml-ppx-fail |
367 | (package |
368 | (name "ocaml-ppx-fail") |
369 | (version "113.33.03") |
370 | (source (janestreet-origin "ppx_fail" version |
371 | "1dwgad0f05gqp5rnwf9dcasidpfi7q3mrpazsw3a2vijjblbhjgn")) |
372 | (build-system ocaml-build-system) |
373 | (native-inputs |
374 | `(("js-build-tools" ,ocaml-js-build-tools) |
375 | ("opam" ,opam))) |
376 | (propagated-inputs |
377 | `(("ppx-driver" ,ocaml-ppx-driver) |
378 | ("ppx-tools" ,ocaml-ppx-tools) |
379 | ("ppx-here" ,ocaml-ppx-here) |
380 | ("ppx-core" ,ocaml-ppx-core))) |
381 | (arguments janestreet-arguments) |
382 | (home-page "https://github.com/janestreet/ppx_fail/") |
383 | (synopsis "Add location to calls to failwiths") |
384 | (description "Syntax extension that makes [failwiths] always include a |
385 | position.") |
386 | (license license:asl2.0))) |
387 | |
388 | (define-public ocaml-ppx-custom-printf |
389 | (package |
390 | (name "ocaml-ppx-custom-printf") |
391 | (version "113.33.03") |
392 | (source (janestreet-origin "ppx_custom_printf" version |
393 | "11jlx0n87g2j1vyyp343dibx7lvvwig5j5q0nq0b80kbsq0k6yr8")) |
394 | (build-system ocaml-build-system) |
395 | (native-inputs |
396 | `(("js-build-tools" ,ocaml-js-build-tools) |
397 | ("opam" ,opam))) |
398 | (propagated-inputs |
399 | `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
400 | ("ppx-tools" ,ocaml-ppx-tools) |
401 | ("ppx-core" ,ocaml-ppx-core) |
402 | ("ppx-driver" ,ocaml-ppx-driver))) |
403 | (arguments janestreet-arguments) |
404 | (home-page "https://github.com/janestreet/ppx_custom_printf/") |
405 | (synopsis "Printf-style format-strings for user-defined string conversion") |
406 | (description "Extensions to printf-style format-strings for user-defined |
407 | string conversion.") |
408 | (license license:asl2.0))) |
409 | |
410 | (define-public ocaml-ppx-sexp-message |
411 | (package |
412 | (name "ocaml-ppx-sexp-message") |
413 | (version "113.33.03") |
414 | (source (janestreet-origin "ppx_sexp_message" version |
415 | "084w1l3gnyw4ri9vbn7bv9b2xkw1520qczfxpxdarfivdrz8xr68")) |
416 | (build-system ocaml-build-system) |
417 | (native-inputs |
418 | `(("js-build-tools" ,ocaml-js-build-tools) |
419 | ("opam" ,opam))) |
420 | (propagated-inputs |
421 | `(("ppx-driver" ,ocaml-ppx-driver) |
422 | ("ppx-here" ,ocaml-ppx-here) |
423 | ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
424 | ("ppx-tools" ,ocaml-ppx-tools) |
425 | ("ppx-core" ,ocaml-ppx-core))) |
426 | (arguments janestreet-arguments) |
427 | (home-page "https://github.com/janestreet/ppx_sexp_message/") |
428 | (synopsis "A ppx rewriter for easy construction of s-expressions") |
429 | (description "The aim of ppx_sexp_message is to ease the creation of |
430 | s-expressions in OCaml. This is mainly motivated by writing error and debugging |
431 | messages, where one needs to construct a s-expression based on various element |
432 | of the context such as function arguments.") |
433 | (license license:asl2.0))) |
434 | |
435 | (define-public ocaml-ppx-fields-conv |
436 | (package |
437 | (name "ocaml-ppx-fields-conv") |
438 | (version "113.33.03") |
439 | (source (janestreet-origin "ppx_fields_conv" version |
440 | "1vzbdz27g5qhhfs7wx6rjf979q4xyssxqbmp6sc1sxknbghslbdv")) |
441 | (build-system ocaml-build-system) |
442 | (native-inputs |
443 | `(("js-build-tools" ,ocaml-js-build-tools) |
444 | ("opam" ,opam) |
445 | ("ppx-core" ,ocaml-ppx-core))) |
446 | (propagated-inputs |
447 | `(("fieldslib" ,ocaml-fieldslib) |
448 | ("ppx-tools" ,ocaml-ppx-tools) |
449 | ("ppx-core" ,ocaml-ppx-core) |
450 | ("ppx-type-conv" ,ocaml-ppx-type-conv))) |
451 | (arguments janestreet-arguments) |
452 | (home-page "https://github.com/janestreet/ppx_fields_conv/") |
453 | (synopsis "Generation of accessor and iteration functions for ocaml records") |
454 | (description "Ppx_fields_conv is a ppx rewriter that can be used to define |
455 | first class values representing record fields, and additional routines, to get |
456 | and set record fields, iterate and fold over all fields of a record and create |
457 | new record values.") |
458 | (license license:asl2.0))) |
459 | |
460 | (define-public ocaml-re |
461 | (package |
462 | (name "ocaml-re") |
463 | (version "1.7.1") |
464 | (source (origin |
465 | (method url-fetch) |
466 | (uri (string-append "https://github.com/ocaml/ocaml-re//archive/" |
467 | version ".tar.gz")) |
468 | (sha256 |
469 | (base32 |
470 | "1s3rcr76cgm4p1xmaazc58arkg2lz3zfcp1icm00m6s5ccnkh67b")))) |
471 | (build-system ocaml-build-system) |
472 | (native-inputs `(("ounit" ,ocaml-ounit))) |
473 | (home-page "https://github.com/ocaml/ocaml-re/") |
474 | (synopsis "Regular expression library for OCaml") |
475 | (description "Pure OCaml regular expressions with: |
476 | enumerate |
477 | @item Perl-style regular expressions (module Re_perl) |
478 | @item Posix extended regular expressions (module Re_posix) |
479 | @item Emacs-style regular expressions (module Re_emacs) |
480 | @item Shell-style file globbing (module Re_glob) |
481 | @item Compatibility layer for OCaml's built-in Str module (module Re_str) |
482 | @end enumerate") |
483 | (license license:expat))) |
484 | |
485 | (define-public ocaml-ppx-expect |
486 | (package |
487 | (name "ocaml-ppx-expect") |
488 | (version "113.33.03") |
489 | (source (janestreet-origin "ppx_expect" version |
490 | "03sbs4s5i8l9syr45v25f5hzy7msd2b47k2a9wsq9m43d4imgkrc")) |
491 | (build-system ocaml-build-system) |
492 | (native-inputs |
493 | `(("js-build-tools" ,ocaml-js-build-tools) |
494 | ("opam" ,opam))) |
495 | (propagated-inputs |
496 | `(("fieldslib" ,ocaml-fieldslib) |
497 | ("ppx-tools" ,ocaml-ppx-tools) |
498 | ("ppx-assert" ,ocaml-ppx-assert) |
499 | ("ppx-compare" ,ocaml-ppx-compare) |
500 | ("ppx-core" ,ocaml-ppx-core) |
501 | ("ppx-custom-printf" ,ocaml-ppx-custom-printf) |
502 | ("ppx-driver" ,ocaml-ppx-driver) |
503 | ("ppx-fields-conv" ,ocaml-ppx-fields-conv) |
504 | ("ppx-inline-test" ,ocaml-ppx-inline-test) |
505 | ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
506 | ("ppx-variants-conv" ,ocaml-ppx-variants-conv) |
507 | ("re" ,ocaml-re) |
508 | ("sexplib" ,ocaml-sexplib) |
509 | ("variantslib" ,ocaml-variantslib))) |
510 | (arguments janestreet-arguments) |
511 | (home-page "https://github.com/janestreet/ppx_expect/") |
512 | (synopsis "Cram like framework for OCaml") |
513 | (description "Expect-test is a framework for writing tests in OCaml, similar |
514 | to Cram. Expect-tests mimic the existing inline tests framework with the |
515 | let%expect_test construct. The body of an expect-test can contain |
516 | output-generating code, interleaved with %expect extension expressions to denote |
517 | the expected output.") |
518 | (license license:asl2.0))) |
519 | |
520 | (define-public ocaml-ppx-jane |
521 | (package |
522 | (name "ocaml-ppx-jane") |
523 | (version "113.33.03") |
524 | (source (janestreet-origin "ppx_jane" version |
525 | "0bjxkhmzgm6x9dcvjwybbccn34khbvyyjimcbaja30fp6qcqk5yl")) |
526 | (build-system ocaml-build-system) |
527 | (native-inputs |
528 | `(("js-build-tools" ,ocaml-js-build-tools) |
529 | ("opam" ,opam))) |
530 | (propagated-inputs |
531 | `(("ppx-assert" ,ocaml-ppx-assert) |
532 | ("ppx-bench" ,ocaml-ppx-bench) |
533 | ("ppx-bin-prot" ,ocaml-ppx-bin-prot) |
534 | ("ppx-compare" ,ocaml-ppx-compare) |
535 | ("ppx-custom-printf" ,ocaml-ppx-custom-printf) |
536 | ("ppx-deriving" ,ocaml-ppx-deriving) |
537 | ("ppx-enumerate" ,ocaml-ppx-enumerate) |
538 | ("ppx-expect" ,ocaml-ppx-expect) |
539 | ("ppx-fail" ,ocaml-ppx-fail) |
540 | ("ppx-fields-conv" ,ocaml-ppx-fields-conv) |
541 | ("ppx-here" ,ocaml-ppx-here) |
542 | ("ppx-inline-test" ,ocaml-ppx-inline-test) |
543 | ("ppx-let" ,ocaml-ppx-let) |
544 | ("ppx-pipebang" ,ocaml-ppx-pipebang) |
545 | ("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
546 | ("ppx-sexp-message" ,ocaml-ppx-sexp-message) |
547 | ("ppx-sexp-value" ,ocaml-ppx-sexp-value) |
548 | ("ppx-typerep-conv" ,ocaml-ppx-typerep-conv) |
549 | ("ppx-variants-conv" ,ocaml-ppx-variants-conv))) |
550 | (arguments janestreet-arguments) |
551 | (home-page "https://github.com/janestreet/ppx_jane/") |
552 | (synopsis "Standard Jane Street ppx rewriters") |
553 | (description "Ppx_jane is a ppx_driver including all standard ppx rewriters.") |
554 | (license license:asl2.0))) |
555 | |
556 | (define-public ocaml-core-kernel |
557 | (package |
558 | (name "ocaml-core-kernel") |
559 | (version "113.33.03") |
560 | (source (janestreet-origin "core_kernel" version |
561 | "0fl23jrwivixawhxinbwaw9cabqnzn7fini7dxpxjjvkxdc8ip5y")) |
562 | (native-inputs |
563 | `(("js-build-tools" ,ocaml-js-build-tools) |
564 | ("ppx-jane" ,ocaml-ppx-jane) |
565 | ("opam" ,opam))) |
566 | (propagated-inputs |
567 | `(("bin_prot" ,ocaml-bin-prot) |
568 | ("ppx-assert" ,ocaml-ppx-assert) |
569 | ("ppx-bench" ,ocaml-ppx-bench) |
570 | ("ppx-driver" ,ocaml-ppx-driver) |
571 | ("ppx-expect" ,ocaml-ppx-expect) |
572 | ("ppx-inline-test" ,ocaml-ppx-inline-test) |
573 | ("typerep" ,ocaml-typerep) |
574 | ("sexplib" ,ocaml-sexplib) |
575 | ("variantslib" ,ocaml-variantslib) |
576 | ("result" ,ocaml-result) |
577 | ("fieldslib" ,ocaml-fieldslib))) |
578 | (build-system ocaml-build-system) |
579 | (arguments janestreet-arguments) |
580 | (home-page "https://github.com/janestreet/core_kernel/") |
581 | (synopsis "Portable standard library for OCaml") |
582 | (description "Core is an alternative to the OCaml standard library. |
583 | |
584 | Core_kernel is the system-independent part of Core. It is aimed for cases when |
585 | the full Core is not available, such as in Javascript.") |
586 | (license license:asl2.0))) |
587 | |
588 | (define-public ocaml-async-kernel |
589 | (package |
590 | (name "ocaml-async-kernel") |
591 | (version "113.33.03") |
592 | (source (janestreet-origin "async_kernel" version |
593 | "04bjsaa23j831r09r38x6xx9nhryvp0z5ihickvhxqa4fb2snyvd")) |
594 | (native-inputs |
595 | `(("oasis" ,ocaml-oasis) |
596 | ("js-build-tools" ,ocaml-js-build-tools) |
597 | ("ppx-jane" ,ocaml-ppx-jane) |
598 | ("opam" ,opam))) |
599 | (propagated-inputs |
600 | `(("core-kernel" ,ocaml-core-kernel))) |
601 | (build-system ocaml-build-system) |
602 | (arguments janestreet-arguments) |
603 | (home-page "https://github.com/janestreet/async_kernel/") |
604 | (synopsis "Monadic concurrency library") |
605 | (description "Monadic concurrency library.") |
606 | (license license:asl2.0))) |
607 | |
608 | (define-public ocaml-async-rpc-kernel |
609 | (package |
610 | (name "ocaml-async-rpc-kernel") |
611 | (version "113.33.03") |
612 | (source (janestreet-origin "async_rpc_kernel" version |
613 | "0y97h9pkb00v7jpf87m8cbb0ffkclj9g26ph6sq97q8dpisnkjwh")) |
614 | (native-inputs |
615 | `(("oasis" ,ocaml-oasis) |
616 | ("js-build-tools" ,ocaml-js-build-tools) |
617 | ("ppx-jane" ,ocaml-ppx-jane) |
618 | ("opam" ,opam))) |
619 | (propagated-inputs |
620 | `(("async-kernel" ,ocaml-async-kernel))) |
621 | (build-system ocaml-build-system) |
622 | (arguments janestreet-arguments) |
623 | (home-page "https://github.com/janestreet/async_rpc_kernel/") |
624 | (synopsis "Platform-independent core of Async RPC library") |
625 | (description "Platform-independent core of Async RPC library.") |
626 | (license license:asl2.0))) |
627 | |
628 | (define-public ocaml-core |
629 | (package |
630 | (name "ocaml-core") |
631 | (version "113.33.03") |
632 | (source (janestreet-origin "core" version |
633 | "1znll157qg56g9d3247fjibv1hxv3r9wxgr4nhy19j2vzdh6a268")) |
634 | (native-inputs |
635 | `(("oasis" ,ocaml-oasis) |
636 | ("js-build-tools" ,ocaml-js-build-tools) |
637 | ("ppx-jane" ,ocaml-ppx-jane) |
638 | ("opam" ,opam))) |
639 | (propagated-inputs |
640 | `(("core-kernel" ,ocaml-core-kernel))) |
641 | (build-system ocaml-build-system) |
642 | (arguments janestreet-arguments) |
643 | (home-page "https://github.com/janestreet/core/") |
644 | (synopsis "Alternative to OCaml's standard library") |
645 | (description "The Core suite of libraries is an alternative to OCaml's |
646 | standard library that was developed by Jane Street.") |
647 | (license license:asl2.0))) |
648 | |
649 | (define-public ocaml-async-unix |
650 | (package |
651 | (name "ocaml-async-unix") |
652 | (version "113.33.03") |
653 | (source (janestreet-origin "async_unix" version |
654 | "1fwl0lfrizllcfjk8hk8m7lsz9ha2jg6qgk4gssfyz377qvpcq4h")) |
655 | (native-inputs |
656 | `(("oasis" ,ocaml-oasis) |
657 | ("js-build-tools" ,ocaml-js-build-tools) |
658 | ("ppx-jane" ,ocaml-ppx-jane) |
659 | ("opam" ,opam))) |
660 | (propagated-inputs |
661 | `(("async-kernel" ,ocaml-async-kernel) |
662 | ("core" ,ocaml-core))) |
663 | (build-system ocaml-build-system) |
664 | (arguments janestreet-arguments) |
665 | (home-page "https://github.com/janestreet/async_unix") |
666 | (synopsis "Monadic concurrency library") |
667 | (description "Monadic concurrency library.") |
668 | (license license:asl2.0))) |
669 | |
670 | (define-public ocaml-async-extra |
671 | (package |
672 | (name "ocaml-async-extra") |
673 | (version "113.33.03") |
674 | (source (janestreet-origin "async_extra" version |
675 | "1si8jgiq5xh5sl9f2b7f9p17p7zx5h1pg557x2cxywi2x7pxqg4f")) |
676 | (native-inputs |
677 | `(("oasis" ,ocaml-oasis) |
678 | ("js-build-tools" ,ocaml-js-build-tools) |
679 | ("ppx-jane" ,ocaml-ppx-jane) |
680 | ("opam" ,opam))) |
681 | (propagated-inputs |
682 | `(("async-rpc-kernel" ,ocaml-async-rpc-kernel) |
683 | ("async-unix" ,ocaml-async-unix) |
684 | ("core" ,ocaml-core))) |
685 | (build-system ocaml-build-system) |
686 | (arguments janestreet-arguments) |
687 | (home-page "https://github.com/janestreet/async_extra") |
688 | (synopsis "Monadic concurrency library") |
689 | (description "Monadic concurrency library.") |
690 | (license license:asl2.0))) |
691 | |
692 | (define-public ocaml-async |
693 | (package |
694 | (name "ocaml-async") |
695 | (version "113.33.03") |
696 | (source (janestreet-origin "async" version |
697 | "0210fyhcs12kpmmd26015bgivkfd2wqkyn3c5wd7688d0f872y25")) |
698 | (native-inputs |
699 | `(("oasis" ,ocaml-oasis) |
700 | ("js-build-tools" ,ocaml-js-build-tools) |
701 | ("ppx-jane" ,ocaml-ppx-jane) |
702 | ("opam" ,opam))) |
703 | (propagated-inputs |
704 | `(("async-extra" ,ocaml-async-extra))) |
705 | (build-system ocaml-build-system) |
706 | (arguments janestreet-arguments) |
707 | (home-page "https://github.com/janestreet/async") |
708 | (synopsis "Monadic concurrency library") |
709 | (description "Monadic concurrency library.") |
710 | (license license:asl2.0))) |
711 | |
712 | (define-public ocaml-ocplib-endian |
713 | (package |
714 | (name "ocaml-ocplib-endian") |
715 | (version "1.0") |
716 | (source (origin |
717 | (method url-fetch) |
718 | (uri (string-append "https://github.com/OCamlPro/ocplib-endian/" |
719 | "archive/" version ".tar.gz")) |
720 | (sha256 |
721 | (base32 |
722 | "0hwj09rnzjs0m0kazz5h2mgs6p95j0zlga8cda5srnzqmzhniwkn")) |
723 | (file-name (string-append name "-" version ".tar.gz")))) |
724 | (build-system ocaml-build-system) |
725 | (native-inputs `(("cppo" ,ocaml-cppo))) |
726 | (home-page "https://github.com/OCamlPro/ocplib-endian") |
727 | (synopsis "Optimised functions to read and write int16/32/64 from strings |
728 | and bigarrays") |
729 | (description "Optimised functions to read and write int16/32/64 from strings |
730 | and bigarrays, based on new primitives added in version 4.01. It works on |
731 | strings, bytes and bigstring (Bigarrys of chars), and provides submodules for |
732 | big- and little-endian, with their unsafe counter-parts.") |
733 | (license license:lgpl2.1))) |
734 | |
735 | (define-public ocaml-cstruct |
736 | (package |
737 | (name "ocaml-cstruct") |
738 | (version "2.3.1") |
739 | (source (origin |
740 | (method url-fetch) |
741 | (uri (string-append "https://github.com/mirage/ocaml-cstruct/" |
742 | "archive/v" version ".tar.gz")) |
743 | (sha256 |
744 | (base32 |
745 | "15qpdc8421shq4pprdas9jznpva45229wkfqbwcxw9khaiiz7949")) |
746 | (file-name (string-append name "-" version ".tar.gz")))) |
747 | (build-system ocaml-build-system) |
748 | (arguments |
749 | `(#:configure-flags |
750 | (list "--enable-lwt" "--enable-async") |
751 | #:phases |
752 | (modify-phases %standard-phases |
753 | (add-after 'install 'link-stubs |
754 | (lambda* (#:key outputs #:allow-other-keys) |
755 | (let* ((out (assoc-ref outputs "out")) |
756 | (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) |
757 | (lib (string-append out "/lib/ocaml/site-lib/cstruct"))) |
758 | (mkdir-p stubs) |
759 | (symlink (string-append lib "/dllcstruct_stubs.so") |
760 | (string-append stubs "/dllcstruct_stubs.so")))))))) |
761 | (native-inputs |
762 | `(("ounit" ,ocaml-ounit) |
763 | ("ppx-tools" ,ocaml-ppx-tools) |
764 | ("camlp4" ,camlp4))) |
765 | (propagated-inputs |
766 | `(("ocplib-endian" ,ocaml-ocplib-endian) |
767 | ("lwt" ,ocaml-lwt) |
768 | ("async" ,ocaml-async) |
769 | ("sexplib" ,ocaml-sexplib))) |
770 | (home-page "https://github.com/mirage/ocaml-cstruct") |
771 | (synopsis "Access C structures via a camlp4 extension") |
772 | (description "Cstruct is a library and syntax extension to make it easier |
773 | to access C-like structures directly from OCaml. It supports both reading and |
774 | writing to these structures, and they are accessed via the Bigarray module.") |
775 | (license license:isc))) |
776 | |
777 | (define-public ocaml-hex |
778 | (package |
779 | (name "ocaml-hex") |
780 | (version "1.0.0") |
781 | (source (origin |
782 | (method url-fetch) |
783 | (uri (string-append "https://github.com/mirage/ocaml-hex/" |
784 | "archive/" version ".tar.gz")) |
785 | (sha256 |
786 | (base32 |
787 | "0s63g0b8gfv2xm6fv6xg7bva8h76b5pcjb0zw3f8cygs0lq9072v")) |
788 | (file-name (string-append name "-" version ".tar.gz")))) |
789 | (build-system ocaml-build-system) |
790 | (propagated-inputs `(("cstruct" ,ocaml-cstruct))) |
791 | (home-page "https://github.com/mirage/ocaml-hex/") |
792 | (synopsis "Minimal library providing hexadecimal converters") |
793 | (description "Minimal library providing hexadecimal converters.") |
794 | (license license:isc))) |
795 | |
796 | (define-public ocaml-ezjsonm |
797 | (package |
798 | (name "ocaml-ezjsonm") |
799 | (version "0.4.3") |
800 | (source (origin |
801 | (method url-fetch) |
802 | (uri (string-append "https://github.com/mirage/ezjsonm/archive/" |
803 | version ".tar.gz")) |
804 | (sha256 |
805 | (base32 |
806 | "1kag0z2xlk4rw73a240dmkxh9rj6psxxcxkm7d7z0rrj6hzjajgq")) |
807 | (file-name (string-append name "-" version ".tar.gz")))) |
808 | (build-system ocaml-build-system) |
809 | (native-inputs |
810 | `(("alcotest" ,ocaml-alcotest))) |
811 | (propagated-inputs |
812 | `(("hex" ,ocaml-hex) |
813 | ("jsonm" ,ocaml-jsonm) |
814 | ("lwt" ,ocaml-lwt) |
815 | ("sexplib" ,ocaml-sexplib))) |
816 | (arguments |
817 | `(#:configure-flags (list "--enable-lwt") |
818 | ;; dllcstruct_stubs.so: cannot open shared object file: No such file |
819 | ;; or directory. May be fixed? |
820 | #:tests? #f)) |
821 | (home-page "https://github.com/mirage/ezjsonm/") |
822 | (synopsis "An easy interface on top of the Jsonm library") |
823 | (description "This version provides more convenient (but far less flexible) |
824 | input and output functions that go to and from [string] values. This avoids |
825 | the need to write signal code, which is useful for quick scripts that |
826 | manipulate JSON.") |
827 | (license license:isc))) |
828 | |
829 | (define-public ocaml-uri |
830 | (package |
831 | (name "ocaml-uri") |
832 | (version "1.9.2") |
833 | (source (origin |
834 | (method url-fetch) |
835 | (uri (string-append "https://github.com/mirage/ocaml-uri/archive/v" |
836 | version ".tar.gz")) |
837 | (sha256 |
838 | (base32 |
839 | "02bzrag79prx261rxf9mlak749pwf4flpfl8p012x1xznv9m0clc")) |
840 | (file-name (string-append name "-" version ".tar.gz")))) |
841 | (build-system ocaml-build-system) |
842 | (native-inputs |
843 | `(("ounit" ,ocaml-ounit))) |
844 | (propagated-inputs |
845 | `(("ppx-sexp-conv" ,ocaml-ppx-sexp-conv) |
846 | ("re" ,ocaml-re) |
847 | ("ppx-deriving" ,ocaml-ppx-deriving) |
848 | ("sexplib" ,ocaml-sexplib) |
849 | ("stringext" ,ocaml-stringext))) |
850 | (home-page "https://github.com/mirage/ocaml-uri") |
851 | (synopsis "RFC3986 URI/URL parsing library") |
852 | (description "RFC3986 URI/URL parsing library.") |
853 | (license license:isc))) |
854 | |
855 | (define-public ocaml-easy-format |
856 | (package |
857 | (name "ocaml-easy-format") |
858 | (version "1.2.0") |
859 | (source (origin |
860 | (method url-fetch) |
861 | (uri (string-append "https://github.com/mjambon/easy-format/" |
862 | "archive/v" version ".tar.gz")) |
863 | (sha256 |
864 | (base32 |
865 | "1zcz682y9figa84k7lgdjcab5qbzk3yy14ygfqp2dhhrvjygm252")) |
866 | (file-name (string-append name "-" version ".tar.gz")))) |
867 | (build-system ocaml-build-system) |
868 | (arguments |
869 | `(#:phases |
870 | (modify-phases %standard-phases |
871 | (delete 'configure)) |
872 | #:tests? #f)) |
873 | (home-page "https://github.com/mjambon/easy-format") |
874 | (synopsis "High-level and functional interface to the Format module of the |
875 | OCaml standard library") |
876 | (description "High-level and functional interface to the Format module of |
877 | the OCaml standard library.") |
878 | (license license:bsd-3))) |
879 | |
880 | (define-public ocaml-optcomp |
881 | (package |
882 | (name "ocaml-optcomp") |
883 | (version "1.6") |
884 | (source (origin |
885 | (method url-fetch) |
886 | (uri (string-append "https://github.com/diml/optcomp/archive/" |
887 | version ".tar.gz")) |
888 | (sha256 |
889 | (base32 |
890 | "0hhhb2gisah1h22zlg5iszbgqxdd7x85cwd57bd4mfkx9l7dh8jh")) |
891 | (file-name (string-append name "-" version ".tar.gz")))) |
892 | (build-system ocaml-build-system) |
893 | (arguments |
894 | `(#:use-make? #t |
895 | #:make-flags |
896 | (list (string-append "BUILDFLAGS=\"-cflags -I," |
897 | (assoc-ref %build-inputs "camlp4") |
898 | "/lib/ocaml/site-lib/camlp4/Camlp4Parsers\"")))) |
899 | (native-inputs `(("camlp4" ,camlp4))) |
900 | (propagated-inputs `(("camlp4" ,camlp4))) |
901 | (home-page "https://github.com/diml/optcomp") |
902 | (synopsis "Optional compilation with cpp-like directives") |
903 | (description "Optional compilation with cpp-like directives.") |
904 | (license license:bsd-3))) |
905 | |
906 | (define-public ocaml-piqilib |
907 | (package |
908 | (name "ocaml-piqilib") |
909 | (version "0.6.13") |
910 | (source (origin |
911 | (method url-fetch) |
912 | (uri (string-append "https://github.com/alavrik/piqi/archive/v" |
913 | version ".tar.gz")) |
914 | (sha256 |
915 | (base32 |
916 | "1whqr2bb3gds2zmrzqnv8vqka9928w4lx6mi6g244kmbwb2h8d8l")) |
917 | (file-name (string-append name "-" version ".tar.gz")) |
918 | (patches (search-patches "ocaml-piqilib-fix-makefile.patch")))) |
919 | (build-system ocaml-build-system) |
920 | (arguments |
921 | `(#:phases |
922 | (modify-phases %standard-phases |
923 | (replace 'configure |
924 | (lambda* (#:key outputs #:allow-other-keys) |
925 | (let ((out (assoc-ref outputs "out"))) |
926 | (substitute* "make/OCamlMakefile" |
927 | (("/bin/sh") (which "bash"))) |
928 | (zero? (system* "./configure" "--prefix" out "--ocaml-libdir" |
929 | (string-append out "/lib/ocaml/site-lib")))))) |
930 | (add-after 'build 'build-ocaml |
931 | (lambda* (#:key outputs #:allow-other-keys) |
932 | (zero? (system* "make" "ocaml")))) |
933 | (add-after 'install 'install-ocaml |
934 | (lambda* (#:key outputs #:allow-other-keys) |
935 | (zero? (system* "make" "ocaml-install")))) |
936 | (add-after 'install-ocaml 'link-stubs |
937 | (lambda* (#:key outputs #:allow-other-keys) |
938 | (let* ((out (assoc-ref outputs "out")) |
939 | (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) |
940 | (lib (string-append out "/lib/ocaml/site-lib/piqilib"))) |
941 | (mkdir-p stubs) |
942 | (symlink (string-append lib "/dllpiqilib_stubs.so") |
943 | (string-append stubs "/dllpiqilib_stubs.so")))))))) |
944 | (native-inputs |
945 | `(("which" ,which) |
946 | ("camlp4" ,camlp4))) |
947 | (propagated-inputs |
948 | `(("xmlm" ,ocaml-xmlm) |
949 | ("ulex" ,ocaml-ulex) |
950 | ("optcomp" ,ocaml-optcomp) |
951 | ("easy-format" ,ocaml-easy-format) |
952 | ("base64" ,ocaml-base64))) |
953 | (home-page "http://piqi.org") |
954 | (synopsis "Data serialization and conversion library") |
955 | (description "Common library used by piqi command-line tool and piqi-ocaml.") |
956 | (license license:asl2.0))) |
957 | |
958 | (define-public ocaml-uuidm |
959 | (package |
960 | (name "ocaml-uuidm") |
961 | (version "0.9.6") |
962 | (source (origin |
963 | (method url-fetch) |
964 | (uri (string-append "http://erratique.ch/software/uuidm/" |
965 | "releases/uuidm-" version ".tbz")) |
966 | (sha256 |
967 | (base32 |
968 | "0hz4fdx0x16k0pw9995vkz5d1hmzz6b16wck9li399rcbfnv5jlc")))) |
969 | (build-system ocaml-build-system) |
970 | (arguments |
971 | `(#:tests? #f |
972 | #:build-flags |
973 | (list "build" "--with-cmdliner" "true") |
974 | #:phases |
975 | (modify-phases %standard-phases |
976 | (delete 'configure)))) |
977 | (native-inputs |
978 | `(("opam" ,opam))) |
979 | (propagated-inputs |
980 | `(("cmdliner" ,ocaml-cmdliner) |
981 | ("topkg" ,ocaml-topkg))) |
982 | (home-page "http://erratique.ch/software/uuidm") |
983 | (synopsis "Universally unique identifiers (UUIDs) for OCaml") |
984 | (description "Uuidm is an OCaml module implementing 128 bits universally |
985 | unique identifiers version 3, 5 (named based with MD5, SHA-1 hashing) and 4 |
986 | (random based) according to RFC 4122.") |
987 | (license license:isc))) |
988 | |
989 | (define-public ocamlgraph |
990 | (package |
991 | (name "ocamlgraph") |
992 | (version "1.8.7") |
993 | (source (origin |
994 | (method url-fetch) |
995 | (uri (string-append "http://ocamlgraph.lri.fr/download/" |
996 | "ocamlgraph-" version ".tar.gz")) |
997 | (sha256 |
998 | (base32 |
999 | "1845r537swjil2fcj7lgbibc2zybfwqqasrd2s7bncajs83cl1nz")) |
1000 | (patches (search-patches "ocamlgraph-honor-source-date-epoch.patch")))) |
1001 | (build-system ocaml-build-system) |
1002 | (arguments |
1003 | `(#:install-target "install-findlib" |
1004 | #:phases |
1005 | (modify-phases %standard-phases |
1006 | (add-before 'configure 'fix-/bin/sh |
1007 | (lambda* (#:key inputs #:allow-other-keys) |
1008 | (substitute* "configure" |
1009 | (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash") |
1010 | "/bin/sh")))))))) |
1011 | (inputs `(("lablgtk" ,lablgtk))) |
1012 | (home-page "http://ocamlgraph.lri.fr/") |
1013 | (synopsis "A generic graph library for OCaml") |
1014 | (description "A generic graph library for OCaml.") |
1015 | (license license:lgpl2.1))) |
1016 | |
1017 | (define-public ocaml-piqi |
1018 | (package |
1019 | (name "ocaml-piqi") |
1020 | (version "0.7.5") |
1021 | (source (origin |
1022 | (method url-fetch) |
1023 | (uri (string-append "https://github.com/alavrik/piqi-ocaml/" |
1024 | "archive/v" version ".tar.gz")) |
1025 | (sha256 |
1026 | (base32 |
1027 | "0ngz6y8i98i5v2ma8nk6mc83pdsmf2z0ks7m3xi6clfg3zqbddrv")))) |
1028 | (build-system ocaml-build-system) |
1029 | (arguments |
1030 | `(#:make-flags |
1031 | (list (string-append "DESTDIR=" (assoc-ref %outputs "out"))) |
1032 | #:phases |
1033 | (modify-phases %standard-phases |
1034 | (delete 'configure) |
1035 | (add-before 'build 'patch-/bin/sh |
1036 | (lambda _ |
1037 | (substitute* "make/OCamlMakefile" |
1038 | (("/bin/sh") (which "sh"))) |
1039 | #t))))) |
1040 | (native-inputs |
1041 | `(("which" ,which) |
1042 | ("protobuf" ,protobuf))) ; for tests |
1043 | (propagated-inputs |
1044 | `(("piqilib" ,ocaml-piqilib))) |
1045 | (home-page "https://github.com/alavrik/piqi-ocaml") |
1046 | (synopsis "Protocol serialization system for OCaml") |
1047 | (description "Piqi is a multi-format data serialization system for OCaml. |
1048 | It provides a uniform interface for serializing OCaml data structures to JSON, |
1049 | XML and Protocol Buffers formats.") |
1050 | (license license:asl2.0))) |
1051 | |
1052 | (define-public bap |
1053 | (package |
1054 | (name "bap") |
1055 | (version "1.1.0") |
1056 | (home-page "https://github.com/BinaryAnalysisPlatform/bap") |
1057 | (source (origin |
1058 | (method url-fetch) |
1059 | (uri (string-append home-page "/archive/v" version ".tar.gz")) |
1060 | (sha256 |
1061 | (base32 |
1062 | "1ms95m4j1qrmy7zqmsn2izh7gq68lnmssl7chyhk977kd3sxj66m")) |
1063 | (file-name (string-append name "-" version ".tar.gz")))) |
1064 | (build-system ocaml-build-system) |
1065 | (native-inputs |
1066 | `(("oasis" ,ocaml-oasis) |
1067 | ("clang" ,clang) |
1068 | ("ounit" ,ocaml-ounit))) |
1069 | (propagated-inputs |
1070 | `(("core-kernel" ,ocaml-core-kernel) |
1071 | ("ppx-driver" ,ocaml-ppx-driver) |
1072 | ("uri" ,ocaml-uri) |
1073 | ("llvm" ,llvm) |
1074 | ("gmp" ,gmp) |
1075 | ("clang-runtime" ,clang-runtime) |
1076 | ("fileutils" ,ocaml-fileutils) |
1077 | ("cmdliner" ,ocaml-cmdliner) |
1078 | ("zarith" ,ocaml-zarith) |
1079 | ("uuidm" ,ocaml-uuidm) |
1080 | ("camlzip" ,camlzip) |
1081 | ("frontc" ,ocaml-frontc) |
1082 | ("ezjsonm" ,ocaml-ezjsonm) |
1083 | ("ocurl" ,ocaml-ocurl) |
1084 | ("piqi" ,ocaml-piqi) |
1085 | ("ocamlgraph" ,ocamlgraph) |
1086 | ("bitstring" ,ocaml-bitstring) |
1087 | ("ppx-jane" ,ocaml-ppx-jane) |
1088 | ("re" ,ocaml-re))) |
1089 | (inputs `(("llvm" ,llvm))) |
1090 | (arguments |
1091 | `(#:use-make? #t |
1092 | #:phases |
1093 | (modify-phases %standard-phases |
1094 | (replace 'configure |
1095 | (lambda* (#:key outputs #:allow-other-keys) |
1096 | (zero? (system* "./configure" "--prefix" |
1097 | (assoc-ref outputs "out") |
1098 | "--libdir" |
1099 | (string-append |
1100 | (assoc-ref outputs "out") |
1101 | "/lib/ocaml/site-lib") |
1102 | "--with-llvm-version=3.8" |
1103 | "--with-llvm-config=llvm-config" |
1104 | "--enable-everything")))) |
1105 | (add-before 'install 'fix-ocamlpath |
1106 | (lambda* (#:key outputs #:allow-other-keys) |
1107 | (setenv "OCAMLPATH" |
1108 | (string-append |
1109 | (getenv "OCAMLPATH") ":" |
1110 | (assoc-ref outputs "out") |
1111 | "/lib/ocaml/site-lib")) |
1112 | (setenv "PATH" |
1113 | (string-append (getenv "PATH") ":" |
1114 | (assoc-ref outputs "out") "/bin")))) |
1115 | (add-after 'install 'link-stubs |
1116 | (lambda* (#:key outputs #:allow-other-keys) |
1117 | (let* ((out (assoc-ref outputs "out")) |
1118 | (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) |
1119 | (lib (string-append out "/lib/ocaml/site-lib/bap-plugin-llvm"))) |
1120 | (mkdir-p stubs) |
1121 | (symlink (string-append lib "/dllllvm_plugin_stubs.so") |
1122 | (string-append stubs "/dllllvm_plugin_stubs.so")))))))) |
1123 | (synopsis "Binary Analysis Platform") |
1124 | (description "Binary Analysis Platform is a framework for writing program |
1125 | analysis tools, that target binary files. The framework consists of a plethora |
1126 | of libraries, plugins, and frontends. The libraries provide code reusability, |
1127 | the plugins facilitate extensibility, and the frontends serve as entry points.") |
1128 | (license license:expat))) |
1129 | |
1130 | (define-public ocaml-camomile |
1131 | (package |
1132 | (name "ocaml-camomile") |
1133 | (version "0.8.5") |
1134 | (home-page "https://github.com/yoriyuki/Camomile") |
1135 | (source (origin |
1136 | (method url-fetch) |
1137 | (uri (string-append home-page "/releases/download/rel-" version |
1138 | "/camomile-" version ".tar.bz2")) |
1139 | (sha256 |
1140 | (base32 |
1141 | "003ikpvpaliy5hblhckfmln34zqz0mk3y2m1fqvbjngh3h2np045")))) |
1142 | (build-system ocaml-build-system) |
1143 | (native-inputs `(("camlp4" ,camlp4))) |
1144 | (arguments |
1145 | `(#:phases |
1146 | (modify-phases %standard-phases |
1147 | (add-before 'configure 'fix-bin/sh |
1148 | (lambda* (#:key #:allow-other-keys) |
1149 | (substitute* "configure" |
1150 | (("CONFIG_SHELL-/bin/sh") |
1151 | (string-append "CONFIG_SHELL-" (which "bash"))))))))) |
1152 | (synopsis "Comprehensive Unicode library") |
1153 | (description "Camomile is a Unicode library for OCaml. Camomile provides |
1154 | Unicode character type, UTF-8, UTF-16, UTF-32 strings, conversion to/from about |
1155 | 200 encodings, collation and locale-sensitive case mappings, and more. The |
1156 | library is currently designed for Unicode Standard 3.2.") |
1157 | (license license:lgpl2.0+))) ; with an exception |
1158 | |
1159 | (define-public ocaml-zed |
1160 | (package |
1161 | (name "ocaml-zed") |
1162 | (version "1.4") |
1163 | (source (origin |
1164 | (method url-fetch) |
1165 | (uri (string-append "https://github.com/diml/zed/archive/" |
1166 | version ".tar.gz")) |
1167 | (sha256 |
1168 | (base32 |
1169 | "0pvfq9ikhbkv4ksn3k3vzs6wiwkihjav3n81lhxm54z9931gfwnz")))) |
1170 | (build-system ocaml-build-system) |
1171 | (propagated-inputs |
1172 | `(("camomile" ,ocaml-camomile) |
1173 | ("react" ,ocaml-react))) |
1174 | (home-page "https://github.com/diml/zed") |
1175 | (synopsis "Abstract engine for text edition in OCaml") |
1176 | (description "Zed is an abstract engine for text edition. It can be used to |
1177 | write text editors, edition widgets, readlines, ... |
1178 | |
1179 | Zed uses Camomile to fully support the Unicode specification, and implements an |
1180 | UTF-8 encoded string type with validation, and a rope datastructure to achieve |
1181 | efficient operations on large Unicode buffers. Zed also features a regular |
1182 | expression search on ropes. |
1183 | |
1184 | To support efficient text edition capabilities, Zed provides macro recording |
1185 | and cursor management facilities.") |
1186 | (license license:bsd-3))) |
1187 | |
1188 | (define-public ocaml-lambda-term |
1189 | (package |
1190 | (name "ocaml-lambda-term") |
1191 | (version "1.10.1") |
1192 | (home-page "https://github.com/diml/lambda-term") |
1193 | (source (origin |
1194 | (method url-fetch) |
1195 | (uri (string-append home-page "/archive/" version ".tar.gz")) |
1196 | (sha256 |
1197 | (base32 |
1198 | "1449glcsavcwbcsxbd7wcjz50y8vvin4zwpmkhq8i6jca3f3sknj")))) |
1199 | (build-system ocaml-build-system) |
1200 | (propagated-inputs |
1201 | `(("zed" ,ocaml-zed) |
1202 | ("lwt" ,ocaml-lwt) |
1203 | ("react" ,ocaml-react))) |
1204 | (arguments |
1205 | `(#:phases |
1206 | (modify-phases %standard-phases |
1207 | (add-after 'install 'link-stubs |
1208 | (lambda* (#:key outputs #:allow-other-keys) |
1209 | (let* ((out (assoc-ref outputs "out")) |
1210 | (stubs (string-append out "/lib/ocaml/site-lib/stubslibs")) |
1211 | (lib (string-append out "/lib/ocaml/site-lib/lambda-term"))) |
1212 | (mkdir-p stubs) |
1213 | (symlink (string-append lib "/dlllambda-term_stubs.so") |
1214 | (string-append stubs "/dlllambda-term_stubs.so")))))))) |
1215 | (synopsis "Terminal manipulation library for OCaml") |
1216 | (description "Lambda-term is a cross-platform library for manipulating the |
1217 | terminal. It provides an abstraction for keys, mouse events, colors, as well as |
1218 | a set of widgets to write curses-like applications. |
1219 | |
1220 | The main objective of lambda-term is to provide a higher level functional |
1221 | interface to terminal manipulation than, for example, ncurses, by providing a |
1222 | native OCaml interface instead of bindings to a C library. |
1223 | |
1224 | Lambda-term integrates with zed to provide text edition facilities in console |
1225 | applications.") |
1226 | (license license:bsd-3))) |
1227 | |
1228 | (define-public ocaml-utop |
1229 | (package |
1230 | (name "ocaml-utop") |
1231 | (version "1.19.3") |
1232 | (source (origin |
1233 | (method url-fetch) |
1234 | (uri (string-append "https://github.com/diml/utop/archive/" |
1235 | version ".tar.gz")) |
1236 | (file-name (string-append name "-" version ".tar.gz")) |
1237 | (sha256 |
1238 | (base32 |
1239 | "16z02vp9n97iax4fqpbi7v86r75vbabxvnd1rirh8w2miixs1g4x")))) |
1240 | (build-system ocaml-build-system) |
1241 | (native-inputs |
1242 | `(("cppo" ,ocaml-cppo))) |
1243 | (propagated-inputs |
1244 | `(("lambda-term" ,ocaml-lambda-term) |
1245 | ("lwt" ,ocaml-lwt) |
1246 | ("react" ,ocaml-react))) |
1247 | (home-page "https://github.com/diml/utop") |
1248 | (synopsis "Universal toplevel for OCaml") |
1249 | (description "utop is an improved toplevel for OCaml. It can run in a |
1250 | terminal or in Emacs. It supports line edition, history, real-time and context |
1251 | sensitive completion, colors, and more. |
1252 | |
1253 | It integrates with the tuareg mode in Emacs.") |
1254 | (license license:bsd-3))) |
1255 | |
1256 | (define-public proof-general2 |
1257 | (package |
1258 | (name "proof-general2") |
1259 | (version "4.4") |
1260 | (source (origin |
1261 | (method url-fetch) |
1262 | (uri (string-append |
1263 | "https://github.com/ProofGeneral/PG/archive/v" |
1264 | version ".tar.gz")) |
1265 | (file-name (string-append name "-" version ".tar.gz")) |
1266 | (sha256 |
1267 | (base32 |
1268 | "0zif2fv6mm4pv75nh10q3p37n293495rvx470bx7ma382zc3d8hv")))) |
1269 | (build-system gnu-build-system) |
1270 | (native-inputs |
1271 | `(("which" ,which) |
1272 | ("emacs" ,emacs-minimal) |
1273 | ("texinfo" ,texinfo))) |
1274 | (inputs |
1275 | `(("host-emacs" ,emacs) |
1276 | ("perl" ,perl) |
1277 | ("coq" ,coq))) |
1278 | (arguments |
1279 | `(#:tests? #f ; no check target |
1280 | #:make-flags (list (string-append "PREFIX=" %output) |
1281 | (string-append "DEST_PREFIX=" %output) |
1282 | "-j1") |
1283 | #:modules ((guix build gnu-build-system) |
1284 | (guix build utils) |
1285 | (guix build emacs-utils)) |
1286 | #:imported-modules (,@%gnu-build-system-modules |
1287 | (guix build emacs-utils)) |
1288 | #:phases |
1289 | (modify-phases %standard-phases |
1290 | (delete 'configure) |
1291 | (add-after 'unpack 'disable-byte-compile-error-on-warn |
1292 | (lambda _ |
1293 | (substitute* "Makefile" |
1294 | (("\\(setq byte-compile-error-on-warn t\\)") |
1295 | "(setq byte-compile-error-on-warn nil)")) |
1296 | #t)) |
1297 | (add-after 'unpack 'patch-hardcoded-paths |
1298 | (lambda* (#:key inputs outputs #:allow-other-keys) |
1299 | (let ((out (assoc-ref outputs "out")) |
1300 | (coq (assoc-ref inputs "coq")) |
1301 | (emacs (assoc-ref inputs "host-emacs"))) |
1302 | (define (coq-prog name) |
1303 | (string-append coq "/bin/" name)) |
1304 | (substitute* "pgshell/pgshell.el" |
1305 | (("/bin/sh") (which "sh"))) |
1306 | ;(emacs-substitute-variables "coq/coq.el" |
1307 | ; ("coq-prog-name" (coq-prog "coqtop")) |
1308 | ; ("coq-compiler" (coq-prog "coqc")) |
1309 | ; ("coq-dependency-analyzer" (coq-prog "coqdep"))) |
1310 | (substitute* "Makefile" |
1311 | (("/sbin/install-info") "install-info")) |
1312 | (substitute* "bin/proofgeneral" |
1313 | (("^PGHOMEDEFAULT=.*" all) |
1314 | (string-append all |
1315 | "PGHOME=$PGHOMEDEFAULT\n" |
1316 | "EMACS=" emacs "/bin/emacs"))) |
1317 | #t)))))) |
1318 | ;(add-after 'unpack 'clean |
1319 | ; (lambda _ |
1320 | ; ;; Delete the pre-compiled elc files for Emacs 23. |
1321 | ; (zero? (system* "make" "clean")))) |
1322 | ;(add-after 'install 'install-doc |
1323 | ; (lambda* (#:key make-flags #:allow-other-keys) |
1324 | ; ;; XXX FIXME avoid building/installing pdf files, |
1325 | ; ;; due to unresolved errors building them. |
1326 | ; (substitute* "Makefile" |
1327 | ; ((" [^ ]*\\.pdf") "")) |
1328 | ; (zero? (apply system* "make" "install-doc" |
1329 | ; make-flags))))))) |
1330 | (home-page "http://proofgeneral.inf.ed.ac.uk/") |
1331 | (synopsis "Generic front-end for proof assistants based on Emacs") |
1332 | (description |
1333 | "Proof General is a major mode to turn Emacs into an interactive proof |
1334 | assistant to write formal mathematical proofs using a variety of theorem |
1335 | provers.") |
1336 | (license license:gpl2+))) |
1337 |