From 196c828153ff15c18c7fe8635407d30afbb206c4 Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 16 Sep 2020 22:37:17 +0200 Subject: [PATCH] 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. --- pkgs/data/fonts/joypixels/default.nix | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkgs/data/fonts/joypixels/default.nix b/pkgs/data/fonts/joypixels/default.nix index 128fd69ced1..037e76315ce 100644 --- a/pkgs/data/fonts/joypixels/default.nix +++ b/pkgs/data/fonts/joypixels/default.nix @@ -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; {