{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, camlp4, ocaml_react , lambdaTerm, ocaml_lwt, makeWrapper, camomile, zed, cppo, ppx_tools }: stdenv.mkDerivation rec { version = "1.19.3"; name = "utop-${version}"; src = fetchurl { url = "https://github.com/diml/utop/archive/${version}.tar.gz"; sha256 = "16z02vp9n97iax4fqpbi7v86r75vbabxvnd1rirh8w2miixs1g4x"; }; buildInputs = [ ocaml findlib ocamlbuild makeWrapper cppo camlp4 ppx_tools ]; propagatedBuildInputs = [ lambdaTerm ocaml_lwt ]; createFindlibDestdir = true; configureFlags = [ "--enable-camlp4" ] ++ stdenv.lib.optional (ppx_tools != null && !stdenv.lib.versionAtLeast ocaml.version "4.04") "--enable-interact"; buildPhase = '' make make doc ''; dontStrip = true; postFixup = let p = p: "${p}/lib/ocaml/${ocaml.version}/site-lib"; in '' pushd $out/bin for prog in * do mv $prog .$prog-wrapped cat > $prog <