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