Kde/patches: get patches with lib.toast.patches.patchesInPath
This commit is contained in:
parent
16f79d8a7d
commit
c00ef6ab7c
1 changed files with 2 additions and 9 deletions
|
|
@ -3,24 +3,17 @@
|
||||||
removeFiles = lib.attrsets.filterAttrs (n: v: v == "directory") rootDirs;
|
removeFiles = lib.attrsets.filterAttrs (n: v: v == "directory") rootDirs;
|
||||||
programsToPatch = builtins.attrNames removeFiles;
|
programsToPatch = builtins.attrNames removeFiles;
|
||||||
|
|
||||||
getPatches = name:
|
|
||||||
builtins.map (value: ./${name}/${value}) (builtins.attrNames (
|
|
||||||
lib.attrsets.filterAttrs (
|
|
||||||
n: v:
|
|
||||||
v == "regular" && lib.strings.hasSuffix ".patch" n
|
|
||||||
) (builtins.readDir ./${name})
|
|
||||||
));
|
|
||||||
|
|
||||||
bigOverlay = final: prev:
|
bigOverlay = final: prev:
|
||||||
lib.attrsets.mergeAttrsList (
|
lib.attrsets.mergeAttrsList (
|
||||||
lib.lists.forEach programsToPatch (
|
lib.lists.forEach programsToPatch (
|
||||||
program: let
|
program: let
|
||||||
unpatchedProgram = prev."${program}";
|
unpatchedProgram = prev."${program}";
|
||||||
|
newPatches = lib.toast.patches.patchesInPath (lib.path.append ./. program);
|
||||||
in {
|
in {
|
||||||
"${program}" = unpatchedProgram.overrideAttrs {
|
"${program}" = unpatchedProgram.overrideAttrs {
|
||||||
version = "${unpatchedProgram.version}-patched";
|
version = "${unpatchedProgram.version}-patched";
|
||||||
__intentionallyOverridingVersion = true;
|
__intentionallyOverridingVersion = true;
|
||||||
patches = unpatchedProgram.patches ++ getPatches program;
|
patches = unpatchedProgram.patches ++ newPatches;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue