2018-12-03 16:14:33 +01:00
|
|
|
{ stdenv, fetchFromGitHub, coq, ssreflect, coq-ext-lib, simple-io }:
|
2017-09-02 17:31:44 +02:00
|
|
|
|
2018-03-21 15:00:47 +01:00
|
|
|
let params =
|
2017-09-02 17:31:44 +02:00
|
|
|
{
|
|
|
|
"8.5" = {
|
|
|
|
version = "20170512";
|
|
|
|
rev = "31eb050ae5ce57ab402db9726fb7cd945a0b4d03";
|
|
|
|
sha256 = "033ch10i5wmqyw8j6wnr0dlbnibgfpr1vr0c07q3yj6h23xkmqpg";
|
|
|
|
};
|
|
|
|
|
|
|
|
"8.6" = {
|
2017-11-12 18:17:48 +01:00
|
|
|
version = "20171102";
|
|
|
|
rev = "0fdb769e1dc87a278383b44a9f5102cc7ccbafcf";
|
|
|
|
sha256 = "0fri4nih40vfb0fbr82dsi631ydkw48xszinq43lyinpknf54y17";
|
|
|
|
};
|
|
|
|
|
|
|
|
"8.7" = {
|
2017-12-12 20:36:50 +01:00
|
|
|
version = "20171212";
|
|
|
|
rev = "195e550a1cf0810497734356437a1720ebb6d744";
|
|
|
|
sha256 = "0zm23y89z0h4iamy74qk9qi2pz2cj3ga6ygav0w79n0qyqwhxcq1";
|
2017-09-02 17:31:44 +02:00
|
|
|
};
|
2018-12-03 16:14:33 +01:00
|
|
|
"8.8" = rec {
|
|
|
|
preConfigure = "substituteInPlace Makefile --replace quickChickTool.byte quickChickTool.native";
|
|
|
|
version = "1.0.2";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1mcbsp07ra3gdcmir36pf27ig3xv8nagyfp7w5pwqi4gj9w81ffn";
|
|
|
|
buildInputs = with coq.ocamlPackages; [ ocamlbuild num ];
|
|
|
|
propagatedBuildInputs = [ coq-ext-lib simple-io ];
|
|
|
|
};
|
2018-03-21 15:00:47 +01:00
|
|
|
};
|
2019-02-01 16:59:45 +01:00
|
|
|
param = params."${coq.coq-version}";
|
2018-03-21 15:00:47 +01:00
|
|
|
in
|
2015-08-18 21:28:33 +02:00
|
|
|
|
2015-05-08 18:35:00 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2017-09-02 17:31:44 +02:00
|
|
|
name = "coq${coq.coq-version}-QuickChick-${param.version}";
|
2015-05-08 18:35:00 +02:00
|
|
|
|
2018-03-06 16:17:06 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "QuickChick";
|
|
|
|
repo = "QuickChick";
|
2017-09-02 17:31:44 +02:00
|
|
|
inherit (param) rev sha256;
|
2015-05-08 18:35:00 +02:00
|
|
|
};
|
|
|
|
|
2018-12-03 16:14:33 +01:00
|
|
|
buildInputs = [ coq ]
|
|
|
|
++ (with coq.ocamlPackages; [ ocaml camlp5 findlib ])
|
|
|
|
++ (param.buildInputs or [])
|
|
|
|
;
|
|
|
|
propagatedBuildInputs = [ ssreflect ] ++ (param.propagatedBuildInputs or []);
|
2015-05-08 18:35:00 +02:00
|
|
|
|
2017-11-12 18:17:48 +01:00
|
|
|
enableParallelBuilding = false;
|
2015-05-08 18:35:00 +02:00
|
|
|
|
2018-12-03 16:14:33 +01:00
|
|
|
preConfigure = param.preConfigure or null;
|
|
|
|
|
2017-11-12 18:17:48 +01:00
|
|
|
installPhase = ''
|
|
|
|
make -f Makefile.coq COQLIB=$out/lib/coq/${coq.coq-version}/ install
|
|
|
|
'';
|
2015-05-08 18:35:00 +02:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-09-08 18:30:00 +02:00
|
|
|
homepage = https://github.com/QuickChick/QuickChick;
|
2015-05-08 18:35:00 +02: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 15:00:47 +01:00
|
|
|
passthru = {
|
|
|
|
compatibleCoqVersions = v: builtins.hasAttr v params;
|
|
|
|
};
|
|
|
|
|
2015-05-08 18:35:00 +02:00
|
|
|
}
|