diff options
author | Vincent Laporte <Vincent.Laporte@gmail.com> | 2015-01-25 11:31:06 +0100 |
---|---|---|
committer | Vincent Laporte <Vincent.Laporte@gmail.com> | 2015-01-28 12:03:25 +0100 |
commit | 8e77300cc1aedead3bc7717ffcd5c4a59f4eb42e (patch) | |
tree | d763110052b206800c45f7e7f523b7c1d54a0ad9 /pkgs/development | |
parent | a931de00b362477df1770b75f49e3ee8df4398fc (diff) |
Adds ocp-index
ocp-index is a simple and light-weight documentation extractor for OCaml. Homepage: http://typerex.ocamlpro.com/ocp-index.html
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/ocaml/ocp-index/default.nix | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/development/tools/ocaml/ocp-index/default.nix b/pkgs/development/tools/ocaml/ocp-index/default.nix new file mode 100644 index 0000000000000..767a5e17cb4ae --- /dev/null +++ b/pkgs/development/tools/ocaml/ocp-index/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchzip, ocaml, findlib, ocpBuild, ocpIndent, opam, cmdliner, ncurses, re, lambdaTerm, libev }: + +let inherit (stdenv.lib) getVersion versionAtLeast optional; in + +assert versionAtLeast (getVersion ocaml) "3.12.1"; +assert versionAtLeast (getVersion ocpBuild) "1.99.6-beta"; +assert versionAtLeast (getVersion ocpIndent) "1.4.2"; + +let version = "1.1.1"; in + +stdenv.mkDerivation { + + name = "ocp-index-${version}"; + + src = fetchzip { + url = "http://github.com/OCamlPro/ocp-index/archive/${version}.tar.gz"; + sha256 = "173lqbyivwv1zf9ifpxa9f8m2y3kybzs3idrwyzy824ixdqv2fww"; + }; + + buildInputs = [ ocaml findlib ocpBuild opam cmdliner ncurses re libev ] + ++ optional (versionAtLeast (getVersion lambdaTerm) "1.7") lambdaTerm; + propagatedBuildInputs = [ ocpIndent ]; + + createFindlibDestdir = true; + + preBuild = "export TERM=xterm"; + postInstall = "mv $out/lib/{ocp-index,ocaml/${getVersion ocaml}/site-lib/}"; + + meta = { + homepage = http://typerex.ocamlpro.com/ocp-index.html; + description = "A simple and light-weight documentation extractor for OCaml"; + license = stdenv.lib.licenses.lgpl3; + platforms = ocaml.meta.platforms; + maintainers = with stdenv.lib.maintainers; [ vbgl ]; + }; +} |