- packages can provide patch() directive to specify a patch file that should be applied to source code after expanding it and before building. - patches can have a when spec, so they're only applied under certain conditions - patches can be local files in the package's own directory, or they can be URLs which will be fetched from the internet.