From b5c88efba7d7ce6ae830930613b40bd3b0a4aba9 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 15 Aug 2024 10:12:42 +0200 Subject: [PATCH] gst_all_1.gstreamer: disable introspection if unavailable --- pkgs/development/libraries/gstreamer/core/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index 2cf0569b3e9e..e8f873555d70 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -15,9 +15,11 @@ , lib , Cocoa , CoreServices -, gobject-introspection , rustc , testers +, gobject-introspection +, buildPackages +, withIntrospection ? lib.meta.availableOn stdenv.hostPlatform gobject-introspection && stdenv.hostPlatform.emulatorAvailable buildPackages , libunwind # darwin.libunwind doesn't have pkg-config definitions so meson doesn't detect it. , withLibunwind ? !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform libunwind @@ -60,10 +62,11 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper glib bash-completion - gobject-introspection rustc ] ++ lib.optionals stdenv.isLinux [ libcap # for setcap binary + ] ++ lib.optionals withIntrospection [ + gobject-introspection ] ++ lib.optionals enableDocumentation [ hotdoc ]; @@ -88,6 +91,7 @@ stdenv.mkDerivation (finalAttrs: { mesonFlags = [ "-Ddbghelp=disabled" # not needed as we already provide libunwind and libdw, and dbghelp is a fallback to those "-Dexamples=disabled" # requires many dependencies and probably not useful for our users + (lib.mesonEnable "introspection" withIntrospection) (lib.mesonEnable "doc" enableDocumentation) (lib.mesonEnable "libunwind" withLibunwind) (lib.mesonEnable "libdw" withLibunwind)