2020-11-01 07:49:44 +01:00
|
|
|
{ lib, fetchurl, buildDunePackage, dune-configurator
|
2019-10-29 07:31:14 +01:00
|
|
|
, bigarray-compat, optint
|
2020-11-01 07:49:44 +01:00
|
|
|
, fmt, rresult
|
2019-10-29 07:31:14 +01:00
|
|
|
, alcotest
|
|
|
|
}:
|
2018-11-04 07:49:33 +01:00
|
|
|
|
2019-10-29 07:31:14 +01:00
|
|
|
buildDunePackage rec {
|
2020-11-01 07:49:44 +01:00
|
|
|
version = "0.2.1";
|
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;
|
|
|
|
|
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";
|
2020-11-01 07:49:44 +01:00
|
|
|
sha256 = "1swb44c64pcs4dh9ka9lig6d398qwwkd3kkiajicww6qk7jbh3n5";
|
2018-11-04 07:49:33 +01:00
|
|
|
};
|
|
|
|
|
2020-11-01 07:49:44 +01:00
|
|
|
buildInputs = [ dune-configurator fmt rresult ];
|
2019-10-29 07:31:14 +01:00
|
|
|
propagatedBuildInputs = [ bigarray-compat optint ];
|
|
|
|
checkInputs = lib.optionals doCheck [ alcotest ];
|
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
|
|
|
};
|
|
|
|
}
|