2023-08-29 22:09:47 +02:00
|
|
|
{ lib, fetchpatch }:
|
|
|
|
|
|
|
|
lib.makeOverridable (
|
2023-09-06 19:47:59 +02:00
|
|
|
{ pname, version, debianRevision ? null, area ? "main",
|
|
|
|
patch, name ? patch, hash }:
|
2023-08-30 10:26:52 +02: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 22:09:47 +02:00
|
|
|
in fetchpatch {
|
2023-08-30 09:48:42 +02:00
|
|
|
inherit name hash;
|
2023-08-29 22:09:47 +02:00
|
|
|
url =
|
2023-08-30 10:26:52 +02:00
|
|
|
"https://sources.debian.org/data/${area}/${prefix}/"
|
2023-09-06 19:47:59 +02:00
|
|
|
+ "${pname}/${versionString}/debian/patches/${patch}";
|
2023-08-29 22:09:47 +02:00
|
|
|
}
|
|
|
|
)
|