nixpkgs/pkgs/build-support/fetchdebianpatch/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
453 B
Nix
Raw Normal View History

2023-08-29 20:09:47 +00:00
{ lib, fetchpatch }:
lib.makeOverridable (
{ pname, version, debianRevision ? null, patch, hash,
area ? "main", name ? "${patch}.patch" }:
2023-08-29 20:09:47 +00:00
let versionString =
if debianRevision == null then version else "${version}-${debianRevision}";
in fetchpatch {
inherit name hash;
2023-08-29 20:09:47 +00:00
url =
"https://sources.debian.org/data/${area}/${builtins.substring 0 1 pname}/"
+ "${pname}/${versionString}/debian/patches/${patch}.patch";
2023-08-29 20:09:47 +00:00
}
)