From 9d0fcb374ff78d7cd096401130d62fcc212b9341 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 6 Nov 2022 18:13:26 -0800 Subject: [PATCH] libiio: allow build on systems without avahi https://github.com/NixOS/nixpkgs/pull/181875 seems to have made this package and its downstream dependencies no longer build on avahi-less systems. Let's make it possible for them to build again. --- pkgs/development/libraries/libiio/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libiio/default.nix b/pkgs/development/libraries/libiio/default.nix index c495935e14020..815f23a052788 100644 --- a/pkgs/development/libraries/libiio/default.nix +++ b/pkgs/development/libraries/libiio/default.nix @@ -6,7 +6,7 @@ , libxml2 , python , libusb1 -, avahi +, avahiSupport ? true, avahi , libaio , runtimeShell , lib @@ -43,8 +43,8 @@ stdenv.mkDerivation rec { python libxml2 libusb1 - avahi ] ++ lib.optional python.isPy3k python.pkgs.setuptools + ++ lib.optional avahiSupport avahi ++ lib.optional stdenv.isLinux libaio ++ lib.optionals stdenv.isDarwin [ CFNetwork CoreServices ]; @@ -55,6 +55,8 @@ stdenv.mkDerivation rec { # the linux-like directory structure is used for proper output splitting "-DOSX_PACKAGE=off" "-DOSX_FRAMEWORK=off" + ] ++ lib.optionals (!avahiSupport) [ + "-DHAVE_DNS_SD=OFF" ]; postPatch = ''