summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2023-02-28 05:48:57 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2023-03-07 08:37:31 +0100
commit9550348c1aea20ecf2a10a4d725bc5c30c8452e3 (patch)
tree65db218c3ca0b7e72b753e798785eb5bfc6c7b60
parentff951cd1c2fc8e639814b88ba2a2d9358916b03d (diff)
ocamlPackages.{arp,ethernet,tcpip}: some cleaning
-rw-r--r--pkgs/development/ocaml-modules/arp/default.nix27
-rw-r--r--pkgs/development/ocaml-modules/ethernet/default.nix23
-rw-r--r--pkgs/development/ocaml-modules/tcpip/default.nix17
3 files changed, 40 insertions, 27 deletions
diff --git a/pkgs/development/ocaml-modules/arp/default.nix b/pkgs/development/ocaml-modules/arp/default.nix
index 4c98f5b377bc..63c1e090662c 100644
--- a/pkgs/development/ocaml-modules/arp/default.nix
+++ b/pkgs/development/ocaml-modules/arp/default.nix
@@ -1,8 +1,22 @@
-{ 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
+{ lib
+, buildDunePackage
+, fetchurl
+, cstruct
+, duration
+, ethernet
+, ipaddr
+, logs
+, lwt
+, macaddr
+, mirage-profile
+, mirage-time
+, alcotest
+, mirage-clock-unix
+, mirage-flow
+, mirage-random
+, mirage-random-test
+, mirage-time-unix
+, mirage-vnetif
, bisect_ppx
}:
@@ -31,7 +45,6 @@ buildDunePackage rec {
lwt
macaddr
mirage-profile
- mirage-protocols
mirage-time
];
@@ -39,7 +52,7 @@ buildDunePackage rec {
checkInputs = [
alcotest
mirage-clock-unix
- mirage-profile
+ mirage-flow
mirage-random
mirage-random-test
mirage-time-unix
diff --git a/pkgs/development/ocaml-modules/ethernet/default.nix b/pkgs/development/ocaml-modules/ethernet/default.nix
index 6d76590c6ca9..a27a91d9d8e9 100644
--- a/pkgs/development/ocaml-modules/ethernet/default.nix
+++ b/pkgs/development/ocaml-modules/ethernet/default.nix
@@ -1,20 +1,26 @@
-{ lib, buildDunePackage, fetchurl
-, rresult, cstruct, ppx_cstruct, mirage-net, mirage-protocols
-, mirage-profile, macaddr, fmt, lwt, logs
+{ lib
+, buildDunePackage
+, fetchurl
+, cstruct
+, logs
+, lwt
+, macaddr
+, mirage-net
+, mirage-profile
+, ppx_cstruct
}:
buildDunePackage rec {
pname = "ethernet";
version = "3.0.0";
- minimumOCamlVersion = "4.08";
+ minimalOCamlVersion = "4.08";
- # necessary due to cstruct
- useDune2 = true;
+ duneVersion = "3";
src = fetchurl {
url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-v${version}.tbz";
- sha256 = "0a898vp9dw42majsvzzvs8pc6x4ns01wlwhwbacixliv6vv78ng9";
+ hash = "sha256:0a898vp9dw42majsvzzvs8pc6x4ns01wlwhwbacixliv6vv78ng9";
};
buildInputs = [
@@ -22,13 +28,10 @@ buildDunePackage rec {
];
propagatedBuildInputs = [
- rresult
cstruct
mirage-net
- mirage-protocols
macaddr
mirage-profile
- fmt
lwt
logs
];
diff --git a/pkgs/development/ocaml-modules/tcpip/default.nix b/pkgs/development/ocaml-modules/tcpip/default.nix
index 0cd57ba9c8ff..90100c2d5b57 100644
--- a/pkgs/development/ocaml-modules/tcpip/default.nix
+++ b/pkgs/development/ocaml-modules/tcpip/default.nix
@@ -1,7 +1,7 @@
{ lib, buildDunePackage, fetchurl
-, bisect_ppx, ppx_cstruct, pkg-config
-, rresult, cstruct, cstruct-lwt, mirage-net, mirage-clock
-, mirage-random, mirage-stack, mirage-protocols, mirage-time
+, ppx_cstruct, pkg-config
+, cstruct, cstruct-lwt, mirage-net, mirage-clock
+, mirage-random, mirage-time
, ipaddr, macaddr, macaddr-cstruct, mirage-profile, fmt
, lwt, lwt-dllist, logs, duration, randomconv, ethernet
, alcotest, mirage-flow, mirage-vnetif, pcap-format
@@ -19,7 +19,7 @@ buildDunePackage rec {
src = fetchurl {
url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-${version}.tbz";
- sha256 = "sha256-lraur6NfFD9yddG+y21jlHKt82gLgYBBbedltlgcRm0=";
+ hash = "sha256-lraur6NfFD9yddG+y21jlHKt82gLgYBBbedltlgcRm0=";
};
nativeBuildInputs = [
@@ -27,17 +27,12 @@ buildDunePackage rec {
];
propagatedBuildInputs = [
- bisect_ppx
ppx_cstruct
- rresult
cstruct
cstruct-lwt
mirage-net
mirage-clock
mirage-random
- mirage-random-test
- mirage-stack
- mirage-protocols
mirage-time
ipaddr
macaddr
@@ -53,13 +48,15 @@ buildDunePackage rec {
lru
metrics
arp
+ mirage-flow
] ++ lib.optionals withFreestanding [
ocaml-freestanding
];
- doCheck = false;
+ doCheck = true;
checkInputs = [
alcotest
+ mirage-random-test
mirage-flow
mirage-vnetif
pcap-format