docs: replace fetchpatch with fetchpatch2

This commit is contained in:
Jörg Thalheim
2025-05-11 12:00:24 +02:00
parent 1fdaba680b
commit 1bf8b9e5d5
+3 -3
View File
@@ -501,12 +501,12 @@ When using the `patches` parameter to `mkDerivation`, make sure the patch name c
### 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`:
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`:
```nix
{
patches = [
(fetchpatch {
(fetchpatch2 {
name = "fix-check-for-using-shared-freetype-lib.patch";
url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285";
hash = "sha256-uRcxaCjd+WAuGrXOmGfFeu79cUILwkRdBu48mwcBE7g=";
@@ -515,7 +515,7 @@ In the interest of keeping our maintenance burden and the size of Nixpkgs to a m
}
```
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 [the `fetchpatch` reference](https://nixos.org/manual/nixpkgs/unstable/#fetchpatch) for details.
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 `fetchpatch2`. Check [the `fetchpatch` reference](https://nixos.org/manual/nixpkgs/unstable/#fetchpatch) for details.
### Vendoring patches