diff --git a/pkgs/by-name/tw/twemoji-color-font-src/package.nix b/pkgs/by-name/tw/twemoji-color-font-src/package.nix new file mode 100644 index 000000000000..ff2d208fb6ba --- /dev/null +++ b/pkgs/by-name/tw/twemoji-color-font-src/package.nix @@ -0,0 +1,63 @@ +{ + lib, + stdenv, + fetchFromGitHub, + nix-update-script, + twemoji-color-font, + imagemagick, + inkscape, + nodePackages, + potrace, + scfbuild, + which, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "twemoji-color-font"; + version = "15.1.0"; + + src = fetchFromGitHub { + owner = "13rac1"; + repo = "twemoji-color-font"; + rev = "v${finalAttrs.version}"; + hash = "sha256-Nx6zyj6FLFFyWz0vbbN3eYk2WRns7IVG6lDvLOmSf6E="; + }; + + nativeBuildInputs = [ + imagemagick + inkscape + nodePackages.svgo + potrace + scfbuild + which + ]; + + # silence inkscape errors about non-writable home + preBuild = "export HOME=\"$NIX_BUILD_ROOT\""; + buildFlags = [ + "SCFBUILD=${scfbuild}/bin/scfbuild" + "linux-package" + ]; + enableParallelBuilding = true; + + installPhase = '' + runHook preInstall + install -Dm755 build/TwitterColorEmoji-SVGinOT.ttf $out/share/fonts/truetype/TwitterColorEmoji-SVGinOT.ttf + install -Dm644 linux/fontconfig/46-twemoji-color.conf $out/etc/fonts/conf.d/46-twemoji-color.conf + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { }; + + meta = { + inherit (twemoji-color-font.meta) + description + longDescription + homepage + downloadPage + license + ; + maintainers = [ lib.maintainers.ncfavier ]; + hydraPlatforms = [ ]; # https://github.com/NixOS/nixpkgs/issues/97871 + }; +}) diff --git a/pkgs/by-name/tw/twemoji-color-font/package.nix b/pkgs/by-name/tw/twemoji-color-font/package.nix index 570630b5a683..f3db120f1c8c 100644 --- a/pkgs/by-name/tw/twemoji-color-font/package.nix +++ b/pkgs/by-name/tw/twemoji-color-font/package.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = nix-update-script { }; meta = { - description = "Color emoji SVGinOT font using Twitter Unicode 10 emoji with diversity and country flags"; + description = "Color emoji SVGinOT font using Twitter Unicode 15 emoji with diversity and country flags"; longDescription = '' A color and B&W emoji SVGinOT font built from the Twitter Emoji for Everyone artwork with support for ZWJ, skin tone diversity and country