1{ lib, stdenvNoCC, fetchzip }:
2
3stdenvNoCC.mkDerivation rec {
4 pname = "cascadia-code";
5 version = "2404.23";
6
7 src = fetchzip {
8 url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaCode-${version}.zip";
9 stripRoot = false;
10 hash = "sha256-Z2AzBeNiM6mc1OHCJRv0rUvH8WRygyQGSOvwbAISYHE=";
11 };
12
13 installPhase = ''
14 runHook preInstall
15
16 install -Dm644 otf/static/*.otf -t $out/share/fonts/opentype
17 install -Dm644 ttf/static/*.ttf -t $out/share/fonts/truetype
18
19 runHook postInstall
20 '';
21
22 meta = with lib; {
23 description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal";
24 homepage = "https://github.com/microsoft/cascadia-code";
25 changelog = "https://github.com/microsoft/cascadia-code/raw/v${version}/FONTLOG.txt";
26 license = licenses.ofl;
27 maintainers = with maintainers; [ ryanccn ];
28 platforms = platforms.all;
29 };
30}