avahi: add Python support

This commit is contained in:
Ben Wolsieffer 2019-04-18 01:36:26 -04:00 committed by Frederik Rietdijk
parent 48c8756157
commit f9750a769f
2 changed files with 13 additions and 2 deletions

View File

@ -3,7 +3,9 @@
, gtk3Support ? false, gtk3 ? null
, qt4 ? null
, qt4Support ? false
, withLibdnssdCompat ? false }:
, withLibdnssdCompat ? false
, python ? null
, withPython ? false }:
assert qt4Support -> qt4 != null;
@ -30,6 +32,9 @@ stdenv.mkDerivation rec {
++ (stdenv.lib.optional gtk3Support gtk3)
++ (stdenv.lib.optional qt4Support qt4);
propagatedBuildInputs =
stdenv.lib.optionals withPython (with python.pkgs; [ python pygobject3 dbus-python ]);
nativeBuildInputs = [ pkgconfig gettext intltool glib ];
configureFlags =
@ -37,7 +42,8 @@ stdenv.mkDerivation rec {
"--disable-gtk"
(stdenv.lib.enableFeature gtk3Support "gtk3")
"--${if qt4Support then "enable" else "disable"}-qt4"
"--disable-python" "--localstatedir=/var" "--with-distro=none"
(stdenv.lib.enableFeature withPython "python")
"--localstatedir=/var" "--with-distro=none"
# A systemd unit is provided by the avahi-daemon NixOS module
"--with-systemdsystemunitdir=no" ]
++ stdenv.lib.optional withLibdnssdCompat "--enable-compat-libdns_sd"

View File

@ -243,6 +243,11 @@ in {
ansiconv = callPackage ../development/python-modules/ansiconv { };
avahi = toPythonModule (pkgs.avahi.override {
inherit python;
withPython = true;
});
azure = callPackage ../development/python-modules/azure { };
azure-nspkg = callPackage ../development/python-modules/azure-nspkg { };