Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

cascadia-code: add variants

+33 -12
+33 -12
pkgs/data/fonts/cascadia-code/default.nix
··· 1 - { lib, fetchurl }: 1 + { stdenv, fetchurl }: 2 2 3 - let 3 + stdenv.mkDerivation rec { 4 4 pname = "cascadia-code"; 5 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"; 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 + ]; 10 25 11 - downloadToTemp = true; 12 - recursiveHash = true; 26 + unpackCmd = '' 27 + ttfName=$(basename $(stripHash $curSrc)) 28 + cp $curSrc ./$ttfName 29 + ''; 13 30 14 - postFetch = '' 15 - install -Dm444 $downloadedFile $out/share/fonts/truetype/Cascadia.ttf 31 + sourceRoot = "."; 32 + 33 + installPhase = '' 34 + install -Dm444 -t $out/share/fonts/truetype *.ttf 16 35 ''; 17 36 18 - sha256 = "0b41xkpqx4ybpw5ar8njy0yznbk0hwf1ypigxf8f16chsfim7dkr"; 37 + outputHashAlgo = "sha256"; 38 + outputHashMode = "recursive"; 39 + outputHash = "1gkjs7qa409r4ykdy4ik8i0c3z49hzpklw6kyijhhifhyyyzhz4h"; 19 40 20 - meta = with lib; { 41 + meta = with stdenv.lib; { 21 42 description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal"; 22 43 homepage = "https://github.com/microsoft/cascadia-code"; 23 44 license = licenses.ofl;