2022-08-23 07:04:50 +01:00
|
|
|
{ lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config
|
2022-09-15 20:04:55 +01:00
|
|
|
, 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 {
|
2022-09-30 17:14:36 +01:00
|
|
|
version = "0.4.0";
|
2019-10-29 06:31:14 +00:00
|
|
|
pname = "checkseum";
|
2018-11-04 06:49:33 +00:00
|
|
|
|
2022-09-15 20:04:55 +01:00
|
|
|
minimalOCamlVersion = "4.07";
|
2021-05-11 05:54:15 +01:00
|
|
|
|
2018-11-04 06:49:33 +00:00
|
|
|
src = fetchurl {
|
2022-09-15 20:04:55 +01:00
|
|
|
url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-${version}.tbz";
|
2022-09-30 17:14:36 +01:00
|
|
|
sha256 = "sha256-K6QPMts5+hxH2a+WQ1N0lwMBoshG2T0bSozNgzRvAlo=";
|
2018-11-04 06:49:33 +00:00
|
|
|
};
|
|
|
|
|
2022-02-22 09:59:04 +00:00
|
|
|
buildInputs = [ dune-configurator ];
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2021-05-11 05:54:15 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
optint
|
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-05-11 05:54:15 +01:00
|
|
|
alcotest
|
|
|
|
bos
|
|
|
|
astring
|
|
|
|
fmt
|
|
|
|
fpath
|
|
|
|
rresult
|
|
|
|
];
|
2018-11-04 06:49:33 +00:00
|
|
|
|
2022-08-23 07:04:50 +01:00
|
|
|
doCheck = lib.versionAtLeast ocaml.version "4.08";
|
2019-10-21 06:36:52 +01:00
|
|
|
|
2018-11-04 06:49:33 +00:00
|
|
|
meta = {
|
|
|
|
description = "ADLER-32 and CRC32C Cyclic Redundancy Check";
|
2022-05-14 00:48:49 +01:00
|
|
|
homepage = "https://github.com/mirage/checkseum";
|
2019-10-29 06:31:14 +00:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
2022-05-14 00:48:49 +01:00
|
|
|
mainProgram = "checkseum.checkseum";
|
2018-11-04 06:49:33 +00:00
|
|
|
};
|
|
|
|
}
|