about summary refs log tree commit diff
path: root/doc/contributing/coding-conventions.chapter.md
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2022-06-03 11:17:25 +0200
committerFlorian Klink <flokli@flokli.de>2022-06-03 14:37:31 +0200
commit1cefcfab2d3eb9274f4627a178a59d6f980f7f3b (patch)
tree25cd448fd8587224366f1ef48571f053eb4465eb /doc/contributing/coding-conventions.chapter.md
parent7b3000f1d0f24b5ad8bd51a70290167fc2819a50 (diff)
nixos/doc: move fetchpatch documentation to fetcher documentation
… and link from the coding-conventions chapter to it.

Closes #48569.
Diffstat (limited to 'doc/contributing/coding-conventions.chapter.md')
-rw-r--r--doc/contributing/coding-conventions.chapter.md13
1 files changed, 2 insertions, 11 deletions
diff --git a/doc/contributing/coding-conventions.chapter.md b/doc/contributing/coding-conventions.chapter.md
index 41973292863c7..9a01b5a0828c8 100644
--- a/doc/contributing/coding-conventions.chapter.md
+++ b/doc/contributing/coding-conventions.chapter.md
@@ -511,6 +511,8 @@ patches = [
 
 Otherwise, you can add a `.patch` file to the `nixpkgs` repository. In the interest of keeping our maintenance burden to a minimum, only patches that are unique to `nixpkgs` should be added in this way.
 
+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`. Check [](#fetchpatch) for details.
+
 ```nix
 patches = [ ./0001-changes.patch ];
 ```
@@ -538,17 +540,6 @@ If you do need to do create this sort of patch file, one way to do so is with gi
     $ git diff -a > 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`:
-
-- `relative`: Similar to using `git-diff`'s `--relative` flag, only keep changes inside the specified directory, making paths relative to it.
-- `stripLen`: Remove the first `stripLen` components of pathnames in the patch.
-- `extraPrefix`: Prefix pathnames by this string.
-- `excludes`: Exclude files matching these patterns (applies after the above arguments).
-- `includes`: Include only files matching these patterns (applies after the above arguments).
-- `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.