From f35535217780644b32ee74c0b02bde131da438ac Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 12 Sep 2020 23:21:30 +0200 Subject: [PATCH 1/2] emojione: fix build with Inkscape 1 --- pkgs/data/fonts/emojione/default.nix | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/pkgs/data/fonts/emojione/default.nix b/pkgs/data/fonts/emojione/default.nix index 6f5168e90d5..d5b9b29dd85 100644 --- a/pkgs/data/fonts/emojione/default.nix +++ b/pkgs/data/fonts/emojione/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, inkscape, imagemagick, potrace, svgo, scfbuild }: +{ stdenv, fetchFromGitHub, fetchpatch, inkscape, imagemagick, potrace, svgo, scfbuild }: stdenv.mkDerivation rec { pname = "emojione"; @@ -11,6 +11,22 @@ stdenv.mkDerivation rec { sha256 = "1781kxfbhnvylypbkwxc3mx6hi0gcjisfjr9cf0jdz4d1zkf09b3"; }; + patches = [ + # Fix build with Inkscape 1.0 + # https://github.com/eosrei/twemoji-color-font/pull/82 + (fetchpatch { + url = "https://github.com/eosrei/twemoji-color-font/commit/208ad63c2ceb38c528b5237abeb2b85ceedc1d37.patch"; + sha256 = "7tDWIkpcdir1V6skgXSM3r0FwHy0F6PyJ07OPRsSStA="; + postFetch = '' + substituteInPlace $out \ + --replace "inkscape --without-gui" "inkscape --export-png" \ + --replace TWEMOJI EMOJIONE \ + --replace "the assets" "the emojione assets" \ + --replace twemoji emojione + ''; + }) + ]; + preBuild = '' sed -i 's,SCFBUILD :=.*,SCFBUILD := scfbuild,' Makefile # Shut up inkscape's warnings From 24a6d1152d61ee52043a665e479009e24aa4ab45 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 12 Sep 2020 23:22:37 +0200 Subject: [PATCH 2/2] twemoji-color-font: fix build with Inkscape 1 --- pkgs/data/fonts/twemoji-color-font/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/data/fonts/twemoji-color-font/default.nix b/pkgs/data/fonts/twemoji-color-font/default.nix index a9bf3720c07..23ae8e76b1d 100644 --- a/pkgs/data/fonts/twemoji-color-font/default.nix +++ b/pkgs/data/fonts/twemoji-color-font/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, inkscape, imagemagick, potrace, svgo, scfbuild }: +{ stdenv, fetchFromGitHub, fetchpatch, inkscape, imagemagick, potrace, svgo, scfbuild }: stdenv.mkDerivation rec { pname = "twemoji-color-font"; @@ -10,6 +10,19 @@ stdenv.mkDerivation rec { sha256 = "00pbgqpkq21wl8fs0q1xp49xb10m48b9sz8cdc58flkd2vqfssw2"; }; + patches = [ + # Fix build with Inkscape 1.0 + # https://github.com/eosrei/twemoji-color-font/pull/82 + (fetchpatch { + url = "https://github.com/eosrei/twemoji-color-font/commit/208ad63c2ceb38c528b5237abeb2b85ceedc1d37.patch"; + sha256 = "TV8I++BEnVUQg7FNbnrEQ/MLV9n3drmspqjmDZgTGFI="; + postFetch = '' + substituteInPlace $out \ + --replace "inkscape --without-gui" "inkscape --export-png" + ''; + }) + ]; + nativeBuildInputs = [ inkscape imagemagick potrace svgo scfbuild ]; # silence inkscape errors about non-writable home preBuild = "export HOME=\"$NIX_BUILD_ROOT\"";