CONTRIBUTING: allow fetching unaccepted changes if the URL is stable

Reword documentation to allow using `fetchpatch` for changes that are
not yet merged upstream. Additionally, put a greater emphasis on URL
stability.

fixes #400873

authored by Marcin Serwin and committed by Alyssa Ross 406ea5c0 8d21d162

+3 -2
+3 -2
pkgs/README.md
··· 508 patches = [ 509 (fetchpatch { 510 name = "fix-check-for-using-shared-freetype-lib.patch"; 511 - url = "http://git.ghostscript.com/?p=ghostpdl.git;a=patch;h=8f5d285"; 512 hash = "sha256-uRcxaCjd+WAuGrXOmGfFeu79cUILwkRdBu48mwcBE7g="; 513 }) 514 ]; ··· 517 518 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. 519 520 ### Vendoring patches 521 522 In the following cases, a `.patch` file _should_ be added to Nixpkgs repository, instead of retrieved: 523 524 - solves problems unique to packaging in Nixpkgs 525 - - is already proposed upstream but not merged yet 526 - cannot be fetched easily 527 - has a high chance to disappear in the future due to unstable or unreliable URLs 528
··· 508 patches = [ 509 (fetchpatch { 510 name = "fix-check-for-using-shared-freetype-lib.patch"; 511 + url = "https://cgit.ghostscript.com/cgi-bin/cgit.cgi/ghostpdl.git/patch/?id=8f5d28536e4518716fdfe974e580194c8f57871d"; 512 hash = "sha256-uRcxaCjd+WAuGrXOmGfFeu79cUILwkRdBu48mwcBE7g="; 513 }) 514 ]; ··· 517 518 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. 519 520 + When adding patches in this manner you should be reasonably sure that the used URL is stable. Patches referencing open pull requests will change when the PR is updated and code forges (such as GitHub) usually garbage collect commits that are no longer reachable due to rebases/amends. 521 + 522 ### Vendoring patches 523 524 In the following cases, a `.patch` file _should_ be added to Nixpkgs repository, instead of retrieved: 525 526 - solves problems unique to packaging in Nixpkgs 527 - cannot be fetched easily 528 - has a high chance to disappear in the future due to unstable or unreliable URLs 529