2019-08-20 04:32:06 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
let inherit (stdenv.hostPlatform) system;
|
2020-08-06 12:17:41 +01:00
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
throwSystem = throw "Unsupported system: ${system}";
|
2020-08-06 12:17:41 +01:00
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
systemTag = {
|
|
|
|
x86_64-darwin = "nix-darwin";
|
|
|
|
x86_64-linux = "nix-os";
|
|
|
|
}.${system} or throwSystem;
|
|
|
|
|
|
|
|
capitalized = {
|
|
|
|
x86_64-darwin = systemTag;
|
|
|
|
x86_64-linux = "NixOS";
|
|
|
|
}.${system} or throwSystem;
|
|
|
|
|
|
|
|
fontFile = {
|
|
|
|
x86_64-darwin = "Apple%20Color%20Emoji.ttc";
|
|
|
|
x86_64-linux = "joypixels-android.ttf";
|
|
|
|
}.${system} or throwSystem;
|
2019-08-20 04:32:06 +01:00
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
name = {
|
|
|
|
x86_64-darwin = "joypixels-apple-color-emoji.ttc";
|
|
|
|
x86_64-linux = fontFile;
|
|
|
|
}.${system} or throwSystem;
|
2020-08-06 12:17:41 +01:00
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
ext = {
|
|
|
|
x86_64-darwin = "ttc";
|
|
|
|
x86_64-linux = "ttf";
|
|
|
|
}.${system} or throwSystem;
|
2020-08-06 12:17:41 +01:00
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
sha256 = {
|
|
|
|
x86_64-darwin = "043980g0dlp8vd4qkbx6298fwz8ns0iwbxm0f8czd9s7n2xm4npq";
|
|
|
|
x86_64-linux = "1vxqsqs93g4jyp01r47lrpcm0fmib2n1vysx32ksmfxmprimb75s";
|
|
|
|
}.${system} or throwSystem;
|
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "joypixels";
|
|
|
|
version = "6.0.0";
|
2020-08-06 12:17:41 +01:00
|
|
|
|
2019-08-20 04:32:06 +01:00
|
|
|
src = fetchurl {
|
2020-08-07 20:52:38 +01:00
|
|
|
inherit name sha256;
|
|
|
|
url = "https://cdn.joypixels.com/distributions/${systemTag}/font/${version}/${fontFile}";
|
2019-08-20 04:32:06 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
2020-08-07 20:52:38 +01:00
|
|
|
installPhase = ''
|
|
|
|
install -Dm644 $src $out/share/fonts/truetype/joypixels.${ext}
|
|
|
|
'';
|
2019-08-20 04:32:06 +01:00
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Emoji as a Service (formerly EmojiOne)";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.joypixels.com/";
|
2019-08-20 04:32:06 +01:00
|
|
|
license = licenses.unfree;
|
2020-08-06 11:37:25 +01:00
|
|
|
maintainers = with maintainers; [ toonn jtojnar ];
|
2020-08-06 12:17:41 +01:00
|
|
|
platforms = [
|
|
|
|
"x86_64-darwin"
|
|
|
|
"x86_64-linux"
|
|
|
|
];
|
2019-08-20 04:32:06 +01:00
|
|
|
};
|
|
|
|
}
|