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