| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 |
|
| 32 | (define-module (gnu packages rocq)
|
| 33 | #:use-module (gnu packages base)
|
| 34 | #:use-module (gnu packages gawk)
|
| 35 | #:use-module (gnu packages gtk)
|
| 36 | #:use-module (gnu packages multiprecision)
|
| 37 | #:use-module (gnu packages ocaml)
|
| 38 | #:use-module (guix build-system dune)
|
| 39 | #:use-module (guix gexp)
|
| 40 | #:use-module (guix git-download)
|
| 41 | #:use-module (guix licenses)
|
| 42 | #:use-module (guix packages))
|
| 43 |
|
| 44 | (define (rocq-arguments opam-package-name)
|
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | (list #:package opam-package-name
|
| 55 | #:build-flags ''("-j1")
|
| 56 | |
| 57 | #:test-flags ''("-j1")))
|
| 58 |
|
| 59 | (define-public rocq-runtime
|
| 60 | (package
|
| 61 | (name "rocq-runtime") |
| 62 | (version "9.2.0")
|
| 63 | (source
|
| 64 | (origin
|
| 65 | (method git-fetch)
|
| 66 | |
| 67 | |
| 68 | (uri (git-reference
|
| 69 | (url "https://github.com/rocq-prover/rocq")
|
| 70 | (commit (string-append "V" version))))
|
| 71 | (file-name (git-file-name name version))
|
| 72 | (sha256
|
| 73 | (base32 "1rxq2cfqlbp8vzygmk6cwszbsn5l2vka0syhrafrnpn2rpyivya9"))))
|
| 74 | (build-system dune-build-system)
|
| 75 | (arguments
|
| 76 | (rocq-arguments "rocq-runtime"))
|
| 77 | (propagated-inputs (list ocaml-zarith camlzip ocaml-yojson))
|
| 78 | (inputs (list gmp))
|
| 79 | (native-inputs (list ocaml-ounit2 which))
|
| 80 | (native-search-paths
|
| 81 | (list
|
| 82 | (search-path-specification
|
| 83 | (variable "ROCQLIB")
|
| 84 | (files (list "lib/ocaml/site-lib/coq")))
|
| 85 | (search-path-specification
|
| 86 | (variable "ROCQRUNTIMELIB")
|
| 87 | (files (list "lib/ocaml/site-lib/rocq-runtime")))))
|
| 88 | (home-page "https://rocq-prover.org/")
|
| 89 | (synopsis "Core Binaries and Tools for the Rocq Prover")
|
| 90 | (description
|
| 91 | "Rocq is an interactive theorem prover, or proof assistant. It provides
|
| 92 | a formal language to write mathematical definitions, executable algorithms
|
| 93 | and theorems together with an environment for semi-interactive development
|
| 94 | of machine-checked proofs.
|
| 95 |
|
| 96 | This package includes the Rocq Prover core binaries, plugins, and tools, but
|
| 97 | not the language's standard library implementation.")
|
| 98 | |
| 99 | |
| 100 | (license (list lgpl2.1 opl1.0+))))
|
| 101 |
|
| 102 | (define-public rocq-core
|
| 103 | (package
|
| 104 | (inherit rocq-runtime)
|
| 105 | (name "rocq-core") |
| 106 | (arguments
|
| 107 | (append (rocq-arguments "rocq-core")
|
| 108 | (list #:phases
|
| 109 | |
| 110 | #~(modify-phases %standard-phases
|
| 111 | (add-before 'build 'make-dunestrap
|
| 112 | (lambda _
|
| 113 | (invoke "make" "DUNEOPT=-j1" "COQ_SPLIT=1"
|
| 114 | "dunestrap")))))))
|
| 115 | (propagated-inputs (modify-inputs (package-propagated-inputs rocq-runtime)
|
| 116 | (append rocq-runtime)))
|
| 117 | (synopsis "Standard library modules for Rocq Prover")
|
| 118 | (description
|
| 119 | "Rocq is an interactive theorem prover, or proof assistant. It provides
|
| 120 | a formal language to write mathematical definitions, executable algorithms
|
| 121 | and theorems together with an environment for semi-interactive development
|
| 122 | of machine-checked proofs.
|
| 123 |
|
| 124 | This package includes the Rocq standard library some other core language
|
| 125 | libraries.")))
|
| 126 |
|
| 127 | |
| 128 | |
| 129 | |
| 130 | (define-public rocqide-server
|
| 131 | (package
|
| 132 | (inherit rocq-runtime)
|
| 133 | (name "rocqide-server") |
| 134 | (propagated-inputs (modify-inputs (package-propagated-inputs rocq-runtime)
|
| 135 | (append rocq-runtime)))
|
| 136 | (arguments
|
| 137 | (rocq-arguments "coqide-server"))
|
| 138 | (synopsis "Rocq's XML protocol server")
|
| 139 | (description
|
| 140 | "Rocq is an interactive theorem prover, or proof assistant. It provides
|
| 141 | a formal language to write mathematical definitions, executable algorithms
|
| 142 | and theorems together with an environment for semi-interactive development
|
| 143 | of machine-checked proofs.
|
| 144 |
|
| 145 | This package provides the @code{coqidetop} language server, an implementation of
|
| 146 | Rocq's XML protocol which allows clients, such as RocqIDE, to interact with
|
| 147 | the Rocq Prover in a structured way.")))
|
| 148 |
|
| 149 | (define-public rocqide
|
| 150 | (package
|
| 151 | (inherit rocq-runtime)
|
| 152 | (name "rocqide") |
| 153 | (propagated-inputs (modify-inputs (package-propagated-inputs
|
| 154 | rocqide-server)
|
| 155 | (append rocqide-server ocaml-lablgtk3-sourceview3)))
|
| 156 | (arguments
|
| 157 | (rocq-arguments "rocqide"))
|
| 158 | (synopsis "Rocq's IDE")
|
| 159 | (description
|
| 160 | "Rocq is an interactive theorem prover, or proof assistant. It provides
|
| 161 | a formal language to write mathematical definitions, executable algorithms
|
| 162 | and theorems together with an environment for semi-interactive development
|
| 163 | of machine-checked proofs.
|
| 164 |
|
| 165 | This package provides the RocqIDE, a graphical user interface for the
|
| 166 | development of interactive proofs.")))
|