From 111565d6e70a63e2ea10ea04a5373efced7f1e73 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sat, 25 Jul 2020 04:20:00 -0500 Subject: [PATCH] cascadia-code: 1911.21 -> 2007.01 --- pkgs/data/fonts/cascadia-code/default.nix | 49 ++++++----------------- 1 file changed, 13 insertions(+), 36 deletions(-) diff --git a/pkgs/data/fonts/cascadia-code/default.nix b/pkgs/data/fonts/cascadia-code/default.nix index 56894f920954..220d2684eef5 100644 --- a/pkgs/data/fonts/cascadia-code/default.nix +++ b/pkgs/data/fonts/cascadia-code/default.nix @@ -1,44 +1,21 @@ -{ stdenv, fetchurl }: +{ lib, fetchzip }: +let + version = "2007.01"; +in +fetchzip { + name = "cascadia-code-${version}"; -stdenv.mkDerivation rec { - pname = "cascadia-code"; - version = "1911.21"; + url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaCode-${version}.zip"; - srcs = [ - (fetchurl { - url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/Cascadia.ttf"; - sha256 = "1m5ymbngjg3n1g3p6vhcq7d825bwwln9afih651ar3jn7j9njnyg"; - }) - (fetchurl { - url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaMono.ttf"; - sha256 = "0vkhm6rhspzd1iayxrzaag099wsc94azfqa3ips7f4x9s8fmbp80"; - }) - (fetchurl { - url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaMonoPL.ttf"; - sha256 = "0xxqd8m2ydn97jngp1a3ik1mzpjbm65pfq02a82gfbbvajq5d673"; - }) - (fetchurl { - url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/CascadiaPL.ttf"; - sha256 = "1s83c9flvifd05nbhnk8knwnik7p621sr7i94smknigc7d72wqav"; - }) - ]; + sha256 = "173dpr0k4y5b02ps9426pyaazl2pxj1kw5l5jrikbi6zjv4590gb"; - unpackCmd = '' - ttfName=$(basename $(stripHash $curSrc)) - cp $curSrc ./$ttfName + postFetch = '' + mkdir -p $out/share/fonts/ + unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype + unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype ''; - sourceRoot = "."; - - installPhase = '' - install -Dm444 -t $out/share/fonts/truetype *.ttf - ''; - - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "1gkjs7qa409r4ykdy4ik8i0c3z49hzpklw6kyijhhifhyyyzhz4h"; - - meta = with stdenv.lib; { + meta = with lib; { description = "Monospaced font that includes programming ligatures and is designed to enhance the modern look and feel of the Windows Terminal"; homepage = "https://github.com/microsoft/cascadia-code"; license = licenses.ofl;