This function helps building an OCaml package that builds with topkg. There are currently many such packages in nixpkgs and this function would greatly simplify adding more. This is heavily inspired by `ocamlPackages.buildDunePackage`.