2020-12-29 23:45:06 +01:00
|
|
|
{ lib, buildDunePackage, fetchurl
|
2021-03-29 18:08:35 +02:00
|
|
|
, bisect_ppx, ppx_cstruct, pkg-config
|
2020-12-29 23:45:06 +01:00
|
|
|
, rresult, cstruct, cstruct-lwt, mirage-net, mirage-clock
|
|
|
|
, mirage-random, mirage-stack, mirage-protocols, mirage-time
|
|
|
|
, ipaddr, macaddr, macaddr-cstruct, mirage-profile, fmt
|
|
|
|
, lwt, lwt-dllist, logs, duration, randomconv, ethernet
|
|
|
|
, alcotest, mirage-flow, mirage-vnetif, pcap-format
|
|
|
|
, mirage-clock-unix, arp, ipaddr-cstruct, mirage-random-test
|
|
|
|
, lru
|
2021-03-29 18:08:35 +02:00
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
2020-12-29 23:45:06 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "tcpip";
|
2021-03-29 18:08:35 +02:00
|
|
|
version = "6.1.0";
|
2020-12-29 23:45:06 +01:00
|
|
|
|
|
|
|
useDune2 = true;
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
|
2021-03-29 18:08:35 +02:00
|
|
|
sha256 = "7b3ed2e1ca835c1cc65ac911bcb0de12ebc2b580dd195006bdea2cb387510474";
|
2020-12-29 23:45:06 +01:00
|
|
|
};
|
|
|
|
|
2021-03-29 18:08:35 +02:00
|
|
|
patches = [
|
|
|
|
./makefile-no-opam.patch
|
|
|
|
];
|
|
|
|
|
2020-12-29 23:45:06 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
bisect_ppx
|
|
|
|
ppx_cstruct
|
2021-03-29 18:08:35 +02:00
|
|
|
pkg-config
|
2020-12-29 23:45:06 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
rresult
|
|
|
|
cstruct
|
|
|
|
cstruct-lwt
|
|
|
|
mirage-net
|
|
|
|
mirage-clock
|
|
|
|
mirage-random
|
|
|
|
mirage-random-test
|
|
|
|
mirage-stack
|
|
|
|
mirage-protocols
|
|
|
|
mirage-time
|
|
|
|
ipaddr
|
|
|
|
macaddr
|
|
|
|
macaddr-cstruct
|
|
|
|
mirage-profile
|
|
|
|
fmt
|
|
|
|
lwt
|
|
|
|
lwt-dllist
|
|
|
|
logs
|
|
|
|
duration
|
|
|
|
randomconv
|
|
|
|
ethernet
|
|
|
|
lru
|
2021-03-29 18:08:35 +02:00
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
2020-12-29 23:45:06 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
mirage-flow
|
|
|
|
mirage-vnetif
|
|
|
|
pcap-format
|
|
|
|
mirage-clock-unix
|
|
|
|
arp
|
|
|
|
ipaddr-cstruct
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "OCaml TCP/IP networking stack, used in MirageOS";
|
|
|
|
homepage = "https://github.com/mirage/mirage-tcpip";
|
|
|
|
maintainers = [ maintainers.sternenseemann ];
|
|
|
|
license = licenses.isc;
|
|
|
|
};
|
|
|
|
}
|