git.iko.soy/typeable/nixpkgs
on master help sign in
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

commita29fcc1c108edc5317ddcbff86d82d45dd5dbd4c authormidchildan <git@midchildan.org> dateSun 10 Jan 2021, 13:24 (6 years ago) parentbd32ec4
1 file changed+3−2
pkgs/data/fonts/fira-code/default.nix+3−2
pkgs/data/fonts/fira-code/default.nix+3−2
@@ -7,12 +7,13 @@ in fetchzip {
77
88 url = "https://github.com/tonsky/FiraCode/releases/download/${version}/Fira_Code_v${version}.zip";
99
10+ # only extract the variable font because everything else is a duplicate
1011 postFetch = ''
1112 mkdir -p $out/share/fonts
12− unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
13+ unzip -j $downloadedFile '*-VF.ttf' -d $out/share/fonts/truetype
1314 '';
1415
15− sha256 = "16v62wj872ba4w7qxn4l6zjgqh7lrpwh1xax1bp1x9dpz08mnq06";
16+ sha256 = "1wbfjgvr9m5azl5w49y0hpqzgcraw6spd1wnxgxlzfx57x6gcw0k";
1617
1718 meta = with stdenv.lib; {
1819 homepage = "https://github.com/tonsky/FiraCode";