summaryrefslogtreecommitdiff
path: root/pkgs/development/coq-modules/vcfloat/default.nix
blob: 099efcfc6bb9aab84965c5df9204e11fda716781 (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
55
56
{
  lib,
  mkCoqDerivation,
  coq,
  interval,
  compcert,
  flocq,
  bignums,
  version ? null,
}:

let
  self = mkCoqDerivation {
    pname = "vcfloat";
    owner = "VeriNum";
    inherit version;
    sourceRoot = "${self.src.name}/vcfloat";
    postPatch = ''
      coq_makefile -o Makefile -f _CoqProject *.v
    '';
    defaultVersion =
      with lib.versions;
      lib.switch coq.coq-version [
        {
          case = isEq "8.20";
          out = "2.3";
        }
        {
          case = isEq "8.19";
          out = "2.2";
        }
        {
          case = range "8.16" "8.18";
          out = "2.1.1";
        }
      ] null;
    release."2.3".sha256 = "sha256-fV7w/kYTpcBxrHFzEvx+eydDHbGH05/seucrgSjKK3w=";
    release."2.2".sha256 = "sha256-PyMm84ZYh+dOnl8Kk2wlYsQ+S/d1Hsp6uv2twTedEPg=";
    release."2.1.1".sha256 = "sha256-bd/XSQhyFUAnSm2bhZEZBWB6l4/Ptlm9JrWu6w9BOpw=";
    releaseRev = v: "v${v}";

    propagatedBuildInputs = [
      interval
      compcert
      flocq
      bignums
    ];

    meta = {
      description = "Tool for Coq proofs about floating-point round-off error";
      maintainers = with lib.maintainers; [ quinn-dougherty ];
      license = lib.licenses.lgpl3Plus;
    };
  };
in
self