buildDunePackage: new support function; use it to refactor some OCaml derivations
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
{ stdenv, ocaml, findlib, dune, cohttp, ocaml_lwt, uri, ppx_sexp_conv }:
|
||||
{ stdenv, buildDunePackage, cohttp, ocaml_lwt, uri, ppx_sexp_conv }:
|
||||
|
||||
if !stdenv.lib.versionAtLeast cohttp.version "0.99"
|
||||
then cohttp
|
||||
else
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ocaml${ocaml.version}-cohttp-lwt-${version}";
|
||||
inherit (cohttp) version src installPhase meta;
|
||||
buildDunePackage rec {
|
||||
pname = "cohttp-lwt";
|
||||
inherit (cohttp) version src meta;
|
||||
|
||||
buildInputs = [ ocaml findlib dune uri ppx_sexp_conv ];
|
||||
buildInputs = [ uri ppx_sexp_conv ];
|
||||
|
||||
propagatedBuildInputs = [ cohttp ocaml_lwt ];
|
||||
|
||||
buildPhase = "dune build -p cohttp-lwt";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user