2022-09-09 14:08:57 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config
|
2022-09-22 12:36:57 +00:00
|
|
|
, 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 {
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "0.3.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "checkseum";
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
minimalOCamlVersion = "4.07";
|
2021-05-20 23:08:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-09-22 12:36:57 +00:00
|
|
|
url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-${version}.tbz";
|
|
|
|
sha256 = "sha256-BL4BOwxXORrkOOba4QjRSetm8bF9JmlKHSFPq24+1zg=";
|
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 = [
|
|
|
|
optint
|
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
bos
|
|
|
|
astring
|
|
|
|
fmt
|
|
|
|
fpath
|
|
|
|
rresult
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|