The patch module lets you apply your unified diffs in pure OCaml.
The loosely specified diff
file format is widely used for
transmitting differences of line-based information. The motivating
example is opam, which is able to
validate updates being cryptographically signed by providing a unified
diff. In addition, some support for the git diff format is available.
ocaml-patch-3.0.0-1.fc43.src.rpm
For the purpose of submitting this package to Fedora, here is the RPM spec file.