ocamlPackages.lwt3: make dependency to camlp4 optional
This commit is contained in:
parent
b26c224293
commit
124071cacd
@ -1,6 +1,8 @@
|
|||||||
{ stdenv, fetchzip, pkgconfig, ncurses, libev, jbuilder
|
{ stdenv, fetchzip, pkgconfig, ncurses, libev, jbuilder
|
||||||
, ocaml, findlib, camlp4, cppo
|
, ocaml, findlib, cppo
|
||||||
, ocaml-migrate-parsetree, ppx_tools_versioned, result
|
, ocaml-migrate-parsetree, ppx_tools_versioned, result
|
||||||
|
, withP4 ? !stdenv.lib.versionAtLeast ocaml.version "4.07"
|
||||||
|
, camlp4 ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -13,12 +15,13 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
ocaml src/util/configure.ml -use-libev true -use-camlp4 true
|
ocaml src/util/configure.ml -use-libev true -use-camlp4 ${if withP4 then "true" else "false"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs = [ ncurses ocaml findlib jbuilder camlp4 cppo
|
buildInputs = [ ncurses ocaml findlib jbuilder cppo
|
||||||
ocaml-migrate-parsetree ppx_tools_versioned ];
|
ocaml-migrate-parsetree ppx_tools_versioned ]
|
||||||
|
++ stdenv.lib.optional withP4 camlp4;
|
||||||
propagatedBuildInputs = [ libev result ];
|
propagatedBuildInputs = [ libev result ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user