nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, buildDunePackage, fetchurl
2, ppx_cstruct, ppx_tools
3, cstruct, ounit, mmap, stdlib-shims
4}:
5
6buildDunePackage rec {
7 pname = "pcap-format";
8 version = "0.5.2";
9
10 minimumOCamlVersion = "4.03";
11
12 # due to cstruct
13 useDune2 = true;
14
15 src = fetchurl {
16 url = "https://github.com/mirage/ocaml-pcap/releases/download/${version}/${pname}-${version}.tbz";
17 sha256 = "14c5rpgglyz41jic0fg0xa22d2w1syb86kva22y9fi7aqj9vm31f";
18 };
19
20 nativeBuildInputs = [
21 ppx_tools
22 ppx_cstruct
23 ];
24
25 propagatedBuildInputs = [
26 cstruct
27 stdlib-shims
28 ];
29
30 doCheck = true;
31 checkInputs = [
32 ounit
33 mmap
34 ];
35
36 meta = with lib; {
37 description = "Decode and encode PCAP (packet capture) files";
38 homepage = "https://mirage.github.io/ocaml-pcap";
39 license = licenses.isc;
40 maintainers = [ maintainers.sternenseemann ];
41 };
42}