From d4e265327f9b98ee6bddd08f422bc0372c484193 Mon Sep 17 00:00:00 2001 From: nicoo Date: Wed, 30 Aug 2023 07:48:42 +0000 Subject: fetchDebianPatch: Rename `patch` parameter, make `name` overrideable This allows using the fetcher with `invalidateFetcherByDrvHash` for testing. --- pkgs/build-support/fetchdebianpatch/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pkgs/build-support/fetchdebianpatch') diff --git a/pkgs/build-support/fetchdebianpatch/default.nix b/pkgs/build-support/fetchdebianpatch/default.nix index c1230484f82b0..ba6aa63a732b6 100644 --- a/pkgs/build-support/fetchdebianpatch/default.nix +++ b/pkgs/build-support/fetchdebianpatch/default.nix @@ -1,13 +1,14 @@ { lib, fetchpatch }: lib.makeOverridable ( - { pname, version, debianRevision ? null, name, hash, area ? "main" }: + { pname, version, debianRevision ? null, patch, hash, + area ? "main", name ? "${patch}.patch" }: let versionString = if debianRevision == null then version else "${version}-${debianRevision}"; in fetchpatch { + inherit name hash; url = "https://sources.debian.org/data/${area}/${builtins.substring 0 1 pname}/" - + "${pname}/${versionString}/debian/patches/${name}.patch"; - inherit hash; + + "${pname}/${versionString}/debian/patches/${patch}.patch"; } ) -- cgit 1.4.1