guix-more/more/packages/ocaml.scm

ocaml.scm

1
;;; GNU Guix --- Functional package management for GNU
2
;;; Copyright © 2017-2019 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 git-download)
23
  #:use-module (guix utils)
24
  #:use-module (guix build-system dune)
25
  #:use-module (guix build-system gnu)
26
  #:use-module (guix build-system ocaml)
27
  #:use-module ((guix licenses) #:prefix license:)
28
  #:use-module (gnu packages)
29
  #:use-module (gnu packages assembly)
30
  #:use-module (gnu packages autotools)
31
  #:use-module (gnu packages base)
32
  #:use-module (gnu packages bison)
33
  #:use-module (gnu packages boost)
34
  #:use-module (gnu packages check)
35
  #:use-module (gnu packages compression)
36
  #:use-module (gnu packages coq)
37
  #:use-module (gnu packages emacs)
38
  #:use-module (gnu packages flex)
39
  #:use-module (gnu packages llvm)
40
  #:use-module (gnu packages m4)
41
  #:use-module (gnu packages maths)
42
  #:use-module (gnu packages multiprecision)
43
  #:use-module (gnu packages ocaml)
44
  #:use-module (gnu packages perl)
45
  #:use-module (gnu packages pkg-config)
46
  #:use-module (gnu packages protobuf)
47
  #:use-module (gnu packages python)
48
  #:use-module (gnu packages python-xyz)
49
  #:use-module (gnu packages sphinx)
50
  #:use-module (gnu packages tex)
51
  #:use-module (gnu packages texinfo)
52
  #:use-module (more packages smt)
53
  #:use-module (ice-9 match))
54
55
(define (ocaml-forge-uri name version file-number)
56
  (string-append "https://forge.ocamlcore.org/frs/download.php/"
57
                 (number->string file-number) "/" name "-" version
58
                 ".tar.gz"))
