2020-04-14 06:15:32 +01:00
|
|
|
{ lib, fetchurl, fetchpatch, buildDunePackage
|
2019-10-07 07:48:15 +01:00
|
|
|
, bigarray-compat, eqaf, stdlib-shims
|
|
|
|
, alcotest
|
|
|
|
}:
|
2017-12-05 18:19:25 +00:00
|
|
|
|
2019-10-07 07:48:15 +01:00
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "digestif";
|
|
|
|
version = "0.8.0";
|
2017-12-05 18:19:25 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-10-07 07:48:15 +01:00
|
|
|
url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-v${version}.tbz";
|
|
|
|
sha256 = "09g4zngqiw97cljv8ds4m063wcxz3y7c7vzaprsbpjzi0ja5jdcy";
|
2017-12-05 18:19:25 +00:00
|
|
|
};
|
|
|
|
|
2020-04-14 06:15:32 +01:00
|
|
|
# Fix tests with alcotest ≥ 1
|
|
|
|
patches = [ (fetchpatch {
|
|
|
|
url = "https://github.com/mirage/digestif/commit/b65d996c692d75da0a81323253429e07d14b72b6.patch";
|
|
|
|
sha256 = "0sf7qglcp19dhs65pwrrc7d9v57icf18jsrhpmvwskx8b4dchfiv";
|
|
|
|
})];
|
|
|
|
|
2019-10-07 07:48:15 +01:00
|
|
|
buildInputs = lib.optional doCheck alcotest;
|
|
|
|
propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ];
|
2017-12-05 18:19:25 +00:00
|
|
|
|
2019-10-07 07:48:15 +01:00
|
|
|
doCheck = true;
|
2017-12-05 18:19:25 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Simple hash algorithms in OCaml";
|
|
|
|
homepage = "https://github.com/mirage/digestif";
|
2019-10-07 07:48:15 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2017-12-05 18:19:25 +00:00
|
|
|
};
|
|
|
|
}
|