diff options
author | John Ericson <git@JohnEricson.me> | 2020-12-29 23:13:58 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 23:13:58 -0500 |
commit | 78c4e34f69c445193def026e1f010c18c562be26 (patch) | |
tree | 7531ac03aa4e9b8d7bd3ea88eebb943429c7769d /pkgs/development/ocaml-modules | |
parent | 854973e51d5e47e5a9f4b633afebbd55043c5866 (diff) | |
parent | 459da0525ac7bb003f9f9784c120869eb9bc00dc (diff) | |
download | nixlib-78c4e34f69c445193def026e1f010c18c562be26.tar nixlib-78c4e34f69c445193def026e1f010c18c562be26.tar.gz nixlib-78c4e34f69c445193def026e1f010c18c562be26.tar.bz2 nixlib-78c4e34f69c445193def026e1f010c18c562be26.tar.lz nixlib-78c4e34f69c445193def026e1f010c18c562be26.tar.xz nixlib-78c4e34f69c445193def026e1f010c18c562be26.tar.zst nixlib-78c4e34f69c445193def026e1f010c18c562be26.zip |
Merge pull request #107922 from sternenseemann/tcpip-6.0.0
ocamlPackages.tcpip: init at 6.0.0 (plus init required dependencies)
Diffstat (limited to 'pkgs/development/ocaml-modules')
8 files changed, 356 insertions, 0 deletions
diff --git a/pkgs/development/ocaml-modules/arp/default.nix b/pkgs/development/ocaml-modules/arp/default.nix new file mode 100644 index 000000000000..518f1c9f4245 --- /dev/null +++ b/pkgs/development/ocaml-modules/arp/default.nix @@ -0,0 +1,57 @@ +{ lib, buildDunePackage, fetchurl +, cstruct, ipaddr, macaddr, logs, lwt, duration +, mirage-time, mirage-protocols, mirage-profile +, alcotest, ethernet, fmt, mirage-vnetif, mirage-random +, mirage-random-test, mirage-clock-unix, mirage-time-unix +, bisect_ppx +}: + +buildDunePackage rec { + pname = "arp"; + version = "2.3.1"; + + minimumOCamlVersion = "4.06"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "1nzm3fbkvz702g8f60fs49736lpffwchy64i1l1raxm9b4lmdk3p"; + }; + + nativeBuildInputs = [ + bisect_ppx + ]; + + propagatedBuildInputs = [ + cstruct + ipaddr + macaddr + logs + mirage-time + mirage-protocols + lwt + duration + mirage-profile + ]; + + doCheck = true; + checkInputs = [ + alcotest + mirage-profile + mirage-random + mirage-random-test + mirage-vnetif + mirage-clock-unix + mirage-random + mirage-time-unix + ethernet + ]; + + meta = with lib; { + description = "Address Resolution Protocol purely in OCaml"; + license = licenses.isc; + homepage = "https://github.com/mirage/arp"; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/ethernet/default.nix b/pkgs/development/ocaml-modules/ethernet/default.nix new file mode 100644 index 000000000000..bc4f4a475447 --- /dev/null +++ b/pkgs/development/ocaml-modules/ethernet/default.nix @@ -0,0 +1,42 @@ +{ lib, buildDunePackage, fetchurl +, rresult, cstruct, ppx_cstruct, mirage-net, mirage-protocols +, mirage-profile, macaddr, fmt, lwt, logs +}: + +buildDunePackage rec { + pname = "ethernet"; + version = "2.2.0"; + + minimumOCamlVersion = "4.06"; + + # necessary due to cstruct + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0qzisqibx2gd8rh330n642mk5wz229199rnlrs7x8cr5pnymif7z"; + }; + + nativeBuildInputs = [ + 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 ]; + }; +} diff --git a/pkgs/development/ocaml-modules/lwt-dllist/default.nix b/pkgs/development/ocaml-modules/lwt-dllist/default.nix new file mode 100644 index 000000000000..59e13330e58f --- /dev/null +++ b/pkgs/development/ocaml-modules/lwt-dllist/default.nix @@ -0,0 +1,26 @@ +{ lib, buildDunePackage, fetchurl, lwt }: + +buildDunePackage rec { + pname = "lwt-dllist"; + version = "1.0.0"; + + minimumOCamlVersion = "4.03"; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0g111f8fq9k1hwccpkhylkp83f73mlz4xnxxr3rf9xpi2f8fh7j9"; + }; + + propagatedBuildInputs = [ + lwt + ]; + + doCheck = true; + + meta = with lib; { + description = "Mutable doubly-linked list with Lwt iterators"; + homepage = "https://github.com/mirage/lwt-dllist"; + license = licenses.mit; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-nat/default.nix b/pkgs/development/ocaml-modules/mirage-nat/default.nix new file mode 100644 index 000000000000..5edf8a347ad0 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-nat/default.nix @@ -0,0 +1,50 @@ +{ lib, buildDunePackage, fetchurl +, ipaddr, cstruct, lwt, rresult, logs, lru +, tcpip, ethernet, stdlib-shims +, alcotest, mirage-clock-unix +, ppx_deriving +}: + +buildDunePackage rec { + pname = "mirage-nat"; + version = "2.2.3"; + + minimumOCamlVersion = "4.06"; + + # due to cstruct + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0cy95j184hi8fm1h6z6x1brjfrmbq3zjy2mqz99m8ys9vwkb63ma"; + }; + + nativeBuildInputs = [ + ppx_deriving + ]; + + propagatedBuildInputs = [ + ipaddr + cstruct + lwt + rresult + logs + lru + tcpip + ethernet + stdlib-shims + ]; + + 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 ]; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-random-test/default.nix b/pkgs/development/ocaml-modules/mirage-random-test/default.nix new file mode 100644 index 000000000000..81d75db77251 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-random-test/default.nix @@ -0,0 +1,30 @@ +{ lib, buildDunePackage, fetchurl +, cstruct, mirage-random +}: + +buildDunePackage rec { + pname = "mirage-random-test"; + version = "0.1.0"; + + minimumOCamlVersion = "4.06"; + + # due to cstruct + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "1jmjyb9a4v7l0xxgdwpr9zshzr8xk3hybra6y2dp51anbwk8kv46"; + }; + + propagatedBuildInputs = [ + cstruct + mirage-random + ]; + + meta = with lib; { + description = "Stub random device implementation for testing"; + homepage = "https://github.com/mirage/mirage-random"; + license = licenses.isc; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/mirage-vnetif/default.nix b/pkgs/development/ocaml-modules/mirage-vnetif/default.nix new file mode 100644 index 000000000000..cafb50309ce6 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-vnetif/default.nix @@ -0,0 +1,40 @@ +{ lib, buildDunePackage, fetchurl +, lwt, mirage-time, mirage-clock, mirage-net +, cstruct, ipaddr, macaddr, mirage-profile +, duration, logs +}: + +buildDunePackage rec { + pname = "mirage-vnetif"; + version = "0.5.0"; + + minimumOCamlVersion = "4.06"; + + # due to cstruct + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0cpqwf51v2cpz41dfqxabf3bsabwyl6a0h0v2ncrn33q58i60m5q"; + }; + + propagatedBuildInputs = [ + lwt + mirage-net + mirage-time + mirage-clock + cstruct + ipaddr + macaddr + mirage-profile + duration + logs + ]; + + meta = with lib; { + description = "Virtual network interface and software switch for Mirage"; + homepage = "https://github.com/mirage/${pname}"; + license = licenses.isc; + mantainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/pcap-format/default.nix b/pkgs/development/ocaml-modules/pcap-format/default.nix new file mode 100644 index 000000000000..f8bb6f4f6b2d --- /dev/null +++ b/pkgs/development/ocaml-modules/pcap-format/default.nix @@ -0,0 +1,41 @@ +{ lib, buildDunePackage, fetchurl +, ppx_cstruct, ppx_tools +, cstruct, ounit, mmap +}: + +buildDunePackage rec { + pname = "pcap-format"; + version = "0.5.2"; + + minimumOCamlVersion = "4.03"; + + # due to cstruct + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/ocaml-pcap/releases/download/${version}/${pname}-${version}.tbz"; + sha256 = "14c5rpgglyz41jic0fg0xa22d2w1syb86kva22y9fi7aqj9vm31f"; + }; + + nativeBuildInputs = [ + ppx_tools + ppx_cstruct + ]; + + propagatedBuildInputs = [ + cstruct + ]; + + doCheck = true; + checkInputs = [ + ounit + mmap + ]; + + meta = with lib; { + description = "Decode and encode PCAP (packet capture) files"; + homepage = "https://mirage.github.io/ocaml-pcap"; + license = licenses.isc; + maintainers = [ maintainers.sternenseemann ]; + }; +} diff --git a/pkgs/development/ocaml-modules/tcpip/default.nix b/pkgs/development/ocaml-modules/tcpip/default.nix new file mode 100644 index 000000000000..80fa01066f1e --- /dev/null +++ b/pkgs/development/ocaml-modules/tcpip/default.nix @@ -0,0 +1,70 @@ +{ lib, buildDunePackage, fetchurl +, bisect_ppx, ppx_cstruct +, 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 +}: + +buildDunePackage rec { + pname = "tcpip"; + version = "6.0.0"; + + useDune2 = true; + + src = fetchurl { + url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-v${version}.tbz"; + sha256 = "0wbrs8jz1vw3zdrqmqcwawxh4yhc2gy30rw7gz4w116cblkvnb8s"; + }; + + nativeBuildInputs = [ + bisect_ppx + ppx_cstruct + ]; + + 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 + ]; + + 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; + }; +} |