2023-08-29 20:09:47 +00:00
|
|
|
{ lib, fetchpatch }:
|
|
|
|
|
|
|
|
lib.makeOverridable (
|
2023-09-06 17:47:59 +00:00
|
|
|
{ pname, version, debianRevision ? null, area ? "main",
|
|
|
|
patch, name ? patch, hash }:
|
2023-08-30 08:26:52 +00:00
|
|
|
let
|
|
|
|
inherit (lib.strings) hasPrefix substring;
|
|
|
|
prefix =
|
|
|
|
substring 0 (if hasPrefix "lib" pname then 4 else 1) pname;
|
|
|
|
versionString =
|
|
|
|
if debianRevision == null then version
|
|
|
|
else "${version}-${debianRevision}";
|
2023-08-29 20:09:47 +00:00
|
|
|
in fetchpatch {
|
2023-08-30 07:48:42 +00:00
|
|
|
inherit name hash;
|
2023-08-29 20:09:47 +00:00
|
|
|
url =
|
2023-08-30 08:26:52 +00:00
|
|
|
"https://sources.debian.org/data/${area}/${prefix}/"
|
2023-09-06 17:47:59 +00:00
|
|
|
+ "${pname}/${versionString}/debian/patches/${patch}";
|
2023-08-29 20:09:47 +00:00
|
|
|
}
|
|
|
|
)
|