From 0ad6c9b78a363e976191dfcae373608f97438331 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Fri, 2 Jan 2026 09:12:07 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.cryptokit:=201.20.1=20=E2=86=92?= =?UTF-8?q?=201.21.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.gapi-ocaml: 0.4.7 → 0.4.8 --- .../ocaml-modules/cryptokit/default.nix | 19 ++++++++++++------- .../ocaml-modules/gapi-ocaml/default.nix | 19 +++++++++++-------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/pkgs/development/ocaml-modules/cryptokit/default.nix b/pkgs/development/ocaml-modules/cryptokit/default.nix index 33ec440fb5a2..8d33c7e47534 100644 --- a/pkgs/development/ocaml-modules/cryptokit/default.nix +++ b/pkgs/development/ocaml-modules/cryptokit/default.nix @@ -1,23 +1,28 @@ { lib, buildDunePackage, + ocaml, fetchFromGitHub, zlib, dune-configurator, zarith, + version ? if lib.versionAtLeast ocaml.version "4.13" then "1.21.1" else "1.20.1", }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "cryptokit"; - version = "1.20.1"; - - minimalOCamlVersion = "4.08"; + inherit version; src = fetchFromGitHub { owner = "xavierleroy"; repo = "cryptokit"; - rev = "release${lib.replaceStrings [ "." ] [ "" ] version}"; - hash = "sha256-VFY10jGctQfIUVv7dK06KP8zLZHLXTxvLyTCObS+W+E="; + tag = "release${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}"; + hash = + { + "1.21.1" = "sha256-9JU9grZpTTrYYO9gai2UPq119HfenI1JAY+EyoR6x7Q="; + "1.20.1" = "sha256-VFY10jGctQfIUVv7dK06KP8zLZHLXTxvLyTCObS+W+E="; + } + ."${finalAttrs.version}"; }; # dont do autotools configuration, but do trigger findlib's preConfigure hook @@ -39,4 +44,4 @@ buildDunePackage rec { description = "Library of cryptographic primitives for OCaml"; license = lib.licenses.lgpl2Only; }; -} +}) diff --git a/pkgs/development/ocaml-modules/gapi-ocaml/default.nix b/pkgs/development/ocaml-modules/gapi-ocaml/default.nix index 84ffc37a30cd..a6bec8a069cb 100644 --- a/pkgs/development/ocaml-modules/gapi-ocaml/default.nix +++ b/pkgs/development/ocaml-modules/gapi-ocaml/default.nix @@ -10,17 +10,20 @@ ounit2, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "gapi-ocaml"; - version = "0.4.7"; - - minimalOCamlVersion = "4.08"; + version = if lib.versionAtLeast cryptokit.version "1.21" then "0.4.8" else "0.4.7"; src = fetchFromGitHub { owner = "astrada"; - repo = pname; - rev = "v${version}"; - hash = "sha256-uQJfrgF0oafURlamHslt9hX9MP4vFeVqDhuX7T/kjiY="; + repo = "gapi-ocaml"; + tag = "v${finalAttrs.version}"; + hash = + { + "0.4.7" = "sha256-uQJfrgF0oafURlamHslt9hX9MP4vFeVqDhuX7T/kjiY="; + "0.4.8" = "sha256-RvHcse3ech8BwnR0Kd1oE5ycAdSBpeQ0IGAp9egFbBY="; + } + ."${finalAttrs.version}"; }; nativeBuildInputs = [ cppo ]; @@ -41,4 +44,4 @@ buildDunePackage rec { license = lib.licenses.mit; maintainers = with lib.maintainers; [ bennofs ]; }; -} +})