summaryrefslogtreecommitdiff
path: root/pkgs/development/coq-modules/ElmExtraction/default.nix
blob: c7c336305e3dd0ba22d1c1e7f82187387180c0f6 (plain)
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
{
  lib,
  mkCoqDerivation,
  which,
  coq,
  metacoq,
  version ? null,
}:

mkCoqDerivation {
  pname = "ElmExtraction";
  repo = "coq-elm-extraction";
  owner = "AU-COBRA";
  domain = "github.com";

  inherit version;
  defaultVersion =
    let
      case = coq: mc: out: {
        cases = [
          coq
          mc
        ];
        inherit out;
      };
    in
    lib.switch
      [
        coq.coq-version
        metacoq.version
      ]
      [
        (case (lib.versions.range "8.17" "9.0") (lib.versions.range "1.3.1" "1.3.4") "0.1.1")
      ]
      null;

  release."0.1.0".sha256 = "EWjubBHsxAl2HuRAfJI3B9qzP2mj89eh0CUc8y7/7Ds=";
  release."0.1.1".sha256 = "SDSyXqtOQlW9m9yH8OC909fsC/ePhKkSiY+BoQE76vk=";

  releaseRev = v: "v${v}";

  propagatedBuildInputs = [
    coq.ocamlPackages.findlib
    metacoq
  ];

  postPatch = "patchShebangs ./tests/process-extraction-examples.sh";

  meta = {
    description = "Framework for extracting Coq programs to Elm";
    maintainers = with lib.maintainers; [ _4ever2 ];
    license = lib.licenses.mit;
  };
}