From d6d54a41a00230ee14f3277fabed5f7982ddbef4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Sun, 28 Sep 2025 04:56:33 +0700 Subject: [PATCH] =?UTF-8?q?ocamlPackages.uring:=200.9=20=E2=86=92=202.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ocaml-modules/uring/default.nix | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/pkgs/development/ocaml-modules/uring/default.nix b/pkgs/development/ocaml-modules/uring/default.nix index 7ab261c06e12..6ee432359967 100644 --- a/pkgs/development/ocaml-modules/uring/default.nix +++ b/pkgs/development/ocaml-modules/uring/default.nix @@ -1,5 +1,7 @@ { lib, + ocaml, + version ? if lib.versionAtLeast ocaml.version "5.1" then "2.7.0" else "0.9", buildDunePackage, cstruct, dune-configurator, @@ -9,15 +11,28 @@ mdx, }: +let + param = + { + "0.9" = { + minimalOCamlVersion = "4.12"; + hash = "sha256-eXWIxfL9UsKKf4sanBjKfr6Od4fPDctVnkU+wjIXW0M="; + }; + "2.7.0" = { + minimalOCamlVersion = "5.1.0"; + hash = "sha256-mePi6/TXtxgtLYLyHRAdnRcgeldCVgUaPY+MZXSzC6U="; + }; + } + .${version}; +in buildDunePackage rec { pname = "uring"; - version = "0.9"; - - minimalOCamlVersion = "4.12"; + inherit version; + inherit (param) minimalOCamlVersion; src = fetchurl { url = "https://github.com/ocaml-multicore/ocaml-${pname}/releases/download/v${version}/${pname}-${version}.tbz"; - hash = "sha256-eXWIxfL9UsKKf4sanBjKfr6Od4fPDctVnkU+wjIXW0M="; + inherit (param) hash; }; propagatedBuildInputs = [