Merge pull request #119126 from fabaff/pycomfoconnect
[NixPkgs.git] / pkgs / development / ocaml-modules / mysql / default.nix
blob6ccdfa9cf81c688aeae6b0d92d103c73ced2e15e
1 { stdenv, lib, fetchurl, fetchpatch, ocaml, findlib, libmysqlclient }:
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
7 let
8   pname = "ocaml-mysql";
9 in
11 stdenv.mkDerivation rec {
12   name = "${pname}-${version}";
13   version = "1.2.1";
15   src = fetchurl {
16     url = "http://ygrek.org.ua/p/release/ocaml-mysql/${name}.tar.gz";
17     sha256 = "06mb2bq7v37wn0lza61917zqgb4bsg1xxb73myjyn88p6khl6yl2";
18   };
20   configureFlags = [
21      "--prefix=$out"
22      "--libdir=$out/lib/ocaml/${ocaml.version}/site-lib/mysql"
23   ];
25   buildInputs = [ ocaml findlib ];
27   createFindlibDestdir = true;
29   propagatedBuildInputs = [ libmysqlclient ];
31   patches = [
32     (fetchpatch {
33       url = "https://github.com/ygrek/ocaml-mysql/compare/v1.2.1...d6d1b3b262ae2cf493ef56f1dd7afcf663a70a26.patch";
34       sha256 = "0018s2wcrvbsw9yaqmwq500qmikwffrgdp5xg9b8v7ixhd4gi6hn";
35     })
36   ];
38   meta = {
39     homepage = "http://ocaml-mysql.forge.ocamlcore.org";
40     description = "Bindings for interacting with MySQL databases from ocaml";
41     license = lib.licenses.lgpl21Plus;
42     maintainers = [ lib.maintainers.roconnor ];
43   };