1{ stdenv, lib, fetchurl, fetchpatch, ocaml, findlib, libmysqlclient }:
2
3# TODO: la versione stabile da' un errore di compilazione dovuto a
4# qualche cambiamento negli header .h
5# TODO: compilazione di moduli dipendenti da zip, ssl, tcl, gtk, gtk2
6
7let
8 pname = "ocaml-mysql";
9in
10
11stdenv.mkDerivation rec {
12 name = "${pname}-${version}";
13 version = "1.2.1";
14
15 src = fetchurl {
16 url = "http://ygrek.org.ua/p/release/ocaml-mysql/${name}.tar.gz";
17 sha256 = "06mb2bq7v37wn0lza61917zqgb4bsg1xxb73myjyn88p6khl6yl2";
18 };
19
20 configureFlags = [
21 "--prefix=$out"
22 "--libdir=$out/lib/ocaml/${ocaml.version}/site-lib/mysql"
23 ];
24
25 nativeBuildInputs = [ ocaml findlib ];
26
27 createFindlibDestdir = true;
28
29 propagatedBuildInputs = [ libmysqlclient ];
30
31 strictDeps = true;
32
33 patches = [
34 (fetchpatch {
35 url = "https://github.com/ygrek/ocaml-mysql/compare/v1.2.1...d6d1b3b262ae2cf493ef56f1dd7afcf663a70a26.patch";
36 sha256 = "0018s2wcrvbsw9yaqmwq500qmikwffrgdp5xg9b8v7ixhd4gi6hn";
37 })
38 ];
39
40 meta = {
41 homepage = "http://ocaml-mysql.forge.ocamlcore.org";
42 description = "Bindings for interacting with MySQL databases from ocaml";
43 license = lib.licenses.lgpl21Plus;
44 maintainers = [ lib.maintainers.roconnor ];
45 };
46}