1 { lib, fetchurl, stdenv
2 , ocaml, findlib, ocamlbuild
3 , ctypes, mariadb, libmysqlclient }:
5 lib.throwIfNot (lib.versionAtLeast ocaml.version "4.07")
6 "mariadb is not available for OCaml ${ocaml.version}"
8 stdenv.mkDerivation rec {
9 pname = "ocaml${ocaml.version}-mariadb";
13 url = "https://github.com/andrenth/ocaml-mariadb/releases/download/${version}/ocaml-mariadb-${version}.tar.gz";
14 sha256 = "sha256-3/C1Gz6luUzS7oaudLlDHMT6JB2v5OdbLVzJhtayHGM=";
17 nativeBuildInputs = [ ocaml findlib ocamlbuild ];
18 buildInputs = [ mariadb libmysqlclient ];
19 propagatedBuildInputs = [ ctypes ];
23 preInstall = "mkdir -p $OCAMLFIND_DESTDIR/stublibs";
26 description = "OCaml bindings for MariaDB";
27 license = lib.licenses.mit;
28 maintainers = with lib.maintainers; [ bcc32 ];
29 homepage = "https://github.com/andrenth/ocaml-mariadb";
30 inherit (ocaml.meta) platforms;