summaryrefslogtreecommitdiffstats
path: root/pkgs/development/ocaml-modules/ethernet/default.nix
blob: 6d76590c6ca960b2f339f98f709f4850c93c081b (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
42
{ lib, buildDunePackage, fetchurl
, rresult, cstruct, ppx_cstruct, mirage-net, mirage-protocols
, mirage-profile, macaddr, fmt, lwt, logs
}:

buildDunePackage rec {
  pname = "ethernet";
  version = "3.0.0";

  minimumOCamlVersion = "4.08";

  # necessary due to cstruct
  useDune2 = true;

  src = fetchurl {
    url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
    sha256 = "0a898vp9dw42majsvzzvs8pc6x4ns01wlwhwbacixliv6vv78ng9";
  };

  buildInputs = [
    ppx_cstruct
  ];

  propagatedBuildInputs = [
    rresult
    cstruct
    mirage-net
    mirage-protocols
    macaddr
    mirage-profile
    fmt
    lwt
    logs
  ];

  meta = with lib; {
    description = "OCaml Ethernet (IEEE 802.3) layer, used in MirageOS";
    homepage = "https://github.com/mirage/ethernet";
    license = licenses.isc;
    maintainers = [ maintainers.sternenseemann ];
  };
}