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