noto-fonts-monochrome-emoji: init at version 46.2023-09-07

This commit is contained in:
nicoo 2023-09-09 01:34:14 +00:00
parent c7423cd734
commit 149f6d07ed
3 changed files with 81 additions and 0 deletions

View File

@ -225,6 +225,56 @@ rec {
};
};
noto-fonts-monochrome-emoji =
# Metadata fetched from
# https://www.googleapis.com/webfonts/v1/webfonts?key=${GOOGLE_FONTS_TOKEN}&family=Noto+Emoji
let metadata = with builtins; head (fromJSON (readFile ./noto-emoji.json)).items;
in
stdenvNoCC.mkDerivation {
pname = "noto-fonts-monochrome-emoji";
version = "${lib.removePrefix "v" metadata.version}.${metadata.lastModified}";
preferLocalBuild = true;
dontUnpack = true;
srcs = let
weightNames = {
"300" = "Light";
regular = "Regular";
"500" = "Medium";
"600" = "SemiBold";
"700" = "Bold";
};
fileHashes = {
"NotoEmoji-Bold.ttf" = "ce426e27c6254eb515fb6f301c8aa7cb7c90be3bd9a843c6e165d899a2dc63c0";
"NotoEmoji-Light.ttf" = "f67750a89273b02911e8a71844d556df05d6331707fb44331604107421bcbd2a";
"NotoEmoji-Medium.ttf" = "c3317d90a34c7904d86764144f9a4881aba1976a8ca59da730b35378026eaad4";
"NotoEmoji-Regular.ttf" = "01718b75679b75dc8985328c5bf0ffead5bc38371a5eb50cf7a9b684df706258";
"NotoEmoji-SemiBold.ttf" = "3487a513c5fe94ab47eb24f77853d957bcd8511dd8e469cda1b01b7fb01c911d";
};
in lib.mapAttrsToList
(variant: url: fetchurl rec { name = "NotoEmoji-${weightNames.${variant}}.ttf";
sha256 = fileHashes.${name};
inherit url; } )
metadata.files;
installPhase = ''
for src in $srcs; do
install -D $src $out/share/fonts/noto/$(stripHash $src)
done
'';
meta = with lib; {
description = "Monochrome emoji font";
homepage = "https://fonts.google.com/noto/specimen/Noto+Emoji";
license = [ licenses.ofl ];
maintainers = [ maintainers.nicoo ];
platforms = platforms.all;
sourceProvenance = [ sourceTypes.binaryBytecode ];
};
};
noto-fonts-emoji-blob-bin =
let
pname = "noto-fonts-emoji-blob-bin";

View File

@ -0,0 +1,30 @@
{
"kind": "webfonts#webfontList",
"items": [
{
"family": "Noto Emoji",
"variants": [
"300",
"regular",
"500",
"600",
"700"
],
"subsets": [
"emoji"
],
"version": "v46",
"lastModified": "2023-09-07",
"files": {
"300": "http://fonts.gstatic.com/s/notoemoji/v46/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob_10jwvS-FGJCMY.ttf",
"regular": "http://fonts.gstatic.com/s/notoemoji/v46/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob-r0jwvS-FGJCMY.ttf",
"500": "http://fonts.gstatic.com/s/notoemoji/v46/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob-Z0jwvS-FGJCMY.ttf",
"600": "http://fonts.gstatic.com/s/notoemoji/v46/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob911TwvS-FGJCMY.ttf",
"700": "http://fonts.gstatic.com/s/notoemoji/v46/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob9M1TwvS-FGJCMY.ttf"
},
"category": "sans-serif",
"kind": "webfonts#webfont",
"menu": "http://fonts.gstatic.com/s/notoemoji/v46/bMrnmSyK7YY-MEu6aWjPDs-ar6uWaGWuob-r0gwuQeU.ttf"
}
]
}

View File

@ -29926,6 +29926,7 @@ with pkgs;
noto-fonts-cjk-serif
noto-fonts-color-emoji
noto-fonts-emoji-blob-bin
noto-fonts-monochrome-emoji
;
nuclear = callPackage ../applications/audio/nuclear { };