noto-fonts-color-emoji: move out of noto-fonts file

This commit is contained in:
jopejoe1 2023-12-06 19:42:41 +01:00 committed by Jörg Thalheim
parent c34ac183ca
commit 9fbcecc83f
3 changed files with 69 additions and 62 deletions

View file

@ -0,0 +1,69 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, buildPackages
, pkg-config
, cairo
, imagemagick
, zopfli
, pngquant
, which
}:
let
emojiPythonEnv =
buildPackages.python3.withPackages (p: with p; [ fonttools nototools ]);
in
stdenvNoCC.mkDerivation rec {
pname = "noto-fonts-color-emoji";
version = "2.042";
src = fetchFromGitHub {
owner = "googlefonts";
repo = "noto-emoji";
rev = "v${version}";
hash = "sha256-otJQMXrBIPrxD1vCdgcrZ2h1a9XAMbqEBFumjz1XJ54=";
};
depsBuildBuild = [
buildPackages.stdenv.cc
pkg-config
cairo
];
nativeBuildInputs = [
imagemagick
zopfli
pngquant
which
emojiPythonEnv
];
postPatch = ''
patchShebangs *.py
patchShebangs third_party/color_emoji/*.py
# remove check for virtualenv, since we handle
# python requirements using python.withPackages
sed -i '/ifndef VIRTUAL_ENV/,+2d' Makefile
# Make the build verbose so it won't get culled by Hydra thinking that
# it somehow got stuck doing nothing.
sed -i 's;\t@;\t;' Makefile
'';
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/noto
cp NotoColorEmoji.ttf $out/share/fonts/noto
runHook postInstall
'';
meta = {
description = "Color emoji font";
homepage = "https://github.com/googlefonts/noto-emoji";
license = with lib.licenses; [ ofl asl20 ];
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ mathnerd314 sternenseemann ];
};
}

View file

@ -163,65 +163,4 @@ rec {
version = "2.002";
sha256 = "sha256-GLjpTAiHfygj1J4AdUVDJh8kykkFOglq+h4kyat5W9s=";
};
noto-fonts-color-emoji =
let
version = "2.042";
emojiPythonEnv =
buildPackages.python3.withPackages (p: with p; [ fonttools nototools ]);
in
stdenvNoCC.mkDerivation {
pname = "noto-fonts-emoji";
inherit version;
src = fetchFromGitHub {
owner = "googlefonts";
repo = "noto-emoji";
rev = "v${version}";
hash = "sha256-otJQMXrBIPrxD1vCdgcrZ2h1a9XAMbqEBFumjz1XJ54=";
};
depsBuildBuild = [
buildPackages.stdenv.cc
pkg-config
cairo
];
nativeBuildInputs = [
imagemagick
zopfli
pngquant
which
emojiPythonEnv
];
postPatch = ''
patchShebangs *.py
patchShebangs third_party/color_emoji/*.py
# remove check for virtualenv, since we handle
# python requirements using python.withPackages
sed -i '/ifndef VIRTUAL_ENV/,+2d' Makefile
# Make the build verbose so it won't get culled by Hydra thinking that
# it somehow got stuck doing nothing.
sed -i 's;\t@;\t;' Makefile
'';
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/noto
cp NotoColorEmoji.ttf $out/share/fonts/noto
runHook postInstall
'';
meta = with lib; {
description = "Color emoji font";
homepage = "https://github.com/googlefonts/noto-emoji";
license = with licenses; [ ofl asl20 ];
platforms = platforms.all;
maintainers = with maintainers; [ mathnerd314 sternenseemann ];
};
};
}

View file

@ -29753,7 +29753,6 @@ with pkgs;
noto-fonts-lgc-plus
noto-fonts-cjk-sans
noto-fonts-cjk-serif
noto-fonts-color-emoji
;
nuclear = callPackage ../applications/audio/nuclear { };