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