59
60
(define-public proof-general2
61
  (package
62
    (name "proof-general2")
63
    (version "4.4")
64
    (source (origin
65
              (method url-fetch)
66
              (uri (string-append
67
                    "https://github.com/ProofGeneral/PG/archive/v"
68
                    version ".tar.gz"))
69
              (file-name (string-append name "-" version ".tar.gz"))
70
              (sha256
71
               (base32
72
                "0zif2fv6mm4pv75nh10q3p37n293495rvx470bx7ma382zc3d8hv"))))
73
    (build-system gnu-build-system)
74
    (native-inputs
75
     `(("which" ,which)
76
       ("emacs" ,emacs-minimal)
77
       ("texinfo" ,texinfo)))
78
    (inputs
79
     `(("host-emacs" ,emacs)
80
       ("perl" ,perl)
81
       ("coq" ,coq)))
82
    (arguments
83
     `(#:tests? #f  ; no check target
84
       #:make-flags (list (string-append "PREFIX=" %output)
85
                          (string-append "DEST_PREFIX=" %output)
86
                          "-j1")
87
       #:modules ((guix build gnu-build-system)
88
                  (guix build utils)
89
                  (guix build emacs-utils))
90
       #:imported-modules (,@%gnu-build-system-modules
91
                           (guix build emacs-utils))
92
       #:phases
93
       (modify-phases %standard-phases
94
         (delete 'configure)
95
         (add-after 'unpack 'disable-byte-compile-error-on-warn
96
                    (lambda _
97
                      (substitute* "Makefile"
98
                        (("\\(setq byte-compile-error-on-warn t\\)")
99
                         "(setq byte-compile-error-on-warn nil)"))
100
                      #t))
101
         (add-after 'unpack 'patch-hardcoded-paths
102
                    (lambda* (#:key inputs outputs #:allow-other-keys)
103
                      (let ((out   (assoc-ref outputs "out"))
104
                            (coq   (assoc-ref inputs "coq"))
105
                            (emacs (assoc-ref inputs "host-emacs")))
106
                        (define (coq-prog name)
107
                          (string-append coq "/bin/" name))
108
                        (substitute* "pgshell/pgshell.el"
109
                          (("/bin/sh") (which "sh")))
110
                        ;(emacs-substitute-variables "coq/coq.el"
111
                        ;  ("coq-prog-name"           (coq-prog "coqtop"))
112
                        ;  ("coq-compiler"            (coq-prog "coqc"))
113
                        ;  ("coq-dependency-analyzer" (coq-prog "coqdep")))
114
                        (substitute* "Makefile"
115
                          (("/sbin/install-info") "install-info"))
116
                        (substitute* "bin/proofgeneral"
117
                          (("^PGHOMEDEFAULT=.*" all)
118
                           (string-append all
119
                                          "PGHOME=$PGHOMEDEFAULT\n"
120
                                          "EMACS=" emacs "/bin/emacs")))
121
                        #t))))))
122
         ;(add-after 'unpack 'clean
123
         ;           (lambda _
124
         ;             ;; Delete the pre-compiled elc files for Emacs 23.
125
         ;             (zero? (system* "make" "clean"))))
126
         ;(add-after 'install 'install-doc
127
         ;           (lambda* (#:key make-flags #:allow-other-keys)
128
         ;             ;; XXX FIXME avoid building/installing pdf files,
129
         ;             ;; due to unresolved errors building them.
130
         ;             (substitute* "Makefile"
131
         ;               ((" [^ ]*\\.pdf") ""))
132
         ;             (zero? (apply system* "make" "install-doc"
133
         ;                           make-flags)))))))
134
    (home-page "http://proofgeneral.inf.ed.ac.uk/")
135
    (synopsis "Generic front-end for proof assistants based on Emacs")
136
    (description
137
     "Proof General is a major mode to turn Emacs into an interactive proof
138
assistant to write formal mathematical proofs using a variety of theorem
139
provers.")
140
    (license license:gpl2+)))
141
142
(define-public coq-8.6
143
  (package
144
    (inherit coq)
145
    (name "coq")
146
    (version "8.6.1")
147
    (source (origin
148
              (method url-fetch)
149
              (uri (string-append "https://github.com/coq/coq/archive/V"
150
                                  version ".tar.gz"))
151
              (file-name (string-append name "-" version ".tar.gz"))
152
              (sha256
153
               (base32
154
                "02nm5sn79hrb9fdmkhyclk80jydadf4jcafmr3idwr5h4z56qbms"))))
155
    (arguments
156
     `(#:phases
157
       (modify-phases %standard-phases
158
         (add-before 'configure 'fix-latest-ocaml
159
           (lambda* (#:key inputs #:allow-other-keys)
160
             (substitute* "Makefile.build"
161
               (("MLINCLUDES=") (string-append
162
                                  "MLINCLUDES=-I "
163
                                  (assoc-ref inputs "ocaml-num")
164
                                  "/lib/ocaml/site-lib ")))
165
             (substitute* "configure.ml"
166
               (("CAMLFLAGS=") "CAMLFLAGS=-unsafe-string -package num "))
167
             (substitute* "ide/ideutils.ml"
168
               (("String.blit") "Bytes.blit"))
169
             (substitute* "tools/coqmktop.ml"
170
               (("nums") (string-append (assoc-ref inputs "ocaml-num")
171
                                        "/lib/ocaml/site-lib/nums"))
172
               (("\"-linkall\"") "\"-linkall\" :: \"-package\" :: \"num\""))
173
             #t))
174
         (replace 'configure
175
           (lambda* (#:key outputs #:allow-other-keys)
176
             (let* ((out (assoc-ref outputs "out"))
177
                    (mandir (string-append out "/share/man"))
178
                    (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
179
               (invoke "./configure"
180
                       "-prefix" out
181
                       "-mandir" mandir
182
                       "-browser" browser
183
                       "-coqide" "opt"))
184
             #t))
185
         (replace 'build
186
           (lambda* (#:key inputs #:allow-other-keys)
187
             (invoke "make" "-j" (number->string
188
                                  (parallel-job-count))
189
                     "world")
190
             #t))
191
         (delete 'check)
192
         (add-after 'install 'check
193
           (lambda _
194
             (with-directory-excursion "test-suite"
195
               (invoke "make"))
196
             #t)))))
197
    (native-inputs '())
198
    (inputs
199
     `(("lablgtk" ,lablgtk)
200
       ("python" ,python-2)
201
       ("camlp5" ,camlp5)
202
       ("ocaml-num" ,ocaml-num)))))
203
204
(define-public coq-8.7
205
  (package
206
    (inherit coq)
207
    (name "coq")
208
    (version "8.7.2")
209
    (source (origin
210
              (method url-fetch)
211
              (uri (string-append "https://github.com/coq/coq/archive/V"
212
                                  version ".tar.gz"))
213
              (file-name (string-append name "-" version ".tar.gz"))
214
              (sha256
215
               (base32
216
                "1lkqvs7ayzv5kkg26y837pg0d6r2b5hbjxl71ba93f39kybw69gg"))))
217
    (arguments
218
     `(#:phases
219
       (modify-phases %standard-phases
220
         (replace 'configure
221
           (lambda* (#:key outputs #:allow-other-keys)
222
             (let* ((out (assoc-ref outputs "out"))
223
                    (mandir (string-append out "/share/man"))
224
                    (browser "icecat -remote \"OpenURL(%s,new-tab)\""))
225
               (invoke "./configure"
226
                       "-prefix" out
227
                       "-mandir" mandir
228
                       "-browser" browser
229
                       "-coqide" "opt"))
230
             #t))
231
         (replace 'build
232
           (lambda* (#:key inputs #:allow-other-keys)
233
             (substitute* "ide/ideutils.ml"
234
               (("Bytes.unsafe_to_string read_string") "read_string"))
235
             (invoke "make" "-j" (number->string
236
                                  (parallel-job-count))
237
                     (string-append
238
                       "USERFLAGS=-I "
239
                       (assoc-ref inputs "ocaml-num")
240
                       "/lib/ocaml/site-lib")
241
                     "world")
242
             #t))
243
         (delete 'check)
244
         (add-after 'install 'check
245
           (lambda _
246
             (with-directory-excursion "test-suite"
247
               ;; These two tests fail.
248
               ;; This one fails because the output is not formatted as expected.
249
               (delete-file-recursively "coq-makefile/timing")
250
               ;; This one fails because we didn't build coqtop.byte.
251
               (delete-file-recursively "coq-makefile/findlib-package")
252
               (invoke "make"))
253
             #t)))))))
254
255
(define-public coq-8.8
256
  (package
257
    (inherit coq)
258
    (name "coq")
259
    (version "8.8.2")
260
    (source (origin
261
              (method url-fetch)
262
              (uri (string-append "https://github.com/coq/coq/archive/V"
263
                                  version ".tar.gz"))
264
              (file-name (string-append name "-" version ".tar.gz"))
265
              (sha256
266
               (base32
267
                "0i2hs0i6rp27cy8zd0mx7jscqw5cx2y0diw0pxgij66s3yr47y7r"))))
268
    (native-inputs
269
     `(("ocaml-ounit" ,ocaml-ounit)
270
       ,@(package-native-inputs coq)))))
271
272
(define-public coq-bignums-8.7
273
  (package
274
    (inherit coq-bignums)
275
    (name "coq-bignums")
276
    (version "8.7.0")
277
    (source (origin
278
              (method url-fetch)
279
              (uri (string-append "https://github.com/coq/bignums/archive/V"
280
                                  version ".tar.gz"))
281
              (file-name (string-append name "-" version ".tar.gz"))
282
              (sha256
283
               (base32
284
                "03iw9jiwq9jx45gsvp315y3lxr8m9ksppmcjvxs5c23qnky6zqjx"))))
285
    (native-inputs
286
     `(("ocaml" ,ocaml)
287
       ("coq-8.7" ,coq-8.7)))
288
    (inputs
289
     `(("camlp5" ,camlp5)))))
290
291
(define-public ocaml-c2newspeak
292
  (package
293
    (name "ocaml-c2newspeak")
294
    (version "1")
295
    (source (origin
296
              (method git-fetch)
297
              (uri (git-reference
298
                     (url "https://github.com/airbus-seclab/c2newspeak")
299
                     (commit "c97fd380111a49fa7baeb9e49c45238fca627492")))
300
              (file-name (string-append name "-" version))
301
              (sha256
302
               (base32
303
                "0fxh868s5jraq61mnig9ilhyjzsq4iw32f20zh3982naanp4p8r6"))))
304
    (build-system ocaml-build-system)
305
    (arguments
306
     `(#:test-target "check"
307
       #:tests? #f
308
       #:phases
309
       (modify-phases %standard-phases
310
         (delete 'configure)
311
         (add-after 'install 'install-bin
312
           (lambda* (#:key outputs #:allow-other-keys)
313
             (install-file "bin/c2newspeak" (string-append (assoc-ref outputs "out") "/bin")))))))
314
    (home-page "https://github.com/airbus-seclab/c2newspeak")
315
    (synopsis "")
316
    (description "")
317
    (license license:lgpl2.1+)))
318
319
;(define-public ocaml-bincat
320
;  (package
321
;    (name "ocaml-bincat")
322
;    (version "0.8.1")
323
;    (source (origin
324
;              (method url-fetch)
325
;              (uri (string-append "https://github.com/airbus-seclab/bincat/archive/v"
326
;                                  version ".tar.gz"))
327
;              (file-name (string-append name "-" version ".tar.gz"))
328
;              (sha256
329
;               (base32
330
;                "1ncwm1h428x1bs4sq7ql1isrkhw0angglsa9hnsvhhw2i1jsdk7j"))))
331
;    (build-system ocaml-build-system)
332
;    (arguments
333
;     `(#:tests? #f; disabled for now
334
;       #:validate-runpath? #f; disabled for now
335
;       #:make-flags
336
;       (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
337
;             "LDCONFIG=true"
338
;             (string-append "CFLAGS+=-I " (assoc-ref %build-inputs "ocaml")
339
;                            "/lib/ocaml"))
340
;       #:phases
341
;       (modify-phases %standard-phases
342
;         (delete 'configure)
343
;         (add-before 'build 'python-path
344
;           (lambda* (#:key outputs #:allow-other-keys)
345
;             (setenv "PYTHONPATH" (string-append (getenv "PYTHONPATH")
346
;                                                 ":../python:"
347
;                                                 (assoc-ref outputs "out")
348
;                                                 "/lib/python2.7/site-packages/"))
349
;             #t))
350
;         (add-before 'build 'fix-makefiles
351
;           (lambda _
352
;             (substitute* "ocaml/src/Makefile"
353
;               (("GITVERSION:=.*") "GITVERSION:=0.8.1\n"))
354
;             (substitute* "python/Makefile"
355
;               (("./setup.py install") "./setup.py install --prefix=$(PREFIX)"))
356
;             #t))
357
;         (add-before 'check 'fix-test
358
;           (lambda _
359
;             (setenv "PATH" (string-append (getenv "PATH") ":" (getcwd) "/ocaml/src"))
360
;             ;; Remove tests that require an armv8 compiler
361
;             (substitute* "test/Makefile"
362
;               (("eggloader_armv8 eggloader_armv7 eggloader_armv7thumb") ""))
363
;             (chmod "test/eggloader_x86" #o755)
364
;             #t))
365
;         (add-before 'install 'install-python-dir
366
;           (lambda* (#:key outputs #:allow-other-keys)
367
;             (mkdir-p (string-append (assoc-ref outputs "out")
368
;                                     "/lib/python2.7/site-packages/")))))))
369
;    (inputs
370
;     `(("c2newspeak" ,ocaml-c2newspeak)
371
;       ("zarith" ,ocaml-zarith)
372
;       ("menhir" ,ocaml-menhir)
373
;       ("ocamlgraph" ,ocaml-graph)
374
;       ("ocaml-cppo" ,ocaml-cppo)
375
;       ("ocaml-ppx-tools" ,ocaml-ppx-tools)
376
;       ("gmp" ,gmp)))
377
;    (native-inputs
378
;     `(("python" ,python-2)
379
;       ("pytest" ,python2-pytest)
380
;       ("sphinx" ,python2-sphinx)
381
;       ("nasm" ,nasm)))
382
;    (home-page "https://github.com/airbus-seclab/bincat")
383
;    (synopsis "")
384
;    (description "")
385
;    (license license:lgpl2.1+)))
386
387
(define-public ocaml-ocplib-simplex
388
  (package
389
    (name "ocaml-ocplib-simplex")
390
    (version "0.4")
391
    (source (origin
392
              (method url-fetch)
393
              (uri (string-append "https://github.com/OCamlPro-Iguernlala/"
394
                                  "ocplib-simplex/archive/v" version ".tar.gz"))
395
              (sha256
396
               (base32
397
                "0y6q4bgly7fisdklriww48aknqf2vg4dphr7wwnd1wh80l4anzg1"))))
398
    (build-system gnu-build-system)
399
    (arguments
400
     `(#:tests? #f; Compilation error
401
       #:phases
402
       (modify-phases %standard-phases
403
         (add-after 'unpack 'autoreconf
404
           (lambda _
405
             (invoke "autoreconf" "-fiv")
406
             #t))
407
         (add-before 'install 'mkdir
408
           (lambda* (#:key outputs #:allow-other-keys)
409
             (let* ((out (assoc-ref outputs "out"))
410
                    (lib (string-append out "/lib")))
411
               (mkdir-p lib)
412
               #t))))))
413
    (native-inputs
414
     `(("autoconf" ,autoconf)
415
       ("automake" ,automake)
416
       ("ocaml" ,ocaml)
417
       ("ocaml-findlib" ,ocaml-findlib)
418
       ("which" ,which)))
419
    (home-page "")
420
    (synopsis "")
421
    (description "")
422
    ; lgpl2.1+ with linking exception
423
    (license license:lgpl2.1+)))
424
425
(define-public coq-io
426
  (package
427
    (name "coq-io")
428
    (version "3.3.0")
429
    (source (origin
430
              (method url-fetch)
431
              (uri (string-append "https://github.com/coq-io/io/archive/"
432
                                  version ".tar.gz"))
433
              (file-name (string-append name "-" version ".tar.gz"))
434
              (sha256
435
               (base32
436
                "0k1z8kav3wz5n04g3imm1hqjimb9cf12ga5wkj1skz8l5ccjxprw"))))
437
    (build-system gnu-build-system)
438
    (arguments
439
     `(#:tests? #f; no tests
440
       #:make-flags
441
       (list (string-append "COQLIB=" (assoc-ref %outputs "out") "/lib/coq/"))
442
       #:phases
443
       (modify-phases %standard-phases
444
         (replace 'configure
445
           (lambda _
446
             (invoke "./configure.sh")
447
             #t)))))
448
    (native-inputs
449
     `(("coq" ,coq-8.6)))
450
    (home-page "")
451
    (synopsis "")
452
    (description "")
453
    (license license:lgpl2.1+)))
454
455
(define-public ocaml-optint
456
  (package
457
    (name "ocaml-optint")
458
    (version "0.0.2")
459
    (source
460
      (origin
461
        (method url-fetch)
462
        (uri "https://github.com/dinosaure/optint/releases/download/v0.0.2/optint-v0.0.2.tbz")
463
        (sha256
464
          (base32
465
            "1lmb7nycmkr05y93slqi98i1lcs1w4kcngjzjwz7i230qqjpw9w1"))))
466
    (build-system dune-build-system)
467
    (arguments
468
     `(#:test-target "."))
469
    (home-page "https://github.com/dinosaure/optint")
470
    (synopsis
471
      "Abstract type on integer between x64 and x86 architecture")
472
    (description
473
      "This library provide one module `Optint` which use internally an `int` if you
474
are in a x64 architecture or an `int32` (boxed value) if you are in a x86
475
architecture. This module is __really__ unsafe and does not care some details
476
(like the sign bit) for any cast.
477
478
## Goal
479
480
The main difference between an `int` and an `int32` is the second is boxed.
481
About performance this is not the best. However, you can not ensure to be in an
482
x64 architecture where you can use directly an `int` instead an `int32` (and
483
improve performance).
484
485
So, this library provide an abstraction about a real `int32`. In a x64
486
architecture, internally, we use a `int` and in a x86 architure, we use a
487
`int32`. By this way, we ensure to have in any platform 32 free bits in
488
`Optint.t`.")
489
    (license #f)))
490
491
(define-public ocaml-checkseum
492
  (package
493
    (name "ocaml-checkseum")
494
    (version "0.0.3")
495
    (source
496
      (origin
497
        (method url-fetch)
498
        (uri "https://github.com/dinosaure/checkseum/releases/download/v0.0.3/checkseum-v0.0.3.tbz")
499
        (sha256
500
          (base32
501
            "12j45zsvil1ynwx1x8fbddhqacc8r1zf7f6h576y3f3yvbg7l1fm"))))
502
    (build-system dune-build-system)
503
    (propagated-inputs
504
      `(("ocaml-optint" ,ocaml-optint)
505
        ("ocaml-fmt" ,ocaml-fmt)
506
        ("ocaml-rresult" ,ocaml-rresult)
507
        ("ocaml-cmdliner" ,ocaml-cmdliner)))
508
    (native-inputs
509
      `(("ocaml-alcotest" ,ocaml-alcotest)))
510
    (home-page
511
      "https://github.com/dinosaure/checkseum")
512
    (synopsis
513
      "Adler-32, CRC32 and CRC32-C implementation in C and OCaml")
514
    (description
515
      "Checkseum is a library to provide implementation of Adler-32, CRC32 and CRC32-C in C and OCaml.
516
517
This library use the linking trick to choose between the C implementation (checkseum.c) or the OCaml implementation (checkseum.ocaml).
518
This library is on top of optint to get the best representation of an int32.
519
")
520
    (license #f)))
521
522
; not the latest but imagelib requires 0.7
523
(define-public ocaml-decompress
524
  (package
525
    (name "ocaml-decompress")
526
    (version "0.7")
527
    (source
528
      (origin
529
        (method url-fetch)
530
        (uri "https://github.com/mirage/decompress/releases/download/v0.7/decompress-0.7.tbz")
531
        (sha256
532
          (base32
533
            "1q96q4bhrlz13c33jj82qn6706m8dbn4azc6yja8lbavpy4q5zpy"))))
534
    (build-system ocaml-build-system)
535
    (arguments
536
     ;; Tets need some path modification
537
     `(#:tests? #f
538
       #:phases
539
       (modify-phases %standard-phases
540
         (delete 'configure)
541
         (replace 'build
542
           (lambda _
543
             (invoke "ocaml" "pkg/pkg.ml" "build")))
544
         (add-before 'build 'set-topfind
545
           (lambda* (#:key inputs #:allow-other-keys)
546
             ;; add the line #directory ".." at the top of each file
547
             ;; using #use "topfind";; to be able to find topfind
548
             (let* ((findlib-path (assoc-ref inputs "findlib"))
549
                    (findlib-libdir
550
                     (string-append findlib-path "/lib/ocaml/site-lib")))
551
               (substitute* '("pkg/pkg.ml")
552
                 (("#use       \"topfind\";;" all)
553
                  (string-append "#directory \"" findlib-libdir "\"\n"
554
                                 all))))
555
             #t)))))
556
    (propagated-inputs
557
     `(("ocaml-optint" ,ocaml-optint)
558
        ("ocaml-checkseum" ,ocaml-checkseum)
559
        ("ocaml-cmdliner" ,ocaml-cmdliner)))
560
    (native-inputs
561
      `(("camlzip" ,camlzip)
562
        ("ocaml-re" ,ocaml-re)
563
        ("ocaml-topkg" ,ocaml-topkg)
564
        ("ocamlbuild" ,ocamlbuild)
565
        ("ocaml-alcotest" ,ocaml-alcotest)
566
        ("opam" ,opam)))
567
    (inputs
568
     `(("zlib" ,zlib)))
569
    (home-page
570
      "https://github.com/mirage/decompress")
571
    (synopsis "Implementation of Zlib in OCaml")
572
    (description
573
      "Decompress is an implementation of Zlib in OCaml
574
575
It provides a pure non-blocking interface to inflate and deflate data flow.
576
")
577
    (license #f)))
578
579
(define-public ocaml-imagelib
580
  (package
581
    (name "ocaml-imagelib")
582
    (version "20180522")
583
    (source
584
      (origin
585
        (method url-fetch)
586
        (uri "https://github.com/rlepigre/ocaml-imagelib/archive/ocaml-imagelib_20180522.tar.gz")
587
        (sha256
588
          (base32
589
            "06l724fj8yirp5jbf782r2xl3lrcff2i1b3c3pf80kbgngw6kakg"))))
590
    (build-system ocaml-build-system)
591
    (arguments
592
     `(#:tests? #f
593
       #:phases
594
       (modify-phases %standard-phases
595
         (delete 'configure)
596
         (replace 'build
597
           (lambda _
598
             (invoke "make")))
599
         (replace 'install
600
           (lambda _
601
             (invoke "make" "install"))))))
602
    (propagated-inputs
603
      `(("ocaml-decompress" ,ocaml-decompress)
604
        ("which" ,which)))
605
    (native-inputs
606
      `(("ocamlbuild" ,ocamlbuild)))
607
    (home-page "http://lepigre.fr")
608
    (synopsis
609
      "The imagelib library implements image formats such as PNG and PPM")
610
    (description
611
      "The imagelib library implements image formats such as PNG and PPM in
612
OCaml, relying on only one external dependency: 'decompress'.
613
614
Supported image formats:
615
 - PNG (full implementation of RFC 2083),
616
 - PPM, PGM, PBM, ... (fully supported),
617
 - JPG (only image size natively, conversion to PNG otherwise),
618
 - GIF (only image size natively, conversion to PNG otherwise),
619
 - XCF (only image size natively, conversion to PNG otherwise),
620
 - Other formats rely on 'convert' (imagemagick).
621
622
As imagelib only requires 'decompress', it can be used together with
623
js_of_ocaml to compile projects to Javascript. Note that some of the
624
features of imagelib require the convert binary  (and thus cannot be
625
used from Javascript).")
626
    (license #f)))
627
628
629
; Require earley and sqlite3 to be up-to-date
630
;(define-public patoline
631
;  (package
632
;    (name "patoline")
633
;    (version "0.2")
634
;    (source (origin
635
;              (method url-fetch)
636
;              (uri (string-append "https://github.com/patoline/patoline/archive/"
637
;                                  version ".tar.gz"))
638
;              (file-name (string-append name "-" version ".tar.gz"))
639
;              (sha256
640
;               (base32
641
;                "1qlxcf8k83lcyamyg19838j3f1js068skxgab94axv2gv4ylhhfb"))))
642
;    (build-system dune-build-system)
643
;    (arguments
644
;     `(#:test-target "."
645
;       #:phases
646
;       (modify-phases %standard-phases
647
;         (add-before 'build 'set-dirs
648
;           (lambda* (#:key outputs #:allow-other-keys)
649
;             (let ((out (assoc-ref outputs "out")))
650
;               (substitute* '("unicodelib/config.ml"
651
;                              "patconfig/patDefault.ml")
652
;                 (("/usr/local/share") (string-append out "/share"))))
653
;             #t)))))
654
;    (propagated-inputs
655
;     `(("camlzip" ,camlzip)
656
;       ("ocaml-earley" ,ocaml-earley)
657
;       ("ocaml-imagelib" ,ocaml-imagelib)
658
;       ("ocaml-sqlite3" ,ocaml-sqlite3)))
659
;    (inputs
660
;     `(("zlib" ,zlib)))
661
;    (home-page "")
662
;    (synopsis "")
663
;    (description "")
664
;    (license license:gpl2+)))
665
666
(define-public coq-tlc
667
  (package
668
    (name "coq-tlc")
669
    (version "20181116")
670
    (source (origin
671
              (method git-fetch)
672
              (uri (git-reference
673
                     (url "https://gitlab.inria.fr/charguer/tlc")
674
                     (commit version)))
675
              (sha256
676
               (base32
677
                "1fkb4z92m04wdic4im4fd7dypbr1lnz285f06ci52kxgv2w4bkjz"))))
678
    (build-system gnu-build-system)
679
    (arguments
680
     `(#:tests? #f; no tests
681
       #:phases
682
       (modify-phases %standard-phases
683
         (delete 'configure)
684
         (add-before 'build 'fix-timestamp
685
           (lambda _
686
             (substitute* "GNUmakefile"
687
               (("\\$\\(shell /bin/date.*") (string-append ,version "\n")))
688
             #t))
689
         (add-before 'build 'fix-timestamp
690
           (lambda _
691
             (substitute* "src/Makefile.coq"
692
               (("/usr/bin/env bash") (which "bash")))
693
             #t))
694
         (add-before 'build 'fix-install-dir
695
           (lambda* (#:key outputs #:allow-other-keys)
696
             (substitute* "src/Makefile"
697
               (("TARGET *:=.*") (string-append "TARGET := " (assoc-ref outputs "out")
698
                                               "/lib/coq/user-contrib/TLC")))
699
             #t)))))
700
    (native-inputs
701
     `(("coq" ,coq)))
702
    (home-page "")
703
    (synopsis "")
704
    (description "")
705
    (license #f)))
706