about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/sqlite3/default.nix
blob: 63dc06634d716390e8d97e2a5a268797207ddedd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{stdenv, fetchurl, sqlite, ocaml, findlib, pkgconfig}:

stdenv.mkDerivation {
  name = "ocaml-sqlite3-2.0.4";

  src = fetchurl {
    url = https://bitbucket.org/mmottl/sqlite3-ocaml/downloads/sqlite3-ocaml-2.0.4.tar.gz;
    sha256 = "51ccb4c7a240eb40652c59e1770cfe1827dfa1eb926c969d19ff414aef4e80a1";
  };

  buildInputs = [ocaml findlib pkgconfig ];

  #configureFlags = "--with-sqlite3=${sqlite}";

  preConfigure = ''
    export PKG_CONFIG_PATH=${sqlite}/lib/pkgconfig/
    export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR
    mkdir -p $out/bin
  '';

  createFindlibDestdir = true;

  meta = {
    homepage = https://bitbucket.org/mmottl/sqlite3-ocaml;
    description = "OCaml bindings to the SQLite 3 database access library";
    license = "MIT/X11";
    platforms = ocaml.meta.platforms;
    maintainers = [
      stdenv.lib.maintainers.z77z
    ];
  };
}