From 5c50f0987172ee863bba9c1cba8c71edd2c31160 Mon Sep 17 00:00:00 2001 From: aleksana Date: Thu, 12 Jun 2025 22:17:59 +0800 Subject: [PATCH] pkgs/README.md: require to specify the purpose of the patch --- pkgs/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/README.md b/pkgs/README.md index 6201839f23c45..60c3e2b4db91e 100644 --- a/pkgs/README.md +++ b/pkgs/README.md @@ -521,6 +521,8 @@ When using the `patches` parameter to `mkDerivation`, make sure the patch name c > > See [Versioning](#versioning) for details on package versioning. +The following describes two ways to include the patch. Regardless of how the patch is included, you _must_ ensure its purpose is clear and obvious. This enables other maintainers to more easily determine when old patches are no longer required. Typically, you can improve clarity with carefully considered filenames, attribute names, and/or comments; these should explain the patch's _intention_. Additionally, it may sometimes be helpful to clarify _how_ it resolves the issue. For example: _"fix gcc14 build by adding missing include"_. + ### Fetching patches In the interest of keeping our maintenance burden and the size of Nixpkgs to a minimum, patches already merged upstream or published elsewhere _should_ be retrieved using `fetchpatch2`: