1{
2 lib,
3 fetchurl,
4 buildDunePackage,
5 angstrom,
6 bigstringaf,
7 domain-name,
8 dune-site,
9 ipaddr,
10 logs,
11 lru,
12 lwt-dllist,
13 mtime,
14 ptime,
15 uri,
16 stdenv,
17 darwin,
18}:
19
20buildDunePackage rec {
21 pname = "caqti";
22 version = "2.2.4";
23
24 minimalOCamlVersion = "4.08";
25
26 src = fetchurl {
27 url = "https://github.com/paurkedal/ocaml-caqti/releases/download/v${version}/caqti-v${version}.tbz";
28 hash = "sha256-uOpDKCAVTsCVEyxPeyRLBs2FU+CyA1GFuETZxPMK+Ls=";
29 };
30
31 buildInputs = [ dune-site ];
32 propagatedBuildInputs = [
33 angstrom
34 bigstringaf
35 domain-name
36 ipaddr
37 logs
38 lru
39 lwt-dllist
40 mtime
41 ptime
42 uri
43 ];
44
45 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ];
46
47 # Checks depend on caqti-driver-sqlite3 (circural dependency)
48 doCheck = false;
49
50 meta = {
51 description = "Unified interface to relational database libraries";
52 license = with lib.licenses; [
53 lgpl3Plus
54 ocamlLgplLinkingException
55 ];
56 maintainers = with lib.maintainers; [ bcc32 ];
57 homepage = "https://github.com/paurkedal/ocaml-caqti";
58 };
59}