fira-code: only extract the variable font

Fira Code includes a variable font[1] file that packs all the variants
in a single file. Including both variable and non-variable fonts would
be redundant and cause the system to list the same font twice.

[1]: https://en.wikipedia.org/wiki/Variable_fonts
This commit is contained in:
midchildan 2021-01-10 13:24:55 +09:00 committed by Robert Helgesson
parent bd32ec4cdf
commit a29fcc1c10
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -7,12 +7,13 @@ in fetchzip {
url = "https://github.com/tonsky/FiraCode/releases/download/${version}/Fira_Code_v${version}.zip";
# only extract the variable font because everything else is a duplicate
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
unzip -j $downloadedFile '*-VF.ttf' -d $out/share/fonts/truetype
'';
sha256 = "16v62wj872ba4w7qxn4l6zjgqh7lrpwh1xax1bp1x9dpz08mnq06";
sha256 = "1wbfjgvr9m5azl5w49y0hpqzgcraw6spd1wnxgxlzfx57x6gcw0k";
meta = with stdenv.lib; {
homepage = "https://github.com/tonsky/FiraCode";