about summary refs log tree commit diff
path: root/pkgs/development/ocaml-modules/sqlite3/default.nix
blob: 1903068bb0b2f42825a9ee54b274cc577df57ce1 (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
33
34
35
36
37
{stdenv, fetchurl, sqlite, ocaml, findlib}:

let
  ocaml_version = (builtins.parseDrvName ocaml.name).version;
  version = "1.5.8";
in

stdenv.mkDerivation {
  name = "ocaml-sqlite3-${version}";

  src = fetchurl {
    url = "http://hg.ocaml.info/release/ocaml-sqlite3/archive/" +
          "release-${version}.tar.bz2";
    sha256 = "0ccy9b4pl9586vlzdkk3kvkz8xqc023ih1aw4nndyjnabkvgl832";
  };

  buildInputs = [ocaml findlib];

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

  preConfigure = ''
    export OCAMLPATH=$OCAMLPATH:$OCAMLFIND_DESTDIR
    mkdir -p $out/bin
  '';

  createFindlibDestdir = true;

  meta = {
    homepage = "http://ocaml.info/home/ocaml_sources.html#ocaml-sqlite3";
    description = "OCaml bindings to the SQLite 3 database access library";
    license = "MIT/X11";
    platforms = ocaml.meta.platforms;
    maintainers = [
      stdenv.lib.maintainers.z77z
    ];
  };
}