at v192 47 lines 1.2 kB view raw
1{ stdenv, fetchurl, ocaml, findlib, mysql, camlp4 }: 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 ocaml_version = (builtins.parseDrvName ocaml.name).version; 9 pname = "ocaml-mysql"; 10 version = "1.1.1"; 11in 12 13stdenv.mkDerivation { 14 name = "${pname}-${version}"; 15 16 src = fetchurl { 17 url = "https://forge.ocamlcore.org/frs/download.php/870/${pname}-${version}.tar.gz"; 18 sha256 = "f896fa101a05d81b85af8122fe1c2809008a5e5fdca00f9ceeb7eec356369e3a"; 19 }; 20 21 configureFlags = [ 22 "--prefix=$out" 23 "--libdir=$out/lib/ocaml/${ocaml_version}/site-lib/mysql" 24 ]; 25 26 buildInputs = [ocaml findlib mysql.lib camlp4 ]; 27 28 createFindlibDestdir = true; 29 30 propagatedBuildInputs = [ mysql.lib ]; 31 32 preConfigure = '' 33 export LDFLAGS="-L${mysql.lib}/lib/mysql" 34 ''; 35 36 buildPhase = '' 37 make 38 make opt 39 ''; 40 41 meta = { 42 homepage = http://ocaml-mysql.forge.ocamlcore.org; 43 description = "Bindings for interacting with MySQL databases from ocaml"; 44 license = stdenv.lib.licenses.lgpl21Plus; 45 maintainers = [ stdenv.lib.maintainers.roconnor ]; 46 }; 47}