summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/mirage-nat/default.nix
blob: 9d4bbc88c2c59eeef5579d0fb3f499f4f6e45a21 (plain) (blame)
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
43
44
45
46
47
48
49
50
{ lib, buildDunePackage, fetchurl
, ipaddr, cstruct, lwt, logs, lru
, tcpip, ethernet, stdlib-shims
, alcotest, mirage-clock-unix
, ppxlib, ppx_deriving
}:

buildDunePackage rec {
  pname = "mirage-nat";
  version = "2.2.5";

  minimumOCamlVersion = "4.08";

  # due to cstruct
  useDune2 = true;

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

  buildInputs = [
    ppxlib
  ];

  propagatedBuildInputs = [
    ipaddr
    cstruct
    lwt
    logs
    lru
    tcpip
    ethernet
    stdlib-shims
    ppx_deriving
  ];

  doCheck = true;
  checkInputs = [
    alcotest
    mirage-clock-unix
  ];

  meta = with lib; {
    description = "Mirage-nat is a library for network address translation to be used with MirageOS";
    homepage = "https://github.com/mirage/${pname}";
    license = licenses.isc;
    maintainers = [ maintainers.sternenseemann ];
  };
}