From 697e5e8346d8374ab12612ac8168a47d789a416b Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:04:52 +0100 Subject: [PATCH 1/8] ocamlPackages.lwt-dllist: init at 1.0.0 --- .../ocaml-modules/lwt-dllist/default.nix | 26 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/ocaml-modules/lwt-dllist/default.nix 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 00000000000..59e13330e58 --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 80c5c0a5a8a..0839a770a0d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -501,6 +501,8 @@ let lwt_camlp4 = callPackage ../development/ocaml-modules/lwt/camlp4.nix { }; + lwt-dllist = callPackage ../development/ocaml-modules/lwt-dllist { }; + lwt_log = callPackage ../development/ocaml-modules/lwt_log { }; lwt_ppx = callPackage ../development/ocaml-modules/lwt/ppx.nix { }; From 9a56ba878108b06c63fb41adbd14ecf2b93561fb Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:14:50 +0100 Subject: [PATCH 2/8] ocamlPackages.ethernet: init at 2.2.0 --- .../ocaml-modules/ethernet/default.nix | 42 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/ocaml-modules/ethernet/default.nix diff --git a/pkgs/development/ocaml-modules/ethernet/default.nix b/pkgs/development/ocaml-modules/ethernet/default.nix new file mode 100644 index 00000000000..bc4f4a47544 --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 0839a770a0d..b34f5f9c2a6 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -270,6 +270,8 @@ let estring = callPackage ../development/ocaml-modules/estring { }; + ethernet = callPackage ../development/ocaml-modules/ethernet { }; + ezjsonm = callPackage ../development/ocaml-modules/ezjsonm { }; ezxmlm = callPackage ../development/ocaml-modules/ezxmlm { }; From 2446dfa5fc573db9fc6f66f801e2c0ce19fa5173 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:43:18 +0100 Subject: [PATCH 3/8] ocamlPackages.mirage-random-test: init at 0.1.0 --- .../mirage-random-test/default.nix | 30 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-random-test/default.nix 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 00000000000..81d75db7725 --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index b34f5f9c2a6..001749123e2 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -595,6 +595,8 @@ let mirage-random = callPackage ../development/ocaml-modules/mirage-random { }; + mirage-random-test = callPackage ../development/ocaml-modules/mirage-random-test { }; + mirage-runtime = callPackage ../development/ocaml-modules/mirage/runtime.nix { }; mirage-stack = callPackage ../development/ocaml-modules/mirage-stack { }; From ba66c5b87dd4bae9f717f5d23f66fc325d323e8f Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:43:49 +0100 Subject: [PATCH 4/8] ocamlPackages.mirage-vnetif: init at 0.5.0 --- .../ocaml-modules/mirage-vnetif/default.nix | 40 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-vnetif/default.nix 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 00000000000..cafb50309ce --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 001749123e2..52afcd002b3 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -611,6 +611,8 @@ let mirage-unix = callPackage ../development/ocaml-modules/mirage-unix { }; + mirage-vnetif = callPackage ../development/ocaml-modules/mirage-vnetif { }; + mlgmp = callPackage ../development/ocaml-modules/mlgmp { }; mlgmpidl = callPackage ../development/ocaml-modules/mlgmpidl { }; From 9e3040ef413fae384d610c79ff58a85cf1596770 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:44:18 +0100 Subject: [PATCH 5/8] ocamlPackages.pcap-format: init at 0.5.2 --- .../ocaml-modules/pcap-format/default.nix | 41 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 43 insertions(+) create mode 100644 pkgs/development/ocaml-modules/pcap-format/default.nix 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 00000000000..f8bb6f4f6b2 --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 52afcd002b3..db0187f44f9 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -796,6 +796,8 @@ let parse-argv = callPackage ../development/ocaml-modules/parse-argv { }; + pcap-format = callPackage ../development/ocaml-modules/pcap-format { }; + pgsolver = callPackage ../development/ocaml-modules/pgsolver { }; phylogenetics = callPackage ../development/ocaml-modules/phylogenetics { }; From fa3da94dd59efd49d1432a1790b145846761ad2c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:44:46 +0100 Subject: [PATCH 6/8] ocamlPackages.arp: init at 2.3.1 --- .../development/ocaml-modules/arp/default.nix | 57 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/development/ocaml-modules/arp/default.nix diff --git a/pkgs/development/ocaml-modules/arp/default.nix b/pkgs/development/ocaml-modules/arp/default.nix new file mode 100644 index 00000000000..518f1c9f424 --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index db0187f44f9..e82e425bc48 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -34,6 +34,8 @@ let apron = callPackage ../development/ocaml-modules/apron { }; + arp = callPackage ../development/ocaml-modules/arp { }; + asn1-combinators = callPackage ../development/ocaml-modules/asn1-combinators { }; astring = callPackage ../development/ocaml-modules/astring { }; From 33b6e32d771d933b4746529b3f0ba506be4f7c79 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 29 Dec 2020 23:45:06 +0100 Subject: [PATCH 7/8] ocamlPackages.tcpip: init at 6.0.0 --- .../ocaml-modules/tcpip/default.nix | 70 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/ocaml-modules/tcpip/default.nix diff --git a/pkgs/development/ocaml-modules/tcpip/default.nix b/pkgs/development/ocaml-modules/tcpip/default.nix new file mode 100644 index 00000000000..80fa01066f1 --- /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; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e82e425bc48..49bddde6f55 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -838,6 +838,8 @@ let spacetime_lib = callPackage ../development/ocaml-modules/spacetime_lib { }; + tcpip = callPackage ../development/ocaml-modules/tcpip { }; + tsort = callPackage ../development/ocaml-modules/tsort { }; tuntap = callPackage ../development/ocaml-modules/tuntap { }; From 459da0525ac7bb003f9f9784c120869eb9bc00dc Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Wed, 30 Dec 2020 00:20:28 +0100 Subject: [PATCH 8/8] ocamlPackages.mirage-nat: init at 2.2.3 --- .../ocaml-modules/mirage-nat/default.nix | 50 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 52 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-nat/default.nix 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 00000000000..5edf8a347ad --- /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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 49bddde6f55..e2dc6a7052a 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -589,6 +589,8 @@ let mirage-logs = callPackage ../development/ocaml-modules/mirage-logs { }; + mirage-nat = callPackage ../development/ocaml-modules/mirage-nat { }; + mirage-net = callPackage ../development/ocaml-modules/mirage-net { }; mirage-profile = callPackage ../development/ocaml-modules/mirage-profile { };