forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / data / fonts / fira-code / default.nix
blob553a2d58098836099d76ef48b39a28353ecab641
1 { lib, stdenvNoCC, fetchzip, useVariableFont ? true }:
3 stdenvNoCC.mkDerivation (finalAttrs: {
4   pname = "fira-code";
5   version = "6.2";
7   src = fetchzip {
8     url = "https://github.com/tonsky/FiraCode/releases/download/${finalAttrs.version}/Fira_Code_v${finalAttrs.version}.zip";
9     stripRoot = false;
10     hash = "sha256-UHOwZL9WpCHk6vZaqI/XfkZogKgycs5lWg1p0XdQt0A=";
11   };
13   # only extract the variable font because everything else is a duplicate
14   installPhase = ''
15     runHook preInstall
17     install -Dm644 -t $out/share/fonts/truetype ${if useVariableFont then "variable_ttf/*-VF.ttf" else "ttf/*.ttf"}
19     runHook postInstall
20   '';
22   meta = with lib; {
23     homepage = "https://github.com/tonsky/FiraCode";
24     description = "Monospace font with programming ligatures";
25     longDescription = ''
26       Fira Code is a monospace font extending the Fira Mono font with
27       a set of ligatures for common programming multi-character
28       combinations.
29     '';
30     license = licenses.ofl;
31     maintainers = [ maintainers.rycee ];
32     platforms = platforms.all;
33   };