Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, fetchurl, buildDunePackage, ocaml, dune-configurator, pkg-config
2, optint
3, fmt, rresult, bos, fpath, astring, alcotest
4, withFreestanding ? false
5, ocaml-freestanding
6}:
7
8buildDunePackage rec {
9 version = "0.4.0";
10 pname = "checkseum";
11
12 minimalOCamlVersion = "4.07";
13 duneVersion = "3";
14
15 src = fetchurl {
16 url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-${version}.tbz";
17 hash = "sha256-K6QPMts5+hxH2a+WQ1N0lwMBoshG2T0bSozNgzRvAlo=";
18 };
19
20 buildInputs = [ dune-configurator ];
21 nativeBuildInputs = [ pkg-config ];
22 propagatedBuildInputs = [
23 optint
24 ] ++ lib.optionals withFreestanding [
25 ocaml-freestanding
26 ];
27
28 checkInputs = [
29 alcotest
30 bos
31 astring
32 fmt
33 fpath
34 rresult
35 ];
36
37 doCheck = lib.versionAtLeast ocaml.version "4.08";
38
39 meta = {
40 description = "ADLER-32 and CRC32C Cyclic Redundancy Check";
41 homepage = "https://github.com/mirage/checkseum";
42 license = lib.licenses.mit;
43 maintainers = [ lib.maintainers.vbgl ];
44 mainProgram = "checkseum.checkseum";
45 };
46}