From 21c2509a9186425b60460fd9f602ee93eb75f35e Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 24 Feb 2025 07:01:12 +0100 Subject: [PATCH 1/2] ocamlPackages.mirage-ptime: init at 5.0.0 --- .../ocaml-modules/mirage-ptime/default.nix | 28 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/ocaml-modules/mirage-ptime/default.nix diff --git a/pkgs/development/ocaml-modules/mirage-ptime/default.nix b/pkgs/development/ocaml-modules/mirage-ptime/default.nix new file mode 100644 index 000000000000..af68dd9ad5a0 --- /dev/null +++ b/pkgs/development/ocaml-modules/mirage-ptime/default.nix @@ -0,0 +1,28 @@ +{ + lib, + buildDunePackage, + fetchurl, + ptime, + version ? "5.0.0", +}: + +buildDunePackage { + inherit version; + + pname = "mirage-ptime"; + + src = fetchurl { + url = "https://github.com/mirage/mirage-ptime/releases/download/v${version}/mirage-ptime-${version}.tbz"; + hash = "sha256-1VNWBGjVuU2yWwVzjCSZ8pDuZrFKwitDAuZn8fpENHE="; + }; + + propagatedBuildInputs = [ ptime ]; + + meta = { + description = "A POSIX clock for MirageOS"; + license = lib.licenses.isc; + maintainers = [ lib.maintainers.vbgl ]; + changelog = "https://raw.githubusercontent.com/mirage/mirage-ptime/refs/tags/v${version}/CHANGES.md"; + homepage = "https://github.com/mirage/mirage-ptime"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 7bebc3af9364..35d5ba77ceaf 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1216,6 +1216,8 @@ let mirage-protocols = callPackage ../development/ocaml-modules/mirage-protocols { }; + mirage-ptime = callPackage ../development/ocaml-modules/mirage-ptime { }; + mirage-random = callPackage ../development/ocaml-modules/mirage-random { }; mirage-random-test = callPackage ../development/ocaml-modules/mirage-random-test { }; From a23dab1f2c88554c58ab4d90bb32ef0871a3b5a9 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 24 Feb 2025 07:01:20 +0100 Subject: [PATCH 2/2] =?UTF-8?q?ocamlPackages.tls:=201.0.4=20=E2=86=92=202.?= =?UTF-8?q?0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/ocaml-modules/tls/async.nix | 6 +++--- pkgs/development/ocaml-modules/tls/default.nix | 4 ++-- pkgs/development/ocaml-modules/tls/eio.nix | 9 ++++----- pkgs/development/ocaml-modules/tls/lwt.nix | 6 +++--- pkgs/development/ocaml-modules/tls/mirage.nix | 4 ++-- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/development/ocaml-modules/tls/async.nix b/pkgs/development/ocaml-modules/tls/async.nix index 906ec0b83b14..d70f6b4b6498 100644 --- a/pkgs/development/ocaml-modules/tls/async.nix +++ b/pkgs/development/ocaml-modules/tls/async.nix @@ -4,10 +4,10 @@ async, cstruct-async, core, - mirage-crypto-rng-async, + mirage-crypto-rng, }: -buildDunePackage rec { +buildDunePackage { pname = "tls-async"; inherit (tls) src version; @@ -20,7 +20,7 @@ buildDunePackage rec { async core cstruct-async - mirage-crypto-rng-async + mirage-crypto-rng tls ]; diff --git a/pkgs/development/ocaml-modules/tls/default.nix b/pkgs/development/ocaml-modules/tls/default.nix index a576d1327925..71905433743c 100644 --- a/pkgs/development/ocaml-modules/tls/default.nix +++ b/pkgs/development/ocaml-modules/tls/default.nix @@ -18,11 +18,11 @@ buildDunePackage rec { pname = "tls"; - version = "1.0.4"; + version = "2.0.0"; src = fetchurl { url = "https://github.com/mirleft/ocaml-tls/releases/download/v${version}/tls-${version}.tbz"; - hash = "sha256-yFt8Gh4ipseWEHsnJVld3iYElMDvBrYdn1O+IuHcQug="; + hash = "sha256-aEcNa6hIAHWQjAzGn/6Cq7y7g6t/mI0mYzWhnxLCamI="; }; minimalOCamlVersion = "4.08"; diff --git a/pkgs/development/ocaml-modules/tls/eio.nix b/pkgs/development/ocaml-modules/tls/eio.nix index f8381d2f8fa1..ef32131a26b1 100644 --- a/pkgs/development/ocaml-modules/tls/eio.nix +++ b/pkgs/development/ocaml-modules/tls/eio.nix @@ -5,20 +5,19 @@ eio_main, logs, mdx, - mirage-crypto-rng-eio, + mirage-crypto-rng, ptime, tls, }: -buildDunePackage rec { +buildDunePackage { pname = "tls-eio"; inherit (tls) src meta version; minimalOCamlVersion = "5.0"; - # Tests are not compatible with mirage-crypto-rng 1.2.0 - doCheck = false; + doCheck = true; nativeCheckInputs = [ mdx.bin ]; @@ -31,7 +30,7 @@ buildDunePackage rec { propagatedBuildInputs = [ ptime eio - mirage-crypto-rng-eio + mirage-crypto-rng tls ]; } diff --git a/pkgs/development/ocaml-modules/tls/lwt.nix b/pkgs/development/ocaml-modules/tls/lwt.nix index bc201900742d..76bc7973b16b 100644 --- a/pkgs/development/ocaml-modules/tls/lwt.nix +++ b/pkgs/development/ocaml-modules/tls/lwt.nix @@ -2,10 +2,10 @@ buildDunePackage, tls, lwt, - mirage-crypto-rng-lwt, + mirage-crypto-rng, }: -buildDunePackage rec { +buildDunePackage { pname = "tls-lwt"; inherit (tls) src meta version; @@ -16,7 +16,7 @@ buildDunePackage rec { propagatedBuildInputs = [ lwt - mirage-crypto-rng-lwt + mirage-crypto-rng tls ]; } diff --git a/pkgs/development/ocaml-modules/tls/mirage.nix b/pkgs/development/ocaml-modules/tls/mirage.nix index d15ef5ef84f6..053fff613cb0 100644 --- a/pkgs/development/ocaml-modules/tls/mirage.nix +++ b/pkgs/development/ocaml-modules/tls/mirage.nix @@ -3,11 +3,11 @@ tls, fmt, lwt, - mirage-clock, mirage-crypto, mirage-crypto-pk, mirage-flow, mirage-kv, + mirage-ptime, ptime, }: @@ -18,11 +18,11 @@ buildDunePackage { propagatedBuildInputs = [ fmt lwt - mirage-clock mirage-crypto mirage-crypto-pk mirage-flow mirage-kv + mirage-ptime ptime tls ];