2021-05-20 23:08:51 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, dune-configurator, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, bigarray-compat, optint
|
2021-05-20 23:08:51 +00:00
|
|
|
, fmt, rresult, bos, fpath, astring, alcotest
|
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
2021-08-05 21:33:18 +00:00
|
|
|
version = "0.3.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "checkseum";
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
useDune2 = true;
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
minimumOCamlVersion = "4.07";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-v${version}.tbz";
|
2021-08-05 21:33:18 +00:00
|
|
|
sha256 = "9cdd282ea1cfc424095d7284e39e4d0ad091de3c3f2580539d03f6966d45ccd5";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
buildInputs = [ dune-configurator ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-05-20 23:08:51 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
bigarray-compat
|
|
|
|
optint
|
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
bos
|
|
|
|
astring
|
|
|
|
fmt
|
|
|
|
fpath
|
|
|
|
rresult
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ADLER-32 and CRC32C Cyclic Redundancy Check";
|
2022-05-18 14:49:53 +00:00
|
|
|
homepage = "https://github.com/mirage/checkseum";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2022-05-18 14:49:53 +00:00
|
|
|
mainProgram = "checkseum.checkseum";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|