2022-11-21 17:40:18 +00:00
|
|
|
{ lib, fetchFromGitHub, fetchpatch, buildDunePackage, cmdliner, ppxlib }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "bisect_ppx";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "2.8.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aantron";
|
|
|
|
repo = "bisect_ppx";
|
|
|
|
rev = version;
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-pOeeSxzUF1jXQjA71atSZALdgQ2NB9qpKo5iaDnPwhQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
patches = lib.optionals (lib.versionAtLeast ppxlib.version "0.26.0") [
|
|
|
|
# Ppxlib >= 0.26.0 compatibility
|
|
|
|
# remove when a new version is released
|
|
|
|
(fetchpatch {
|
|
|
|
name = "${pname}-${version}-ppxlib-0.26-compatibility.patch";
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/aantron/bisect_ppx/pull/400.patch";
|
|
|
|
sha256 = "sha256-WAn6+d6pMUr79LVugOENuh9s0gbVEcTg0rxXMz1P3ak=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
name = "${pname}-${version}-ppxlib-0.28-compatibility.patch";
|
|
|
|
url = "https://github.com/anmonteiro/bisect_ppx/commit/cc442a08e3a2e0e18deb48f3a696076ac0986728.patch";
|
|
|
|
sha256 = "sha256-pPHhmtd81eWhQd4X0gfZNPYT75+EkurwivP7acfJbNc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
minimalOCamlVersion = "4.08";
|
2021-06-28 23:13:55 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
cmdliner
|
2021-06-28 23:13:55 +00:00
|
|
|
ppxlib
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Bisect_ppx is a code coverage tool for OCaml and Reason. It helps you test thoroughly by showing what's not tested.";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/aantron/bisect_ppx";
|
2022-05-18 14:49:53 +00:00
|
|
|
license = licenses.mit;
|
2021-06-28 23:13:55 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "bisect-ppx-report";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|