Kde/patches: override packages instead of replacing at runtime
This causes A LOT more rebuilds, but it's less hacky
This commit is contained in:
parent
68218ec187
commit
a4f27b49af
1 changed files with 4 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{lib, pkgs, ...}: let
|
||||
{lib, ...}: let
|
||||
rootDirs = builtins.readDir ./.;
|
||||
removeFiles = lib.attrsets.filterAttrs (n: v: v == "directory") rootDirs;
|
||||
programsToPatch = builtins.attrNames removeFiles;
|
||||
|
|
@ -17,7 +17,9 @@
|
|||
program: let
|
||||
unpatchedProgram = prev."${program}";
|
||||
in {
|
||||
"${program}-patched" = unpatchedProgram.overrideAttrs {
|
||||
"${program}" = unpatchedProgram.overrideAttrs {
|
||||
version = "${unpatchedProgram.version}-patched";
|
||||
__intentionallyOverridingVersion = true;
|
||||
patches = unpatchedProgram.patches ++ getPatches program;
|
||||
};
|
||||
}
|
||||
|
|
@ -31,14 +33,4 @@ in {
|
|||
}
|
||||
)
|
||||
];
|
||||
|
||||
system.replaceDependencies.replacements = lib.lists.forEach programsToPatch (
|
||||
package: {
|
||||
oldDependency = pkgs.kdePackages.${package};
|
||||
newDependency = pkgs.kdePackages."${package}-patched";
|
||||
}
|
||||
);
|
||||
system.extraDependencies = lib.lists.forEach programsToPatch (
|
||||
package: pkgs.kdePackages."${package}-patched"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue