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