diff --git a/doc/builders/fetchers.chapter.md b/doc/builders/fetchers.chapter.md index ba105764904..22ddb3b5249 100644 --- a/doc/builders/fetchers.chapter.md +++ b/doc/builders/fetchers.chapter.md @@ -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="; }) ]; diff --git a/pkgs/build-support/fetchdebianpatch/default.nix b/pkgs/build-support/fetchdebianpatch/default.nix index c058b416d38..8d8076bd59d 100644 --- a/pkgs/build-support/fetchdebianpatch/default.nix +++ b/pkgs/build-support/fetchdebianpatch/default.nix @@ -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}"; } )