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 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu packages avahi)
21 #:use-module ((guix licenses) #:select (lgpl2.1+))
22 #:use-module (guix packages)
23 #:use-module (guix download)
24 #:use-module (guix build-system gnu)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages databases)
27 #:use-module (gnu packages libdaemon)
28 #:use-module (gnu packages linux)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages glib)
31 #:use-module (gnu packages xml))
32
33 (define-public avahi
34 (package
35 (name "avahi")
36 (version "0.6.31")
37 (home-page "http://avahi.org")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append home-page "/download/avahi-"
41 version ".tar.gz"))
42 (sha256
43 (base32
44 "0j5b5ld6bjyh3qhd2nw0jb84znq0wqai7fsrdzg7bpg24jdp2wl3"))
45 (patches (search-patches "avahi-localstatedir.patch"))))
46 (build-system gnu-build-system)
47 (arguments
48 '(#:configure-flags '("--with-distro=none"
49 "--localstatedir=/var" ; for the DBus socket
50 "--disable-python"
51 "--disable-mono"
52 "--disable-doxygen-doc"
53 "--disable-xmltoman"
54 "--enable-tests"
55 "--disable-qt3" "--disable-qt4"
56 "--disable-gtk" "--disable-gtk3"
57 "--enable-compat-libdns_sd")))
58 (inputs
59 `(("expat" ,expat)
60 ("glib" ,glib)
61 ("dbus" ,dbus)
62 ("gdbm" ,gdbm)
63 ("libcap" ,libcap) ;to enable chroot support in avahi-daemon
64 ("libdaemon" ,libdaemon)))
65 (native-inputs
66 `(("intltool" ,intltool)
67 ("glib" ,glib "bin")
68 ("pkg-config" ,pkg-config)))
69 (synopsis "Implementation of mDNS/DNS-SD protocols")
70 (description
71 "Avahi is a system which facilitates service discovery on a local
72 network. It is an implementation of the mDNS (for \"Multicast DNS\") and
73 DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
74 (license lgpl2.1+)))
75
76 (define-public nss-mdns
77 (package
78 (name "nss-mdns")
79 (version "0.10")
80 (source (origin
81 (method url-fetch)
82 (uri (list
83 (string-append
84 "mirror://debian/pool/main/n/nss-mdns/nss-mdns_"
85 version ".orig.tar.gz")
86 "http://pkgs.fedoraproject.org/repo/pkgs/nss-mdns/nss-mdns-0.10.tar.gz/03938f17646efbb50aa70ba5f99f51d7/nss-mdns-0.10.tar.gz"
87
88 ;; This used to be the canonical URL but it vanished.
89 ;; See <http://bugs.gnu.org/18704>.
90 ;; (string-append
91 ;; "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-"
92 ;; version ".tar.gz")
93 ))
94 (sha256
95 (base32
96 "0vgs6j0qsl0mwzh5a0m0bykr7x6bx79vnbyn0r3q289rghp3qs0y"))
97 (file-name (string-append name "-" version ".tar.gz"))))
98 (build-system gnu-build-system)
99 (arguments
100 ;; The Avahi daemon socket is expected by src/Makefile.am to be at
101 ;; "$(localstatedir)/run/avahi-daemon/socket", so set $(localstatedir)
102 ;; appropriately.
103 '(#:configure-flags '("--localstatedir=/var")))
104
105 ;; XXX: Stale URL, missing replacement. See <http://bugs.gnu.org/18704>.
106 (home-page "http://0pointer.de/lennart/projects/nss-mdns/")
107
108 (synopsis "The mDNS Name Service Switch (NSS) plug-in")
109 (description
110 "Nss-mdns is a plug-in for the Name Service Switch (NSS) functionality
111 of the GNU C Library, providing host name resolution via Multicast DNS (mDNS).
112 It allows for name resolution by programs in the ad-hoc mDNS domain
113 '.local'.")
114 (license lgpl2.1+)))