mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
twitter-color-emoji: 12.1.5 → 13.0.1
This commit is contained in:
parent
0cfc9f47ce
commit
fe3d667a0f
@ -3,9 +3,8 @@
|
|||||||
|
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
|
||||||
, cairo
|
, cairo
|
||||||
, graphicsmagick
|
, imagemagick
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, pngquant
|
, pngquant
|
||||||
, python3
|
, python3
|
||||||
@ -15,7 +14,7 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "12.1.5";
|
version = "13.0.1";
|
||||||
|
|
||||||
twemojiSrc = fetchFromGitHub {
|
twemojiSrc = fetchFromGitHub {
|
||||||
name = "twemoji";
|
name = "twemoji";
|
||||||
@ -25,6 +24,9 @@ let
|
|||||||
sha256 = "0acinlv2l3s1jga2i9wh16mvgkxw4ipzgvjx8c80zd104lpdpgd9";
|
sha256 = "0acinlv2l3s1jga2i9wh16mvgkxw4ipzgvjx8c80zd104lpdpgd9";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pythonEnv =
|
||||||
|
python3.withPackages (p: [ p.fonttools p.nototools ]);
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "twitter-color-emoji";
|
pname = "twitter-color-emoji";
|
||||||
@ -44,23 +46,14 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cairo
|
cairo
|
||||||
graphicsmagick
|
imagemagick
|
||||||
pkg-config
|
pkg-config
|
||||||
pngquant
|
pngquant
|
||||||
python3
|
pythonEnv
|
||||||
python3.pkgs.nototools
|
|
||||||
which
|
which
|
||||||
zopfli
|
zopfli
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# ImageMagick -> GraphicsMagick
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/07778605d50696f6aa929020e82611a01d254c90/f/noto-emoji-use-gm.patch";
|
|
||||||
sha256 = "06vg16z79s5adyjy8r3mr8fd391b1hi4xkqvbzkmnjwaai7p08lk";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = let
|
postPatch = let
|
||||||
templateSubstitutions = stdenv.lib.concatStringsSep "; " [
|
templateSubstitutions = stdenv.lib.concatStringsSep "; " [
|
||||||
''s#Noto Color Emoji#Twitter Color Emoji#''
|
''s#Noto Color Emoji#Twitter Color Emoji#''
|
||||||
@ -74,7 +67,7 @@ stdenv.mkDerivation rec {
|
|||||||
''s#http://scripts.sil.org/OFL#http://creativecommons.org/licenses/by/4.0/#''
|
''s#http://scripts.sil.org/OFL#http://creativecommons.org/licenses/by/4.0/#''
|
||||||
];
|
];
|
||||||
in ''
|
in ''
|
||||||
patchShebangs ./flag_glyph_name.py
|
${noto-fonts-emoji.postPatch}
|
||||||
|
|
||||||
sed '${templateSubstitutions}' NotoColorEmoji.tmpl.ttx.tmpl > TwitterColorEmoji.tmpl.ttx.tmpl
|
sed '${templateSubstitutions}' NotoColorEmoji.tmpl.ttx.tmpl > TwitterColorEmoji.tmpl.ttx.tmpl
|
||||||
pushd ${twemojiSrc.name}/assets/72x72/
|
pushd ${twemojiSrc.name}/assets/72x72/
|
||||||
@ -88,6 +81,8 @@ stdenv.mkDerivation rec {
|
|||||||
"EMOJI=TwitterColorEmoji"
|
"EMOJI=TwitterColorEmoji"
|
||||||
"EMOJI_SRC_DIR=${twemojiSrc.name}/assets/72x72"
|
"EMOJI_SRC_DIR=${twemojiSrc.name}/assets/72x72"
|
||||||
"BODY_DIMENSIONS=76x72"
|
"BODY_DIMENSIONS=76x72"
|
||||||
|
# twemoji contains some codepoints noto doesn't like
|
||||||
|
"BYPASS_SEQUENCE_CHECK=True"
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user