buildDunePackage: new support function; use it to refactor some OCaml derivations

This commit is contained in:
Théo Zimmermann
2018-11-07 10:08:03 +01:00
parent 5fc73fd52e
commit 794158fcd5
64 changed files with 506 additions and 828 deletions
@@ -1,26 +1,22 @@
{ stdenv, fetchFromGitHub, ocaml, findlib, dune, cppo
, bos, cmdliner, tyxml
}:
{ stdenv, fetchFromGitHub, buildDunePackage, cppo, bos, cmdliner, tyxml }:
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-odoc-${version}";
buildDunePackage rec {
pname = "odoc";
version = "1.3.0";
src = fetchFromGitHub {
owner = "ocaml";
repo = "odoc";
repo = pname;
rev = version;
sha256 = "0hjan5aj5zk8j8qyagv9r4hqm469mh207cv2m6kxwgnw0c3cz7sy";
};
buildInputs = [ ocaml findlib dune cppo bos cmdliner tyxml ];
inherit (dune) installPhase;
buildInputs = [ cppo bos cmdliner tyxml ];
meta = {
description = "A documentation generator for OCaml";
license = stdenv.lib.licenses.isc;
maintainers = [ stdenv.lib.maintainers.vbgl ];
inherit (ocaml.meta) platforms;
inherit (src.meta) homepage;
};
}