2018-07-21 01:44:44 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, ocaml, findlib, mysql }:
|
2010-12-31 17:48:55 +00: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 08:32:30 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2010-12-31 17:48:55 +00:00
|
|
|
name = "${pname}-${version}";
|
2017-03-25 09:54:46 +00:00
|
|
|
version = "1.2.1";
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2017-03-25 09:54:46 +00:00
|
|
|
url = "http://ygrek.org.ua/p/release/ocaml-mysql/${name}.tar.gz";
|
|
|
|
sha256 = "06mb2bq7v37wn0lza61917zqgb4bsg1xxb73myjyn88p6khl6yl2";
|
2010-12-31 17:48:55 +00:00
|
|
|
};
|
|
|
|
|
2013-06-16 21:25:08 +01:00
|
|
|
configureFlags = [
|
|
|
|
"--prefix=$out"
|
2016-10-05 08:32:30 +01:00
|
|
|
"--libdir=$out/lib/ocaml/${ocaml.version}/site-lib/mysql"
|
2013-06-16 21:25:08 +01:00
|
|
|
];
|
|
|
|
|
2017-03-25 09:54:46 +00:00
|
|
|
buildInputs = [ ocaml findlib ];
|
2010-12-31 17:48:55 +00:00
|
|
|
|
|
|
|
createFindlibDestdir = true;
|
|
|
|
|
2017-07-09 16:43:03 +01: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 17:48:55 +00:00
|
|
|
|
|
|
|
meta = {
|
2013-06-16 21:25:08 +01:00
|
|
|
homepage = http://ocaml-mysql.forge.ocamlcore.org;
|
2010-12-31 17:48:55 +00:00
|
|
|
description = "Bindings for interacting with MySQL databases from ocaml";
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl21Plus;
|
2010-12-31 17:48:55 +00:00
|
|
|
maintainers = [ stdenv.lib.maintainers.roconnor ];
|
|
|
|
};
|
|
|
|
}
|