joypixels: Use updated font for macOS

After some back and forth with JoyPixels they agreed to creating a
version of their font for macOS that does not use the exact same name as
the Apple Color Emoji default font.

This naming collision meant it was impossible to configure applications
to use the JoyPixels emoji font unless you disabled the Apple Color
Emoji font using Font Book. Which meant the JoyPixels font could either
replace the Apple Color Emoji font completely or only fill in the gaps
in that font (on my system "hot face" isn't in the system font) but not
be used entirely for specific apps or be used with the system font as a
back up.
This commit is contained in:
toonn 2020-09-16 22:37:17 +02:00 committed by Jan Tojnar
parent fd653b992a
commit 196c828153
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -8,16 +8,12 @@ let inherit (stdenv.hostPlatform.parsed) kernel;
darwin = rec {
systemTag = "nix-darwin";
capitalized = systemTag;
ext = "ttc";
fontFile = "Apple%20Color%20Emoji.ttc";
name = "joypixels-apple-color-emoji.ttc";
fontFile = "JoyPixels-SBIX.ttf";
};
}.${kernel.name} or rec {
systemTag = "nixos";
capitalized = "NixOS";
ext = "ttf";
fontFile = "joypixels-android.ttf";
name = fontFile;
};
joypixels-free-license = with systemSpecific; {
@ -46,7 +42,7 @@ let inherit (stdenv.hostPlatform.parsed) kernel;
configuration.nix:
nixpkgs.config.allowUnfree = true;
nixpkgs.config.joypixels.acceptLicense = true;
config.nix:
allowUnfree = true;
joypixels.acceptLicense = true;
@ -63,17 +59,17 @@ stdenv.mkDerivation rec {
src = assert !acceptLicense -> throwLicense;
with systemSpecific; fetchurl {
inherit name;
name = fontFile;
url = "https://cdn.joypixels.com/distributions/${systemTag}/font/${version}/${fontFile}";
sha256 = {
darwin = "043980g0dlp8vd4qkbx6298fwz8ns0iwbxm0f8czd9s7n2xm4npq";
darwin = "1s1dibgpv4lc9cwbgykgwjxxhg2rbn5g9fyd10r6apj9xhfn8cyn";
}.${kernel.name} or "1vxqsqs93g4jyp01r47lrpcm0fmib2n1vysx32ksmfxmprimb75s";
};
dontUnpack = true;
installPhase = with systemSpecific; ''
install -Dm644 $src $out/share/fonts/truetype/joypixels.${ext}
install -Dm644 $src $out/share/fonts/truetype/${fontFile}
'';
meta = with stdenv.lib; {