From e81e75f86e8dd0a5e5a52135ff012c97d92db2ab Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 27 Feb 2025 08:48:09 +0100 Subject: [PATCH 1/3] ocamlPackages.mirage-sleep: init at 4.0.0 --- .../ocaml-modules/mirage-sleep/default.nix | 31 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-sleep/default.nix diff --git a/pkgs/development/ocaml-modules/mirage-sleep/default.nix b/pkgs/development/ocaml-modules/mirage-sleep/default.nix new file mode 100644 index 000000000000..13223546ebfc --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-sleep/default.nix @@ -0,0 +1,31 @@ +{ + lib, + buildDunePackage, + fetchurl, + lwt, + duration, + version ? "4.0.0", +}: + +buildDunePackage { + inherit version; + pname = "mirage-sleep"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-sleep/releases/download/v${version}/mirage-sleep-${version}.tbz"; + hash = "sha256-J7cw7sE3EE3BIhSdwD1KV3VeXjEqviVmys3LgGhEE/A="; + }; + + propagatedBuildInputs = [ + duration + lwt + ]; + + meta = { + description = "Sleep operations for MirageOS"; + homepage = "https://github.com/mirage/mirage-sleep"; + changelog = "https://raw.githubusercontent.com/mirage/mirage-sleep/refs/tags/v${version}/CHANGES.md"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index d2dae1c3e383..e494aa9830bd 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1224,6 +1224,8 @@ let mirage-runtime = callPackage ../development/ocaml-modules/mirage/runtime.nix { }; + mirage-sleep = callPackage ../development/ocaml-modules/mirage-sleep { }; + mirage-time = callPackage ../development/ocaml-modules/mirage-time { }; mirage-time-unix = callPackage ../development/ocaml-modules/mirage-time/unix.nix { }; From 21409b645064edd905c1bcfadcbb1fda95dd2f39 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 27 Feb 2025 08:48:13 +0100 Subject: [PATCH 2/3] ocamlPackages.mirage-mtime: init at 5.0.0 --- .../ocaml-modules/mirage-mtime/default.nix | 29 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-mtime/default.nix diff --git a/pkgs/development/ocaml-modules/mirage-mtime/default.nix b/pkgs/development/ocaml-modules/mirage-mtime/default.nix new file mode 100644 index 000000000000..5293a65c7eee --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-mtime/default.nix @@ -0,0 +1,29 @@ +{ + lib, + fetchurl, + buildDunePackage, + mtime, + version ? "5.0.0", +}: + +buildDunePackage { + pname = "mirage-mtime"; + + inherit version; + + src = fetchurl { + url = "https://github.com/mirage/mirage-mtime/releases/download/v${version}/mirage-mtime-${version}.tbz"; + hash = "sha256-IwdaAyZyj8gfRPxQP9SOwb28AbtVy9PY7qcr0Pns9GU="; + }; + + propagatedBuildInputs = [ + mtime + ]; + + meta = { + description = "Monotonic time for MirageOS"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + homepage = "https://github.com/mirage/mirage-mtime"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index e494aa9830bd..6eedf4967f89 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1206,6 +1206,8 @@ let mirage-logs = callPackage ../development/ocaml-modules/mirage-logs { }; + mirage-mtime = callPackage ../development/ocaml-modules/mirage-mtime { }; + mirage-nat = callPackage ../development/ocaml-modules/mirage-nat { }; mirage-net = callPackage ../development/ocaml-modules/mirage-net { }; From 1e9f22f118be8661049bf1391b52ed59912db014 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 27 Feb 2025 08:48:16 +0100 Subject: [PATCH 3/3] =?UTF-8?q?ocamlPackages.arp:=203.1.1=20=E2=86=92=204.?= =?UTF-8?q?0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.tcpip: 8.2.0 → 9.0.0 --- .../development/ocaml-modules/arp/default.nix | 25 +++++-------------- .../ocaml-modules/dns/resolver.nix | 2 ++ .../ocaml-modules/tcpip/default.nix | 21 ++++++---------- 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/pkgs/development/ocaml-modules/arp/default.nix b/pkgs/development/ocaml-modules/arp/default.nix index af1f2380a28b..e1585623147e 100644 --- a/pkgs/development/ocaml-modules/arp/default.nix +++ b/pkgs/development/ocaml-modules/arp/default.nix @@ -10,32 +10,23 @@ logs, lwt, macaddr, - mirage-time, + mirage-sleep, alcotest, - mirage-clock-unix, - mirage-flow, - mirage-random, - mirage-random-test, - mirage-time-unix, + bos, mirage-vnetif, - bisect_ppx, }: buildDunePackage rec { pname = "arp"; - version = "3.1.1"; + version = "4.0.0"; src = fetchurl { url = "https://github.com/mirage/${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - hash = "sha256-6jPFiene6jAPtivCugtVfP3+6k9A5gBoWzpoxoaPBvE="; + hash = "sha256-C2Bh/2NwZqCJEidCnkhwRMoW3AsbQtvwdFh9IiJkDaU="; }; minimalOCamlVersion = "4.08"; - nativeBuildInputs = [ - bisect_ppx - ]; - propagatedBuildInputs = [ cstruct duration @@ -44,18 +35,14 @@ buildDunePackage rec { logs lwt macaddr - mirage-time + mirage-sleep ]; ## NOTE: As of 18 april 2023 and ARP version 3.0.0, tests fail on Darwin. doCheck = !stdenv.hostPlatform.isDarwin; checkInputs = [ alcotest - mirage-clock-unix - mirage-flow - mirage-random - mirage-random-test - mirage-time-unix + bos mirage-vnetif ]; diff --git a/pkgs/development/ocaml-modules/dns/resolver.nix b/pkgs/development/ocaml-modules/dns/resolver.nix index 3fb9446f7ac3..c647aa49aa47 100644 --- a/pkgs/development/ocaml-modules/dns/resolver.nix +++ b/pkgs/development/ocaml-modules/dns/resolver.nix @@ -13,6 +13,7 @@ tcpip, tls, tls-mirage, + mirage-crypto-rng-mirage, dnssec, alcotest, }: @@ -37,6 +38,7 @@ buildDunePackage { tcpip tls tls-mirage + mirage-crypto-rng-mirage ]; doCheck = true; diff --git a/pkgs/development/ocaml-modules/tcpip/default.nix b/pkgs/development/ocaml-modules/tcpip/default.nix index d72332b83248..5ca99b287b91 100644 --- a/pkgs/development/ocaml-modules/tcpip/default.nix +++ b/pkgs/development/ocaml-modules/tcpip/default.nix @@ -6,9 +6,9 @@ cstruct, cstruct-lwt, mirage-net, - mirage-clock, - mirage-crypto-rng-mirage, - mirage-time, + mirage-mtime, + mirage-crypto-rng, + mirage-sleep, macaddr, macaddr-cstruct, fmt, @@ -22,10 +22,8 @@ mirage-flow, mirage-vnetif, pcap-format, - mirage-clock-unix, arp, ipaddr-cstruct, - mirage-crypto-rng, lru, metrics, withFreestanding ? false, @@ -34,11 +32,11 @@ buildDunePackage rec { pname = "tcpip"; - version = "8.2.0"; + version = "9.0.0"; src = fetchurl { url = "https://github.com/mirage/mirage-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - hash = "sha256-kW5oirqJdnbERNuBKfSWOtc5+NG+Yx2eAJxiKLS31u0="; + hash = "sha256-WTd+01kIDY2pSuyRR0pTO62VXBK+eYJ77IU8y0ltZZo="; }; nativeBuildInputs = [ @@ -50,9 +48,9 @@ buildDunePackage rec { cstruct cstruct-lwt mirage-net - mirage-clock - mirage-crypto-rng-mirage - mirage-time + mirage-mtime + mirage-crypto-rng + mirage-sleep ipaddr-cstruct macaddr macaddr-cstruct @@ -75,11 +73,8 @@ buildDunePackage rec { doCheck = true; checkInputs = [ alcotest - mirage-crypto-rng - mirage-flow mirage-vnetif pcap-format - mirage-clock-unix ]; __darwinAllowLocalNetworking = true;