nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenvNoCC, fetchzip }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "fira-code";
5 version = "6.2";
6
7 src = fetchzip {
8 url = "https://github.com/tonsky/FiraCode/releases/download/${version}/Fira_Code_v${version}.zip";
9 stripRoot = false;
10 hash = "sha256-UHOwZL9WpCHk6vZaqI/XfkZogKgycs5lWg1p0XdQt0A=";
11 };
12
13 # only extract the variable font because everything else is a duplicate
14 installPhase = ''
15 runHook preInstall
16
17 install -Dm644 variable_ttf/*-VF.ttf -t $out/share/fonts/truetype
18
19 runHook postInstall
20 '';
21
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 };
34}