From 6ee6794c8ca4e44d483a0b4d361ff0236202d737 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Thu, 26 May 2022 22:15:38 +0200 Subject: [PATCH] openmoji-black,openmoji-color: fix hanging builds ...by downgrading fontforge. Fixes https://github.com/NixOS/nixpkgs/issues/167869 --- pkgs/data/fonts/openmoji/default.nix | 33 +++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/pkgs/data/fonts/openmoji/default.nix b/pkgs/data/fonts/openmoji/default.nix index d511a78f72503..baf49c80e1c7d 100644 --- a/pkgs/data/fonts/openmoji/default.nix +++ b/pkgs/data/fonts/openmoji/default.nix @@ -1,7 +1,10 @@ { lib , stdenv , fetchFromGitHub +, fetchpatch , scfbuild +, fontforge +, libuninameslist , nodejs , nodePackages , python3Packages @@ -14,6 +17,34 @@ let [ "OpenMoji-Color.ttf" "OpenMoji-Black.ttf" ] variant; + # With newer fontforge the build hangs, see + # https://github.com/NixOS/nixpkgs/issues/167869 + # Patches etc taken from + # https://github.com/NixOS/nixpkgs/commit/69da642a5a9bb433138ba1b13c8d56fb5bb6ec05 + fontforge-20201107 = fontforge.overrideAttrs (old: rec { + version = "20201107"; + src = fetchFromGitHub { + owner = "fontforge"; + repo = "fontforge"; + rev = version; + sha256 = "sha256-Rl/5lbXaPgIndANaD0IakaDus6T53FjiBb45FIuGrvc="; + }; + patches = [ + (fetchpatch { + url = "https://salsa.debian.org/fonts-team/fontforge/raw/76bffe6ccf8ab20a0c81476a80a87ad245e2fd1c/debian/patches/0001-add-extra-cmake-install-rules.patch"; + sha256 = "u3D9od2xLECNEHhZ+8dkuv9818tPkdP6y/Tvd9CADJg="; + }) + (fetchpatch { + url = "https://github.com/fontforge/fontforge/commit/69e263b2aff29ad22f97f13935cfa97a1eabf207.patch"; + sha256 = "06yyf90605aq6ppfiz83mqkdmnaq5418axp9jgsjyjq78b00xb29"; + }) + ]; + buildInputs = old.buildInputs ++ [ libuninameslist ]; + }); + scfbuild-with-fontforge-20201107 = scfbuild.override (old: { + fontforge = fontforge-20201107; + }); + in stdenv.mkDerivation rec { pname = "openmoji"; version = "13.1.0"; @@ -26,7 +57,7 @@ in stdenv.mkDerivation rec { }; nativeBuildInputs = [ - scfbuild + scfbuild-with-fontforge-20201107 nodejs nodePackages.glob nodePackages.lodash