fetchDebianPatch: Require patch names with extensions

Otherwise the fetcher is unuseable with patches
whose filename (in Debian) doesn't end in `.patch`.

authored by Weijia Wang and committed by nicoo 0cfc319f 4fdb5e27

+5 -5
+2 -2
doc/builders/fetchers.chapter.md
··· 86 86 ## `fetchDebianPatch` {#fetchdebianpatch} 87 87 88 88 A wrapper around `fetchpatch`, which takes: 89 - - `patch` and `hash`: the patch's filename without the `.patch` suffix, 89 + - `patch` and `hash`: the patch's filename, 90 90 and its hash after normalization by `fetchpatch` ; 91 91 - `pname`: the Debian source package's name ; 92 92 - `version`: the upstream version number ; ··· 110 110 (fetchDebianPatch { 111 111 inherit pname version; 112 112 debianRevision = "5"; 113 - name = "Add-quotes-to-SOAPAction-header-in-SoapClient"; 113 + name = "Add-quotes-to-SOAPAction-header-in-SoapClient.patch"; 114 114 hash = "sha256-xA8Wnrpr31H8wy3zHSNfezFNjUJt1HbSXn3qUMzeKc0="; 115 115 }) 116 116 ];
+3 -3
pkgs/build-support/fetchdebianpatch/default.nix
··· 1 1 { lib, fetchpatch }: 2 2 3 3 lib.makeOverridable ( 4 - { pname, version, debianRevision ? null, patch, hash, 5 - area ? "main", name ? "${patch}.patch" }: 4 + { pname, version, debianRevision ? null, area ? "main", 5 + patch, name ? patch, hash }: 6 6 let 7 7 inherit (lib.strings) hasPrefix substring; 8 8 prefix = ··· 14 14 inherit name hash; 15 15 url = 16 16 "https://sources.debian.org/data/${area}/${prefix}/" 17 - + "${pname}/${versionString}/debian/patches/${patch}.patch"; 17 + + "${pname}/${versionString}/debian/patches/${patch}"; 18 18 } 19 19 )