2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, fetchpatch, ocaml, findlib, mysql }:
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
# TODO: la versione stabile da' un errore di compilazione dovuto a
|
|
|
|
# qualche cambiamento negli header .h
|
|
|
|
# TODO: compilazione di moduli dipendenti da zip, ssl, tcl, gtk, gtk2
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "ocaml-mysql";
|
|
|
|
in
|
|
|
|
|
2016-10-05 09:32:30 +02:00
|
|
|
stdenv.mkDerivation rec {
|
2010-12-31 18:48:55 +01:00
|
|
|
name = "${pname}-${version}";
|
2017-03-25 10:54:46 +01:00
|
|
|
version = "1.2.1";
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-25 10:54:46 +01:00
|
|
|
url = "http://ygrek.org.ua/p/release/ocaml-mysql/${name}.tar.gz";
|
|
|
|
sha256 = "06mb2bq7v37wn0lza61917zqgb4bsg1xxb73myjyn88p6khl6yl2";
|
2010-12-31 18:48:55 +01:00
|
|
|
};
|
|
|
|
|
2013-06-16 22:25:08 +02:00
|
|
|
configureFlags = [
|
|
|
|
"--prefix=$out"
|
2016-10-05 09:32:30 +02:00
|
|
|
"--libdir=$out/lib/ocaml/${ocaml.version}/site-lib/mysql"
|
2013-06-16 22:25:08 +02:00
|
|
|
];
|
|
|
|
|
2017-03-25 10:54:46 +01:00
|
|
|
buildInputs = [ ocaml findlib ];
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-07-09 17:43:03 +02:00
|
|
|
propagatedBuildInputs = [ mysql.connector-c ];
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/ygrek/ocaml-mysql/compare/v1.2.1...d6d1b3b262ae2cf493ef56f1dd7afcf663a70a26.patch";
|
|
|
|
sha256 = "0018s2wcrvbsw9yaqmwq500qmikwffrgdp5xg9b8v7ixhd4gi6hn";
|
|
|
|
})
|
|
|
|
];
|
2010-12-31 18:48:55 +01:00
|
|
|
|
|
|
|
meta = {
|
2013-06-16 22:25:08 +02:00
|
|
|
homepage = http://ocaml-mysql.forge.ocamlcore.org;
|
2010-12-31 18:48:55 +01:00
|
|
|
description = "Bindings for interacting with MySQL databases from ocaml";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.lgpl21Plus;
|
2010-12-31 18:48:55 +01:00
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
|
|
|
};
|
|
|
|
}
|