2021-01-05 17:05:55 +00:00
|
|
|
{ lib, buildDunePackage, fetchurl
|
2021-04-05 15:23:46 +00:00
|
|
|
, bisect_ppx, ppx_cstruct, pkg-config
|
2021-01-05 17:05:55 +00: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
|
2022-01-25 03:21:06 +00:00
|
|
|
, lru, metrics
|
2021-04-05 15:23:46 +00:00
|
|
|
, withFreestanding ? false
|
|
|
|
, ocaml-freestanding
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildDunePackage rec {
|
|
|
|
pname = "tcpip";
|
2022-03-30 09:31:56 +00:00
|
|
|
version = "7.1.0";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
useDune2 = true;
|
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-25 03:21:06 +00:00
|
|
|
url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
|
2022-03-30 09:31:56 +00:00
|
|
|
sha256 = "sha256-4nd2OVZa4w22I4bgglnS8lrNfjTk40PL5n6Oh6n+osw=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
bisect_ppx
|
|
|
|
ppx_cstruct
|
2021-04-05 15:23:46 +00:00
|
|
|
pkg-config
|
2021-01-05 17:05:55 +00: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
|
2022-01-25 03:21:06 +00:00
|
|
|
metrics
|
|
|
|
arp
|
2021-04-05 15:23:46 +00:00
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2022-01-25 03:21:06 +00:00
|
|
|
doCheck = false;
|
2021-01-05 17:05:55 +00:00
|
|
|
checkInputs = [
|
|
|
|
alcotest
|
|
|
|
mirage-flow
|
|
|
|
mirage-vnetif
|
|
|
|
pcap-format
|
|
|
|
mirage-clock-unix
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|