Skip to content

Commit

Permalink
libiio: allow build on systems without avahi
Browse files Browse the repository at this point in the history
NixOS#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.
  • Loading branch information
Adam Joseph authored and rtimush committed Sep 21, 2023
1 parent 2f9081c commit 9d0fcb3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkgs/development/libraries/libiio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
, libxml2
, python
, libusb1
, avahi
, avahiSupport ? true, avahi
, libaio
, runtimeShell
, lib
Expand Down Expand Up @@ -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 ];

Expand All @@ -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 = ''
Expand Down

0 comments on commit 9d0fcb3

Please sign in to comment.