Kde/patches: use replaceDependencies to avoid mass rebuilds
This commit is contained in:
parent
5832fcb26b
commit
a47d0a090d
1 changed files with 9 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: let
|
||||
{lib, pkgs, ...}: let
|
||||
rootDirs = builtins.readDir ./.;
|
||||
removeFiles = lib.attrsets.filterAttrs (n: v: v == "directory") rootDirs;
|
||||
programsToPatch = builtins.attrNames removeFiles;
|
||||
|
|
@ -17,8 +17,7 @@
|
|||
program: let
|
||||
unpatchedProgram = prev."${program}";
|
||||
in {
|
||||
"${program}" = unpatchedProgram.overrideAttrs {
|
||||
version = "${unpatchedProgram.version}-patched";
|
||||
"${program}-patched" = unpatchedProgram.overrideAttrs {
|
||||
patches = unpatchedProgram.patches ++ getPatches program;
|
||||
};
|
||||
}
|
||||
|
|
@ -32,4 +31,11 @@ in {
|
|||
}
|
||||
)
|
||||
];
|
||||
|
||||
system.replaceDependencies.replacements = lib.lists.forEach programsToPatch (
|
||||
package: {
|
||||
oldDependency = pkgs.kdePackages.${package};
|
||||
newDependency = pkgs.kdePackages."${package}-patched";
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue