Skyler Grey | 95c67e0 | 2022-10-30 22:28:42 +0000 | [diff] [blame] | 1 | final: prev: let |
| 2 | lib = prev.lib; |
| 3 | fonts = ["roboto-mono"]; |
| 4 | ligaturizer = prev.fetchFromGithub { |
| 5 | owner = "ToxicFrog"; |
| 6 | repo = "Ligaturizer"; |
| 7 | rev = "v5"; |
| 8 | sha256 = lib.fakeSha256; |
| 9 | }; |
| 10 | in |
| 11 | lib.pipe fonts [ |
| 12 | (builtins.map (name: { |
| 13 | inherit name; |
| 14 | value = prev.${name}; |
| 15 | })) |
| 16 | (builtins.mapAttrs (name: value: |
| 17 | value.overrideAttrs ( |
| 18 | prevAttrs: { |
| 19 | postPatch = prevAttrs.postPatch + '' |
| 20 | find $out -name "*.ttf" -exec fontforge -lang py -script ligaturize.py {} \; |
| 21 | find $out -name "*.otf" -exec fontforge -lang py -script ligaturize.py {} \; |
| 22 | false |
| 23 | ''; |
| 24 | } |
| 25 | ))) |
| 26 | builtins.listToAttrs |
| 27 | ] |