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