buildDunePackage: new support function; use it to refactor some OCaml derivations
This commit is contained in:
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user