2021-05-20 23:08:51 +00:00
|
|
|
{ lib, fetchurl, buildDunePackage, dune-configurator, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, bigarray-compat, 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 {
|
2021-05-20 23:08:51 +00:00
|
|
|
version = "0.3.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "checkseum";
|
|
|
|
|
2020-11-03 02:18:15 +00:00
|
|
|
useDune2 = true;
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
minimumOCamlVersion = "4.07";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-v${version}.tbz";
|
2021-05-20 23:08:51 +00:00
|
|
|
sha256 = "b9e4d054e17618b1faed8c0eb15afe0614b2f093e58b59a180bda4500a5d2da1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
patches = [
|
|
|
|
./makefile-no-opam.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
dune-configurator
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
bigarray-compat
|
|
|
|
optint
|
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
bos
|
|
|
|
astring
|
|
|
|
fmt
|
|
|
|
fpath
|
|
|
|
rresult
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/mirage/checkseum";
|
|
|
|
description = "ADLER-32 and CRC32C Cyclic Redundancy Check";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = [ lib.maintainers.vbgl ];
|
|
|
|
};
|
|
|
|
}
|