ocaml: uchar: add the ability to build without dynamic linking

This commit is contained in:
Alexander Bantyev 2019-11-20 14:31:23 +03:00
parent 484e0a89f9
commit 08edfb6967
No known key found for this signature in database
GPG Key ID: E081FF12ADCB4AD5

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline }:
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, opaline, withShared ? true }:
stdenv.mkDerivation {
name = "ocaml${ocaml.version}-uchar-0.0.2";
@ -9,8 +9,8 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ ocaml ocamlbuild findlib opaline ];
buildInputs = [ findlib ];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=true";
buildInputs = [ findlib ocaml ocamlbuild opaline ];
buildPhase = "ocaml pkg/build.ml native=true native-dynlink=${if withShared then "true" else "false"}";
installPhase = "opaline -libdir $OCAMLFIND_DESTDIR";
configurePlatforms = [];