Commit | Line | Data |
---|---|---|
33af92dd JL |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> | |
b92660af | 3 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
7d60df33 | 4 | ;;; Copyright © 2019 Dan Frumin <dfrumin@cs.ru.nl> |
641981d3 | 5 | ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org> |
33af92dd JL |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages coq) | |
23 | #:use-module (gnu packages) | |
34682557 | 24 | #:use-module (gnu packages autotools) |
33af92dd JL |
25 | #:use-module (gnu packages base) |
26 | #:use-module (gnu packages bison) | |
27 | #:use-module (gnu packages boost) | |
28 | #:use-module (gnu packages emacs) | |
29 | #:use-module (gnu packages flex) | |
66fbffde | 30 | #:use-module (gnu packages gawk) |
33af92dd JL |
31 | #:use-module (gnu packages multiprecision) |
32 | #:use-module (gnu packages ocaml) | |
33 | #:use-module (gnu packages perl) | |
34 | #:use-module (gnu packages python) | |
35 | #:use-module (gnu packages texinfo) | |
36 | #:use-module (guix build-system gnu) | |
37 | #:use-module (guix build-system ocaml) | |
38 | #:use-module (guix download) | |
7d60df33 | 39 | #:use-module (guix git-download) |
33af92dd JL |
40 | #:use-module ((guix licenses) #:prefix license:) |
41 | #:use-module (guix packages) | |
42 | #:use-module (guix utils) | |
43 | #:use-module ((srfi srfi-1) #:hide (zip))) | |
44 | ||
45 | (define-public coq | |
46 | (package | |
47 | (name "coq") | |
1ac40045 | 48 | (version "8.10.2") |
8b9b2210 TGR |
49 | (source |
50 | (origin | |
51 | (method git-fetch) | |
52 | (uri (git-reference | |
53 | (url "https://github.com/coq/coq.git") | |
54 | (commit (string-append "V" version)))) | |
55 | (file-name (git-file-name name version)) | |
56 | (sha256 | |
1ac40045 BG |
57 | (base32 |
58 | "0ji2rzd70b3hcwfw97qk7rv3m2977ylqnq82l1555dp3njr8nm3q")))) | |
33af92dd JL |
59 | (native-search-paths |
60 | (list (search-path-specification | |
61 | (variable "COQPATH") | |
62 | (files (list "lib/coq/user-contrib"))))) | |
63 | (build-system ocaml-build-system) | |
4d6d88bb | 64 | (outputs '("out" "ide")) |
33af92dd | 65 | (inputs |
1ac40045 | 66 | `(("lablgtk" ,lablgtk3) |
33af92dd JL |
67 | ("python" ,python-2) |
68 | ("camlp5" ,camlp5) | |
69 | ("ocaml-num" ,ocaml-num))) | |
e03e1b55 JL |
70 | (native-inputs |
71 | `(("ocaml-ounit" ,ocaml-ounit))) | |
33af92dd JL |
72 | (arguments |
73 | `(#:phases | |
74 | (modify-phases %standard-phases | |
8b9b2210 TGR |
75 | (add-after 'unpack 'make-git-checkout-writable |
76 | (lambda _ | |
77 | (for-each make-file-writable (find-files ".")) | |
78 | #t)) | |
33af92dd JL |
79 | (replace 'configure |
80 | (lambda* (#:key outputs #:allow-other-keys) | |
81 | (let* ((out (assoc-ref outputs "out")) | |
82 | (mandir (string-append out "/share/man")) | |
83 | (browser "icecat -remote \"OpenURL(%s,new-tab)\"")) | |
84 | (invoke "./configure" | |
85 | "-prefix" out | |
86 | "-mandir" mandir | |
87 | "-browser" browser | |
88 | "-coqide" "opt")))) | |
89 | (replace 'build | |
90 | (lambda _ | |
91 | (invoke "make" | |
92 | "-j" (number->string (parallel-job-count)) | |
93 | "world"))) | |
94 | (delete 'check) | |
4d6d88bb JL |
95 | (add-after 'install 'remove-duplicate |
96 | (lambda* (#:key outputs #:allow-other-keys) | |
97 | (let* ((out (assoc-ref outputs "out")) | |
98 | (bin (string-append out "/bin"))) | |
a5727da9 BG |
99 | ;; These files are exact copies without `.opt` extension. |
100 | ;; Removing these saves 35 MiB in the resulting package. | |
4d6d88bb JL |
101 | (delete-file (string-append bin "/coqtop.opt")) |
102 | (delete-file (string-append bin "/coqidetop.opt"))) | |
103 | #t)) | |
104 | (add-after 'install 'install-ide | |
105 | (lambda* (#:key outputs #:allow-other-keys) | |
106 | (let ((out (assoc-ref outputs "out")) | |
107 | (ide (assoc-ref outputs "ide"))) | |
108 | (mkdir-p (string-append ide "/bin")) | |
109 | (rename-file (string-append out "/bin/coqide") | |
110 | (string-append ide "/bin/coqide"))) | |
111 | #t)) | |
33af92dd JL |
112 | (add-after 'install 'check |
113 | (lambda _ | |
114 | (with-directory-excursion "test-suite" | |
115 | ;; These two tests fail. | |
a5727da9 | 116 | ;; Fails because the output is not formatted as expected. |
33af92dd | 117 | (delete-file-recursively "coq-makefile/timing") |
a5727da9 | 118 | ;; Fails because we didn't build coqtop.byte. |
33af92dd JL |
119 | (delete-file-recursively "coq-makefile/findlib-package") |
120 | (invoke "make"))))))) | |
121 | (home-page "https://coq.inria.fr") | |
122 | (synopsis "Proof assistant for higher-order logic") | |
123 | (description | |
124 | "Coq is a proof assistant for higher-order logic, which allows the | |
125 | development of computer programs consistent with their formal specification. | |
126 | It is developed using Objective Caml and Camlp5.") | |
a5727da9 | 127 | ;; The source code is distributed under lgpl2.1. |
33af92dd JL |
128 | ;; Some of the documentation is distributed under opl1.0+. |
129 | (license (list license:lgpl2.1 license:opl1.0+)))) | |
130 | ||
131 | (define-public proof-general | |
132 | (package | |
133 | (name "proof-general") | |
134 | (version "4.2") | |
135 | (source (origin | |
136 | (method url-fetch) | |
137 | (uri (string-append | |
138 | "http://proofgeneral.inf.ed.ac.uk/releases/" | |
139 | "ProofGeneral-" version ".tgz")) | |
140 | (sha256 | |
141 | (base32 | |
142 | "09qb0myq66fw17v4ziz401ilsb5xlxz1nl2wsp69d0vrfy0bcrrm")))) | |
143 | (build-system gnu-build-system) | |
144 | (native-inputs | |
145 | `(("which" ,which) | |
146 | ("emacs" ,emacs-minimal) | |
147 | ("texinfo" ,texinfo))) | |
148 | (inputs | |
149 | `(("host-emacs" ,emacs) | |
150 | ("perl" ,perl) | |
151 | ("coq" ,coq))) | |
152 | (arguments | |
153 | `(#:tests? #f ; no check target | |
154 | #:make-flags (list (string-append "PREFIX=" %output) | |
155 | (string-append "DEST_PREFIX=" %output)) | |
156 | #:modules ((guix build gnu-build-system) | |
157 | (guix build utils) | |
158 | (guix build emacs-utils)) | |
159 | #:imported-modules (,@%gnu-build-system-modules | |
160 | (guix build emacs-utils)) | |
161 | #:phases | |
162 | (modify-phases %standard-phases | |
163 | (delete 'configure) | |
164 | (add-after 'unpack 'disable-byte-compile-error-on-warn | |
165 | (lambda _ | |
166 | (substitute* "Makefile" | |
167 | (("\\(setq byte-compile-error-on-warn t\\)") | |
168 | "(setq byte-compile-error-on-warn nil)")) | |
169 | #t)) | |
170 | (add-after 'unpack 'patch-hardcoded-paths | |
171 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
172 | (let ((out (assoc-ref outputs "out")) | |
173 | (coq (assoc-ref inputs "coq")) | |
174 | (emacs (assoc-ref inputs "host-emacs"))) | |
175 | (define (coq-prog name) | |
176 | (string-append coq "/bin/" name)) | |
177 | (emacs-substitute-variables "coq/coq.el" | |
178 | ("coq-prog-name" (coq-prog "coqtop")) | |
179 | ("coq-compiler" (coq-prog "coqc")) | |
180 | ("coq-dependency-analyzer" (coq-prog "coqdep"))) | |
181 | (substitute* "Makefile" | |
182 | (("/sbin/install-info") "install-info")) | |
183 | (substitute* "bin/proofgeneral" | |
184 | (("^PGHOMEDEFAULT=.*" all) | |
185 | (string-append all | |
186 | "PGHOME=$PGHOMEDEFAULT\n" | |
187 | "EMACS=" emacs "/bin/emacs"))) | |
188 | #t))) | |
189 | (add-after 'unpack 'clean | |
a48d6acc RW |
190 | (lambda _ |
191 | ;; Delete the pre-compiled elc files for Emacs 23. | |
192 | (invoke "make" "clean"))) | |
33af92dd | 193 | (add-after 'install 'install-doc |
a48d6acc RW |
194 | (lambda* (#:key make-flags #:allow-other-keys) |
195 | ;; XXX FIXME avoid building/installing pdf files, | |
196 | ;; due to unresolved errors building them. | |
197 | (substitute* "Makefile" | |
198 | ((" [^ ]*\\.pdf") "")) | |
199 | (apply invoke "make" "install-doc" make-flags)))))) | |
33af92dd JL |
200 | (home-page "http://proofgeneral.inf.ed.ac.uk/") |
201 | (synopsis "Generic front-end for proof assistants based on Emacs") | |
202 | (description | |
203 | "Proof General is a major mode to turn Emacs into an interactive proof | |
204 | assistant to write formal mathematical proofs using a variety of theorem | |
205 | provers.") | |
206 | (license license:gpl2+))) | |
207 | ||
208 | (define-public coq-flocq | |
209 | (package | |
210 | (name "coq-flocq") | |
34682557 BG |
211 | (version "3.2.0") |
212 | (source | |
213 | (origin | |
214 | (method git-fetch) | |
215 | (uri (git-reference | |
216 | (url "https://gitlab.inria.fr/flocq/flocq.git") | |
217 | (commit (string-append "flocq-" version)))) | |
218 | (file-name (git-file-name name version)) | |
219 | (sha256 | |
220 | (base32 | |
221 | "15bi36x7zj0glsb3s2gwqd4wswhfzh36rbp7imbyff53a7nna95l")))) | |
33af92dd JL |
222 | (build-system gnu-build-system) |
223 | (native-inputs | |
34682557 BG |
224 | `(("autoconf" ,autoconf) |
225 | ("automake" ,automake) | |
226 | ("ocaml" ,ocaml) | |
33af92dd JL |
227 | ("which" ,which) |
228 | ("coq" ,coq))) | |
229 | (arguments | |
230 | `(#:configure-flags | |
231 | (list (string-append "--libdir=" (assoc-ref %outputs "out") | |
232 | "/lib/coq/user-contrib/Flocq")) | |
233 | #:phases | |
234 | (modify-phases %standard-phases | |
34682557 BG |
235 | (add-after 'unpack 'remove-failing-examples |
236 | (lambda _ | |
237 | (substitute* "Remakefile.in" | |
238 | ;; Fails on a union error. | |
239 | (("Double_rounding_odd_radix.v") "")) | |
240 | #t)) | |
33af92dd JL |
241 | (add-before 'configure 'fix-remake |
242 | (lambda _ | |
243 | (substitute* "remake.cpp" | |
244 | (("/bin/sh") (which "sh"))) | |
245 | #t)) | |
246 | (replace 'build | |
247 | (lambda _ | |
718d358a | 248 | (invoke "./remake"))) |
33af92dd JL |
249 | (replace 'check |
250 | (lambda _ | |
718d358a | 251 | (invoke "./remake" "check"))) |
33af92dd JL |
252 | ;; TODO: requires coq-gappa and coq-interval. |
253 | ;(invoke "./remake" "check-more") | |
254 | (replace 'install | |
255 | (lambda _ | |
718d358a | 256 | (invoke "./remake" "install")))))) |
59265e5f | 257 | (home-page "https://flocq.gforge.inria.fr/") |
33af92dd JL |
258 | (synopsis "Floating-point formalization for the Coq system") |
259 | (description "Flocq (Floats for Coq) is a floating-point formalization for | |
260 | the Coq system. It provides a comprehensive library of theorems on a multi-radix | |
261 | multi-precision arithmetic. It also supports efficient numerical computations | |
262 | inside Coq.") | |
263 | (license license:lgpl3+))) | |
264 | ||
265 | (define-public coq-gappa | |
266 | (package | |
267 | (name "coq-gappa") | |
f24dc271 BG |
268 | (version "1.4.2") |
269 | (source | |
270 | (origin | |
271 | (method git-fetch) | |
272 | (uri (git-reference | |
273 | (url "https://gitlab.inria.fr/gappa/coq.git") | |
274 | (commit (string-append "gappalib-coq-" version)))) | |
275 | (file-name (git-file-name name version)) | |
276 | (sha256 | |
277 | (base32 | |
278 | "0r7jwp5xssdfzivs2flp7mzrscqhgl63mryhhf1cvndpgzqwfk2f")))) | |
33af92dd JL |
279 | (build-system gnu-build-system) |
280 | (native-inputs | |
f24dc271 BG |
281 | `(("autoconf" ,autoconf) |
282 | ("automake" ,automake) | |
283 | ("ocaml" ,ocaml) | |
33af92dd JL |
284 | ("which" ,which) |
285 | ("coq" ,coq) | |
f24dc271 | 286 | ("camlp5" ,camlp5) |
33af92dd JL |
287 | ("bison" ,bison) |
288 | ("flex" ,flex))) | |
289 | (inputs | |
290 | `(("gmp" ,gmp) | |
291 | ("mpfr" ,mpfr) | |
292 | ("boost" ,boost))) | |
f24dc271 BG |
293 | (propagated-inputs |
294 | `(("coq-flocq" ,coq-flocq))) | |
33af92dd JL |
295 | (arguments |
296 | `(#:configure-flags | |
297 | (list (string-append "--libdir=" (assoc-ref %outputs "out") | |
0fe041bd | 298 | "/lib/coq/user-contrib/Gappa")) |
33af92dd JL |
299 | #:phases |
300 | (modify-phases %standard-phases | |
301 | (add-before 'configure 'fix-remake | |
302 | (lambda _ | |
303 | (substitute* "remake.cpp" | |
ace73a93 RW |
304 | (("/bin/sh") (which "sh"))) |
305 | #t)) | |
33af92dd | 306 | (replace 'build |
ace73a93 | 307 | (lambda _ (invoke "./remake"))) |
f24dc271 BG |
308 | ;; FIXME: Figure out why failures occur, and re-enable check phase. |
309 | (delete 'check) | |
310 | ;; (replace 'check | |
311 | ;; (lambda _ (invoke "./remake" "check"))) | |
33af92dd | 312 | (replace 'install |
ace73a93 | 313 | (lambda _ (invoke "./remake" "install")))))) |
a61fe4c0 | 314 | (home-page "https://gappa.gforge.inria.fr/") |
33af92dd JL |
315 | (synopsis "Verify and formally prove properties on numerical programs") |
316 | (description "Gappa is a tool intended to help verifying and formally proving | |
317 | properties on numerical programs dealing with floating-point or fixed-point | |
318 | arithmetic. It has been used to write robust floating-point filters for CGAL | |
319 | and it is used to certify elementary functions in CRlibm. While Gappa is | |
320 | intended to be used directly, it can also act as a backend prover for the Why3 | |
321 | software verification plateform or as an automatic tactic for the Coq proof | |
322 | assistant.") | |
323 | (license (list license:gpl2+ license:cecill))));either gpl2+ or cecill | |
324 | ||
325 | (define-public coq-mathcomp | |
326 | (package | |
327 | (name "coq-mathcomp") | |
641981d3 | 328 | (version "1.10.0") |
aaa2add8 TGR |
329 | (source |
330 | (origin | |
331 | (method git-fetch) | |
332 | (uri (git-reference | |
333 | (url "https://github.com/math-comp/math-comp.git") | |
334 | (commit (string-append "mathcomp-" version)))) | |
335 | (file-name (git-file-name name version)) | |
336 | (sha256 | |
641981d3 | 337 | (base32 "1h5h1c2025r1ms5qryvwy6pikxmpmmjav6yl127xpzmqdi6w732d")))) |
33af92dd JL |
338 | (build-system gnu-build-system) |
339 | (native-inputs | |
340 | `(("ocaml" ,ocaml) | |
341 | ("which" ,which) | |
342 | ("coq" ,coq))) | |
343 | (arguments | |
641981d3 | 344 | `(#:tests? #f ; No tests. |
33af92dd JL |
345 | #:phases |
346 | (modify-phases %standard-phases | |
347 | (delete 'configure) | |
348 | (add-before 'build 'chdir | |
492ee4f8 | 349 | (lambda _ (chdir "mathcomp") #t)) |
33af92dd JL |
350 | (replace 'install |
351 | (lambda* (#:key outputs #:allow-other-keys) | |
492ee4f8 RW |
352 | (invoke "make" "-f" "Makefile.coq" |
353 | (string-append "COQLIB=" (assoc-ref outputs "out") | |
354 | "/lib/coq/") | |
355 | "install")))))) | |
33af92dd JL |
356 | (home-page "https://math-comp.github.io/math-comp/") |
357 | (synopsis "Mathematical Components for Coq") | |
358 | (description "Mathematical Components for Coq has its origins in the formal | |
359 | proof of the Four Colour Theorem. Since then it has grown to cover many areas | |
360 | of mathematics and has been used for large scale projects like the formal proof | |
361 | of the Odd Order Theorem. | |
362 | ||
363 | The library is written using the Ssreflect proof language that is an integral | |
364 | part of the distribution.") | |
365 | (license license:cecill-b))) | |
366 | ||
367 | (define-public coq-coquelicot | |
368 | (package | |
369 | (name "coq-coquelicot") | |
d481db8b BG |
370 | (version "3.0.3") |
371 | (source | |
372 | (origin | |
373 | (method git-fetch) | |
374 | (uri (git-reference | |
375 | (url "https://gitlab.inria.fr/coquelicot/coquelicot.git") | |
376 | (commit (string-append "coquelicot-" version)))) | |
377 | (file-name (git-file-name name version)) | |
378 | (sha256 | |
379 | (base32 | |
380 | "0m5wbr2s8lnf8b7cfwv15hyzsmbcaz6hgdn7aazcrkxnwr87vgkp")))) | |
33af92dd JL |
381 | (build-system gnu-build-system) |
382 | (native-inputs | |
d481db8b BG |
383 | `(("autoconf" ,autoconf) |
384 | ("automake" ,automake) | |
385 | ("ocaml" ,ocaml) | |
33af92dd JL |
386 | ("which" ,which) |
387 | ("coq" ,coq))) | |
388 | (propagated-inputs | |
389 | `(("mathcomp" ,coq-mathcomp))) | |
390 | (arguments | |
391 | `(#:configure-flags | |
392 | (list (string-append "--libdir=" (assoc-ref %outputs "out") | |
393 | "/lib/coq/user-contrib/Coquelicot")) | |
394 | #:phases | |
395 | (modify-phases %standard-phases | |
33af92dd JL |
396 | (add-before 'configure 'fix-remake |
397 | (lambda _ | |
398 | (substitute* "remake.cpp" | |
e09e8388 RW |
399 | (("/bin/sh") (which "sh"))) |
400 | #t)) | |
33af92dd | 401 | (replace 'build |
e09e8388 | 402 | (lambda _ (invoke "./remake"))) |
33af92dd | 403 | (replace 'check |
e09e8388 | 404 | (lambda _ (invoke "./remake" "check"))) |
33af92dd | 405 | (replace 'install |
e09e8388 | 406 | (lambda _ (invoke "./remake" "install")))))) |
c0228096 | 407 | (home-page "http://coquelicot.saclay.inria.fr") |
33af92dd JL |
408 | (synopsis "Coq library for Reals") |
409 | (description "Coquelicot is an easier way of writing formulas and theorem | |
410 | statements, achieved by relying on total functions in place of dependent types | |
411 | for limits, derivatives, integrals, power series, and so on. To help with the | |
412 | proof process, the library comes with a comprehensive set of theorems that cover | |
413 | not only these notions, but also some extensions such as parametric integrals, | |
414 | two-dimensional differentiability, asymptotic behaviors. It also offers some | |
415 | automations for performing differentiability proofs. Moreover, Coquelicot is a | |
416 | conservative extension of Coq's standard library and provides correspondence | |
417 | theorems between the two libraries.") | |
418 | (license license:lgpl3+))) | |
419 | ||
420 | (define-public coq-bignums | |
421 | (package | |
422 | (name "coq-bignums") | |
8ace2045 | 423 | (version "8.10.0") |
33af92dd | 424 | (source (origin |
775373b8 EF |
425 | (method git-fetch) |
426 | (uri (git-reference | |
427 | (url "https://github.com/coq/bignums.git") | |
428 | (commit (string-append "V" version)))) | |
429 | (file-name (git-file-name name version)) | |
33af92dd JL |
430 | (sha256 |
431 | (base32 | |
8ace2045 | 432 | "0bpb4flckn4nqxbs3wjiznyx1k7r8k93qdigp3qwmikp2lxvcbw5")))) |
33af92dd JL |
433 | (build-system gnu-build-system) |
434 | (native-inputs | |
435 | `(("ocaml" ,ocaml) | |
436 | ("coq" ,coq))) | |
437 | (inputs | |
438 | `(("camlp5" ,camlp5))) | |
439 | (arguments | |
14af514b | 440 | `(#:tests? #f ; No test target. |
33af92dd JL |
441 | #:make-flags |
442 | (list (string-append "COQLIBINSTALL=" (assoc-ref %outputs "out") | |
443 | "/lib/coq/user-contrib")) | |
444 | #:phases | |
445 | (modify-phases %standard-phases | |
446 | (delete 'configure)))) | |
447 | (home-page "https://github.com/coq/bignums") | |
448 | (synopsis "Coq library for arbitrary large numbers") | |
449 | (description "Bignums is a coq library of arbitrary large numbers. It | |
450 | provides BigN, BigZ, BigQ that used to be part of Coq standard library.") | |
451 | (license license:lgpl2.1+))) | |
452 | ||
453 | (define-public coq-interval | |
454 | (package | |
455 | (name "coq-interval") | |
8f121655 BG |
456 | (version "3.4.1") |
457 | (source | |
458 | (origin | |
459 | (method git-fetch) | |
460 | (uri (git-reference | |
461 | (url "https://gitlab.inria.fr/coqinterval/interval.git") | |
462 | (commit (string-append "interval-" version)))) | |
463 | (file-name (git-file-name name version)) | |
464 | (sha256 | |
465 | (base32 | |
466 | "03q3dfqi3r3f7aji5s06ig4aav9ajcwswwdzi5lrgr69z0m487k4")))) | |
33af92dd JL |
467 | (build-system gnu-build-system) |
468 | (native-inputs | |
8f121655 BG |
469 | `(("autoconf" ,autoconf) |
470 | ("automake" ,automake) | |
471 | ("ocaml" ,ocaml) | |
33af92dd JL |
472 | ("which" ,which) |
473 | ("coq" ,coq))) | |
474 | (propagated-inputs | |
475 | `(("flocq" ,coq-flocq) | |
476 | ("bignums" ,coq-bignums) | |
477 | ("coquelicot" ,coq-coquelicot) | |
478 | ("mathcomp" ,coq-mathcomp))) | |
479 | (arguments | |
480 | `(#:configure-flags | |
481 | (list (string-append "--libdir=" (assoc-ref %outputs "out") | |
482 | "/lib/coq/user-contrib/Gappa")) | |
483 | #:phases | |
484 | (modify-phases %standard-phases | |
485 | (add-before 'configure 'fix-remake | |
486 | (lambda _ | |
487 | (substitute* "remake.cpp" | |
7492af9b RW |
488 | (("/bin/sh") (which "sh"))) |
489 | #t)) | |
33af92dd | 490 | (replace 'build |
7492af9b | 491 | (lambda _ (invoke "./remake"))) |
33af92dd | 492 | (replace 'check |
7492af9b | 493 | (lambda _ (invoke "./remake" "check"))) |
33af92dd | 494 | (replace 'install |
7492af9b | 495 | (lambda _ (invoke "./remake" "install")))))) |
33af92dd JL |
496 | (home-page "http://coq-interval.gforge.inria.fr/") |
497 | (synopsis "Coq tactics to simplify inequality proofs") | |
498 | (description "Interval provides vernacular files containing tactics for | |
499 | simplifying the proofs of inequalities on expressions of real numbers for the | |
500 | Coq proof assistant.") | |
501 | (license license:cecill-c))) | |
7d60df33 DF |
502 | |
503 | (define-public coq-autosubst | |
504 | ;; Latest commit on that branch, where work on supporting coq 8.6 and | |
505 | ;; more recent versions of coq happen. | |
506 | (let ((branch "coq86-devel") | |
e03e1b55 | 507 | (commit "fa6ef30664511ffa659cbcf3c962715cbee03572")) |
7d60df33 DF |
508 | (package |
509 | (name "coq-autosubst") | |
510 | (version (git-version "1" branch commit)) | |
511 | (source (origin | |
512 | (method git-fetch) | |
513 | (uri (git-reference | |
514 | (url "git://github.com/uds-psl/autosubst.git") | |
515 | (commit commit))) | |
516 | (file-name (git-file-name name version)) | |
517 | (sha256 | |
e03e1b55 | 518 | (base32 "1cl0bp96bk6lplbl7n5c703vd3gvbs5mvf2qrf8q333kkqd7jqq4")))) |
7d60df33 DF |
519 | (build-system gnu-build-system) |
520 | (arguments | |
521 | `(#:tests? #f | |
522 | #:phases | |
523 | (modify-phases %standard-phases | |
524 | (delete 'configure) | |
525 | (replace 'install | |
526 | (lambda* (#:key outputs #:allow-other-keys) | |
527 | (setenv "COQLIB" (string-append (assoc-ref outputs "out") "/lib/coq/")) | |
528 | (invoke "make" | |
529 | (string-append "COQLIB=" (assoc-ref outputs "out") | |
530 | "/lib/coq/") | |
531 | "install")))))) | |
532 | (native-inputs | |
533 | `(("coq" ,coq))) | |
534 | (home-page "https://www.ps.uni-saarland.de/autosubst/") | |
535 | (synopsis "Coq library for parallel de Bruijn substitutions") | |
536 | (description "Formalizing syntactic theories with variable binders is | |
537 | not easy. Autosubst is a library for the Coq proof assistant to | |
538 | automate this process. Given an inductive definition of syntactic objects in | |
539 | de Bruijn representation augmented with binding annotations, Autosubst | |
540 | synthesizes the parallel substitution operation and automatically proves the | |
541 | basic lemmas about substitutions. This library contains an automation | |
542 | tactic that solves equations involving terms and substitutions. This makes the | |
543 | usage of substitution lemmas unnecessary. The tactic is based on our current | |
544 | work on a decision procedure for the equational theory of an extension of the | |
545 | sigma-calculus by Abadi et al. The library is completely written in Coq and | |
546 | uses Ltac to synthesize the substitution operation.") | |
547 | (license license:bsd-3)))) | |
ec23bae6 DF |
548 | |
549 | (define-public coq-equations | |
550 | (package | |
551 | (name "coq-equations") | |
cd5406ef | 552 | (version "1.2.1") |
ec23bae6 DF |
553 | (source (origin |
554 | (method git-fetch) | |
555 | (uri (git-reference | |
556 | (url "https://github.com/mattam82/Coq-Equations.git") | |
cd5406ef | 557 | (commit (string-append "v" version "-8.10")))) |
ec23bae6 DF |
558 | (file-name (git-file-name name version)) |
559 | (sha256 | |
560 | (base32 | |
cd5406ef | 561 | "023q5dww3drw35dm9bi9p9d0wrj9k7vax7hfdsprf8l340pb4s0k")))) |
ec23bae6 DF |
562 | (build-system gnu-build-system) |
563 | (native-inputs | |
564 | `(("ocaml" ,ocaml) | |
565 | ("coq" ,coq) | |
566 | ("camlp5" ,camlp5))) | |
567 | (arguments | |
568 | `(#:test-target "test-suite" | |
569 | #:phases | |
570 | (modify-phases %standard-phases | |
571 | (replace 'configure | |
572 | (lambda* (#:key outputs #:allow-other-keys) | |
cd5406ef | 573 | (invoke "sh" "./configure.sh"))) |
ec23bae6 DF |
574 | (replace 'install |
575 | (lambda* (#:key outputs #:allow-other-keys) | |
ec23bae6 DF |
576 | (invoke "make" |
577 | (string-append "COQLIB=" (assoc-ref outputs "out") | |
578 | "/lib/coq/") | |
579 | "install")))))) | |
580 | (home-page "https://mattam82.github.io/Coq-Equations/") | |
581 | (synopsis "Function definition plugin for Coq") | |
582 | (description "Equations provides a notation for writing programs | |
583 | by dependent pattern-matching and (well-founded) recursion in Coq. It | |
584 | compiles everything down to eliminators for inductive types, equality | |
585 | and accessibility, providing a definitional extension to the Coq | |
586 | kernel.") | |
587 | (license license:lgpl2.1))) | |
66fbffde DF |
588 | |
589 | (define-public coq-stdpp | |
590 | (package | |
591 | (name "coq-stdpp") | |
d2884b7f | 592 | (version "1.2.1") |
66fbffde DF |
593 | (synopsis "Alternative Coq standard library std++") |
594 | (source (origin | |
595 | (method git-fetch) | |
596 | (uri (git-reference | |
597 | (url "https://gitlab.mpi-sws.org/iris/stdpp.git") | |
598 | (commit (string-append "coq-stdpp-" version)))) | |
599 | (file-name (git-file-name name version)) | |
600 | (sha256 | |
d2884b7f BG |
601 | (base32 |
602 | "1lczybg1jq9drbi8nzrlb0k199x4n07aawjwfzrl3qqc0w8kmvdz")))) | |
66fbffde DF |
603 | (build-system gnu-build-system) |
604 | (inputs | |
605 | `(("coq" ,coq))) | |
606 | (arguments | |
3c9e86ae | 607 | `(#:tests? #f ; Tests are executed during build phase. |
66fbffde DF |
608 | #:phases |
609 | (modify-phases %standard-phases | |
610 | (delete 'configure) | |
611 | (replace 'install | |
612 | (lambda* (#:key outputs #:allow-other-keys) | |
66fbffde DF |
613 | (invoke "make" |
614 | (string-append "COQLIB=" (assoc-ref outputs "out") | |
615 | "/lib/coq/") | |
616 | "install")))))) | |
617 | (description "This project contains an extended \"Standard Library\" for | |
618 | Coq called coq-std++. The key features are: | |
619 | @itemize | |
620 | @item Great number of definitions and lemmas for common data structures such | |
621 | as lists, finite maps, finite sets, and finite multisets. | |
622 | ||
623 | @item Type classes for common notations (like ∅, ∪, and Haskell-style monad | |
624 | notations) so that these can be overloaded for different data structures. | |
625 | ||
626 | @item It uses type classes to keep track of common properties of types, like | |
627 | it having decidable equality or being countable or finite. | |
628 | ||
629 | @item Most data structures are represented in canonical ways so that Leibniz | |
630 | equality can be used as much as possible (for example, for maps we have m1 = | |
631 | m2 iff ∀ i, m1 !! i = m2 !! i). On top of that, the library provides setoid | |
632 | instances for most types and operations. | |
633 | ||
634 | @item Various tactics for common tasks, like an ssreflect inspired done tactic | |
635 | for finishing trivial goals, a simple breadth-first solver naive_solver, an | |
636 | equality simplifier simplify_eq, a solver solve_proper for proving | |
637 | compatibility of functions with respect to relations, and a solver set_solver | |
638 | for goals involving set operations. | |
639 | ||
640 | @item The library is dependency- and axiom-free. | |
641 | @end itemize") | |
642 | (home-page "https://gitlab.mpi-sws.org/iris/stdpp") | |
643 | (license license:bsd-3))) |