@@ -27,9 +27,11 @@ stdenv.mkDerivation {
2727 patches = [ ./install-emacs-to-site-lisp.patch
2828 ./use-nix-ocaml-byteflags.patch ];
2929
30− postPatch = stdenv.lib.optionalString (camlp4 != null) ''
30+ postPatch = optionalString (camlp4 != null) ''
3131 substituteInPlace src/Makefile.master.in \
3232 --replace "+camlp4" "${camlp4}/lib/ocaml/${ocaml.version}/site-lib/camlp4/"
33+ '' + optionalString (versionAtLeast (stdenv.lib.getVersion ocamlPackages.yojson) "1.4") ''
34+ substituteInPlace src/scripting/Makefile.in --replace yojson.cmo yojson.cma
3335 '';
3436
3537 # The bytecode executable is dependent on the dynamic library provided by