From 646d4d5a2d448615d518b5ba5ff85de275a7d7ed Mon Sep 17 00:00:00 2001 From: Randy Eckenrode Date: Mon, 7 Oct 2024 08:11:30 -0400 Subject: [PATCH] gst_all_1.gstreamer: only try to link libdw if it is available --- pkgs/development/libraries/gstreamer/core/default.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gstreamer/core/default.nix b/pkgs/development/libraries/gstreamer/core/default.nix index 7eba093ab94b..934d919cbbc4 100644 --- a/pkgs/development/libraries/gstreamer/core/default.nix +++ b/pkgs/development/libraries/gstreamer/core/default.nix @@ -28,6 +28,9 @@ , enableDocumentation ? stdenv.hostPlatform == stdenv.buildPlatform, hotdoc }: +let + hasElfutils = lib.meta.availableOn stdenv.hostPlatform elfutils; +in stdenv.mkDerivation (finalAttrs: { pname = "gstreamer"; version = "1.24.3"; @@ -76,7 +79,7 @@ stdenv.mkDerivation (finalAttrs: { bash-completion ] ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap - ] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform elfutils) [ + ] ++ lib.optionals hasElfutils [ elfutils ] ++ lib.optionals withLibunwind [ libunwind @@ -95,7 +98,7 @@ stdenv.mkDerivation (finalAttrs: { (lib.mesonEnable "introspection" withIntrospection) (lib.mesonEnable "doc" enableDocumentation) (lib.mesonEnable "libunwind" withLibunwind) - (lib.mesonEnable "libdw" withLibunwind) + (lib.mesonEnable "libdw" (withLibunwind && hasElfutils)) ]; postPatch = ''