Skyler Grey | 5b75372 | 2022-08-26 07:53:33 +0100 | [diff] [blame] | 1 | lib: final: prev: let |
| 2 | utils = import ../utils lib; |
| 3 | in |
| 4 | lib.pipe ../patches [ |
| 5 | utils.dirsInWithName |
| 6 | (builtins.map ({ |
| 7 | name, |
| 8 | path, |
| 9 | }: { |
| 10 | inherit name; |
| 11 | value = prev.${name}.overrideAttrs (prevAttrs: { |
| 12 | patches = |
| 13 | (prevAttrs.patches or []) |
| 14 | ++ lib.traceValFn builtins.toJSON (lib.pipe path [ |
| 15 | builtins.readDir |
| 16 | (lib.filterAttrs (_: type: type == "regular")) |
| 17 | builtins.attrNames |
| 18 | (builtins.map (name: "${path}/${name}")) |
| 19 | ]); |
| 20 | }); |
| 21 | })) |
| 22 | builtins.listToAttrs |
| 23 | ] |