fluffychat: 1.22.1 -> 1.23.0 (#364091)
[NixPkgs.git] / pkgs / development / coq-modules / QuickChick / default.nix
blob0f70982dfaf12d407e18b45b653730f3d8d37657
2   lib,
3   mkCoqDerivation,
4   coq,
5   ssreflect,
6   ExtLib,
7   simple-io,
8   version ? null,
9 }:
11 let
12   recent = lib.versions.isGe "8.7" coq.coq-version || coq.coq-version == "dev";
14 (mkCoqDerivation {
15   pname = "QuickChick";
16   owner = "QuickChick";
17   inherit version;
18   defaultVersion =
19     lib.switch
20       [ coq.coq-version ssreflect.version ]
21       [
22         {
23           cases = [
24             (lib.versions.range "8.15" "8.20")
25             lib.pred.true
26           ];
27           out = "2.0.4";
28         }
29         {
30           cases = [
31             (lib.versions.range "8.13" "8.17")
32             lib.pred.true
33           ];
34           out = "1.6.5";
35         }
36         {
37           cases = [
38             "8.13"
39             lib.pred.true
40           ];
41           out = "1.5.0";
42         }
43         {
44           cases = [
45             "8.12"
46             lib.pred.true
47           ];
48           out = "1.4.0";
49         }
50         {
51           cases = [
52             "8.11"
53             lib.pred.true
54           ];
55           out = "1.3.2";
56         }
57         {
58           cases = [
59             "8.10"
60             lib.pred.true
61           ];
62           out = "1.2.1";
63         }
64         {
65           cases = [
66             "8.9"
67             lib.pred.true
68           ];
69           out = "1.1.0";
70         }
71         {
72           cases = [
73             "8.8"
74             lib.pred.true
75           ];
76           out = "20190311";
77         }
78         {
79           cases = [
80             "8.7"
81             lib.versions.isLe
82             "1.8"
83           ];
84           out = "1.0.0";
85         }
86         {
87           cases = [
88             "8.6"
89             lib.pred.true
90           ];
91           out = "20171102";
92         }
93         {
94           cases = [
95             "8.5"
96             lib.pred.true
97           ];
98           out = "20170512";
99         }
100       ]
101       null;
102   release."2.0.4".sha256 = "sha256-WD8B+n8gyGctHMO+M8201Ca3Uw8zCWYsOatSNGCf0/s=";
103   release."2.0.2".sha256 = "sha256-xxKkwDRjB8nUiXNhein1Ppn0DP5FZ13J90xUPAnQBbs=";
104   release."2.0.1".sha256 = "sha256-gJc+9Or6tbqE00920Il4pnEvokRoiADX6CxP/Q0QZaY=";
105   release."1.6.5".sha256 = "sha256-rcFyRDH8UbB9KVk10P5qjtPkWs04p78VNHkCq4mXr3U=";
106   release."1.6.4".sha256 = "sha256-C1060wPSU33yZAFLxGmZlAMXASnx98qz3oSLO8DO+mM=";
107   release."1.6.2".sha256 = "0g5q9zw3xd4zndihq96nxkq4w3dh05418wzlwdk1nnn3b6vbx6z0";
108   release."1.5.0".sha256 = "1lq8x86vd3vqqh2yq6hvyagpnhfq5wmk5pg2z0xq7b7dcw7hyfkw";
109   release."1.4.0".sha256 = "068p48pm5yxjc3yv8qwzp25bp9kddvxj81l31mjkyx3sdrsw3kyc";
110   release."1.3.2".sha256 = "0lciwaqv288dh2f13xk2x0lrn6zyrkqy6g4yy927wwzag2gklfrs";
111   release."1.2.1".sha256 = "17vz88xjzxh3q7hs6hnndw61r3hdfawxp5awqpgfaxx4w6ni8z46";
112   release."1.1.0".sha256 = "1c34v1k37rk7v0xk2czv5n79mbjxjrm6nh3llg2mpfmdsqi68wf3";
113   release."1.0.0".sha256 = "1gqy9a4yavd0sa7kgysf9gf2lq4p8dmn4h89y8081f2j8zli0w5y";
114   release."20190311".rev = "22af9e9a223d0038f05638654422e637e863b355";
115   release."20190311".sha256 = "00rnr19lg6lg0haq1sy4ld38p7imzand6fc52fvfq27gblxkp2aq";
116   release."20171102".rev = "0fdb769e1dc87a278383b44a9f5102cc7ccbafcf";
117   release."20171102".sha256 = "0fri4nih40vfb0fbr82dsi631ydkw48xszinq43lyinpknf54y17";
118   release."20170512".rev = "31eb050ae5ce57ab402db9726fb7cd945a0b4d03";
119   release."20170512".sha256 = "033ch10i5wmqyw8j6wnr0dlbnibgfpr1vr0c07q3yj6h23xkmqpg";
120   releaseRev = v: "v${v}";
122   preConfigure = lib.optionalString recent "substituteInPlace Makefile --replace quickChickTool.byte quickChickTool.native";
124   useDuneifVersion = v: lib.versions.isGe "2.1" v || v == "dev";
125   opam-name = "coq-quickchick";
127   mlPlugin = true;
128   nativeBuildInputs = lib.optional recent coq.ocamlPackages.ocamlbuild;
129   propagatedBuildInputs =
130     [ ssreflect ]
131     ++ lib.optionals recent [
132       ExtLib
133       simple-io
134     ];
135   extraInstallFlags = [ "-f Makefile.coq" ];
137   enableParallelBuilding = false;
139   meta = with lib; {
140     description = "Randomized property-based testing plugin for Coq; a clone of Haskell QuickCheck";
141     maintainers = with maintainers; [ jwiegley ];
142   };
143 }).overrideAttrs
144   (
145     o:
146     let
147       after_1_6 = lib.versions.isGe "1.6" o.version || o.version == "dev";
148       after_2_1 = lib.versions.isGe "2.1" o.version || o.version == "dev";
149     in
150     {
151       nativeBuildInputs =
152         o.nativeBuildInputs
153         ++ lib.optional after_1_6 coq.ocamlPackages.cppo
154         ++ lib.optional after_2_1 coq.ocamlPackages.menhir;
155       propagatedBuildInputs =
156         o.propagatedBuildInputs
157         ++ lib.optionals after_1_6 (
158           with coq.ocamlPackages;
159           [
160             findlib
161             zarith
162           ]
163         );
164     }
165   )