1{
2 lib,
3 mkCoqDerivation,
4 coq,
5 version ? null,
6}:
7
8with lib;
9let
10 derivation = mkCoqDerivation {
11 pname = "parseque";
12 repo = "parseque";
13 owner = "rocq-community";
14
15 inherit version;
16 defaultVersion =
17 let
18 case = case: out: { inherit case out; };
19 in
20 with versions;
21 switch coq.coq-version [
22 (case (range "8.16" "8.20") "0.2.2")
23 ] null;
24
25 release."0.2.2".sha256 = "sha256-O50Rs7Yf1H4wgwb7ltRxW+7IF0b04zpfs+mR83rxT+E=";
26
27 releaseRev = v: "v${v}";
28
29 meta = {
30 description = "Total parser combinators in Coq/Rocq";
31 maintainers = with maintainers; [ womeier ];
32 license = licenses.mit;
33 };
34 };
35in
36# this is just a wrapper for rocqPackages.parseque for Rocq >= 9.0
37if coq.rocqPackages ? parseque then
38 coq.rocqPackages.parseque.override {
39 inherit version;
40 inherit (coq.rocqPackages) rocq-core;
41 }
42else
43 derivation