summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/pcap-format/default.nix
blob: bffab81b4ee5dba17d05826f09a2ccda9b71a7d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{
  lib,
  buildDunePackage,
  fetchurl,
  ppx_cstruct,
  cstruct,
  ounit,
}:

buildDunePackage (finalAttrs: {
  pname = "pcap-format";
  version = "0.6.0";

  minimalOCamlVersion = "4.08";
  duneVersion = "3";

  src = fetchurl {
    url = "https://github.com/mirage/ocaml-pcap/releases/download/v${finalAttrs.version}/pcap-format-${finalAttrs.version}.tbz";
    hash = "sha256-LUjy8Xm6VsnMq1FHKzmJg7uorkTv7cOTsoLwmtNHkaY=";
  };

  buildInputs = [
    ppx_cstruct
  ];

  propagatedBuildInputs = [
    cstruct
  ];

  doCheck = true;
  checkInputs = [
    ounit
  ];

  meta = {
    description = "Decode and encode PCAP (packet capture) files";
    homepage = "https://mirage.github.io/ocaml-pcap";
    license = lib.licenses.isc;
    maintainers = [ lib.maintainers.sternenseemann ];
  };
})