joypixels: Switch on kernel.name rather than system

x86_64-darwin is too specific because macOS runs on multiple
architectures.
This commit is contained in:
toonn 2020-08-10 10:39:26 +02:00 committed by Jan Tojnar
parent c5249d1e9d
commit f9f1cbbffa
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -2,17 +2,17 @@
, acceptLicense ? config.joypixels.acceptLicense or false
}:
let inherit (stdenv.hostPlatform) system;
let inherit (stdenv.hostPlatform.parsed) kernel;
systemSpecific = {
x86_64-darwin = rec {
darwin = rec {
systemTag = "nix-darwin";
capitalized = systemTag;
ext = "ttc";
fontFile = "Apple%20Color%20Emoji.ttc";
name = "joypixels-apple-color-emoji.ttc";
};
}.${system} or rec {
}.${kernel.name} or rec {
systemTag = "nix-os";
capitalized = "NixOS";
ext = "ttf";
@ -55,8 +55,8 @@ stdenv.mkDerivation rec {
inherit name;
url = "https://cdn.joypixels.com/distributions/${systemTag}/font/${version}/${fontFile}";
sha256 = {
x86_64-darwin = "043980g0dlp8vd4qkbx6298fwz8ns0iwbxm0f8czd9s7n2xm4npq";
}.${system} or "1vxqsqs93g4jyp01r47lrpcm0fmib2n1vysx32ksmfxmprimb75s";
darwin = "043980g0dlp8vd4qkbx6298fwz8ns0iwbxm0f8czd9s7n2xm4npq";
}.${kernel.name} or "1vxqsqs93g4jyp01r47lrpcm0fmib2n1vysx32ksmfxmprimb75s";
};
dontUnpack = true;