1{
2 lib,
3 stdenv,
4 buildDunePackage,
5 fetchurl,
6 cstruct,
7 duration,
8 ethernet,
9 ipaddr,
10 logs,
11 lwt,
12 macaddr,
13 mirage-sleep,
14 alcotest,
15 bos,
16 mirage-vnetif,
17}:
18
19buildDunePackage rec {
20 pname = "arp";
21 version = "4.0.0";
22
23 src = fetchurl {
24 url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-${version}.tbz";
25 hash = "sha256-C2Bh/2NwZqCJEidCnkhwRMoW3AsbQtvwdFh9IiJkDaU=";
26 };
27
28 minimalOCamlVersion = "4.08";
29
30 propagatedBuildInputs = [
31 cstruct
32 duration
33 ethernet
34 ipaddr
35 logs
36 lwt
37 macaddr
38 mirage-sleep
39 ];
40
41 ## NOTE: As of 18 april 2023 and ARP version 3.0.0, tests fail on Darwin.
42 doCheck = !stdenv.hostPlatform.isDarwin;
43 checkInputs = [
44 alcotest
45 bos
46 mirage-vnetif
47 ];
48
49 meta = with lib; {
50 description = "Address Resolution Protocol purely in OCaml";
51 homepage = "https://github.com/mirage/arp";
52 license = licenses.isc;
53 maintainers = with maintainers; [ sternenseemann ];
54 };
55}