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