diff options
author | nicoo <nicoo@mur.at> | 2023-08-30 07:48:42 +0000 |
---|---|---|
committer | nicoo <nicoo@mur.at> | 2023-08-30 07:53:05 +0000 |
commit | d4e265327f9b98ee6bddd08f422bc0372c484193 (patch) | |
tree | 1ed32e9cb86200db31ccec9dd25620813d334813 /pkgs/build-support/fetchdebianpatch | |
parent | 7122aea5695e2d7bec80f2985e954eabe3874bd5 (diff) | |
download | nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.tar nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.tar.gz nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.tar.bz2 nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.tar.lz nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.tar.xz nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.tar.zst nixlib-d4e265327f9b98ee6bddd08f422bc0372c484193.zip |
fetchDebianPatch: Rename `patch` parameter, make `name` overrideable
This allows using the fetcher with `invalidateFetcherByDrvHash` for testing.
Diffstat (limited to 'pkgs/build-support/fetchdebianpatch')
-rw-r--r-- | pkgs/build-support/fetchdebianpatch/default.nix | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkgs/build-support/fetchdebianpatch/default.nix b/pkgs/build-support/fetchdebianpatch/default.nix index c1230484f82b..ba6aa63a732b 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"; } ) |