summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Torres <anderson.torres.8519@gmail.com>2026-05-05 17:40:52 -0300
committerNguyễn Gia Phong <cnx@loang.net>2026-06-04 13:07:12 +0900
commit27c8428b41b7ce37109503292309c6b570194d44 (patch)
tree9142fd518b38d065ce8bb398fd646c2dac9075ba
parent6655d5fb372c4cbbcfa03935a702c06e32555ac7 (diff)
gnu: Merge (gnu packages avahi) with (gnu packages dns).
* gnu/packages/dns.scm: Move to here... * gnu/packages/avahi.scm (avahi, nss-mdns): ...from here. New deprecated variables. Change-Id: I504e6d306d43b0642c8ad2cf91e048fdc401398f Merges: https://codeberg.org/guix/guix/pulls/8572 Reviewed-by: Maxim Cournoyer <maxim@guixotic.coop> Reviewed-by: Ludovic Courtès <ludo@gnu.org> Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
-rw-r--r--gnu/packages/avahi.scm138
-rw-r--r--gnu/packages/dns.scm119
2 files changed, 124 insertions, 133 deletions
diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm
index 79e1866b657..e7c597a49ef 100644
--- a/gnu/packages/avahi.scm
+++ b/gnu/packages/avahi.scm
@@ -1,10 +1,5 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2026 Anderson Torres <anderson.torres.8519@gmail.com>
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>
6;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
7;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
8;;; 3;;;
9;;; This file is part of GNU Guix. 4;;; This file is part of GNU Guix.
10;;; 5;;;
@@ -22,129 +17,12 @@
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. 17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23 18
24(define-module (gnu packages avahi) 19(define-module (gnu packages avahi)
25 #:use-module ((guix licenses) #:select (lgpl2.1+)) 20 #:use-module (guix deprecation))
26 #:use-module (guix packages)
27 #:use-module (guix gexp)
28 #:use-module (guix download)
29 #:use-module (guix utils)
30 #:use-module (guix build-system gnu)
31 #:use-module (gnu packages)
32 #:use-module (gnu packages bash)
33 #:use-module (gnu packages dbm)
34 #:use-module (gnu packages gettext)
35 #:use-module (gnu packages glib)
36 #:use-module (gnu packages libdaemon)
37 #:use-module (gnu packages libevent)
38 #:use-module (gnu packages linux)
39 #:use-module (gnu packages pkg-config)
40 #:use-module (gnu packages xml))
41 21
42(define-public avahi 22;; XXX: Deprecated on 2026-06-04.
43 (package 23(define-deprecated/public-alias avahi
44 (name "avahi") 24 (@ (gnu packages dns) avahi))
45 (version "0.8")
46 (home-page "https://avahi.org")
47 (source (origin
48 (method url-fetch)
49 (uri (string-append home-page "/download/avahi-"
50 version ".tar.gz"))
51 (sha256
52 (base32
53 "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"))
54 (patches (search-patches "avahi-localstatedir.patch"))
55 (modules '((guix build utils)))
56 (snippet
57 '(begin
58 ;; Fix version constraint in the avahi-libevent pkg-config file.
59 ;; This can be removed for Avahi versions > 0.8.
60 (substitute* "avahi-libevent.pc.in"
61 (("libevent-2\\.1\\.5")
62 "libevent >= 2.1.5"))))))
63 (build-system gnu-build-system)
64 (arguments
65 `(#:configure-flags '("--with-distro=none"
66 "--disable-static"
67 "--localstatedir=/var" ; for the DBus socket
68 "--disable-python"
69 "--disable-mono"
70 "--disable-doxygen-doc"
71 "--disable-xmltoman"
72 "--enable-tests"
73 "--disable-qt4" "--disable-qt5"
74 "--disable-gtk" "--disable-gtk3"
75 "--enable-compat-libdns_sd"
76 ,@(if (%current-target-system)
77 '("ac_cv_prog_have_pkg_config=yes")
78 '())
79 ,@(if (or (%current-target-system)
80 (not (member (%current-system)
81 (package-supported-systems
82 libcap))))
83 '("--disable-autoipd")
84 '())
85 ,@(if (target-hurd?)
86 '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types")
87 '()))
88 #:modules ((srfi srfi-26)
89 (guix build utils)
90 (guix build gnu-build-system))
91 #:phases
92 ,#~(modify-phases %standard-phases
93 (add-after 'patch-shebangs 'patch-more-shebangs
94 (lambda* (#:key inputs #:allow-other-keys)
95 (define path
96 `(,(dirname (search-input-file inputs "bin/sh"))))
97 (for-each
98 (cut patch-shebang <> path)
99 (find-files (string-append #$output "/etc/avahi"))))))))
100 (inputs
101 `(("bash-minimal" ,bash-minimal)
102 ("dbus" ,dbus)
103 ("expat" ,expat)
104 ("gdbm" ,gdbm)
105 ("glib" ,glib)
106 ;; Do not use libcap when cross-compiling since it's not quite
107 ;; cross-compilable; and use it only for supported systems.
108 ,@(if (and (not (%current-target-system))
109 (member (%current-system)
110 (package-supported-systems libcap)))
111 `(("libcap" ,libcap)) ;to enable chroot support in avahi-daemon
112 '())
113 ("libdaemon" ,libdaemon)
114 ("libevent" ,libevent)))
115 (native-inputs
116 `(("gettext" ,gettext-minimal)
117 ("glib" ,glib "bin")
118 ("pkg-config" ,pkg-config)))
119 (synopsis "Implementation of mDNS/DNS-SD protocols")
120 (description
121 "Avahi is a system which facilitates service discovery on a local
122network. It is an implementation of the mDNS (for \"Multicast DNS\") and
123DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
124 (license lgpl2.1+)))
125 25
126(define-public nss-mdns 26;; XXX: Deprecated on 2026-06-04.
127 (package 27(define-deprecated/public-alias nss-mdns
128 (name "nss-mdns") 28 (@ (gnu packages dns) nss-mdns))
129 (version "0.14.1")
130 (home-page "https://github.com/lathiat/nss-mdns")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append home-page "/releases/download/v" version "/"
134 name "-" version ".tar.gz"))
135 (sha256
136 (base32
137 "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2"))))
138 (build-system gnu-build-system)
139 (arguments
140 ;; The Avahi daemon socket is expected by 'configure.ac' to be at
141 ;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in
142 ;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit.
143 '(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket")))
144 (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in")
145 (description
146 "Nss-mdns is a plug-in for the GNU C Library's Name Service Switch
147(@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is
148most often used in home and other small networks without a local name server,
149to resolve host names in the @samp{.local} top-level domain.")
150 (license lgpl2.1+)))
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 883fab36cdf..d23bc290a65 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -1,7 +1,7 @@
1;;; GNU Guix --- Functional package management for GNU 1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> 2;;; Copyright © 2013-2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
3;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> 3;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
4;;; Copyright © 2016 Mark H Weaver <mhw@netris.org> 4;;; Copyright © 2014, 2016 Mark H Weaver <mhw@netris.org>
5;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net> 5;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
6;;; Copyright © 2015-2018, 2020 Efraim Flashner <efraim@flashner.co.il> 6;;; Copyright © 2015-2018, 2020 Efraim Flashner <efraim@flashner.co.il>
7;;; Copyright © 2016 John Darrington <jmd@gnu.org> 7;;; Copyright © 2016 John Darrington <jmd@gnu.org>
@@ -19,6 +19,7 @@
19;;; Copyright © 2020 Leo Famulari <leo@famulari.name> 19;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
20;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> 20;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
21;;; Copyright © 2020 Simon South <simon@simonsouth.net> 21;;; Copyright © 2020 Simon South <simon@simonsouth.net>
22;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
22;;; Copyright © 2021, 2024 Zheng Junjie <873216071@qq.com> 23;;; Copyright © 2021, 2024 Zheng Junjie <873216071@qq.com>
23;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> 24;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
24;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space> 25;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
@@ -54,15 +55,17 @@
54 #:use-module (gnu packages curl) 55 #:use-module (gnu packages curl)
55 #:use-module (gnu packages databases) 56 #:use-module (gnu packages databases)
56 #:use-module (gnu packages datastructures) 57 #:use-module (gnu packages datastructures)
58 #:use-module (gnu packages dbm)
57 #:use-module (gnu packages documentation) 59 #:use-module (gnu packages documentation)
58 #:use-module (gnu packages elf) 60 #:use-module (gnu packages elf)
59 #:use-module (gnu packages compiler-tools) 61 #:use-module (gnu packages compiler-tools)
60 #:use-module (gnu packages freedesktop) 62 #:use-module (gnu packages freedesktop)
61 #:use-module (gnu packages gcc) 63 #:use-module (gnu packages gcc)
64 #:use-module (gnu packages gettext)
62 #:use-module (gnu packages glib) 65 #:use-module (gnu packages glib)
63 #:use-module (gnu packages groff) 66 #:use-module (gnu packages groff)
64 #:use-module (gnu packages groff)
65 #:use-module (gnu packages gtk) 67 #:use-module (gnu packages gtk)
68 #:use-module (gnu packages libdaemon)
66 #:use-module (gnu packages libedit) 69 #:use-module (gnu packages libedit)
67 #:use-module (gnu packages libevent) 70 #:use-module (gnu packages libevent)
68 #:use-module (gnu packages libidn) 71 #:use-module (gnu packages libidn)
@@ -141,6 +144,90 @@ several concurrent calls. The package also includes several command-line
141utilities for use in scripts.") 144utilities for use in scripts.")
142 (license license:gpl3+))) 145 (license license:gpl3+)))
143 146
147(define-public avahi
148 (package
149 (name "avahi")
150 (version "0.8")
151 (home-page "https://avahi.org")
152 (source (origin
153 (method url-fetch)
154 (uri (string-append home-page "/download/avahi-"
155 version ".tar.gz"))
156 (sha256
157 (base32
158 "1npdixwxxn3s9q1f365x9n9rc5xgfz39hxf23faqvlrklgbhj0q6"))
159 (patches (search-patches "avahi-localstatedir.patch"))
160 (modules '((guix build utils)))
161 (snippet
162 '(begin
163 ;; Fix version constraint in the avahi-libevent pkg-config file.
164 ;; This can be removed for Avahi versions > 0.8.
165 (substitute* "avahi-libevent.pc.in"
166 (("libevent-2\\.1\\.5")
167 "libevent >= 2.1.5"))))))
168 (build-system gnu-build-system)
169 (arguments
170 `(#:configure-flags '("--with-distro=none"
171 "--disable-static"
172 "--localstatedir=/var" ; for the DBus socket
173 "--disable-python"
174 "--disable-mono"
175 "--disable-doxygen-doc"
176 "--disable-xmltoman"
177 "--enable-tests"
178 "--disable-qt4" "--disable-qt5"
179 "--disable-gtk" "--disable-gtk3"
180 "--enable-compat-libdns_sd"
181 ,@(if (%current-target-system)
182 '("ac_cv_prog_have_pkg_config=yes")
183 '())
184 ,@(if (or (%current-target-system)
185 (not (member (%current-system)
186 (package-supported-systems
187 libcap))))
188 '("--disable-autoipd")
189 '())
190 ,@(if (target-hurd?)
191 '("CFLAGS=-g -O2 -Wno-error=incompatible-pointer-types")
192 '()))
193 #:modules ((srfi srfi-26)
194 (guix build utils)
195 (guix build gnu-build-system))
196 #:phases
197 ,#~(modify-phases %standard-phases
198 (add-after 'patch-shebangs 'patch-more-shebangs
199 (lambda* (#:key inputs #:allow-other-keys)
200 (define path
201 `(,(dirname (search-input-file inputs "bin/sh"))))
202 (for-each
203 (cut patch-shebang <> path)
204 (find-files (string-append #$output "/etc/avahi"))))))))
205 (inputs
206 `(("bash-minimal" ,bash-minimal)
207 ("dbus" ,dbus)
208 ("expat" ,expat)
209 ("gdbm" ,gdbm)
210 ("glib" ,glib)
211 ;; Do not use libcap when cross-compiling since it's not quite
212 ;; cross-compilable; and use it only for supported systems.
213 ,@(if (and (not (%current-target-system))
214 (member (%current-system)
215 (package-supported-systems libcap)))
216 `(("libcap" ,libcap)) ;to enable chroot support in avahi-daemon
217 '())
218 ("libdaemon" ,libdaemon)
219 ("libevent" ,libevent)))
220 (native-inputs
221 `(("gettext" ,gettext-minimal)
222 ("glib" ,glib "bin")
223 ("pkg-config" ,pkg-config)))
224 (synopsis "Implementation of mDNS/DNS-SD protocols")
225 (description
226 "Avahi is a system which facilitates service discovery on a local
227network. It is an implementation of the mDNS (for \"Multicast DNS\") and
228DNS-SD (for \"DNS-Based Service Discovery\") protocols.")
229 (license license:lgpl2.1+)))
230
144(define-public c-ares 231(define-public c-ares
145 (package 232 (package
146 (name "c-ares") 233 (name "c-ares")
@@ -423,6 +510,32 @@ C it should be a lot faster than Perl.")
423 (home-page "https://nlnetlabs.nl/projects/ldns/about/") 510 (home-page "https://nlnetlabs.nl/projects/ldns/about/")
424 (license license:bsd-3))) 511 (license license:bsd-3)))
425 512
513(define-public nss-mdns
514 (package
515 (name "nss-mdns")
516 (version "0.14.1")
517 (home-page "https://github.com/lathiat/nss-mdns")
518 (source (origin
519 (method url-fetch)
520 (uri (string-append home-page "/releases/download/v" version "/"
521 name "-" version ".tar.gz"))
522 (sha256
523 (base32
524 "134wdr0n9cm5ab4g6dwq76lvzqns9dcylr470i2xxjimnw0l22d2"))))
525 (build-system gnu-build-system)
526 (arguments
527 ;; The Avahi daemon socket is expected by 'configure.ac' to be at
528 ;; "$(localstatedir)/run/avahi-daemon/socket", but nowadays it lives in
529 ;; /run/avahi-daemon/socket. Remove the "$(localstatedir)" bit.
530 '(#:configure-flags '("AVAHI_SOCKET=/run/avahi-daemon/socket")))
531 (synopsis "Multicast DNS Name Service Switch (@dfn{NSS}) plug-in")
532 (description
533 "Nss-mdns is a plug-in for the GNU C Library's Name Service Switch
534(@dfn{NSS}) that resolves host names via multicast DNS (@dfn{mDNS}). It is
535most often used in home and other small networks without a local name server,
536to resolve host names in the @samp{.local} top-level domain.")
537 (license license:lgpl2.1+)))
538
426(define-public dnssec-trigger 539(define-public dnssec-trigger
427 (package 540 (package
428 (name "dnssec-trigger") 541 (name "dnssec-trigger")