diff options
author | Stefan Frijters <sfrijters@gmail.com> | 2021-05-28 11:55:21 +0200 |
---|---|---|
committer | Stefan Frijters <sfrijters@gmail.com> | 2021-05-28 14:22:46 +0200 |
commit | 585f63b364460b11a25f1692678395465a8fe8b4 (patch) | |
tree | bfb30035da1b757be2b62aee91caccbdb38e8181 /doc/contributing/coding-conventions.chapter.md | |
parent | bcdb2d69bbbdc44c29db36aec72ef36d6d44fc35 (diff) | |
download | nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.tar nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.tar.gz nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.tar.bz2 nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.tar.lz nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.tar.xz nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.tar.zst nixpkgs-585f63b364460b11a25f1692678395465a8fe8b4.zip |
doc/coding-conventions: Add documentation for fetchpatch optional arguments
Diffstat (limited to 'doc/contributing/coding-conventions.chapter.md')
-rw-r--r-- | doc/contributing/coding-conventions.chapter.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md index 6076460b893..6516172adde 100644 --- a/doc/contributing/coding-conventions.chapter.md +++ b/doc/contributing/coding-conventions.chapter.md @@ -526,6 +526,16 @@ If you do need to do create this sort of patch file, one way to do so is with gi $ git diff > nixpkgs/pkgs/the/package/0001-changes.patch ``` +If a patch is available online but does not cleanly apply, it can be modified in some fixed ways by using additional optional arguments for `fetchpatch`: + +- `stripLen`: Remove the first `stripLen` components of pathnames in the patch. +- `extraPrefix`: Prefix pathnames by this string. +- `excludes`: Exclude files matching this pattern. +- `includes`: Include only files matching this pattern. +- `revert`: Revert the patch. + +Note that because the checksum is computed after applying these effects, using or modifying these arguments will have no effect unless the `sha256` argument is changed as well. + ## Package tests {#sec-package-tests} Tests are important to ensure quality and make reviews and automatic updates easy. |