mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
fetchDebianPatch: Require patch names with extensions
Otherwise the fetcher is unuseable with patches whose filename (in Debian) doesn't end in `.patch`.
This commit is contained in:
parent
4fdb5e275d
commit
0cfc319f83
|
@ -86,7 +86,7 @@ Most other fetchers return a directory rather than a single file.
|
|||
## `fetchDebianPatch` {#fetchdebianpatch}
|
||||
|
||||
A wrapper around `fetchpatch`, which takes:
|
||||
- `patch` and `hash`: the patch's filename without the `.patch` suffix,
|
||||
- `patch` and `hash`: the patch's filename,
|
||||
and its hash after normalization by `fetchpatch` ;
|
||||
- `pname`: the Debian source package's name ;
|
||||
- `version`: the upstream version number ;
|
||||
|
@ -110,7 +110,7 @@ buildPythonPackage rec {
|
|||
(fetchDebianPatch {
|
||||
inherit pname version;
|
||||
debianRevision = "5";
|
||||
name = "Add-quotes-to-SOAPAction-header-in-SoapClient";
|
||||
name = "Add-quotes-to-SOAPAction-header-in-SoapClient.patch";
|
||||
hash = "sha256-xA8Wnrpr31H8wy3zHSNfezFNjUJt1HbSXn3qUMzeKc0=";
|
||||
})
|
||||
];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{ lib, fetchpatch }:
|
||||
|
||||
lib.makeOverridable (
|
||||
{ pname, version, debianRevision ? null, patch, hash,
|
||||
area ? "main", name ? "${patch}.patch" }:
|
||||
{ pname, version, debianRevision ? null, area ? "main",
|
||||
patch, name ? patch, hash }:
|
||||
let
|
||||
inherit (lib.strings) hasPrefix substring;
|
||||
prefix =
|
||||
|
@ -14,6 +14,6 @@ lib.makeOverridable (
|
|||
inherit name hash;
|
||||
url =
|
||||
"https://sources.debian.org/data/${area}/${prefix}/"
|
||||
+ "${pname}/${versionString}/debian/patches/${patch}.patch";
|
||||
+ "${pname}/${versionString}/debian/patches/${patch}";
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue