@@ -0,0 +1,42 @@
1+{stdenv, fetchFromGitHub, ocaml, findlib, buildOcaml, type_conv, camlp4,
2+ ocamlmod, ocamlify, ounit, expect}:
3+let
4+ version = "0.9.2";
5+in
6+stdenv.mkDerivation {
7+ name = "ocamlbuild";
8+ inherit version;
9+
10+ src = fetchFromGitHub {
11+ owner = "ocaml";
12+ repo = "ocamlbuild";
13+ rev = version;
14+ sha256 = "0q4bvik08v444g1pill9zgwal48xs50jf424lbryfvqghhw5xjjc";
15+ };
16+
17+ createFindlibDestdir = true;
18+
19+ buildInputs = [ ocaml findlib ];
20+
21+ configurePhase = ''
22+ make -f configure.make Makefile.config \
23+ "OCAMLBUILD_PREFIX=$out" \
24+ "OCAMLBUILD_BINDIR=$out/bin" \
25+ "OCAMLBUILD_LIBDIR=$OCAMLFIND_DESTDIR"
26+ '';
27+
28+ # configurePhase = "ocaml setup.ml -configure --prefix $out";
29+ # buildPhase = "ocaml setup.ml -build";
30+ # installPhase = "ocaml setup.ml -install";
31+
32+ # meta = with stdenv.lib; {
33+ # homepage = http://oasis.forge.ocamlcore.org/;
34+ # description = "Configure, build and install system for OCaml projects";
35+ # license = licenses.lgpl21;
36+ # platforms = ocaml.meta.platforms or [];
37+ # maintainers = with maintainers; [
38+ # vbgl z77z
39+ # ];
40+ # };
41+}
42+