@@ -5,12 +5,12 @@
55, fetchurl
66, cairo
77, nixosTests
8−, python3
98, pkg-config
109, pngquant
1110, which
1211, imagemagick
1312, zopfli
13+, buildPackages
1414}:
1515
1616let
@@ -130,8 +130,8 @@ in
130130 noto-fonts-emoji = let
131131 version = "2.034";
132132 emojiPythonEnv =
133− python3.withPackages (p: with p; [ fonttools nototools ]);
134− in stdenv.mkDerivation {
133+ buildPackages.python3.withPackages (p: with p; [ fonttools nototools ]);
134+ in stdenvNoCC.mkDerivation {
135135 pname = "noto-fonts-emoji";
136136 inherit version;
137137
@@ -142,13 +142,17 @@ in
142142 sha256 = "1d6zzk0ii43iqfnjbldwp8sasyx99lbjp1nfgqjla7ixld6yp98l";
143143 };
144144
145− nativeBuildInputs = [
145+ depsBuildBuild = [
146+ buildPackages.stdenv.cc
147+ pkg-config
146148 cairo
149+ ];
150+
151+ nativeBuildInputs = [
147152 imagemagick
148153 zopfli
149154 pngquant
150155 which
151− pkg-config
152156 emojiPythonEnv
153157 ];
154158
@@ -159,14 +163,6 @@ in
159163 # python requirements using python.withPackages
160164 sed -i '/ifndef VIRTUAL_ENV/,+2d' Makefile
161165
162− # Remove check for missing zopfli, it doesn't
163− # work and we guarantee its presence already.
164− sed -i '/ifdef MISSING_ZOPFLI/,+2d' Makefile
165− sed -i '/ifeq (,$(shell which $(ZOPFLIPNG)))/,+4d' Makefile
166−
167− sed -i '/ZOPFLIPNG = zopflipng/d' Makefile
168− echo "ZOPFLIPNG = ${zopfli}/bin/zopflipng" >> Makefile
169−
170166 # Make the build verbose so it won't get culled by Hydra thinking that
171167 # it somehow got stuck doing nothing.
172168 sed -i 's;\t@;\t;' Makefile