From acb5655bd6c7f13972fa40f9f06baa2e2b7c65ae Mon Sep 17 00:00:00 2001 From: Mitsuhiro Nakamura Date: Thu, 23 May 2019 10:11:13 +0900 Subject: [PATCH] ocamlPackages.{camlpdf,cpdf}: fix build --- pkgs/development/ocaml-modules/camlpdf/default.nix | 6 ++++++ pkgs/development/ocaml-modules/cpdf/default.nix | 6 ++++++ 2 files changed, 12 insertions(+) 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 = ''