From c29ae2c846e0d6dcfb2b8fc3699b2fa36e184f38 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 22 Feb 2024 07:32:37 +0100 Subject: [PATCH] =?UTF-8?q?ocamlPackages.caqti:=201.9.1=20=E2=86=92=202.1.?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../development/ocaml-modules/caqti/async.nix | 2 +- .../ocaml-modules/caqti/default.nix | 31 ++++++++++++------- .../ocaml-modules/caqti/driver-mariadb.nix | 2 -- .../ocaml-modules/caqti/driver-postgresql.nix | 2 -- .../ocaml-modules/caqti/driver-sqlite3.nix | 8 +++-- .../ocaml-modules/caqti/dynload.nix | 2 -- pkgs/development/ocaml-modules/caqti/lwt.nix | 2 -- .../ocaml-modules/caqti/type-calendar.nix | 2 -- 8 files changed, 26 insertions(+), 25 deletions(-) diff --git a/pkgs/development/ocaml-modules/caqti/async.nix b/pkgs/development/ocaml-modules/caqti/async.nix index 328cf37986d2..22755be193df 100644 --- a/pkgs/development/ocaml-modules/caqti/async.nix +++ b/pkgs/development/ocaml-modules/caqti/async.nix @@ -4,7 +4,7 @@ buildDunePackage { pname = "caqti-async"; inherit (caqti) version src; - duneVersion = "3"; + minimalOCamlVersion = "4.14"; propagatedBuildInputs = [ async_kernel async_unix caqti core_kernel ]; diff --git a/pkgs/development/ocaml-modules/caqti/default.nix b/pkgs/development/ocaml-modules/caqti/default.nix index 68eb2657b324..218f4cf3c120 100644 --- a/pkgs/development/ocaml-modules/caqti/default.nix +++ b/pkgs/development/ocaml-modules/caqti/default.nix @@ -1,25 +1,34 @@ -{ lib, fetchurl, buildDunePackage, ocaml -, cppo, logs, ptime, uri, bigstringaf -, re, cmdliner, alcotest +{ lib +, fetchurl +, buildDunePackage +, angstrom +, bigstringaf +, domain-name +, dune-site +, ipaddr +, logs +, lwt-dllist +, mtime +, ptime +, uri }: buildDunePackage rec { pname = "caqti"; - version = "1.9.1"; + version = "2.1.1"; - minimalOCamlVersion = "4.04"; - duneVersion = "3"; + minimalOCamlVersion = "4.08"; src = fetchurl { url = "https://github.com/paurkedal/ocaml-caqti/releases/download/v${version}/caqti-v${version}.tbz"; - sha256 = "sha256-PQBgJBNx3IcE6/vyNIf26a2xStU22LBhff8eM6UPaJ4="; + hash = "sha256-SDpTX0HiZBkX/BgyzkrRX/w/ToKDsbMBiiYXNJWDCQo="; }; - nativeBuildInputs = [ cppo ]; - propagatedBuildInputs = [ logs ptime uri bigstringaf ]; - checkInputs = [ re cmdliner alcotest ]; + buildInputs = [ dune-site ]; + propagatedBuildInputs = [ angstrom bigstringaf domain-name ipaddr logs lwt-dllist mtime ptime uri ]; - doCheck = lib.versionAtLeast ocaml.version "4.08"; + # Checks depend on caqti-driver-sqlite3 (circural dependency) + doCheck = false; meta = { description = "Unified interface to relational database libraries"; diff --git a/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix b/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix index 859402d83ea1..bff515eff381 100644 --- a/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix +++ b/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix @@ -6,8 +6,6 @@ buildDunePackage { propagatedBuildInputs = [ caqti mariadb ]; - duneVersion = "3"; - meta = caqti.meta // { description = "MariaDB driver for Caqti using C bindings"; }; diff --git a/pkgs/development/ocaml-modules/caqti/driver-postgresql.nix b/pkgs/development/ocaml-modules/caqti/driver-postgresql.nix index d48ae1186bf7..f33e38fab8df 100644 --- a/pkgs/development/ocaml-modules/caqti/driver-postgresql.nix +++ b/pkgs/development/ocaml-modules/caqti/driver-postgresql.nix @@ -4,8 +4,6 @@ buildDunePackage { pname = "caqti-driver-postgresql"; inherit (caqti) version src; - duneVersion = "3"; - propagatedBuildInputs = [ caqti postgresql ]; meta = caqti.meta // { diff --git a/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix b/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix index d6c230d9dbde..ddac07f7fcfb 100644 --- a/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix +++ b/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix @@ -1,13 +1,15 @@ -{ lib, buildDunePackage, caqti, ocaml_sqlite3 }: +{ lib, buildDunePackage, caqti, ocaml_sqlite3, alcotest }: buildDunePackage { pname = "caqti-driver-sqlite3"; inherit (caqti) version src; - duneVersion = "3"; - propagatedBuildInputs = [ caqti ocaml_sqlite3 ]; + checkInputs = [ alcotest ]; + + doCheck = true; + meta = caqti.meta // { description = "Sqlite3 driver for Caqti using C bindings"; }; diff --git a/pkgs/development/ocaml-modules/caqti/dynload.nix b/pkgs/development/ocaml-modules/caqti/dynload.nix index dfd52e24dd1e..3dd94fc0e310 100644 --- a/pkgs/development/ocaml-modules/caqti/dynload.nix +++ b/pkgs/development/ocaml-modules/caqti/dynload.nix @@ -4,8 +4,6 @@ buildDunePackage { pname = "caqti-dynload"; inherit (caqti) version src; - duneVersion = "3"; - propagatedBuildInputs = [ caqti findlib ]; meta = caqti.meta // { diff --git a/pkgs/development/ocaml-modules/caqti/lwt.nix b/pkgs/development/ocaml-modules/caqti/lwt.nix index 66e5a7ce293d..d06421136280 100644 --- a/pkgs/development/ocaml-modules/caqti/lwt.nix +++ b/pkgs/development/ocaml-modules/caqti/lwt.nix @@ -4,8 +4,6 @@ buildDunePackage { pname = "caqti-lwt"; inherit (caqti) version src; - duneVersion = "3"; - propagatedBuildInputs = [ caqti logs lwt ]; meta = caqti.meta // { description = "Lwt support for Caqti"; }; diff --git a/pkgs/development/ocaml-modules/caqti/type-calendar.nix b/pkgs/development/ocaml-modules/caqti/type-calendar.nix index db4d5983aedf..26b0887f20e8 100644 --- a/pkgs/development/ocaml-modules/caqti/type-calendar.nix +++ b/pkgs/development/ocaml-modules/caqti/type-calendar.nix @@ -4,8 +4,6 @@ buildDunePackage { pname = "caqti-type-calendar"; inherit (caqti) src version; - duneVersion = "3"; - propagatedBuildInputs = [ calendar caqti ]; meta = caqti.meta // {