Unverified Commit c5668bb8 authored by Naïm Camille Favier's avatar Naïm Camille Favier
Browse files

twemoji-color-font-src: init at 15.1.0

Following the discussion in
https://github.com/NixOS/nixpkgs/issues/97871, the source package was
converted to a binary package. This resurrects the source package under
a different name, and exempts it from Hydra builds. This makes it easier
to apply patches.
parent 88f9052d
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
{
  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
  };
})
+1 −1
Original line number Diff line number Diff line
@@ -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