Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: e96265ebcd25
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 51a7070b4179
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 1, 2020

  1. cascadia-code: add variants

    marsam committed Jan 1, 2020
    Copy the full SHA
    f55358f View commit details

Commits on Jan 24, 2020

  1. Merge pull request #78398 from marsam/update-cascadia-code

    cascadia-code: add variants
    marsam authored Jan 24, 2020
    Copy the full SHA
    51a7070 View commit details
Showing with 33 additions and 12 deletions.
  1. +33 −12 pkgs/data/fonts/cascadia-code/default.nix
45 changes: 33 additions & 12 deletions pkgs/data/fonts/cascadia-code/default.nix
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
{ lib, fetchurl }:
{ stdenv, fetchurl }:

let
stdenv.mkDerivation rec {
pname = "cascadia-code";
version = "1911.21";
in
fetchurl {
name = "${pname}-${version}";
url = "https://github.com/microsoft/cascadia-code/releases/download/v${version}/Cascadia.ttf";

downloadToTemp = true;
recursiveHash = true;
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";
})
];

postFetch = ''
install -Dm444 $downloadedFile $out/share/fonts/truetype/Cascadia.ttf
unpackCmd = ''
ttfName=$(basename $(stripHash $curSrc))
cp $curSrc ./$ttfName
'';

sha256 = "0b41xkpqx4ybpw5ar8njy0yznbk0hwf1ypigxf8f16chsfim7dkr";
sourceRoot = ".";

meta = with lib; {
installPhase = ''
install -Dm444 -t $out/share/fonts/truetype *.ttf
'';

outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "1gkjs7qa409r4ykdy4ik8i0c3z49hzpklw6kyijhhifhyyyzhz4h";

meta = with stdenv.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;