diff --git a/pkgs/development/ocaml-modules/caqti/async.nix b/pkgs/development/ocaml-modules/caqti/async.nix new file mode 100644 index 000000000000..0e0da6a94bb7 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/async.nix @@ -0,0 +1,11 @@ +{ lib, buildDunePackage, async_kernel, async_unix, caqti, core_kernel }: + +buildDunePackage { + pname = "caqti-async"; + useDune2 = true; + inherit (caqti) version src; + + propagatedBuildInputs = [ async_kernel async_unix caqti core_kernel ]; + + meta = caqti.meta // { description = "Async support for Caqti"; }; +} diff --git a/pkgs/development/ocaml-modules/caqti/default.nix b/pkgs/development/ocaml-modules/caqti/default.nix new file mode 100644 index 000000000000..6df0af597c21 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/default.nix @@ -0,0 +1,26 @@ +{ lib, fetchFromGitHub, buildDunePackage, cppo, logs, ptime, uri }: + +buildDunePackage rec { + pname = "caqti"; + version = "1.3.0"; + useDune2 = true; + + minimumOCamlVersion = "4.04"; + + src = fetchFromGitHub { + owner = "paurkedal"; + repo = "ocaml-${pname}"; + rev = "v${version}"; + sha256 = "1ksjchfjnh059wvd95my1sv9b0ild0dfaiynbf2xsaz7zg1y4xmw"; + }; + + buildInputs = [ cppo ]; + propagatedBuildInputs = [ logs ptime uri ]; + + meta = { + description = "Unified interface to relational database libraries"; + license = "LGPL-3.0-or-later WITH OCaml-LGPL-linking-exception"; + maintainers = with lib.maintainers; [ bcc32 ]; + homepage = "https://github.com/paurkedal/ocaml-caqti"; + }; +} diff --git a/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix b/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix new file mode 100644 index 000000000000..5f4f681540e9 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/driver-mariadb.nix @@ -0,0 +1,13 @@ +{ lib, buildDunePackage, caqti, mariadb }: + +buildDunePackage { + pname = "caqti-driver-mariadb"; + useDune2 = true; + inherit (caqti) version src; + + propagatedBuildInputs = [ caqti mariadb ]; + + 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 new file mode 100644 index 000000000000..a1b427a5edf4 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/driver-postgresql.nix @@ -0,0 +1,13 @@ +{ lib, buildDunePackage, caqti, postgresql }: + +buildDunePackage { + pname = "caqti-driver-postgresql"; + useDune2 = true; + inherit (caqti) version src; + + propagatedBuildInputs = [ caqti postgresql ]; + + meta = caqti.meta // { + description = "PostgreSQL driver for Caqti based on C bindings"; + }; +} diff --git a/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix b/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix new file mode 100644 index 000000000000..5282ba5ef505 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/driver-sqlite3.nix @@ -0,0 +1,13 @@ +{ lib, buildDunePackage, caqti, ocaml_sqlite3 }: + +buildDunePackage { + pname = "caqti-driver-sqlite3"; + useDune2 = true; + inherit (caqti) version src; + + propagatedBuildInputs = [ caqti ocaml_sqlite3 ]; + + 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 new file mode 100644 index 000000000000..6ed86683728b --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/dynload.nix @@ -0,0 +1,13 @@ +{ lib, buildDunePackage, caqti }: + +buildDunePackage { + pname = "caqti-dynload"; + useDune2 = true; + inherit (caqti) version src; + + propagatedBuildInputs = [ caqti ]; + + meta = caqti.meta // { + description = "Dynamic linking of Caqti drivers using findlib.dynload"; + }; +} diff --git a/pkgs/development/ocaml-modules/caqti/lwt.nix b/pkgs/development/ocaml-modules/caqti/lwt.nix new file mode 100644 index 000000000000..f02fa377f806 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/lwt.nix @@ -0,0 +1,11 @@ +{ lib, buildDunePackage, caqti, logs, lwt }: + +buildDunePackage { + pname = "caqti-lwt"; + useDune2 = true; + inherit (caqti) version src; + + 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 new file mode 100644 index 000000000000..d2050e2cf474 --- /dev/null +++ b/pkgs/development/ocaml-modules/caqti/type-calendar.nix @@ -0,0 +1,14 @@ +{ lib, buildDunePackage, calendar, caqti }: + +buildDunePackage { + pname = "caqti-type-calendar"; + version = "1.2.0"; + useDune2 = true; + inherit (caqti) src; + + propagatedBuildInputs = [ calendar caqti ]; + + meta = caqti.meta // { + description = "Date and time field types using the calendar library"; + }; +} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 1c987133167d..37e95baac9fc 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -130,6 +130,22 @@ let cairo2 = callPackage ../development/ocaml-modules/cairo2 { }; + caqti = callPackage ../development/ocaml-modules/caqti { }; + + caqti-async = callPackage ../development/ocaml-modules/caqti/async.nix { }; + + caqti-driver-mariadb = callPackage ../development/ocaml-modules/caqti/driver-mariadb.nix { }; + + caqti-driver-postgresql = callPackage ../development/ocaml-modules/caqti/driver-postgresql.nix { }; + + caqti-driver-sqlite3 = callPackage ../development/ocaml-modules/caqti/driver-sqlite3.nix { }; + + caqti-dynload = callPackage ../development/ocaml-modules/caqti/dynload.nix { }; + + caqti-lwt = callPackage ../development/ocaml-modules/caqti/lwt.nix { }; + + caqti-type-calendar = callPackage ../development/ocaml-modules/caqti/type-calendar.nix { }; + cfstream = callPackage ../development/ocaml-modules/cfstream { }; charInfo_width = callPackage ../development/ocaml-modules/charInfo_width { };