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-10-06 18:32:54 +00:00
|
|
|
version = "0.4.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "checkseum";
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
minimalOCamlVersion = "4.07";
|
2023-02-09 11:40:11 +00:00
|
|
|
duneVersion = "3";
|
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";
|
2023-02-09 11:40:11 +00:00
|
|
|
hash = "sha256-K6QPMts5+hxH2a+WQ1N0lwMBoshG2T0bSozNgzRvAlo=";
|
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
|
|
|
|
];
|
|
|
|
|
2023-02-09 11:40:11 +00:00
|
|
|
checkInputs = [
|
2021-05-20 23:08:51 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|