1{
2 lib,
3 mkCoqDerivation,
4 coq,
5 version ? null,
6}:
7
8mkCoqDerivation {
9 pname = "semantics";
10 owner = "coq-community";
11 releaseRev = v: "v${v}";
12
13 release."8.14.0".sha256 = "sha256-TB12C3hX9XucbsXr+UL+8jM19NOFXASW/lcytwy6uVE=";
14 release."8.13.0".sha256 = "sha256-8bDr/Ovl6s8BFaRcHeS5H33/K/pYdeKfSN+krVuKulQ=";
15 release."8.11.1".sha256 = "sha256-jTPgcXSNn1G2mMDC7ocFcmqs8svB7Yo1emXP15iuxiU=";
16 release."8.9.0".sha256 = "sha256-UBsvzlDEZsZsVkbUI0GbFEhpxnnLCiaqlqDyWVC5I6s=";
17 release."8.8.0".sha256 = "sha256-k2nQyNw9KT3wY7bGy8KGILF44sLxkBYqdFpzFE9fgyw=";
18 release."8.7.0".sha256 = "sha256-k2nQyNw9KT3wY7bGy8KGILF44sLxkBYqdFpzFE9fgyw=";
19 release."8.6.0".sha256 = "sha256-GltkGQ3tJqUPAbdDkqqvKLLhMOap50XvGaCkjshiNdY=";
20
21 inherit version;
22 defaultVersion =
23 with lib.versions;
24 lib.switch coq.coq-version [
25 {
26 case = range "8.10" "8.18";
27 out = "8.14.0";
28 }
29 {
30 case = "8.9";
31 out = "8.9.0";
32 }
33 {
34 case = "8.8";
35 out = "8.8.0";
36 }
37 {
38 case = "8.7";
39 out = "8.7.0";
40 }
41 {
42 case = "8.6";
43 out = "8.6.0";
44 }
45 ] null;
46
47 mlPlugin = true;
48 nativeBuildInputs = (with coq.ocamlPackages; [ ocamlbuild ]);
49 propagatedBuildInputs = (with coq.ocamlPackages; [ num ]);
50
51 postPatch = ''
52 for p in Make Makefile.coq.local
53 do
54 substituteInPlace $p --replace "-libs nums" "-use-ocamlfind -package num" || true
55 done
56 '';
57
58 meta = with lib; {
59 description = "Survey of programming language semantics styles in Coq";
60 longDescription = ''
61 A survey of semantics styles in Coq, from natural semantics through
62 structural operational, axiomatic, and denotational semantics, to
63 abstract interpretation
64 '';
65 maintainers = with maintainers; [ siraben ];
66 license = licenses.mit;
67 };
68}