diff --git a/pkgs/development/ocaml-modules/camlpdf/default.nix b/pkgs/development/ocaml-modules/camlpdf/default.nix index 01441fcb4ec..a0a00472a4d 100644 --- a/pkgs/development/ocaml-modules/camlpdf/default.nix +++ b/pkgs/development/ocaml-modules/camlpdf/default.nix @@ -21,6 +21,12 @@ stdenv.mkDerivation rec { EOF ''; + makeFlags = with stdenv.lib; + optionals (versionAtLeast ocaml.version "4.06") [ + "OCAMLBCFLAGS+=-unsafe-string" + "OCAMLNCFLAGS+=-unsafe-string" + ]; + createFindlibDestdir = true; meta = with stdenv.lib; { diff --git a/pkgs/development/ocaml-modules/cpdf/default.nix b/pkgs/development/ocaml-modules/cpdf/default.nix index bcbb96c2c0c..b6473126158 100644 --- a/pkgs/development/ocaml-modules/cpdf/default.nix +++ b/pkgs/development/ocaml-modules/cpdf/default.nix @@ -14,6 +14,12 @@ stdenv.mkDerivation { buildInputs = [ ocaml findlib ncurses ]; propagatedBuildInputs = [ camlpdf ]; + makeFlags = with stdenv.lib; + optionals (versionAtLeast ocaml.version "4.06") [ + "OCAMLBCFLAGS+=-unsafe-string" + "OCAMLNCFLAGS+=-unsafe-string" + ]; + createFindlibDestdir = true; postInstall = ''