Skip to content

Commit

Permalink
harfbuzz: fix cross compilation
Browse files Browse the repository at this point in the history
This change indirectly fixes cross compilation for Emacs

Fixes build errors:
- src/meson.build:639:4: ERROR: Problem encountered: Introspection support is requested but it isn't available in cross builds
- Program glib-mkenums mkenums found: NO
  • Loading branch information
kira-bruneau committed Feb 11, 2021
1 parent 77ffc4c commit 5f97fe5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkgs/development/libraries/harfbuzz/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ let
inherit (lib) optional optionals optionalString;
mesonFeatureFlag = opt: b:
"-D${opt}=${if b then "enabled" else "disabled"}";
isCross = stdenv.hostPlatform != stdenv.buildPlatform;
in

stdenv.mkDerivation {
Expand Down Expand Up @@ -43,21 +44,25 @@ stdenv.mkDerivation {
(mesonFeatureFlag "graphite" withGraphite2)
(mesonFeatureFlag "icu" withIcu)
(mesonFeatureFlag "coretext" withCoreText)
(mesonFeatureFlag "introspection" (!isCross))
];

strictDeps = true;

nativeBuildInputs = [
meson
ninja
gobject-introspection
libintl
pkg-config
python3
gtk-doc
docbook-xsl-nons
docbook_xml_dtd_43
];
glib # glib-mkenums
] ++ lib.optional (!isCross) gobject-introspection;

buildInputs = [ glib freetype cairo ] # recommended by upstream
++ lib.optional (!isCross) gobject-introspection
++ lib.optionals withCoreText [ ApplicationServices CoreText ];

propagatedBuildInputs = []
Expand Down

0 comments on commit 5f97fe5

Please sign in to comment.