gnu: cvs-fast-export: Update to 1.56.
[jackhill/guix/guix.git] / gnu / packages / avahi.scm
CommitLineData
c50cbfd6 1;;; GNU Guix --- Functional package management for GNU
a68fdfea 2;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
05463931 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4525e7c7 4;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
850093ac 5;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
c50cbfd6
LC
6;;;
7;;; This file is part of GNU Guix.
8;;;
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.
13;;;
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.
18;;;
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/>.
21
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)
8eaa8a3b 27 #:use-module (gnu packages)
255d1bbe 28 #:use-module (gnu packages dbm)
850093ac
MB
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages glib)
c50cbfd6 31 #:use-module (gnu packages libdaemon)
850093ac 32 #:use-module (gnu packages libevent)
955ba55c 33 #:use-module (gnu packages linux)
c50cbfd6 34 #:use-module (gnu packages pkg-config)
c50cbfd6
LC
35 #:use-module (gnu packages xml))
36
37(define-public avahi
38 (package
39 (name "avahi")
850093ac 40 (version "0.8")
f460f8da 41 (home-page "https://avahi.org")
c50cbfd6
LC
42 (source (origin
43 (method url-fetch)
44 (uri (string-append home-page "/download/avahi-"
45 version ".tar.gz"))
46 (sha256
47 (base32
850093ac
MB
48 "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"))
49 (patches (search-patches "avahi-localstatedir.patch"))
50 (modules '((guix build utils)))
51 (snippet
52 '(begin
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")
57 "libevent >= 2.1.5"))
58 #t))))
c50cbfd6
LC
59 (build-system gnu-build-system)
60 (arguments
61 '(#:configure-flags '("--with-distro=none"
32b089f4 62 "--disable-static"
8eaa8a3b 63 "--localstatedir=/var" ; for the DBus socket
c50cbfd6
LC
64 "--disable-python"
65 "--disable-mono"
66 "--disable-doxygen-doc"
67 "--disable-xmltoman"
68 "--enable-tests"
850093ac 69 "--disable-qt4" "--disable-qt5"
f88ee3ad
DT
70 "--disable-gtk" "--disable-gtk3"
71 "--enable-compat-libdns_sd")))
c50cbfd6 72 (inputs
850093ac
MB
73 `(("dbus" ,dbus)
74 ("expat" ,expat)
c4c4cc05 75 ("gdbm" ,gdbm)
850093ac 76 ("glib" ,glib)
9e1f5a26 77 ("libcap" ,libcap-2.31) ;to enable chroot support in avahi-daemon
850093ac
MB
78 ("libdaemon" ,libdaemon)
79 ("libevent" ,libevent)))
c4c4cc05 80 (native-inputs
850093ac 81 `(("gettext" ,gettext-minimal)
426adbe8 82 ("glib" ,glib "bin")
c4c4cc05 83 ("pkg-config" ,pkg-config)))
35b9e423 84 (synopsis "Implementation of mDNS/DNS-SD protocols")
c50cbfd6
LC
85 (description
86 "Avahi is a system which facilitates service discovery on a local
87network. It is an implementation of the mDNS (for \"Multicast DNS\") and
88DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
89 (license lgpl2.1+)))
00b7776c
LC
90
91(define-public nss-mdns
92 (package
93 (name "nss-mdns")
6c46e8e6 94 (version "0.14.1")
9859b5c1 95 (home-page "https://github.com/lathiat/nss-mdns")
00b7776c
LC
96 (source (origin
97 (method url-fetch)
9859b5c1 98 (uri (string-append home-page "/releases/download/v" version "/"
4525e7c7 99 name "-" version ".tar.gz"))
00b7776c
LC
100 (sha256
101 (base32
6c46e8e6 102 "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2"))))
00b7776c 103 (build-system gnu-build-system)
69876158 104 (arguments
6c46e8e6
LC
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")))
e80611c4 109 (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in")
00b7776c 110 (description
e80611c4
TGR
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
113most often used in home and other small networks without a local name server,
114to resolve host names in the @samp{.local} top-level domain.")
00b7776c 115 (license lgpl2.1+)))