about summary refs log tree commit diff
path: root/pkgs/data
diff options
context:
space:
mode:
authormidchildan <git@midchildan.org>2021-01-10 13:24:55 +0900
committerRobert Helgesson <robert@rycee.net>2021-01-10 09:25:40 +0100
commita29fcc1c108edc5317ddcbff86d82d45dd5dbd4c (patch)
treedf68d94944c9c39e49c67ada93a379374ea14192 /pkgs/data
parentbd32ec4cdfe7d3c7025db0927e0e9db89b0654eb (diff)
downloadnixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.tar
nixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.tar.gz
nixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.tar.bz2
nixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.tar.lz
nixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.tar.xz
nixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.tar.zst
nixlib-a29fcc1c108edc5317ddcbff86d82d45dd5dbd4c.zip
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
Diffstat (limited to 'pkgs/data')
-rw-r--r--pkgs/data/fonts/fira-code/default.nix5
1 files 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";