summary refs log tree commit diff
path: root/pkgs/development/coq-modules/coq-haskell/default.nix
blob: b8a34c49417bcffceefe5b7146d2a8eb1b3eab25 (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
50
51
52
53
54
55
56
57
58
59
60
{ stdenv, fetchgit, coq, ssreflect }:

let params =
  {
    "8.5" = {
      version = "20171215";
      rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968";
      sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv";
    };

    "8.6" = {
      version = "20171215";
      rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968";
      sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv";
    };

    "8.7" = {
      version = "20171215";
      rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968";
      sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv";
    };

    "8.8" = {
      version = "20171215";
      rev = "e2cf8b270c2efa3b56fab1ef6acc376c2c3de968";
      sha256 = "09dq1vvshhlhgjccrhqgbhnq2hrys15xryfszqq11rzpgvl2zgdv";
    };
  };
  param = params.${coq.coq-version};
in

stdenv.mkDerivation rec {

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

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

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

  enableParallelBuilding = false;

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

  meta = with stdenv.lib; {
    homepage = https://github.com/jwiegley/coq-haskell;
    description = "A library for formalizing Haskell types and functions in Coq";
    maintainers = with maintainers; [ jwiegley ];
    platforms = coq.meta.platforms;
  };

  passthru = {
    compatibleCoqVersions = v: builtins.hasAttr v params;
  };
}