summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/libraries/harfbuzz/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/development/libraries/harfbuzz/default.nix b/pkgs/development/libraries/harfbuzz/default.nix
index ed582248dfe..7376611e1db 100644
--- a/pkgs/development/libraries/harfbuzz/default.nix
+++ b/pkgs/development/libraries/harfbuzz/default.nix
@@ -28,6 +28,7 @@ let
   inherit (lib) optional optionals optionalString;
   mesonFeatureFlag = opt: b:
     "-D${opt}=${if b then "enabled" else "disabled"}";
+  isNativeCompilation = stdenv.buildPlatform == stdenv.hostPlatform;
 in
 
 stdenv.mkDerivation {
@@ -56,6 +57,7 @@ stdenv.mkDerivation {
     (mesonFeatureFlag "graphite" withGraphite2)
     (mesonFeatureFlag "icu" withIcu)
     (mesonFeatureFlag "coretext" withCoreText)
+    (mesonFeatureFlag "introspection" isNativeCompilation)
   ];
 
   nativeBuildInputs = [
@@ -71,7 +73,8 @@ stdenv.mkDerivation {
   ];
 
   buildInputs = [ glib freetype cairo ] # recommended by upstream
-    ++ lib.optionals withCoreText [ ApplicationServices CoreText ];
+    ++ lib.optionals withCoreText [ ApplicationServices CoreText ]
+    ++ lib.optionals isNativeCompilation [ gobject-introspection ];
 
   propagatedBuildInputs = optional withGraphite2 graphite2
     ++ optionals withIcu [ icu harfbuzz ];