twitter-color-emoji: use noto-fonts-emoji’s src
Continues https://github.com/NixOS/nixpkgs/pull/72272
This commit is contained in:
parent
765c0e0619
commit
5cef7b49ec
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, cairo
|
, cairo
|
||||||
, graphicsmagick
|
, graphicsmagick
|
||||||
, pkg-config
|
, pkg-config
|
||||||
|
@ -10,22 +11,12 @@
|
||||||
, python3
|
, python3
|
||||||
, which
|
, which
|
||||||
, zopfli
|
, zopfli
|
||||||
, fetchpatch
|
, noto-fonts-emoji
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "12.1.2";
|
version = "12.1.2";
|
||||||
|
|
||||||
# Cannot use noto-fonts-emoji.src since it is too old
|
|
||||||
# and still tries to use vendored pngquant.
|
|
||||||
notoSrc = fetchFromGitHub {
|
|
||||||
name = "noto";
|
|
||||||
owner = "googlefonts";
|
|
||||||
repo = "noto-emoji";
|
|
||||||
rev = "833a43d03246a9325e748a2d783006454d76ff66";
|
|
||||||
sha256 = "1g6ikzk8banm3ihqm9g27ggjq2mn1b1hq3zhpl13lxid6mp60s4a";
|
|
||||||
};
|
|
||||||
|
|
||||||
twemojiSrc = fetchFromGitHub {
|
twemojiSrc = fetchFromGitHub {
|
||||||
name = "twemoji";
|
name = "twemoji";
|
||||||
owner = "twitter";
|
owner = "twitter";
|
||||||
|
@ -34,24 +25,21 @@ let
|
||||||
sha256 = "0vzmlp83vnk4njcfkn03jcc1vkg2rf12zf5kj3p3a373xr4ds1zn";
|
sha256 = "0vzmlp83vnk4njcfkn03jcc1vkg2rf12zf5kj3p3a373xr4ds1zn";
|
||||||
};
|
};
|
||||||
|
|
||||||
python = python3.withPackages (pp: with pp; [
|
|
||||||
nototools
|
|
||||||
]);
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "twitter-color-emoji";
|
pname = "twitter-color-emoji";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
srcs = [
|
srcs = [
|
||||||
notoSrc
|
noto-fonts-emoji.src
|
||||||
twemojiSrc
|
twemojiSrc
|
||||||
];
|
];
|
||||||
|
|
||||||
sourceRoot = notoSrc.name;
|
sourceRoot = noto-fonts-emoji.src.name;
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
chmod -R +w ${twemojiSrc.name}
|
chmod -R +w ${twemojiSrc.name}
|
||||||
mv ${twemojiSrc.name} ${notoSrc.name}
|
mv ${twemojiSrc.name} ${noto-fonts-emoji.src.name}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -59,21 +47,14 @@ stdenv.mkDerivation rec {
|
||||||
graphicsmagick
|
graphicsmagick
|
||||||
pkg-config
|
pkg-config
|
||||||
pngquant
|
pngquant
|
||||||
python
|
python3
|
||||||
|
python3.pkgs.nototools
|
||||||
which
|
which
|
||||||
zopfli
|
zopfli
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Port to python3
|
# ImageMagick -> GrahphicsMagick
|
||||||
(fetchpatch {
|
|
||||||
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/3bc176c10ced2824fe03da5ff561e22a36bf8ccd/f/noto-emoji-port-to-python3.patch";
|
|
||||||
sha256 = "1b91abd050phxlxq7322i74nkx16fkhpw14yh97r2j4c7fqarr2q";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/3bc176c10ced2824fe03da5ff561e22a36bf8ccd/f/noto-emoji-python3.patch";
|
|
||||||
sha256 = "0mw2c748izb6h9a19jwc0qxlb6l1kj6k8gc345lpf7lfcxfl7l59";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/3bc176c10ced2824fe03da5ff561e22a36bf8ccd/f/noto-emoji-use-gm.patch";
|
url = "https://src.fedoraproject.org/rpms/twitter-twemoji-fonts/raw/3bc176c10ced2824fe03da5ff561e22a36bf8ccd/f/noto-emoji-use-gm.patch";
|
||||||
sha256 = "0yfmfzaaiq5163c06172g4r734aysiqyv1s28siv642vqzsqh4i2";
|
sha256 = "0yfmfzaaiq5163c06172g4r734aysiqyv1s28siv642vqzsqh4i2";
|
||||||
|
|
Loading…
Reference in New Issue