ocamlPackages.piqi: fix build with OCaml 4.06
This commit is contained in:
parent
cf68a14a01
commit
38fa082e79
@ -1,4 +1,4 @@
|
|||||||
{stdenv, fetchurl, ocaml, findlib, camlp4, which, ulex, easy-format, ocaml_optcomp, xmlm, base64}:
|
{ stdenv, fetchurl, ocaml, findlib, which, ulex, easy-format, ocaml_optcomp, xmlm, base64 }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "0.6.13";
|
version = "0.6.13";
|
||||||
@ -9,10 +9,10 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "1whqr2bb3gds2zmrzqnv8vqka9928w4lx6mi6g244kmbwb2h8d8l";
|
sha256 = "1whqr2bb3gds2zmrzqnv8vqka9928w4lx6mi6g244kmbwb2h8d8l";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ocaml findlib camlp4 which ocaml_optcomp];
|
buildInputs = [ ocaml findlib which ocaml_optcomp ];
|
||||||
propagatedBuildInputs = [ulex xmlm easy-format base64];
|
propagatedBuildInputs = [ulex xmlm easy-format base64];
|
||||||
|
|
||||||
patches = [ ./no-ocamlpath-override.patch ];
|
patches = [ ./no-ocamlpath-override.patch ./safe-string.patch ];
|
||||||
|
|
||||||
createFindlibDestdir = true;
|
createFindlibDestdir = true;
|
||||||
|
|
||||||
|
13
pkgs/development/ocaml-modules/piqi/safe-string.patch
Normal file
13
pkgs/development/ocaml-modules/piqi/safe-string.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- a/piqilib/piqi_json_parser.mll
|
||||||
|
+++ b/piqilib/piqi_json_parser.mll
|
||||||
|
@@ -189,8 +189,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
let len = lexbuf.lex_curr_pos - lexbuf.lex_start_pos in
|
||||||
|
let s = lexbuf.lex_buffer in
|
||||||
|
let start = lexbuf.lex_start_pos in
|
||||||
|
- check_adjust_utf8 v lexbuf s start len;
|
||||||
|
- Buffer.add_substring v.buf s start len
|
||||||
|
+ check_adjust_utf8 v lexbuf (Bytes.unsafe_to_string s) start len;
|
||||||
|
+ Buffer.add_subbytes v.buf s start len
|
||||||
|
|
||||||
|
let map_lexeme f lexbuf =
|
||||||
|
let len = lexbuf.lex_curr_pos - lexbuf.lex_start_pos in
|
Loading…
x
Reference in New Issue
Block a user