# patch plugin

## patch - apply locally stored patches

Host dependencies:

> - patch

Usage:

    # Specify the local source kind
    kind: patch

    # Specify the project relative path to a patch file
    path: files/somefile.diff

    # Optionally specify the strip level, defaults to 1
    strip-level: 1

See built-in functionality doumentation for details on common configuration options for sources.

### Reporting SourceInfo

The patch source reports the project relative path of the patch file as the url.

Further, the patch source reports the SourceInfoMedium.LOCAL medium and the SourceVersionType.SHA256 version_type, for which it reports the sha256 checksum of the patch file as the version.

The guess_version of a patch source is meaningless, as it is tied instead to the BuildStream project in which it is contained.