summary refs log tree commit diff
path: root/pkgs/development/coq-modules/category-theory/default.nix
blob: 766a10c9579d99d10f4b9f691c5c97db88376a50 (plain) (blame)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ stdenv, fetchgit, coq, ssreflect }:

let param =
  {
    "8.6" = {
      version = "20171214";
      rev = "babf9c013506da1dbd67171e4a3ae87fdb7e9d00";
      sha256 = "16fsf4cggx9s9fkijnpi4g614nmdb2yx7inzqqn070f8p959qcrd";
    };

    "8.7" = {
      version = "20171214";
      rev = "babf9c013506da1dbd67171e4a3ae87fdb7e9d00";
      sha256 = "16fsf4cggx9s9fkijnpi4g614nmdb2yx7inzqqn070f8p959qcrd";
    };

  }."${coq.coq-version}"
; in

stdenv.mkDerivation rec {

  name = "coq${coq.coq-version}-category-theory-${param.version}";

  src = fetchgit {
    url = git://github.com/jwiegley/category-theory.git;
    inherit (param) rev sha256;
  };

  buildInputs = [ coq.ocaml coq.camlp5 coq.findlib ];
  propagatedBuildInputs = [ coq ssreflect ];

  enableParallelBuilding = false;

  installPhase = ''
    make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
  '';

  meta = with stdenv.lib; {
    homepage = git://github.com/jwiegley/category-theory.git;
    description = "A formalization of category theory in Coq for personal study and practical work";
    maintainers = with maintainers; [ jwiegley ];
    platforms = coq.meta.platforms;
  };

  passthru = {
    compatibleCoqVersions = v: builtins.elem v [ "8.6" "8.7" ];
  };

}