Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / gnu / packages / avahi.scm
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 ;;;
6 ;;; This file is part of GNU Guix.
7 ;;;
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
12 ;;;
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
17 ;;;
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21 (define-module (gnu packages avahi)
22 #:use-module ((guix licenses) #:select (lgpl2.1+))
23 #:use-module (guix packages)
24 #:use-module (guix download)
25 #:use-module (guix build-system gnu)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages dbm)
28 #:use-module (gnu packages libdaemon)
29 #:use-module (gnu packages linux)
30 #:use-module (gnu packages pkg-config)
31 #:use-module (gnu packages glib)
32 #:use-module (gnu packages xml))
33
34 (define-public avahi
35 (package
36 (name "avahi")
37 (version "0.7")
38 (home-page "https://avahi.org")
39 (source (origin
40 (method url-fetch)
41 (uri (string-append home-page "/download/avahi-"
42 version ".tar.gz"))
43 (sha256
44 (base32
45 "0128n7jlshw4bpx0vg8lwj8qwdisjxi7mvniwfafgnkzzrfrpaap"))
46 (patches (search-patches "avahi-localstatedir.patch"
47 "avahi-CVE-2018-1000845.patch"))))
48 ;; Hide a duplicate of the CVE fixed above.
49 (properties `((lint-hidden-cve . ("CVE-2017-6519"))))
50 (build-system gnu-build-system)
51 (arguments
52 '(#:configure-flags '("--with-distro=none"
53 "--localstatedir=/var" ; for the DBus socket
54 "--disable-python"
55 "--disable-mono"
56 "--disable-doxygen-doc"
57 "--disable-xmltoman"
58 "--enable-tests"
59 "--disable-qt3" "--disable-qt4"
60 "--disable-gtk" "--disable-gtk3"
61 "--enable-compat-libdns_sd")))
62 (inputs
63 `(("expat" ,expat)
64 ("glib" ,glib)
65 ("dbus" ,dbus)
66 ("gdbm" ,gdbm)
67 ("libcap" ,libcap) ;to enable chroot support in avahi-daemon
68 ("libdaemon" ,libdaemon)))
69 (native-inputs
70 `(("intltool" ,intltool)
71 ("glib" ,glib "bin")
72 ("pkg-config" ,pkg-config)))
73 (synopsis "Implementation of mDNS/DNS-SD protocols")
74 (description
75 "Avahi is a system which facilitates service discovery on a local
76 network. It is an implementation of the mDNS (for \"Multicast DNS\") and
77 DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
78 (license lgpl2.1+)))
79
80 (define-public nss-mdns
81 (package
82 (name "nss-mdns")
83 (version "0.14.1")
84 (home-page "https://github.com/lathiat/nss-mdns")
85 (source (origin
86 (method url-fetch)
87 (uri (string-append home-page "/releases/download/v" version "/"
88 name "-" version ".tar.gz"))
89 (sha256
90 (base32
91 "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2"))))
92 (build-system gnu-build-system)
93 (arguments
94 ;; The Avahi daemon socket is expected by 'configure.ac' to be at
95 ;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in
96 ;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit.
97 '(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket")))
98 (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in")
99 (description
100 "Nss-mdns is a plug-in for the GNU C Library's Name Service Switch
101 (@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is
102 most often used in home and other small networks without a local name server,
103 to resolve host names in the @samp{.local} top-level domain.")
104 (license lgpl2.1+)))