1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
7 ;;; This file is part of GNU Guix.
9 ;;; GNU Guix is free software; you can redistribute it and/or modify it
10 ;;; under the terms of the GNU General Public License as published by
11 ;;; the Free Software Foundation; either version 3 of the License, or (at
12 ;;; your option) any later version.
14 ;;; GNU Guix is distributed in the hope that it will be useful, but
15 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;;; GNU General Public License for more details.
19 ;;; You should have received a copy of the GNU General Public License
20 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
22 (define-module (gnu packages avahi)
23 #:use-module ((guix licenses) #:select (lgpl2.1+))
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system gnu)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages dbm)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages libdaemon)
32 #:use-module (gnu packages libevent)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages pkg-config)
35 #:use-module (gnu packages xml))
41 (home-page "https://avahi.org")
44 (uri (string-append home-page "/download/avahi-"
48 "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"))
49 (patches (search-patches "avahi-localstatedir.patch"))
50 (modules '((guix build utils)))
53 ;; Fix version constraint in the avahi-libevent pkg-config file.
54 ;; This can be removed for Avahi versions > 0.8.
55 (substitute* "avahi-libevent.pc.in"
56 (("libevent-2\\.1\\.5")
59 (build-system gnu-build-system)
61 '(#:configure-flags '("--with-distro=none"
63 "--localstatedir=/var" ; for the DBus socket
66 "--disable-doxygen-doc"
69 "--disable-qt4" "--disable-qt5"
70 "--disable-gtk" "--disable-gtk3"
71 "--enable-compat-libdns_sd")))
77 ("libcap" ,libcap-2.31) ;to enable chroot support in avahi-daemon
78 ("libdaemon" ,libdaemon)
79 ("libevent" ,libevent)))
81 `(("gettext" ,gettext-minimal)
83 ("pkg-config" ,pkg-config)))
84 (synopsis "Implementation of mDNS/DNS-SD protocols")
86 "Avahi is a system which facilitates service discovery on a local
87 network. It is an implementation of the mDNS (for \"Multicast DNS\") and
88 DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
91 (define-public nss-mdns
95 (home-page "https://github.com/lathiat/nss-mdns")
98 (uri (string-append home-page "/releases/download/v" version "/"
99 name "-" version ".tar.gz"))
102 "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2"))))
103 (build-system gnu-build-system)
105 ;; The Avahi daemon socket is expected by 'configure.ac' to be at
106 ;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in
107 ;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit.
108 '(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket")))
109 (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in")
111 "Nss-mdns is a plug-in for the GNU C Library's Name Service Switch
112 (@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is
113 most often used in home and other small networks without a local name server,
114 to resolve host names in the @samp{.local} top-level domain.")