diff --git a/pkgs/build-support/ocaml/dune.nix b/pkgs/build-support/ocaml/dune.nix index ce3b389b9cee..1ad2d236446a 100644 --- a/pkgs/build-support/ocaml/dune.nix +++ b/pkgs/build-support/ocaml/dune.nix @@ -30,7 +30,10 @@ stdenv.mkDerivation ({ ''; installPhase = '' runHook preInstall - dune install --prefix $out --libdir $OCAMLFIND_DESTDIR ${pname} + dune install --prefix $out --libdir $OCAMLFIND_DESTDIR ${pname} \ + ${if lib.versionAtLeast Dune.version "2.9" + then "--docdir $out/share/doc" + else ""} runHook postInstall '';