gnu: kdenlive: Add missing dependencies.
[jackhill/guix/guix.git] / gnu / packages / dns.scm
CommitLineData
dd2efd3d
TUBK
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
d912db5b 3;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
b2844d8f 4;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
76dd04be 5;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
be86b7ad 6;;; Copyright © 2016 John Darrington <jmd@gnu.org>
3c986a7d 7;;; Copyright © 2016 Nikita <nikita@n0.is>
47b8608d 8;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
645772e4 9;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
ecc7aa89 10;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
7e61a16c 11;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
0bc2d3e4 12;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
498911d3 13;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
41553c90 14;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
7e5eda0c 15;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
37eaefe8 16;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
0d36d0ba 17;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
65fd3f0a 18;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
6b6647f8 19;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
dd2efd3d
TUBK
20;;;
21;;; This file is part of GNU Guix.
22;;;
23;;; GNU Guix is free software; you can redistribute it and/or modify it
24;;; under the terms of the GNU General Public License as published by
25;;; the Free Software Foundation; either version 3 of the License, or (at
26;;; your option) any later version.
27;;;
28;;; GNU Guix is distributed in the hope that it will be useful, but
29;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31;;; GNU General Public License for more details.
32;;;
33;;; You should have received a copy of the GNU General Public License
34;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
35
36fb36b5 36(define-module (gnu packages dns)
f9cdf1c1 37 #:use-module (gnu packages admin)
71f048c6 38 #:use-module (gnu packages autotools)
6cf626e8 39 #:use-module (gnu packages base)
0bc2d3e4 40 #:use-module (gnu packages bash)
6a7256fc 41 #:use-module (gnu packages certs)
a35e16c0 42 #:use-module (gnu packages check)
1e744399 43 #:use-module (gnu packages databases)
a35e16c0 44 #:use-module (gnu packages documentation)
0bc2d3e4 45 #:use-module (gnu packages compression)
afe62a8b 46 #:use-module (gnu packages crypto)
f9cdf1c1 47 #:use-module (gnu packages datastructures)
7e61a16c 48 #:use-module (gnu packages flex)
7239c674 49 #:use-module (gnu packages freedesktop)
018114ba 50 #:use-module (gnu packages gcc)
cb6d322a 51 #:use-module (gnu packages glib)
71f048c6 52 #:use-module (gnu packages groff)
f9cdf1c1 53 #:use-module (gnu packages groff)
7239c674 54 #:use-module (gnu packages gtk)
f9cdf1c1 55 #:use-module (gnu packages libedit)
afe62a8b 56 #:use-module (gnu packages libevent)
f9cdf1c1 57 #:use-module (gnu packages libidn)
1e744399 58 #:use-module (gnu packages linux)
a35e16c0 59 #:use-module (gnu packages lua)
f9cdf1c1
TGR
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages nettle)
e12df2c6 62 #:use-module (gnu packages networking)
1e744399 63 #:use-module (gnu packages perl)
71f048c6 64 #:use-module (gnu packages pkg-config)
7e61a16c
GG
65 #:use-module (gnu packages protobuf)
66 #:use-module (gnu packages python)
0406434b 67 #:use-module (gnu packages python-xyz)
6a7256fc 68 #:use-module (gnu packages shells)
a35e16c0 69 #:use-module (gnu packages sphinx)
7e61a16c 70 #:use-module (gnu packages swig)
a7fd7b68 71 #:use-module (gnu packages tls)
f9cdf1c1 72 #:use-module (gnu packages web)
1e744399 73 #:use-module (gnu packages xml)
12e530ba 74 #:use-module (gnu packages)
1e744399 75 #:use-module ((guix licenses) #:prefix license:)
dd2efd3d
TUBK
76 #:use-module (guix packages)
77 #:use-module (guix download)
91a4863d 78 #:use-module (guix git-download)
7e61a16c 79 #:use-module (guix utils)
7239c674 80 #:use-module (guix build-system glib-or-gtk)
0bc2d3e4 81 #:use-module (guix build-system gnu)
a35e16c0 82 #:use-module (guix build-system meson)
0bc2d3e4 83 #:use-module (guix build-system trivial))
dd2efd3d 84
6a7256fc
RG
85(define-public ldns
86 (package
87 (name "ldns")
88 (version "1.7.1")
89 (source
90 (origin
91 (method url-fetch)
92 (uri
93 (string-append "https://www.nlnetlabs.nl/downloads/"
94 name "/" name "-" version ".tar.gz"))
95 (sha256
96 (base32 "0ac242n7996fswq1a3nlh1bbbhrsdwsq4mx7xq8ffq6aplb4rj4a"))
97 (patches
98 (search-patches
99 ;; To create make-flag vairables,
100 ;; for splitting installation of drill and examples.
101 "ldns-drill-examples.patch"))))
102 (build-system gnu-build-system)
103 (outputs '("out" "drill" "examples" "pyldns"))
104 (arguments
105 `( ;; Tests require Tpkg.
106 ;; https://tpkg.github.io/
107 #:tests? #f
108 #:configure-flags
109 (list
110 "--disable-static"
111 "--enable-gost-anyway"
112 "--enable-rrtype-ninfo"
113 "--enable-rrtype-rkey"
114 "--enable-rrtype-ta"
115 "--enable-rrtype-avc"
116 "--enable-rrtype-doa"
117 "--enable-rrtype-amtrelay"
118 "--with-drill"
119 "--with-examples"
120 "--with-pyldns"
121 ;; Perl module DNS::LDNS not available.
122 ;; https://github.com/erikoest/DNS-LDNS.git
123 ;; "--with-p5-dns-ldns"
124 (string-append "--with-ssl="
125 (assoc-ref %build-inputs "openssl"))
126 (string-append "--with-ca-path="
127 (assoc-ref %build-inputs "nss-certs")
128 "/etc/ssl/certs"))
129 #:make-flags
130 (list
131 (string-append "drillbindir="
132 (assoc-ref %outputs "drill")
133 "/bin")
134 (string-append "drillmandir="
135 (assoc-ref %outputs "drill")
136 "/share/man")
137 (string-append "examplesbindir="
138 (assoc-ref %outputs "examples")
139 "/bin")
140 (string-append "examplesmandir="
141 (assoc-ref %outputs "examples")
142 "/share/man")
143 (string-append "python_site="
144 (assoc-ref %outputs "pyldns")
145 "/lib/python"
146 ,(version-major+minor
147 (package-version python))
148 "/site-packages"))))
149 (native-inputs
150 `(("doxygen" ,doxygen)
151 ("ksh" ,oksh)
152 ("perl" ,perl)
153 ("perl-devel-checklib" ,perl-devel-checklib)
154 ("pkg-config" ,pkg-config)
155 ("python" ,python-wrapper)
156 ("swig" ,swig)))
157 (inputs
158 `(("libpcap" ,libpcap)
159 ("nss-certs" ,nss-certs)
160 ("openssl" ,openssl)))
161 (synopsis "DNS library that facilitates DNS tool programming")
162 (description "LDNS aims to simplify DNS programming, it supports recent
163RFCs like the DNSSEC documents, and allows developers to easily create
164software conforming to current RFCs, and experimental software for current
165Internet Drafts. A secondary benefit of using ldns is speed; ldns is written in
166C it should be a lot faster than Perl.")
167 (home-page "https://nlnetlabs.nl/projects/ldns/about/")
168 (license license:bsd-3)))
169
7239c674
RG
170(define-public dnssec-trigger
171 (package
172 (name "dnssec-trigger")
173 (version "0.17")
174 (source
175 (origin
176 (method url-fetch)
177 (uri
178 (string-append "https://www.nlnetlabs.nl/downloads/"
179 name "/" name "-" version ".tar.gz"))
180 (sha256
181 (base32 "10928q406x9r66a090xl5kznzgyxpja88w4srwcv454hd351j9f0"))))
182 (build-system glib-or-gtk-build-system)
183 (outputs '("out" "gui" "nm"))
184 (arguments
185 `(#:test-target "test"
186 #:configure-flags
187 (list
188 (string-append "--with-ssl="
189 (assoc-ref %build-inputs "openssl"))
190 "--with-hooks=networkmanager"
191 (string-append "--with-networkmanager-dispatch="
192 (assoc-ref %outputs "nm")
193 "/etc/NetworkManager/dispatcher.d")
194 (string-append "--with-xdg-autostart="
195 (assoc-ref %outputs "gui")
196 "/etc/xdg/autostart")
197 (string-append "--with-uidir="
198 (assoc-ref %outputs "gui")
199 "/share/dnssec-trigger")
200 (string-append "--with-python="
201 (assoc-ref %build-inputs "python")
202 "/bin/python")
203 (string-append "--with-unbound-control="
204 (assoc-ref %build-inputs "unbound")
205 "/sbin/unbound-control")
206 "--with-forward-zones-support")
207 #:phases
208 (modify-phases %standard-phases
209 (add-after 'unpack 'patch-configure
210 (lambda _
211 (substitute* "configure"
212 (("appindicator-0.1")
213 "appindicator3-0.1"))
214 #t))
215 (add-before 'configure 'patch-makefile
216 (lambda _
217 (substitute* "Makefile.in"
218 (("/usr")
219 "$(prefix)")
220 (("/etc")
221 "$(prefix)/etc")
222 ((".*gtk-update-icon-cache.*")
223 ""))
224 #t))
225 (add-after 'install 'remove-systemd
226 (lambda* (#:key outputs #:allow-other-keys)
227 (let* ((out (assoc-ref outputs "out")))
228 (delete-file-recursively
229 (string-append out "/lib/systemd"))
230 #t)))
231 (add-after 'remove-systemd 'move-gui
232 (lambda* (#:key outputs #:allow-other-keys)
233 (let* ((out (assoc-ref outputs "out"))
234 (gui (assoc-ref outputs "gui")))
235 (mkdir-p (string-append gui "/bin"))
236 (mkdir-p (string-append gui "/share"))
237 (rename-file
238 (string-append out "/bin")
239 (string-append gui "/bin"))
240 (rename-file
241 (string-append out "/share/icons")
242 (string-append gui "/share/icons"))
243 #t)))
244 (add-after 'move-gui 'move-nm
245 (lambda* (#:key outputs #:allow-other-keys)
246 (let* ((out (assoc-ref outputs "out"))
247 (nm (assoc-ref outputs "nm")))
248 (mkdir-p (string-append nm "/libexec"))
249 (rename-file
250 (string-append out "/libexec")
251 (string-append nm "/libexec"))
252 #t))))))
253 (native-inputs
254 `(("cmocka" ,cmocka)
255 ("pkg-config" ,pkg-config)
256 ("python" ,python-wrapper)))
257 (inputs
258 `(("gtk+-2" ,gtk+-2)
259 ("ldns" ,ldns)
260 ("libappindicator" ,libappindicator)
261 ("openssl" ,openssl)
262 ("unbound" ,unbound)))
263 (synopsis "DNSSEC protection for the DNS traffic")
264 (description "DNSSEC-Trigger enables your computer to use DNSSEC protection
265for the DNS traffic. It relies on the Unbound DNS resolver running locally on
266your system, which performs DNSSEC validation. It reconfigures Unbound in such
267a way that it will signal it to to use the DHCP obtained forwarders if possible,
268fallback to doing its own AUTH queries if that fails, and if that fails it will
269prompt the user with the option to go with insecure DNS only.")
270 (home-page "https://www.nlnetlabs.nl/projects/dnssec-trigger/about/")
271 (license license:bsd-3)))
272
dd2efd3d
TUBK
273(define-public dnsmasq
274 (package
275 (name "dnsmasq")
07af5c5e 276 (version "2.82")
dd2efd3d
TUBK
277 (source (origin
278 (method url-fetch)
279 (uri (string-append
280 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
281 version ".tar.xz"))
282 (sha256
283 (base32
07af5c5e 284 "0cn1xd1s6xs78jmrmwjnh9m6w3q38pk6dyqy2phvasqiyd33cll4"))))
dd2efd3d 285 (build-system gnu-build-system)
cb6d322a
CB
286 (native-inputs
287 `(("pkg-config" ,pkg-config)))
288 (inputs
289 `(("dbus" ,dbus)))
dd2efd3d
TUBK
290 (arguments
291 `(#:phases
dc1d3cde 292 (modify-phases %standard-phases (delete 'configure))
dd2efd3d 293 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
cb6d322a
CB
294 "CC=gcc"
295 "COPTS=\"-DHAVE_DBUS\"")
4e6c51d4 296 #:tests? #f)) ; no ‘check’ target
dd2efd3d
TUBK
297 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
298 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
299 (description
c657716e
TGR
300 "Dnsmasq is a light-weight DNS forwarder and DHCP server. It is designed
301to provide DNS and, optionally, DHCP to a small network. It can serve the
dd2efd3d
TUBK
302names of local machines which are not in the global DNS. The DHCP server
303integrates with the DNS server and allows machines with DHCP-allocated
c657716e 304addresses to appear in the DNS with names configured either on each host or in
dd2efd3d
TUBK
305a central configuration file. Dnsmasq supports static and dynamic DHCP leases
306and BOOTP/TFTP for network booting of diskless machines.")
307 ;; Source files only say GPL2 and GPL3 are allowed.
1e744399
308 (license (list license:gpl2 license:gpl3))))
309
a0683006
LC
310;; 'bind' is the name of a built-in Guile procedure, which is why we choose a
311;; different name here.
312(define-public isc-bind
1e744399 313 (package
be86b7ad 314 (name "bind")
56b4a1d5 315 ;; When updating, check whether isc-dhcp's bundled copy should be as well.
a765b7b0 316 (version "9.16.7")
1e744399
317 (source (origin
318 (method url-fetch)
be86b7ad 319 (uri (string-append
54fd7c02 320 "https://ftp.isc.org/isc/bind9/" version
3c4c60fa 321 "/bind-" version ".tar.xz"))
1e744399
322 (sha256
323 (base32
a765b7b0 324 "1l8lhgnkj3fnl1101bs3pzj5gv2x5m9ahvrbyscsc9mxxc91hzcz"))))
1e744399 325 (build-system gnu-build-system)
be86b7ad 326 (outputs `("out" "utils"))
1e744399 327 (inputs
fc0dd636 328 ;; It would be nice to add GeoIP and gssapi once there are packages.
1e744399 329 `(("libcap" ,libcap)
3c4c60fa 330 ("libuv" ,libuv)
1e744399 331 ("libxml2" ,libxml2)
1e744399 332 ("openssl" ,openssl)
0406434b
TGR
333 ("p11-kit" ,p11-kit)
334 ("python" ,python)
335 ("python-ply" ,python-ply)))
3c4c60fa
TGR
336 (native-inputs
337 `(("perl" ,perl)
338 ("pkg-config" ,pkg-config)))
1e744399 339 (arguments
be86b7ad 340 `(#:configure-flags
3c4c60fa 341 (list (string-append "--with-pkcs11="
1e744399
342 (assoc-ref %build-inputs "p11-kit")))
343 #:phases
be86b7ad
JD
344 (modify-phases %standard-phases
345 (add-after 'strip 'move-to-utils
346 (lambda _
347 (for-each
348 (lambda (file)
349 (let ((target (string-append (assoc-ref %outputs "utils") file))
350 (src (string-append (assoc-ref %outputs "out") file)))
351 (mkdir-p (dirname target))
352 (link src target)
353 (delete-file src)))
354 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
355 "/share/man/man1/dig.1"
356 "/share/man/man1/host.1"
357 "/share/man/man1/nslookup.1"
6023ecab
TGR
358 "/share/man/man1/nsupdate.1"))
359 #t))
be86b7ad
JD
360 ;; When and if guix provides user namespaces for the build process,
361 ;; then the following can be uncommented and the subsequent "force-test"
362 ;; will not be necessary.
363 ;;
364 ;; (add-before 'check 'set-up-loopback
365 ;; (lambda _
366 ;; (system "bin/tests/system/ifconfig.sh up")))
367 (replace 'check
368 (lambda _
c72c1005
TGR
369 ;; XXX Even ‘make force-test’ tries to create network interfaces
370 ;; and fails. The only working target is the (trivial) fuzz test.
371 (with-directory-excursion "fuzz"
372 (invoke "make" "check"))
373 #t)))))
83b5ea9d 374 (synopsis "Domain Name System (DNS) implementation")
366efcb2
TGR
375 (description "BIND is an implementation of the @dfn{Domain Name System}
376(DNS) protocols for the Internet. It is a reference implementation of those
be86b7ad 377protocols, but it is also production-grade software, suitable for use in
83b5ea9d
MC
378high-volume and high-reliability applications. The name BIND stands for
379\"Berkeley Internet Name Domain\", because the software originated in the
380early 1980s at the University of California at Berkeley. The @code{utils}
381output of this package contains the following DNS name servers related command
382line utilities:
383@table @code
384@item delv
385DNS lookup and validation utility
386@item dig
387DNS lookup utility
388@item host
389DNS lookup utility
390@item nslookup
391Internet name servers interactive query utility
392@item nsupdate
393Dynamic DNS update utility
394@end table")
395 (home-page "https://www.isc.org/bind/")
ecc7aa89 396 (license (list license:mpl2.0))))
be86b7ad 397
d24727c0
MB
398(define-public dnscrypt-proxy
399 (package
400 (name "dnscrypt-proxy")
83a89531 401 (version "1.9.5")
d24727c0
MB
402 (source (origin
403 (method url-fetch)
404 (uri (string-append
405 "https://download.dnscrypt.org/dnscrypt-proxy/"
406 "dnscrypt-proxy-" version ".tar.bz2"))
407 (sha256
408 (base32
83a89531 409 "1dhvklr4dg2vlw108n11xbamacaryyg3dbrg629b76lp7685p7z8"))
d24727c0
MB
410 (modules '((guix build utils)))
411 (snippet
412 ;; Delete bundled libltdl. XXX: This package also bundles
413 ;; a modified libevent that cannot currently be removed.
6cbee49d
MW
414 '(begin
415 (delete-file-recursively "libltdl")
416 #t))))
d24727c0
MB
417 (build-system gnu-build-system)
418 (arguments
419 `(#:phases
420 (modify-phases %standard-phases
d10092b8 421 (add-after 'unpack 'autoreconf
d24727c0
MB
422 (lambda _
423 ;; Re-generate build files due to unbundling ltdl.
424 ;; TODO: Prevent generating new libltdl and building it.
425 ;; The system version is still favored and referenced.
997a4e18 426 (invoke "autoreconf" "-vif"))))))
d24727c0
MB
427 (native-inputs
428 `(("pkg-config" ,pkg-config)
429 ("automake" ,automake)
430 ("autoconf" ,autoconf)
431 ("libtool" ,libtool)))
432 (inputs
433 `(("libltdl" ,libltdl)
434 ("libsodium" ,libsodium)))
435 (home-page "https://www.dnscrypt.org/")
436 (synopsis "Securely send DNS requests to a remote server")
437 (description
438 "@command{dnscrypt-proxy} is a tool for securing communications
439between a client and a DNS resolver. It verifies that responses you get
440from a DNS provider was actually sent by that provider, and haven't been
441tampered with. For optimal performance it is recommended to use this as
442a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
443can also be used as a normal DNS \"server\". A list of public dnscrypt
444servers is included, and an up-to-date version is available at
445@url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
446 (license (list license:isc
447 ;; Libevent and src/ext/queue.h is 3-clause BSD.
448 license:bsd-3))))
449
afe62a8b
MB
450(define-public dnscrypt-wrapper
451 (package
452 (name "dnscrypt-wrapper")
453 (version "0.2.2")
454 (source (origin
455 (method url-fetch)
456 (uri (string-append
457 "https://github.com/cofyc/dnscrypt-wrapper/releases"
458 "/download/v" version "/" name "-v" version ".tar.bz2"))
459 (sha256
460 (base32
461 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
462 (build-system gnu-build-system)
463 (arguments
464 `(#:make-flags '("CC=gcc")
465 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
466 #:tests? #f
467 #:phases
468 (modify-phases %standard-phases
d10092b8 469 (add-after 'unpack 'create-configure
afe62a8b 470 (lambda _
b43cd106 471 (invoke "make" "configure"))))))
afe62a8b
MB
472 (native-inputs
473 `(("autoconf" ,autoconf)))
474 (inputs
475 `(("libevent" ,libevent)
476 ("libsodium" ,libsodium)))
477 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
478 (synopsis "Server-side dnscrypt proxy")
479 (description
480 "@command{dnscrypt-wrapper} is a tool to expose a name server over
481the @code{dnscrypt} protocol. It can be used as an endpoint for the
482@command{dnscrypt-proxy} client to securely tunnel DNS requests between
483the two.")
484 (license (list license:isc
485 ;; Bundled argparse is MIT. TODO: package and unbundle.
486 license:expat
487 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
488 license:gpl2
489 license:gpl3))))
490
71f048c6 491(define-public libasr
492 (package
493 (name "libasr")
4bf26153 494 (version "1.0.4")
71f048c6 495 (source
496 (origin
497 (method url-fetch)
498 (uri (string-append "https://www.opensmtpd.org/archives/"
c34d0cd8 499 "libasr-" version ".tar.gz"))
71f048c6 500 (sha256
4bf26153 501 (base32 "1d6s8njqhvayx2gp47409sp1fn8m608ws26hr1srfp6i23nnpyqr"))))
71f048c6 502 (build-system gnu-build-system)
0aa217e7
TGR
503 (arguments
504 `(#:phases
505 (modify-phases %standard-phases
0aa217e7
TGR
506 (add-after 'install 'install-documentation
507 (lambda* (#:key outputs #:allow-other-keys)
508 (let ((out (assoc-ref outputs "out")))
509 (install-file "src/asr_run.3"
510 (string-append out "/share/man/man3"))
511 #t))))))
71f048c6 512 (native-inputs
513 `(("autoconf" ,autoconf)
514 ("automake" ,automake)
0aa217e7
TGR
515 ("libtool" ,libtool)
516 ("pkg-config" ,pkg-config)))
71f048c6 517 (home-page "https://www.opensmtpd.org")
518 (synopsis "Asynchronous resolver library by the OpenBSD project")
519 (description
520 "libasr is a free, simple and portable asynchronous resolver library.
23f5dd91 521It runs DNS queries and performs hostname resolution in a fully
71f048c6 522asynchronous fashion.")
523 (license (list license:isc
524 license:bsd-2 ; last part of getrrsetbyname_async.c
525 license:bsd-3
526 (license:non-copyleft "file://LICENSE") ; includes.h
527 license:openssl))))
6cf626e8 528
7382ecd8
TGR
529(define-public nsd
530 (package
531 (name "nsd")
dc4d01ac 532 (version "4.3.2")
7382ecd8
TGR
533 (source
534 (origin
535 (method url-fetch)
536 (uri (string-append "https://www.nlnetlabs.nl/downloads/nsd/nsd-"
537 version ".tar.gz"))
538 (sha256
dc4d01ac 539 (base32 "0ac3mbn5z4nc18782m9aswdpi2m9f4665vidw0ciyigdh0pywp2v"))))
7382ecd8
TGR
540 (build-system gnu-build-system)
541 (arguments
542 `(#:configure-flags
543 (list "--enable-pie" ; fully benefit from ASLR
544 "--enable-ratelimit"
545 "--enable-recvmmsg"
546 "--enable-relro-now" ; protect GOT and .dtor areas
547 "--disable-radix-tree"
548 (string-append "--with-libevent="
549 (assoc-ref %build-inputs "libevent"))
550 (string-append "--with-ssl="
551 (assoc-ref %build-inputs "openssl"))
552 "--with-configdir=/etc"
553 "--with-nsd_conf_file=/etc/nsd/nsd.conf"
554 "--with-logfile=/var/log/nsd.log"
555 "--with-pidfile=/var/db/nsd/nsd.pid"
556 "--with-dbfile=/var/db/nsd/nsd.db"
557 "--with-zonesdir=/etc/nsd"
558 "--with-xfrdfile=/var/db/nsd/xfrd.state"
559 "--with-zonelistfile=/var/db/nsd/zone.list")
560 #:phases
561 (modify-phases %standard-phases
562 (add-before 'configure 'patch-installation-paths
563 (lambda* (#:key outputs #:allow-other-keys)
564 (let* ((out (assoc-ref outputs "out"))
565 (doc (string-append out "/share/doc/" ,name "-" ,version)))
566 ;; The ‘make install’ target tries to create the parent
567 ;; directories of run-time things like ‘pidfile’ above, and
568 ;; useless empty directories like 'configdir'. Remove such
569 ;; '$(INSTALL)' lines and install the example configuration file
570 ;; in an appropriate location.
571 (substitute* "Makefile.in"
572 ((".*INSTALL.*\\$\\((config|pid|xfr|db)dir" command)
573 (string-append "#" command))
574 (("\\$\\(nsdconfigfile\\)\\.sample" file-name)
575 (string-append doc "/examples/" file-name)))
576 #t))))
577 #:tests? #f)) ; no tests
578 (inputs
579 `(("libevent" ,libevent)
580 ("openssl" ,openssl)))
581 (home-page "https://www.nlnetlabs.nl/projects/nsd/about/")
582 (synopsis "Authoritative DNS name server")
583 (description "@dfn{NSD}, short for Name Server Daemon, is an authoritative
584name server for the Domain Name System (@dfn{DNS}). It aims to be a fast and
585RFC-compliant nameserver.
586
587NSD uses zone information compiled via @command{zonec} into a binary database
588file (@file{nsd.db}). This allows fast startup of the name service daemon and
589allows syntax-structural errors in zone files to be flagged at compile time,
590before being made available to NSD service itself. However, most traditional
591BIND-style zone files can be directly imported into NSD without modification.
592
593The collection of programs and processes that make up NSD are designed so that
594the daemon itself runs as a non-privileged user and can be easily configured to
595run in a @code{chroot} jail, thus making any security flaws in NSD less likely
596to result in system-wide compromise.")
597 (license (list license:bsd-3))))
598
7e61a16c
GG
599(define-public unbound
600 (package
601 (name "unbound")
9554fb10 602 (version "1.10.1")
7e61a16c
GG
603 (source
604 (origin
605 (method url-fetch)
606 (uri (string-append "https://www.unbound.net/downloads/unbound-"
607 version ".tar.gz"))
608 (sha256
9554fb10 609 (base32 "0dnmh9jjh2v274f0hl31bgv40pl77mmfgky8bkqr5kvi3b17fdmp"))))
7e61a16c
GG
610 (build-system gnu-build-system)
611 (outputs '("out" "python"))
612 (native-inputs
613 `(("flex" ,flex)
614 ("swig" ,swig)))
615 (inputs
616 `(("expat" ,expat)
617 ("libevent" ,libevent)
618 ("protobuf" ,protobuf)
7e61a16c
GG
619 ("python-wrapper" ,python-wrapper)
620 ("openssl" ,openssl)))
621 (arguments
622 `(#:configure-flags
37040b85 623 (list "--disable-static" ; save space and non-determinism in libunbound.a
a431929d 624 (string-append
7e61a16c
GG
625 "--with-ssl=" (assoc-ref %build-inputs "openssl"))
626 (string-append
627 "--with-libevent=" (assoc-ref %build-inputs "libevent"))
628 (string-append
629 "--with-libexpat=" (assoc-ref %build-inputs "expat"))
630 "--with-pythonmodule" "--with-pyunbound")
631 #:phases
632 (modify-phases %standard-phases
633 (add-after 'configure 'fix-python-site-package-path
634 ;; Move python modules into their own output.
635 (lambda* (#:key outputs #:allow-other-keys)
636 (let ((pyout (assoc-ref outputs "python"))
637 (ver ,(version-major+minor (package-version python))))
638 (substitute* "Makefile"
639 (("^PYTHON_SITE_PKG=.*$")
640 (string-append
641 "PYTHON_SITE_PKG="
642 pyout "/lib/python-" ver "/site-packages\n"))))
643 #t))
644 (add-before 'check 'fix-missing-nss-for-tests
645 ;; Unfortunately, the package's unittests involve some checks
646 ;; looking up protocols and services which are not provided
647 ;; by the minimalistic build environment, in particular,
648 ;; /etc/protocols and /etc/services are missing.
649 ;; Also, after plain substitution of protocol and service names
650 ;; in the test data, the tests still fail because the
651 ;; corresponding Resource Records have been signed by
652 ;; RRSIG records.
653 ;; The following LD_PRELOAD library overwrites the glibc
654 ;; functions ‘get{proto,serv}byname’, ‘getprotobynumber’ and
655 ;; ‘getservbyport’ providing the few records required for the
656 ;; unit tests to pass.
657 (lambda* (#:key inputs outputs #:allow-other-keys)
658 (let* ((source (assoc-ref %build-inputs "source"))
659 (gcc (assoc-ref %build-inputs "gcc")))
660 (call-with-output-file "/tmp/nss_preload.c"
661 (lambda (port)
662 (display "#include <stdlib.h>
663#include <string.h>
664#include <strings.h>
665
666#include <netdb.h>
667
668struct protoent *getprotobyname(const char *name) {
669 struct protoent *p = malloc(sizeof(struct protoent));
670 p->p_aliases = malloc(sizeof(char*));
671 if (strcasecmp(name, \"tcp\") == 0) {
672 p->p_name = \"tcp\";
673 p->p_proto = 6;
674 p->p_aliases[0] = \"TCP\";
675 } else if (strcasecmp(name, \"udp\") == 0) {
676 p->p_name = \"udp\";
677 p->p_proto = 17;
678 p->p_aliases[0] = \"UDP\";
679 } else
680 p = NULL;
681 return p;
682}
683
684struct protoent *getprotobynumber(int proto) {
685 struct protoent *p = malloc(sizeof(struct protoent));
686 p->p_aliases = malloc(sizeof(char*));
687 switch(proto) {
688 case 6:
689 p->p_name = \"tcp\";
690 p->p_proto = 6;
691 p->p_aliases[0] = \"TCP\";
692 break;
693 case 17:
694 p->p_name = \"udp\";
695 p->p_proto = 17;
696 p->p_aliases[0] = \"UDP\";
697 break;
698 default:
699 p = NULL;
700 break;
701 }
702 return p;
703}
704
705struct servent *getservbyname(const char *name, const char *proto) {
706 struct servent *s = malloc(sizeof(struct servent));
707 char* buf = malloc((strlen(proto)+1)*sizeof(char));
708 strcpy(buf, proto);
709 s->s_aliases = malloc(sizeof(char*));
710 s->s_aliases[0] = NULL;
711 if (strcasecmp(name, \"domain\") == 0) {
712 s->s_name = \"domain\";
713 s->s_port = htons(53);
714 s->s_proto = buf;
715 } else
716 s = NULL;
717 return s;
718}
719
720struct servent *getservbyport(int port, const char *proto) {
721 char buf[32];
722 struct servent *s = malloc(sizeof(struct servent));
723 strcpy(buf, proto);
724 s->s_aliases = malloc(sizeof(char*));
725 s->s_aliases[0] = NULL;
726 switch(port) {
727 case 53:
728 s->s_name = \"domain\";
729 s->s_port = 53;
730 s->s_proto = \"udp\";
731 break;
732 default:
733 s = NULL;
734 break;
735 }
736 return s;
737}" port)))
9a3a1565
TGR
738 (invoke (string-append gcc "/bin/gcc")
739 "-shared" "-fPIC" "-o" "/tmp/nss_preload.so"
740 "/tmp/nss_preload.c")
7e61a16c
GG
741 ;; The preload library only affects the unittests.
742 (substitute* "Makefile"
743 (("./unittest")
744 "LD_PRELOAD=/tmp/nss_preload.so ./unittest")))
745 #t)))))
746 (home-page "https://www.unbound.net")
747 (synopsis "Validating, recursive, and caching DNS resolver")
748 (description
749 "Unbound is a recursive-only caching DNS server which can perform DNSSEC
750validation of results. It implements only a minimal amount of authoritative
751service to prevent leakage to the root nameservers: forward lookups for
752localhost, reverse for @code{127.0.0.1} and @code{::1}, and NXDOMAIN for zones
753served by AS112. Stub and forward zones are supported.")
754 (license license:bsd-4)))
755
6cf626e8
TGR
756(define-public yadifa
757 (package
758 (name "yadifa")
92a33362 759 (version "2.3.9")
6cf626e8 760 (source
92a33362 761 (let ((build "8497"))
8769d482
TGR
762 (origin
763 (method url-fetch)
764 (uri
765 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
fe99b7f7 766 "yadifa-" version "-" build ".tar.gz"))
8769d482 767 (sha256
92a33362 768 (base32 "0xvyr91sfgzkpw6g3h893ldbwnki3w2472n56rr18w67qghs1sa5")))))
6cf626e8
TGR
769 (build-system gnu-build-system)
770 (native-inputs
771 `(("which" ,which)))
772 (inputs
773 `(("openssl" ,openssl)))
774 (arguments
57b05e4a
TGR
775 `(#:phases
776 (modify-phases %standard-phases
777 (add-before 'configure 'omit-example-configurations
778 (lambda _
779 (substitute* "Makefile.in"
780 ((" (etc|var)") ""))
781 #t)))
782 #:configure-flags
783 (list "--sysconfdir=/etc"
784 "--localstatedir=/var"
785 "--disable-build-timestamp" ; build reproducibly
786 "--enable-shared"
787 "--disable-static"
788 "--enable-acl"
789 "--enable-caching"
790 "--enable-ctrl" ; enable remote control
791 "--enable-nsec"
792 "--enable-nsec3"
793 "--enable-tsig")))
9f733172 794 (home-page "https://www.yadifa.eu/")
6cf626e8 795 (synopsis "Authoritative DNS name server")
366efcb2
TGR
796 (description "YADIFA is an authoritative name server for the @dfn{Domain
797Name System} (DNS). It aims for both higher performance and a smaller memory
6cf626e8 798footprint than other implementations, while remaining fully RFC-compliant.
366efcb2
TGR
799YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
800Extensions} (DNSSEC).")
6cf626e8 801 (license license:bsd-3)))
f9cdf1c1
TGR
802
803(define-public knot
804 (package
805 (name "knot")
896ad276 806 (version "2.9.6")
e41ddf76
TGR
807 (source
808 (origin
809 (method url-fetch)
810 (uri (string-append "https://secure.nic.cz/files/knot-dns/"
811 "knot-" version ".tar.xz"))
812 (sha256
896ad276 813 (base32 "1rxjjisr6rz1wa4279ghvj5zzhgyjhncmb9dkzqm8nw2qs1jhx5z"))
e41ddf76
TGR
814 (modules '((guix build utils)))
815 (snippet
816 '(begin
817 ;; Delete bundled libraries.
818 (with-directory-excursion "src/contrib"
819 (delete-file-recursively "lmdb"))
820 #t))))
f9cdf1c1
TGR
821 (build-system gnu-build-system)
822 (native-inputs
823 `(("pkg-config" ,pkg-config)))
824 (inputs
023ef013
TGR
825 `(("fstrm" ,fstrm)
826 ("gnutls" ,gnutls)
f9cdf1c1
TGR
827 ("jansson" ,jansson)
828 ("libcap-ng" ,libcap-ng)
829 ("libedit" ,libedit)
830 ("libidn" ,libidn)
831 ("liburcu" ,liburcu)
832 ("lmdb" ,lmdb)
833 ("ncurses" ,ncurses)
1b00e3bd 834 ("protobuf-c" ,protobuf-c)))
f9cdf1c1
TGR
835 (arguments
836 `(#:phases
837 (modify-phases %standard-phases
838 (add-before 'configure 'disable-directory-pre-creation
839 (lambda _
840 ;; Don't install empty directories like ‘/etc’ outside the store.
1b00e3bd 841 ;; This is needed even when using ‘make config_dir=... install’.
2d431b01
TGR
842 (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
843 #t))
f9cdf1c1
TGR
844 (replace 'install
845 (lambda* (#:key outputs #:allow-other-keys)
846 (let* ((out (assoc-ref outputs "out"))
ee1362fc 847 (doc (string-append out "/share/doc/" ,name "-" ,version))
f9cdf1c1 848 (etc (string-append doc "/examples/etc")))
6b042495
TGR
849 (invoke "make"
850 (string-append "config_dir=" etc)
1b00e3bd 851 "install")))))
f9cdf1c1
TGR
852 #:configure-flags
853 (list "--sysconfdir=/etc"
854 "--localstatedir=/var"
1b00e3bd
TGR
855 "--enable-dnstap" ; let tools read/write capture files
856 "--with-module-dnstap=yes" ; detailed query capturing & logging
f9cdf1c1
TGR
857 (string-append "--with-bash-completions="
858 (assoc-ref %outputs "out")
859 "/etc/bash_completion.d"))))
860 (home-page "https://www.knot-dns.cz/")
861 (synopsis "Authoritative DNS name server")
d1e4ad1b 862 (description "Knot DNS is an authoritative name server for the @dfn{Domain
f9cdf1c1
TGR
863Name System} (DNS), designed to meet the needs of root and @dfn{top-level
864domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
865number of programming techniques to improve speed. For example, the responder
866is completely lock-free, resulting in a very high response rate. Other features
867include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
868synthesis, and on-the-fly re-configuration.")
0056f4cc
TGR
869 (license
870 (list
871 ;; src/contrib/{hat-trie,murmurhash3,openbsd},
872 ;; src/dnssec/contrib/vpool.[ch], and parts of libtap/ are ‘MIT’ (expat).
873 license:expat
874 license:lgpl2.0+ ; parts of scr/contrib/ucw
875 license:public-domain ; src/contrib/fnv and possibly murmurhash3
876 license:gpl3+)))) ; everything else
0bc2d3e4 877
a35e16c0
SB
878(define-public knot-resolver
879 (package
880 (name "knot-resolver")
cb73f30d 881 (version "4.3.0")
a35e16c0
SB
882 (source (origin
883 (method url-fetch)
884 (uri (string-append "https://secure.nic.cz/files/knot-resolver/"
885 "knot-resolver-" version ".tar.xz"))
886 (sha256
887 (base32
cb73f30d 888 "09ffmqx79lv5psr433x4n946njgsn071b9b7161pcb9bmrqz380c"))))
a35e16c0
SB
889 (build-system meson-build-system)
890 (arguments
8a5c4384 891 '(#:configure-flags '("-Ddoc=enabled")
a35e16c0
SB
892 #:phases
893 (modify-phases %standard-phases
8a5c4384
SB
894 (add-before 'configure 'disable-default-ta
895 (lambda _
896 ;; Disable the default managed root TA, since we don't have
897 ;; write access to the keyfile and its directory in store.
898 (substitute* "daemon/lua/sandbox.lua.in"
899 (("^trust_anchors\\.add_file.*") ""))
900 #t))
a35e16c0
SB
901 (add-after 'build 'build-doc
902 (lambda _
903 (invoke "ninja" "doc")))
904 (add-after 'install 'wrap-binary
905 (lambda* (#:key inputs outputs #:allow-other-keys)
906 (let* ((out (assoc-ref outputs "out"))
907 (lua-* (map cdr (filter
908 (lambda (input)
909 (string-prefix? "lua-" (car input)))
910 inputs)))
911 (lua-path (lambda (p)
912 (string-append p "/share/lua/5.1/?.lua")))
913 (lua-cpath (lambda (p)
914 (string-append p "/lib/lua/5.1/?.so"))))
915 (wrap-program (string-append out "/sbin/kresd")
916 `("LUA_PATH" ";" prefix ,(map lua-path lua-*))
917 `("LUA_CPATH" ";" prefix ,(map lua-cpath lua-*)))
918 #t))))))
919 (native-inputs
920 `(("cmocka" ,cmocka) ; for unit tests
921 ("doxygen" ,doxygen)
922 ("protobuf-c" ,protobuf-c)
923 ("pkg-config" ,pkg-config)
924 ("python-breathe" ,python-breathe)
925 ("python-sphinx" ,python-sphinx)
926 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
927 (inputs
928 `(("fstrm" ,fstrm)
929 ("gnutls" ,gnutls)
930 ("knot" ,knot)
931 ("libuv" ,libuv)
932 ("lmdb" ,lmdb)
933 ("luajit" ,luajit)
d1a26bed 934 ;; TODO: Add optional lua modules: basexx and psl.
a35e16c0 935 ("lua-bitop" ,lua5.1-bitop)
d1a26bed 936 ("lua-cqueues" ,lua5.1-cqueues)
a35e16c0
SB
937 ("lua-filesystem" ,lua5.1-filesystem)
938 ("lua-sec" ,lua5.1-sec)
939 ("lua-socket" ,lua5.1-socket)))
940 (home-page "https://www.knot-resolver.cz/")
941 (synopsis "Caching validating DNS resolver")
942 (description
943 "Knot Resolver is a caching full resolver implementation written in C and
944LuaJIT, both a resolver library and a daemon.")
945 (license (list license:gpl3+
946 ;; Some 'contrib' files are under MIT, CC0 and LGPL2.
947 license:expat
948 license:cc0
949 license:lgpl2.0))))
950
0bc2d3e4
OP
951(define-public ddclient
952 (package
953 (name "ddclient")
8bb9f997
TGR
954 (version "3.9.1")
955 (source
956 (origin
957 (method git-fetch)
958 (uri (git-reference
b0e7b699 959 (url "https://github.com/ddclient/ddclient")
8bb9f997
TGR
960 (commit (string-append "v" version))))
961 (file-name (git-file-name name version))
962 (sha256
963 (base32 "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w"))))
0bc2d3e4
OP
964 (build-system trivial-build-system) ; no Makefile.PL
965 (native-inputs
966 `(("bash" ,bash)
8bb9f997 967 ("perl" ,perl)))
0bc2d3e4 968 (inputs
e12df2c6
TGR
969 `(("inetutils" ,inetutils) ; logger
970 ("net-tools" ,net-tools)
971 ("perl-data-validate-ip" ,perl-data-validate-ip)
972 ("perl-digest-sha1" ,perl-digest-sha1)
973 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
0bc2d3e4
OP
974 (arguments
975 `(#:modules ((guix build utils)
976 (ice-9 match)
977 (srfi srfi-26))
978 #:builder
979 (begin
980 (use-modules (guix build utils)
981 (ice-9 match)
982 (srfi srfi-26))
0bc2d3e4
OP
983 (setenv "PATH" (string-append
984 (assoc-ref %build-inputs "bash") "/bin" ":"
0bc2d3e4 985 (assoc-ref %build-inputs "perl") "/bin"))
8bb9f997
TGR
986
987 ;; Copy the (read-only) source into the (writable) build directory.
988 (copy-recursively (assoc-ref %build-inputs "source") ".")
989
990 ;; Install.
991 (let* ((out (assoc-ref %outputs "out"))
992 (bin (string-append out "/bin")))
993 (let ((file "ddclient"))
994 (substitute* file
995 (("/usr/bin/perl") (which "perl"))
996 ;; Strictly use ‘/etc/ddclient/ddclient.conf’.
997 (("\\$\\{program\\}\\.conf") "/etc/ddclient/ddclient.conf")
998 (("\\$etc\\$program.conf") "/etc/ddclient/ddclient.conf")
999 ;; Strictly use ‘/var/cache/ddclient/ddclient.cache’
1000 (("\\$cachedir\\$program\\.cache")
1001 "/var/cache/ddclient/ddclient.cache"))
1002 (install-file file bin)
1003 (wrap-program (string-append bin "/" file)
1004 `("PATH" ":" =
1005 ("$PATH"
1006 ,@(map (lambda (input)
1007 (match input
1008 ((name . store)
1009 (string-append store "/bin"))))
1010 %build-inputs)))
1011 `("PERL5LIB" ":" =
1012 ,(delete
1013 ""
1014 (map (match-lambda
1015 (((? (cut string-prefix? "perl-" <>) name) . dir)
1016 (string-append dir "/lib/perl5/site_perl"))
1017 (_ ""))
1018 %build-inputs)))))
1019 (for-each (cut install-file <> (string-append out
1020 "/share/ddclient"))
1021 (find-files "." "sample.*$"))))))
9469ab53 1022 (home-page "https://ddclient.net/")
0bc2d3e4
OP
1023 (synopsis "Address updating utility for dynamic DNS services")
1024 (description "This package provides a client to update dynamic IP
1025addresses with several dynamic DNS service providers, such as
1026@uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
1027
1028This makes it possible to use a fixed hostname (such as myhost.dyndns.org) to
1029access a machine with a dynamic IP address.
1030
1031The client supports both dynamic and (near) static services, as well as MX
1032record and alternative name management. It caches the address, and only
1033attempts the update when it has changed.")
1034 (license license:gpl2+)))
91a4863d
LC
1035
1036(define-public hnsd
1037 ;; There have been no releases yet, hence this commit.
1038 (let ((revision "0")
1039 (commit "895d89c25d316d18df9d374fe78aae3902bc89fb"))
1040 (package
1041 (name "hnsd")
1042 (version (git-version "0.0" revision commit))
1043 (source (origin
1044 (method git-fetch)
1045 (uri (git-reference
1046 (url "https://github.com/handshake-org/hnsd")
1047 (commit commit)))
1048 (sha256
1049 (base32
1050 "0704y73sddn24jga9csw4gxyfb3pnrfnk0vdcph84n1h38490l16"))
1051 (file-name (git-file-name name version))
1052 (modules '((guix build utils)))
1053 (snippet
1054 '(begin
1055 ;; Delete the bundled copy of libuv.
1056 (delete-file-recursively "uv")
1057 (substitute* "configure.ac"
1058 (("AC_CONFIG_SUBDIRS\\(\\[uv\\]\\)") ""))
1059 (substitute* "Makefile.am"
1060 (("SUBDIRS = uv") "\n")
1061 (("\\$\\(top_builddir\\)/uv/libuv.la") "-luv")
1062
1063 ;; Make sure the 'hnsd' binary is installed and
1064 ;; dynamically-linked.
1065 (("noinst_PROGRAMS") "bin_PROGRAMS")
1066 (("hnsd_LDFLAGS = -static") ""))
1067
1068 ;; This script tries to chdir to "uv" and doesn't do more
1069 ;; than "autoreconf" so remove it.
1070 (delete-file "autogen.sh")
1071 #t))))
1072 (build-system gnu-build-system)
1073 (arguments
1074 '(#:configure-flags '("--disable-static"))) ;no need for libhsk.a
1075 (native-inputs
1076 `(("autoconf" ,autoconf)
1077 ("automake" ,automake)
1078 ("libtool" ,libtool)))
1079 (inputs
1080 `(("unbound" ,unbound)
1081 ("libuv" ,libuv)))
1082 (home-page "https://www.handshake.org/")
1083 (synopsis "Resolver daemon for the Handshake naming protocol")
1084 (description
1085 "@command{hnsd} is a @dfn{host name resolver} for the Handshake Naming
1086System (HNS) peer-to-peer network.")
1087 (license license:expat))))
498911d3
MO
1088
1089(define-public libmicrodns
1090 (package
1091 (name "libmicrodns")
65fd3f0a 1092 (version "0.1.2")
498911d3 1093 (source (origin
65fd3f0a
LF
1094 (method url-fetch)
1095 (uri (string-append "https://github.com/videolabs/libmicrodns/"
1096 "releases/download/" version "/microdns-"
1097 version ".tar.xz"))
498911d3
MO
1098 (sha256
1099 (base32
65fd3f0a
LF
1100 "0p4va18zxgmzcdwhlbg2mmjwswlbgqy4ay5vaxrw7cxmhsflnv36"))))
1101 (build-system meson-build-system)
498911d3
MO
1102 (home-page "https://github.com/videolabs/libmicrodns")
1103 (synopsis "Minimal mDNS resolver library")
1104 (description "@code{libmicrodns} provides a minimal implementation of a
1105mDNS resolver as well as an announcer. mDNS (Multicast Domain Name System) is
1106a zero-config service that allows one to resolve host names to IP addresses in
1107local networks.")
1108 (license license:lgpl2.1)))
41553c90
CM
1109
1110(define-public public-suffix-list
1111 ;; Mozilla releases the official list here:
1112 ;;
1113 ;; https://publicsuffix.org/list/public_suffix_list.dat
1114 ;;
1115 ;; However, Mozilla syncs that file from the GitHub repository periodically,
1116 ;; so its contents will change over time. If you update this commit, please
1117 ;; make sure that the new commit refers to a list which is identical to the
1118 ;; officially published list available from the URL above.
1119 (let ((commit "9375b697baddb0827a5995c81bd3c75877a0b35d"))
1120 (package
1121 (name "public-suffix-list")
1122 (version (git-version "0" "1" commit))
1123 (source (origin
1124 (method git-fetch)
1125 (uri (git-reference
b0e7b699 1126 (url "https://github.com/publicsuffix/list")
41553c90
CM
1127 (commit commit)))
1128 (file-name (git-file-name name version))
1129 (sha256
1130 (base32
1131 "1sm7pni01rnl4ldzi8z8nc4cbgq8nxda9gwc68v0s3ij7jd1jmik"))))
1132 (build-system trivial-build-system)
1133 (arguments
1134 `(#:modules ((guix build utils))
1135 #:builder
1136 (begin
1137 (use-modules (guix build utils))
1138 (let* ((out (assoc-ref %outputs "out"))
1139 ;; Install to /share because that is where "read-only
1140 ;; architecture-independent data files" should go (see:
1141 ;; (standards) Directory Variables). Include the version in
1142 ;; the directory name so that if multiple versions are ever
1143 ;; installed in the same profile, they will not conflict.
1144 (destination (string-append
1145 out "/share/public-suffix-list-" ,version))
1146 (source (assoc-ref %build-inputs "source")))
1147 (with-directory-excursion source
1148 (install-file "public_suffix_list.dat" destination)
1149 (install-file "LICENSE" destination))
1150 #t))))
1151 (home-page "https://publicsuffix.org/")
1152 (synopsis "Database of current and historical DNS suffixes")
1153 (description "This is the Public Suffix List maintained by Mozilla. A
1154\"public suffix\" is one under which Internet users can (or historically
1155could) directly register names in the Domain Name System (DNS). Some examples
1156of public suffixes are .com, .co.uk and pvt.k12.ma.us. This is a list of all
1157known public suffixes.")
1158 (license license:mpl2.0))))
0d36d0ba
AI
1159
1160(define-public maradns
1161 (package
1162 (name "maradns")
0ac91500 1163 (version "3.5.0007")
0d36d0ba
AI
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (string-append "https://maradns.samiam.org/download/"
1168 (version-major+minor version) "/"
1169 version "/maradns-" version ".tar.xz"))
1170 (sha256
0ac91500 1171 (base32 "0bc19xylg4whww9qaj5i4izwxcrh0c0ja7l1pfcn2la02hlvg1a6"))))
0d36d0ba
AI
1172 (build-system gnu-build-system)
1173 (arguments
0ac91500 1174 `(#:tests? #f ; need to be root to run tests
0d36d0ba
AI
1175 #:make-flags
1176 (list
de53ddb5 1177 ,(string-append "CC=" (cc-for-target))
0d36d0ba
AI
1178 (string-append "PREFIX=" %output)
1179 (string-append "RPM_BUILD_ROOT=" %output))
1180 #:phases
1181 (modify-phases %standard-phases
1182 (replace 'configure
018114ba
AI
1183 (lambda* (#:key native-inputs target #:allow-other-keys)
1184 ;; make_32bit_tables generates a header file that is used during
1185 ;; compilation. Hence, during cross compilation, it should be
1186 ;; built for the host system.
1187 (when target
1188 (substitute* "rng/Makefile"
1189 (("\\$\\(CC\\) -o make_32bit_tables")
1190 (string-append (assoc-ref native-inputs "gcc")
1191 "/bin/gcc -o make_32bit_tables"))))
0d36d0ba
AI
1192 (invoke "./configure")))
1193 (add-before 'install 'create-install-directories
1194 (lambda* (#:key outputs #:allow-other-keys)
1195 (let ((out (assoc-ref outputs "out")))
1196 (for-each (lambda (dir)
1197 (mkdir-p (string-append out dir)))
1198 (list "/bin" "/sbin" "/etc"
1199 "/share/man/man1"
1200 "/share/man/man5"
1201 "/share/man/man8"))
1202 #t))))))
1203 (home-page "https://maradns.samiam.org")
1204 (synopsis "Small lightweight DNS server")
1205 (description "MaraDNS is a small and lightweight DNS server. MaraDNS
1206consists of a UDP-only authoritative DNS server for hosting domains, and a UDP
1207and TCP-capable recursive DNS server for finding domains on the internet.")
1208 (license license:bsd-2)))
6b6647f8
BW
1209
1210(define-public openresolv
1211 (package
1212 (name "openresolv")
1213 (version "3.10.0")
1214 (source (origin
1215 (method url-fetch)
1216 (uri (string-append "https://roy.marples.name/downloads/openresolv/"
1217 "openresolv-" version ".tar.xz"))
1218 (sha256
1219 (base32
1220 "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20"))
1221 (patches
1222 (search-patches "openresolv-restartcmd-guix.patch"))))
1223 (build-system gnu-build-system)
1224 (arguments
1225 `(#:tests? #f ; No test suite
1226 #:configure-flags
1227 (list (string-append "--sysconfdir=/etc"))
1228 #:make-flags
1229 (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))))
1230 (home-page "https://roy.marples.name/projects/openresolv/")
1231 (synopsis "Resolvconf POSIX compliant implementation, a middleman for resolv.conf")
1232 (description "openresolv is an implementation of @command{resolvconf}, the
1233middleman between the network configuration services and
1234@file{/etc/resolv.conf}. @command{resolvconf} itself is just a script that
1235stores, removes and lists a full @file{resolv.conf} generated for the
1236interface. It then calls all the helper scripts it knows about so it can
1237configure the real @file{/etc/resolv.conf} and optionally any local
1238nameservers other than libc.")
1239 (license license:bsd-2)))