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

This commit is contained in:
Théo Zimmermann
2018-11-05 11:21:46 +01:00
parent 5fc73fd52e
commit 794158fcd5
64 changed files with 506 additions and 828 deletions

View File

@@ -1,24 +1,15 @@
{ stdenv, ocaml, findlib, dune, git, cohttp-lwt
, alcotest, mtime, nocrypto
}:
{ buildDunePackage, git, cohttp-lwt, alcotest, mtime, nocrypto }:
stdenv.mkDerivation rec {
name = "ocaml${ocaml.version}-git-http-${version}";
buildDunePackage rec {
pname = "git-http";
inherit (git) version src;
buildInputs = [ ocaml findlib dune alcotest mtime nocrypto ];
buildInputs = [ alcotest mtime nocrypto ];
propagatedBuildInputs = [ git cohttp-lwt ];
buildPhase = "dune build -p git-http";
inherit (dune) installPhase;
doCheck = true;
checkPhase = "dune runtest -p git-http";
meta = {
description = "Client implementation of the Smart HTTP Git protocol in pure OCaml";
inherit (git.meta) homepage license maintainers platforms;
inherit (git.meta) homepage license maintainers;
};
}