2018-12-03 15:14:33 +00:00
|
|
|
{ stdenv, fetchFromGitHub, coq, ssreflect, coq-ext-lib, simple-io }:
|
2017-09-02 16:31:44 +01:00
|
|
|
|
2018-03-21 14:00:47 +00:00
|
|
|
let params =
|
2017-09-02 16:31:44 +01:00
|
|
|
{
|
|
|
|
"8.5" = {
|
|
|
|
version = "20170512";
|
|
|
|
rev = "31eb050ae5ce57ab402db9726fb7cd945a0b4d03";
|
|
|
|
sha256 = "033ch10i5wmqyw8j6wnr0dlbnibgfpr1vr0c07q3yj6h23xkmqpg";
|
|
|
|
};
|
|
|
|
|
|
|
|
"8.6" = {
|
2017-11-12 17:17:48 +00:00
|
|
|
version = "20171102";
|
|
|
|
rev = "0fdb769e1dc87a278383b44a9f5102cc7ccbafcf";
|
|
|
|
sha256 = "0fri4nih40vfb0fbr82dsi631ydkw48xszinq43lyinpknf54y17";
|
|
|
|
};
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
"8.8" = {
|
2019-03-15 14:12:42 +00:00
|
|
|
version = "20190311";
|
|
|
|
rev = "22af9e9a223d0038f05638654422e637e863b355";
|
|
|
|
sha256 = "00rnr19lg6lg0haq1sy4ld38p7imzand6fc52fvfq27gblxkp2aq";
|
2019-06-06 15:01:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
"8.9" = rec {
|
|
|
|
version = "1.1.0";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1c34v1k37rk7v0xk2czv5n79mbjxjrm6nh3llg2mpfmdsqi68wf3";
|
2018-12-03 15:14:33 +00:00
|
|
|
};
|
2020-02-28 08:53:54 +00:00
|
|
|
|
|
|
|
"8.10" = rec {
|
2020-06-27 10:19:14 +01:00
|
|
|
version = "1.2.1";
|
2020-02-28 08:53:54 +00:00
|
|
|
rev = "v${version}";
|
2020-06-27 10:19:14 +01:00
|
|
|
sha256 = "17vz88xjzxh3q7hs6hnndw61r3hdfawxp5awqpgfaxx4w6ni8z46";
|
|
|
|
};
|
|
|
|
|
|
|
|
"8.11" = rec {
|
2020-08-12 06:02:11 +01:00
|
|
|
version = "1.3.2";
|
2020-06-27 10:19:14 +01:00
|
|
|
rev = "v${version}";
|
2020-08-12 06:02:11 +01:00
|
|
|
sha256 = "0lciwaqv288dh2f13xk2x0lrn6zyrkqy6g4yy927wwzag2gklfrs";
|
|
|
|
};
|
|
|
|
|
|
|
|
"8.12" = rec {
|
|
|
|
version = "1.4.0";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "068p48pm5yxjc3yv8qwzp25bp9kddvxj81l31mjkyx3sdrsw3kyc";
|
2020-02-28 08:53:54 +00:00
|
|
|
};
|
2018-03-21 14:00:47 +00:00
|
|
|
};
|
2019-08-13 22:52:01 +01:00
|
|
|
param = params.${coq.coq-version};
|
2018-03-21 14:00:47 +00:00
|
|
|
in
|
2015-08-18 20:28:33 +01:00
|
|
|
|
2020-06-27 10:19:14 +01:00
|
|
|
let inherit (stdenv.lib) maintainers optional optionals versionAtLeast; in
|
|
|
|
|
|
|
|
let recent = versionAtLeast coq.coq-version "8.8"; in
|
2019-06-06 15:01:47 +01:00
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2015-05-08 17:35:00 +01:00
|
|
|
|
2017-09-02 16:31:44 +01:00
|
|
|
name = "coq${coq.coq-version}-QuickChick-${param.version}";
|
2015-05-08 17:35:00 +01:00
|
|
|
|
2018-03-06 15:17:06 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "QuickChick";
|
|
|
|
repo = "QuickChick";
|
2017-09-02 16:31:44 +01:00
|
|
|
inherit (param) rev sha256;
|
2015-05-08 17:35:00 +01:00
|
|
|
};
|
|
|
|
|
2019-06-06 15:01:47 +01:00
|
|
|
preConfigure = stdenv.lib.optionalString recent
|
|
|
|
"substituteInPlace Makefile --replace quickChickTool.byte quickChickTool.native";
|
|
|
|
|
2018-12-03 15:14:33 +00:00
|
|
|
buildInputs = [ coq ]
|
2020-06-27 10:19:14 +01:00
|
|
|
++ (with coq.ocamlPackages; [ ocaml findlib ])
|
|
|
|
++ optionals (recent && !versionAtLeast coq.coq-version "8.10")
|
|
|
|
(with coq.ocamlPackages; [ camlp5 ocamlbuild ])
|
|
|
|
++ optional recent coq.ocamlPackages.num
|
2018-12-03 15:14:33 +00:00
|
|
|
;
|
2019-06-06 15:01:47 +01:00
|
|
|
propagatedBuildInputs = [ ssreflect ]
|
2020-06-27 10:19:14 +01:00
|
|
|
++ optionals recent [ coq-ext-lib simple-io ]
|
|
|
|
++ optional (versionAtLeast coq.coq-version "8.10")
|
|
|
|
coq.ocamlPackages.ocamlbuild
|
|
|
|
;
|
2015-05-08 17:35:00 +01:00
|
|
|
|
2017-11-12 17:17:48 +00:00
|
|
|
enableParallelBuilding = false;
|
2015-05-08 17:35:00 +01:00
|
|
|
|
2017-11-12 17:17:48 +00:00
|
|
|
installPhase = ''
|
|
|
|
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
|
|
|
|
'';
|
2015-05-08 17:35:00 +01:00
|
|
|
|
2020-06-27 10:19:14 +01:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/QuickChick/QuickChick";
|
2015-05-08 17:35:00 +01:00
|
|
|
description = "Randomized property-based testing plugin for Coq; a clone of Haskell QuickCheck";
|
|
|
|
maintainers = with maintainers; [ jwiegley ];
|
|
|
|
platforms = coq.meta.platforms;
|
|
|
|
};
|
|
|
|
|
2018-03-21 14:00:47 +00:00
|
|
|
passthru = {
|
|
|
|
compatibleCoqVersions = v: builtins.hasAttr v params;
|
|
|
|
};
|
|
|
|
|
2015-05-08 17:35:00 +01:00
|
|
|
}
|