From ffb544310b8f3c138fcd8c3a04e7f6d37f4d074c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 11 Mar 2026 22:45:18 +0100 Subject: [PATCH] ocamlPackages.ocsipersist: migrate to logs --- .../ocaml-modules/ocsipersist/lib.nix | 31 ++++++++++++++----- .../ocaml-modules/ocsipersist/pgsql.nix | 4 +-- .../ocaml-modules/ocsipersist/sqlite.nix | 4 +-- 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/pkgs/development/ocaml-modules/ocsipersist/lib.nix b/pkgs/development/ocaml-modules/ocsipersist/lib.nix index d88841190bc8..339e1c11d0f6 100644 --- a/pkgs/development/ocaml-modules/ocsipersist/lib.nix +++ b/pkgs/development/ocaml-modules/ocsipersist/lib.nix @@ -1,20 +1,37 @@ { lib, buildDunePackage, + applyPatches, + fetchpatch, fetchFromGitHub, lwt_ppx, lwt, }: -buildDunePackage rec { +buildDunePackage (finalAttrs: { pname = "ocsipersist-lib"; version = "2.0.0"; - src = fetchFromGitHub { - owner = "ocsigen"; - repo = "ocsipersist"; - tag = version; - hash = "sha256-7CKKwJxqxUpCMNs4xGbsMZ6Qud9AnczBStTXS+N21DU="; + src = applyPatches { + + src = fetchFromGitHub { + owner = "ocsigen"; + repo = "ocsipersist"; + tag = finalAttrs.version; + hash = "sha256-7CKKwJxqxUpCMNs4xGbsMZ6Qud9AnczBStTXS+N21DU="; + }; + + patches = [ + # Migrate to logs + (fetchpatch { + url = "https://github.com/ocsigen/ocsipersist/commit/1fc0088b4dc2226f01863dd25f8ed56528c5543d.patch"; + hash = "sha256-WR7SW8jAAo47AIQ7UMQNF8FTXgj6FbxIqFjrLhu7wFs="; + excludes = [ + "*.opam" + "dune-project" + ]; + }) + ]; }; buildInputs = [ lwt_ppx ]; @@ -26,4 +43,4 @@ buildDunePackage rec { maintainers = [ lib.maintainers.vbgl ]; homepage = "https://github.com/ocsigen/ocsipersist/"; }; -} +}) diff --git a/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix b/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix index 3d7c001c306f..ae37d0a2ce0b 100644 --- a/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix +++ b/pkgs/development/ocaml-modules/ocsipersist/pgsql.nix @@ -1,7 +1,7 @@ { buildDunePackage, ocsipersist, - lwt_log, + logs, pgocaml, xml-light, }: @@ -11,7 +11,7 @@ buildDunePackage { inherit (ocsipersist) version src; propagatedBuildInputs = [ - lwt_log + logs ocsipersist pgocaml ]; diff --git a/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix b/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix index 429f56f46ef2..aed27a3d03b7 100644 --- a/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix +++ b/pkgs/development/ocaml-modules/ocsipersist/sqlite.nix @@ -1,7 +1,7 @@ { buildDunePackage, ocsipersist, - lwt_log, + logs, ocaml_sqlite3, ocsigen_server, }: @@ -11,7 +11,7 @@ buildDunePackage { inherit (ocsipersist) version src; propagatedBuildInputs = [ - lwt_log + logs ocaml_sqlite3 ocsipersist ];