From 1037236e65cb903750a37d55a8eb668721bde866 Mon Sep 17 00:00:00 2001 From: Nick Cao Date: Tue, 18 Jan 2022 20:38:32 +0800 Subject: [PATCH] noto-fonts-emoji: fix cross compilation --- pkgs/data/fonts/noto-fonts/default.nix | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pkgs/data/fonts/noto-fonts/default.nix b/pkgs/data/fonts/noto-fonts/default.nix index 9c9996db39e0..248d076b997a 100644 --- a/pkgs/data/fonts/noto-fonts/default.nix +++ b/pkgs/data/fonts/noto-fonts/default.nix @@ -5,12 +5,12 @@ , fetchurl , cairo , nixosTests -, python3 , pkg-config , pngquant , which , imagemagick , zopfli +, buildPackages }: let @@ -130,8 +130,8 @@ in noto-fonts-emoji = let version = "2.034"; emojiPythonEnv = - python3.withPackages (p: with p; [ fonttools nototools ]); - in stdenv.mkDerivation { + buildPackages.python3.withPackages (p: with p; [ fonttools nototools ]); + in stdenvNoCC.mkDerivation { pname = "noto-fonts-emoji"; inherit version; @@ -142,13 +142,17 @@ in sha256 = "1d6zzk0ii43iqfnjbldwp8sasyx99lbjp1nfgqjla7ixld6yp98l"; }; - nativeBuildInputs = [ + depsBuildBuild = [ + buildPackages.stdenv.cc + pkg-config cairo + ]; + + nativeBuildInputs = [ imagemagick zopfli pngquant which - pkg-config emojiPythonEnv ]; @@ -159,14 +163,6 @@ in # python requirements using python.withPackages sed -i '/ifndef VIRTUAL_ENV/,+2d' Makefile - # Remove check for missing zopfli, it doesn't - # work and we guarantee its presence already. - sed -i '/ifdef MISSING_ZOPFLI/,+2d' Makefile - sed -i '/ifeq (,$(shell which $(ZOPFLIPNG)))/,+4d' Makefile - - sed -i '/ZOPFLIPNG = zopflipng/d' Makefile - echo "ZOPFLIPNG = ${zopfli}/bin/zopflipng" >> 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