From 20b8eb5f552a48ef13db79cd86db4f58fbda7bea Mon Sep 17 00:00:00 2001 From: Ben <38633150+Ben9986@users.noreply.github.com> Date: Thu, 12 Dec 2024 07:02:21 +0000 Subject: [PATCH] pkgs/README.md: pkg version shall not be changed after patches (#363964) --- pkgs/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/README.md b/pkgs/README.md index 49c31a76ed43..9c78f667c002 100644 --- a/pkgs/README.md +++ b/pkgs/README.md @@ -492,6 +492,11 @@ Examples going from bad to best practices: Sometimes, changes are needed to the source to allow building a derivation in nixpkgs, or to get earlier access to an upstream fix or improvement. When using the `patches` parameter to `mkDerivation`, make sure the patch name clearly describes the reason for the patch, or add a comment. +> [!Note] +> The version of the package does not need to be changed just because a patch is applied. Declarative package installations don't depend on the version, while imperative `nix-env` installations can use [`upgrade --eq/leq/--always`](https://nix.dev/manual/nix/2.25/command-ref/nix-env/upgrade#flags). +> +> See [Versioning](#versioning) for details on package versioning. + ### 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 `fetchpatch`: