grub: use fc-match format option rather than grep (#368)

This commit is contained in:
Daniel Thwaites 2024-05-18 13:58:56 +01:00 committed by GitHub
parent b5f4ca49df
commit 4a4c82f03c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,8 +14,9 @@ let
} ''
# Use fontconfig to select the correct .ttf or .otf file based on name
font=$(
${pkgs.fontconfig}/bin/fc-match -v "${font.name}" \
| grep "file:" | cut -d '"' -f 2
${lib.getExe' pkgs.fontconfig "fc-match"} \
${lib.escapeShellArg font.name} \
--format=%{file}
)
# Convert to .pf2