2021-01-05 17:05:55 +00:00
|
|
|
{ lib, buildDunePackage, fetchurl
|
2023-10-09 19:29:22 +00:00
|
|
|
, pkg-config
|
2023-03-08 16:32:21 +00:00
|
|
|
, cstruct, cstruct-lwt, mirage-net, mirage-clock
|
|
|
|
, mirage-random, mirage-time
|
2023-10-09 19:29:22 +00:00
|
|
|
, macaddr, macaddr-cstruct, fmt
|
2021-01-05 17:05:55 +00:00
|
|
|
, 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";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "8.0.0";
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-25 03:21:06 +00:00
|
|
|
url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-NrTBVr4WcCukxteBotqLoUYrIjcNFVcOERYFbL8CUjM=";
|
2021-01-05 17:05:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2021-04-05 15:23:46 +00:00
|
|
|
pkg-config
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cstruct
|
|
|
|
cstruct-lwt
|
|
|
|
mirage-net
|
|
|
|
mirage-clock
|
|
|
|
mirage-random
|
|
|
|
mirage-time
|
2023-10-09 19:29:22 +00:00
|
|
|
ipaddr-cstruct
|
2021-01-05 17:05:55 +00:00
|
|
|
macaddr
|
|
|
|
macaddr-cstruct
|
|
|
|
fmt
|
|
|
|
lwt
|
|
|
|
lwt-dllist
|
|
|
|
logs
|
|
|
|
duration
|
|
|
|
randomconv
|
|
|
|
ethernet
|
|
|
|
lru
|
2022-01-25 03:21:06 +00:00
|
|
|
metrics
|
|
|
|
arp
|
2023-03-08 16:32:21 +00:00
|
|
|
mirage-flow
|
2021-04-05 15:23:46 +00:00
|
|
|
] ++ lib.optionals withFreestanding [
|
|
|
|
ocaml-freestanding
|
2021-01-05 17:05:55 +00:00
|
|
|
];
|
|
|
|
|
2023-03-08 16:32:21 +00:00
|
|
|
doCheck = true;
|
2023-02-09 11:40:11 +00:00
|
|
|
checkInputs = [
|
2021-01-05 17:05:55 +00:00
|
|
|
alcotest
|
2023-03-08 16:32:21 +00:00
|
|
|
mirage-random-test
|
2021-01-05 17:05:55 +00:00
|
|
|
mirage-flow
|
|
|
|
mirage-vnetif
|
|
|
|
pcap-format
|
|
|
|
mirage-clock-unix
|
|
|
|
];
|
2023-04-29 16:46:19 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|