2018-10-16 19:38:43 +01:00
|
|
|
{ stdenv, fetchgit, coq, ssreflect, equations }:
|
2017-12-15 05:34:11 +00:00
|
|
|
|
2018-10-16 19:38:43 +01:00
|
|
|
let
|
|
|
|
params =
|
|
|
|
let
|
|
|
|
v20180709 = {
|
2018-07-28 00:09:56 +01:00
|
|
|
version = "20180709";
|
|
|
|
rev = "3b9ba7b26a64d49a55e8b6ccea570a7f32c11ead";
|
|
|
|
sha256 = "0f2nr8dgn1ab7hr7jrdmr1zla9g9h8216q4yf4wnff9qkln8sbbs";
|
2017-12-15 05:34:11 +00:00
|
|
|
};
|
2019-07-23 21:27:55 +01:00
|
|
|
v20190414 = {
|
|
|
|
version = "20190414";
|
|
|
|
rev = "706fdb4065cc2302d92ac2bce62cb59713253119";
|
|
|
|
sha256 = "16lg4xs2wzbdbsn148xiacgl4wq4xwfqjnjkdhfr3w0qh1s81hay";
|
2017-12-15 05:34:11 +00:00
|
|
|
};
|
2018-10-16 19:38:43 +01:00
|
|
|
in {
|
|
|
|
"8.6" = v20180709;
|
|
|
|
"8.7" = v20180709;
|
2019-07-23 21:27:55 +01:00
|
|
|
"8.8" = v20190414;
|
|
|
|
"8.9" = v20190414;
|
2018-10-16 19:38:43 +01:00
|
|
|
};
|
2019-08-13 22:52:01 +01:00
|
|
|
param = params.${coq.coq-version};
|
2018-10-16 19:38:43 +01:00
|
|
|
in
|
2017-12-15 05:34:11 +00:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2017-12-15 05:34:11 +00:00
|
|
|
|
|
|
|
name = "coq${coq.coq-version}-category-theory-${param.version}";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = git://github.com/jwiegley/category-theory.git;
|
|
|
|
inherit (param) rev sha256;
|
|
|
|
};
|
|
|
|
|
2018-10-16 19:38:43 +01:00
|
|
|
buildInputs = [ coq ] ++ (with coq.ocamlPackages; [ ocaml camlp5 findlib ]);
|
|
|
|
propagatedBuildInputs = [ ssreflect equations ];
|
2017-12-15 05:34:11 +00:00
|
|
|
|
2019-01-09 17:07:38 +00:00
|
|
|
buildFlags = [ "JOBS=$(NIX_BUILD_CORES)" ];
|
2017-12-15 05:34:11 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-09-08 17:30:00 +01:00
|
|
|
homepage = https://github.com/jwiegley/category-theory;
|
2017-12-15 05:34:11 +00:00
|
|
|
description = "A formalization of category theory in Coq for personal study and practical work";
|
|
|
|
maintainers = with maintainers; [ jwiegley ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
|
|
|
|
2017-12-15 19:52:16 +00:00
|
|
|
passthru = {
|
2018-10-16 19:38:43 +01:00
|
|
|
compatibleCoqVersions = v: builtins.hasAttr v params;
|
2017-12-15 19:52:16 +00:00
|
|
|
};
|
|
|
|
|
2017-12-15 05:34:11 +00:00
|
|
|
}
|