···1-{ lib, fetchurl }:
23-let
4 pname = "cascadia-code";
5 version = "1911.21";
6-in
7-fetchurl {
8- name = "${pname}-${version}";
9- url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/Cascadia.ttf";
0000000000000001011- downloadToTemp = true;
12- recursiveHash = true;
001314- postFetch = ''
15- install -Dm444 $downloadedFile $out/share/fonts/truetype/Cascadia.ttf
0016 '';
1718- sha256 = "0b41xkpqx4ybpw5ar8njy0yznbk0hwf1ypigxf8f16chsfim7dkr";
001920- meta = with lib; {
21 description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal";
22 homepage = "https://github.com/microsoft/cascadia-code";
23 license = licenses.ofl;
···1+{ stdenv, fetchurl }:
23+stdenv.mkDerivation rec {
4 pname = "cascadia-code";
5 version = "1911.21";
6+7+ srcs = [
8+ (fetchurl {
9+ url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/Cascadia.ttf";
10+ sha256 = "1m5ymbngjg3n1g3p6vhcq7d825bwwln9afih651ar3jn7j9njnyg";
11+ })
12+ (fetchurl {
13+ url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaMono.ttf";
14+ sha256 = "0vkhm6rhspzd1iayxrzaag099wsc94azfqa3ips7f4x9s8fmbp80";
15+ })
16+ (fetchurl {
17+ url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaMonoPL.ttf";
18+ sha256 = "0xxqd8m2ydn97jngp1a3ik1mzpjbm65pfq02a82gfbbvajq5d673";
19+ })
20+ (fetchurl {
21+ url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaPL.ttf";
22+ sha256 = "1s83c9flvifd05nbhnk8knwnik7p621sr7i94smknigc7d72wqav";
23+ })
24+ ];
2526+ unpackCmd = ''
27+ ttfName=$(basename $(stripHash $curSrc))
28+ cp $curSrc ./$ttfName
29+ '';
3031+ sourceRoot = ".";
32+33+ installPhase = ''
34+ install -Dm444 -t $out/share/fonts/truetype *.ttf
35 '';
3637+ outputHashAlgo = "sha256";
38+ outputHashMode = "recursive";
39+ outputHash = "1gkjs7qa409r4ykdy4ik8i0c3z49hzpklw6kyijhhifhyyyzhz4h";
4041+ meta = with stdenv.lib; {
42 description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal";
43 homepage = "https://github.com/microsoft/cascadia-code";
44 license = licenses.ofl;