From a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c Mon Sep 17 00:00:00 2001 From: midchildan Date: Sun, 10 Jan 2021 13:24:55 +0900 Subject: [PATCH] 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 --- pkgs/data/fonts/fira-code/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/fira-code/default.nix b/pkgs/data/fonts/fira-code/default.nix index 4f0fb1e81c16..a3fac2d69d0b 100644 --- a/pkgs/data/fonts/fira-code/default.nix +++ b/pkgs/data/fonts/fira-code/default.nix @@ -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";