2020-11-15 13:44:38 +00:00
|
|
|
{ lib, ocaml, fetchurl, buildDunePackage
|
2022-03-05 16:20:37 +00:00
|
|
|
, pkg-config, which
|
2020-04-24 23:36:52 +00:00
|
|
|
, bigarray-compat, eqaf, stdlib-shims
|
2020-11-15 13:44:38 +00:00
|
|
|
, alcotest, astring, bos, findlib, fpath
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "digestif";
|
2022-01-25 03:21:06 +00:00
|
|
|
version = "1.1.0";
|
2020-11-15 13:44:38 +00:00
|
|
|
|
|
|
|
useDune2 = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/digestif/releases/download/v${version}/digestif-v${version}.tbz";
|
2022-01-25 03:21:06 +00:00
|
|
|
sha256 = "01gwkbrznci4xdcbww4ysgsciz2qs0r8jsmhp0siwbcgcrf1jjv5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ findlib which ];
|
|
|
|
buildInputs = [ ocaml ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ bigarray-compat eqaf stdlib-shims ];
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
strictDeps = !doCheck;
|
|
|
|
|
2020-11-15 13:44:38 +00:00
|
|
|
checkInputs = [ alcotest astring bos fpath ];
|
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.05";
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
ocaml -I ${findlib}/lib/ocaml/${ocaml.version}/site-lib/ test/test_runes.ml
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Simple hash algorithms in OCaml";
|
|
|
|
homepage = "https://github.com/mirage/digestif";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|