Kde/patches: get patches with lib.toast.patches.patchesInPath

This commit is contained in:
Toast 2025-11-02 13:44:37 +01:00
parent 16f79d8a7d
commit c00ef6ab7c

View file

@ -3,24 +3,17 @@
removeFiles = lib.attrsets.filterAttrs (n: v: v == "directory") rootDirs;
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:
lib.attrsets.mergeAttrsList (
lib.lists.forEach programsToPatch (
program: let
unpatchedProgram = prev."${program}";
newPatches = lib.toast.patches.patchesInPath (lib.path.append ./. program);
in {
"${program}" = unpatchedProgram.overrideAttrs {
version = "${unpatchedProgram.version}-patched";
__intentionallyOverridingVersion = true;
patches = unpatchedProgram.patches ++ getPatches program;
patches = unpatchedProgram.patches ++ newPatches;
};
}
)