Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / dns.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
3 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
7 ;;; Copyright © 2016 Nikita <nikita@n0.is>
8 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
11 ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
12 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
13 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
14 ;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
15 ;;; Copyright © 2019 Rutger Helling <rhelling@mykolab.com>
16 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
17 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
18 ;;; Copyright © 2020 Leo Famulari <leo@famulari.name>
19 ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
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
36 (define-module (gnu packages dns)
37 #:use-module (gnu packages admin)
38 #:use-module (gnu packages autotools)
39 #:use-module (gnu packages base)
40 #:use-module (gnu packages bash)
41 #:use-module (gnu packages certs)
42 #:use-module (gnu packages check)
43 #:use-module (gnu packages databases)
44 #:use-module (gnu packages documentation)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages crypto)
47 #:use-module (gnu packages datastructures)
48 #:use-module (gnu packages flex)
49 #:use-module (gnu packages freedesktop)
50 #:use-module (gnu packages gcc)
51 #:use-module (gnu packages glib)
52 #:use-module (gnu packages groff)
53 #:use-module (gnu packages groff)
54 #:use-module (gnu packages gtk)
55 #:use-module (gnu packages libedit)
56 #:use-module (gnu packages libevent)
57 #:use-module (gnu packages libidn)
58 #:use-module (gnu packages linux)
59 #:use-module (gnu packages lua)
60 #:use-module (gnu packages ncurses)
61 #:use-module (gnu packages nettle)
62 #:use-module (gnu packages networking)
63 #:use-module (gnu packages perl)
64 #:use-module (gnu packages pkg-config)
65 #:use-module (gnu packages protobuf)
66 #:use-module (gnu packages python)
67 #:use-module (gnu packages python-xyz)
68 #:use-module (gnu packages shells)
69 #:use-module (gnu packages sphinx)
70 #:use-module (gnu packages swig)
71 #:use-module (gnu packages tls)
72 #:use-module (gnu packages web)
73 #:use-module (gnu packages xml)
74 #:use-module (gnu packages)
75 #:use-module ((guix licenses) #:prefix license:)
76 #:use-module (guix packages)
77 #:use-module (guix download)
78 #:use-module (guix git-download)
79 #:use-module (guix utils)
80 #:use-module (guix build-system glib-or-gtk)
81 #:use-module (guix build-system gnu)
82 #:use-module (guix build-system meson)
83 #:use-module (guix build-system trivial))
84
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
163 RFCs like the DNSSEC documents, and allows developers to easily create
164 software conforming to current RFCs, and experimental software for current
165 Internet Drafts. A secondary benefit of using ldns is speed; ldns is written in
166 C it should be a lot faster than Perl.")
167 (home-page "https://nlnetlabs.nl/projects/ldns/about/")
168 (license license:bsd-3)))
169
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
265 for the DNS traffic. It relies on the Unbound DNS resolver running locally on
266 your system, which performs DNSSEC validation. It reconfigures Unbound in such
267 a way that it will signal it to to use the DHCP obtained forwarders if possible,
268 fallback to doing its own AUTH queries if that fails, and if that fails it will
269 prompt 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
273 (define-public dnsmasq
274 (package
275 (name "dnsmasq")
276 (version "2.82")
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
284 "0cn1xd1s6xs78jmrmwjnh9m6w3q38pk6dyqy2phvasqiyd33cll4"))))
285 (build-system gnu-build-system)
286 (native-inputs
287 `(("pkg-config" ,pkg-config)))
288 (inputs
289 `(("dbus" ,dbus)))
290 (arguments
291 `(#:phases
292 (modify-phases %standard-phases (delete 'configure))
293 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
294 "CC=gcc"
295 "COPTS=\"-DHAVE_DBUS\"")
296 #:tests? #f)) ; no ‘check’ target
297 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
298 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
299 (description
300 "Dnsmasq is a light-weight DNS forwarder and DHCP server. It is designed
301 to provide DNS and, optionally, DHCP to a small network. It can serve the
302 names of local machines which are not in the global DNS. The DHCP server
303 integrates with the DNS server and allows machines with DHCP-allocated
304 addresses to appear in the DNS with names configured either on each host or in
305 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
306 and BOOTP/TFTP for network booting of diskless machines.")
307 ;; Source files only say GPL2 and GPL3 are allowed.
308 (license (list license:gpl2 license:gpl3))))
309
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
313 (package
314 (name "bind")
315 ;; When updating, check whether isc-dhcp's bundled copy should be as well.
316 (version "9.16.7")
317 (source (origin
318 (method url-fetch)
319 (uri (string-append
320 "https://ftp.isc.org/isc/bind9/" version
321 "/bind-" version ".tar.xz"))
322 (sha256
323 (base32
324 "1l8lhgnkj3fnl1101bs3pzj5gv2x5m9ahvrbyscsc9mxxc91hzcz"))))
325 (build-system gnu-build-system)
326 (outputs `("out" "utils"))
327 (inputs
328 ;; It would be nice to add GeoIP and gssapi once there are packages.
329 `(("libcap" ,libcap)
330 ("libuv" ,libuv)
331 ("libxml2" ,libxml2)
332 ("openssl" ,openssl)
333 ("p11-kit" ,p11-kit)
334 ("python" ,python)
335 ("python-ply" ,python-ply)))
336 (native-inputs
337 `(("perl" ,perl)
338 ("pkg-config" ,pkg-config)))
339 (arguments
340 `(#:configure-flags
341 (list (string-append "--with-pkcs11="
342 (assoc-ref %build-inputs "p11-kit")))
343 #:phases
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"
358 "/share/man/man1/nsupdate.1"))
359 #t))
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 _
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)))))
374 (synopsis "Domain Name System (DNS) implementation")
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
377 protocols, but it is also production-grade software, suitable for use in
378 high-volume and high-reliability applications. The name BIND stands for
379 \"Berkeley Internet Name Domain\", because the software originated in the
380 early 1980s at the University of California at Berkeley. The @code{utils}
381 output of this package contains the following DNS name servers related command
382 line utilities:
383 @table @code
384 @item delv
385 DNS lookup and validation utility
386 @item dig
387 DNS lookup utility
388 @item host
389 DNS lookup utility
390 @item nslookup
391 Internet name servers interactive query utility
392 @item nsupdate
393 Dynamic DNS update utility
394 @end table")
395 (home-page "https://www.isc.org/bind/")
396 (license (list license:mpl2.0))))
397
398 (define-public dnscrypt-proxy
399 (package
400 (name "dnscrypt-proxy")
401 (version "1.9.5")
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
409 "1dhvklr4dg2vlw108n11xbamacaryyg3dbrg629b76lp7685p7z8"))
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.
414 '(begin
415 (delete-file-recursively "libltdl")
416 #t))))
417 (build-system gnu-build-system)
418 (arguments
419 `(#:phases
420 (modify-phases %standard-phases
421 (add-after 'unpack 'autoreconf
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.
426 (invoke "autoreconf" "-vif"))))))
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
439 between a client and a DNS resolver. It verifies that responses you get
440 from a DNS provider was actually sent by that provider, and haven't been
441 tampered with. For optimal performance it is recommended to use this as
442 a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
443 can also be used as a normal DNS \"server\". A list of public dnscrypt
444 servers 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
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
469 (add-after 'unpack 'create-configure
470 (lambda _
471 (invoke "make" "configure"))))))
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
481 the @code{dnscrypt} protocol. It can be used as an endpoint for the
482 @command{dnscrypt-proxy} client to securely tunnel DNS requests between
483 the 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
491 (define-public libasr
492 (package
493 (name "libasr")
494 (version "1.0.4")
495 (source
496 (origin
497 (method url-fetch)
498 (uri (string-append "https://www.opensmtpd.org/archives/"
499 "libasr-" version ".tar.gz"))
500 (sha256
501 (base32 "1d6s8njqhvayx2gp47409sp1fn8m608ws26hr1srfp6i23nnpyqr"))))
502 (build-system gnu-build-system)
503 (arguments
504 `(#:phases
505 (modify-phases %standard-phases
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))))))
512 (native-inputs
513 `(("autoconf" ,autoconf)
514 ("automake" ,automake)
515 ("libtool" ,libtool)
516 ("pkg-config" ,pkg-config)))
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.
521 It runs DNS queries and performs hostname resolution in a fully
522 asynchronous 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))))
528
529 (define-public nsd
530 (package
531 (name "nsd")
532 (version "4.3.2")
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
539 (base32 "0ac3mbn5z4nc18782m9aswdpi2m9f4665vidw0ciyigdh0pywp2v"))))
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
584 name server for the Domain Name System (@dfn{DNS}). It aims to be a fast and
585 RFC-compliant nameserver.
586
587 NSD uses zone information compiled via @command{zonec} into a binary database
588 file (@file{nsd.db}). This allows fast startup of the name service daemon and
589 allows syntax-structural errors in zone files to be flagged at compile time,
590 before being made available to NSD service itself. However, most traditional
591 BIND-style zone files can be directly imported into NSD without modification.
592
593 The collection of programs and processes that make up NSD are designed so that
594 the daemon itself runs as a non-privileged user and can be easily configured to
595 run in a @code{chroot} jail, thus making any security flaws in NSD less likely
596 to result in system-wide compromise.")
597 (license (list license:bsd-3))))
598
599 (define-public unbound
600 (package
601 (name "unbound")
602 (version "1.10.1")
603 (source
604 (origin
605 (method url-fetch)
606 (uri (string-append "https://www.unbound.net/downloads/unbound-"
607 version ".tar.gz"))
608 (sha256
609 (base32 "0dnmh9jjh2v274f0hl31bgv40pl77mmfgky8bkqr5kvi3b17fdmp"))))
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)
619 ("python-wrapper" ,python-wrapper)
620 ("openssl" ,openssl)))
621 (arguments
622 `(#:configure-flags
623 (list "--disable-static" ; save space and non-determinism in libunbound.a
624 (string-append
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
668 struct 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
684 struct 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
705 struct 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
720 struct 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)))
738 (invoke (string-append gcc "/bin/gcc")
739 "-shared" "-fPIC" "-o" "/tmp/nss_preload.so"
740 "/tmp/nss_preload.c")
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
750 validation of results. It implements only a minimal amount of authoritative
751 service to prevent leakage to the root nameservers: forward lookups for
752 localhost, reverse for @code{127.0.0.1} and @code{::1}, and NXDOMAIN for zones
753 served by AS112. Stub and forward zones are supported.")
754 (license license:bsd-4)))
755
756 (define-public yadifa
757 (package
758 (name "yadifa")
759 (version "2.3.10")
760 (source
761 (let ((build "9729"))
762 (origin
763 (method url-fetch)
764 (uri
765 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
766 "yadifa-" version "-" build ".tar.gz"))
767 (sha256
768 (base32 "0azaignqmylfdzr4x02s8y3pkn4f0xkpz3d1pkiiz8mwk92zgybn")))))
769 (build-system gnu-build-system)
770 (native-inputs
771 `(("which" ,which)))
772 (inputs
773 `(("openssl" ,openssl)))
774 (arguments
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")))
794 (home-page "https://www.yadifa.eu/")
795 (synopsis "Authoritative DNS name server")
796 (description "YADIFA is an authoritative name server for the @dfn{Domain
797 Name System} (DNS). It aims for both higher performance and a smaller memory
798 footprint than other implementations, while remaining fully RFC-compliant.
799 YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
800 Extensions} (DNSSEC).")
801 (license license:bsd-3)))
802
803 (define-public knot
804 (package
805 (name "knot")
806 (version "3.0.0")
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
813 (base32 "1i76zflc49jbsaj3idxx7a6x87c0lzal294c3fdjyfl7dvznmjgi"))))
814 (build-system gnu-build-system)
815 (arguments
816 `(#:configure-flags
817 (list "--sysconfdir=/etc"
818 "--localstatedir=/var"
819 "--enable-dnstap" ; let tools read/write capture files
820 "--with-module-dnstap=yes" ; detailed query capturing & logging
821 (string-append "--with-bash-completions="
822 (assoc-ref %outputs "out")
823 "/etc/bash_completion.d"))
824 #:phases
825 (modify-phases %standard-phases
826 (add-before 'configure 'disable-directory-pre-creation
827 (lambda _
828 ;; Don't install empty directories like ‘/etc’ outside the store.
829 ;; This is needed even when using ‘make config_dir=... install’.
830 (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
831 #t))
832 (replace 'install
833 (lambda* (#:key outputs #:allow-other-keys)
834 (let* ((out (assoc-ref outputs "out"))
835 (doc (string-append out "/share/doc/" ,name "-" ,version))
836 (etc (string-append doc "/examples/etc")))
837 (invoke "make"
838 (string-append "config_dir=" etc)
839 "install")))))))
840 (native-inputs
841 `(("pkg-config" ,pkg-config)))
842 (inputs
843 `(("fstrm" ,fstrm)
844 ("gnutls" ,gnutls)
845 ("jansson" ,jansson)
846 ("libcap-ng" ,libcap-ng)
847 ("libedit" ,libedit)
848 ("libidn" ,libidn)
849 ("liburcu" ,liburcu)
850 ("lmdb" ,lmdb)
851 ("ncurses" ,ncurses)
852 ("protobuf-c" ,protobuf-c)))
853 (home-page "https://www.knot-dns.cz/")
854 (synopsis "Authoritative DNS name server")
855 (description "Knot DNS is an authoritative name server for the @dfn{Domain
856 Name System} (DNS), designed to meet the needs of root and @dfn{top-level
857 domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
858 number of programming techniques to improve speed. For example, the responder
859 is completely lock-free, resulting in a very high response rate. Other features
860 include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
861 synthesis, and on-the-fly re-configuration.")
862 (license
863 (list
864 ;; src/contrib/{hat-trie,murmurhash3,openbsd},
865 ;; src/dnssec/contrib/vpool.[ch], and parts of libtap/ are ‘MIT’ (expat).
866 license:expat
867 license:lgpl2.0+ ; parts of scr/contrib/ucw
868 license:public-domain ; src/contrib/fnv and possibly murmurhash3
869 license:gpl3+)))) ; everything else
870
871 (define-public knot-resolver
872 (package
873 (name "knot-resolver")
874 (version "5.1.3")
875 (source (origin
876 (method url-fetch)
877 (uri (string-append "https://secure.nic.cz/files/knot-resolver/"
878 "knot-resolver-" version ".tar.xz"))
879 (sha256
880 (base32
881 "12s5070nqqf599s1mb6rjas2as481rjf751qk5yrz6p34y885k90"))))
882 (build-system meson-build-system)
883 (arguments
884 '(#:configure-flags '("-Ddoc=enabled")
885 #:phases
886 (modify-phases %standard-phases
887 (add-before 'configure 'disable-default-ta
888 (lambda _
889 ;; Disable the default managed root TA, since we don't have
890 ;; write access to the keyfile and its directory in store.
891 (substitute* "daemon/lua/sandbox.lua.in"
892 (("^trust_anchors\\.add_file.*") ""))
893 #t))
894 (add-after 'build 'build-doc
895 (lambda _
896 (invoke "ninja" "doc")))
897 (add-after 'install 'wrap-binary
898 (lambda* (#:key inputs outputs #:allow-other-keys)
899 (let* ((out (assoc-ref outputs "out"))
900 (lua-* (map cdr (filter
901 (lambda (input)
902 (string-prefix? "lua-" (car input)))
903 inputs)))
904 (lua-path (lambda (p)
905 (string-append p "/share/lua/5.1/?.lua")))
906 (lua-cpath (lambda (p)
907 (string-append p "/lib/lua/5.1/?.so"))))
908 (wrap-program (string-append out "/sbin/kresd")
909 `("LUA_PATH" ";" prefix ,(map lua-path lua-*))
910 `("LUA_CPATH" ";" prefix ,(map lua-cpath lua-*)))
911 #t))))))
912 (native-inputs
913 `(("cmocka" ,cmocka) ; for unit tests
914 ("doxygen" ,doxygen)
915 ("protobuf-c" ,protobuf-c)
916 ("pkg-config" ,pkg-config)
917 ("python-breathe" ,python-breathe)
918 ("python-sphinx" ,python-sphinx)
919 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
920 (inputs
921 `(("fstrm" ,fstrm)
922 ("gnutls" ,gnutls)
923 ("knot" ,knot)
924 ("libuv" ,libuv)
925 ("lmdb" ,lmdb)
926 ("luajit" ,luajit)
927 ;; TODO: Add optional lua modules: basexx and psl.
928 ("lua-bitop" ,lua5.1-bitop)))
929 (home-page "https://www.knot-resolver.cz/")
930 (synopsis "Caching validating DNS resolver")
931 (description
932 "Knot Resolver is a caching full resolver implementation written in C and
933 LuaJIT, both a resolver library and a daemon.")
934 (license (list license:gpl3+
935 ;; Some 'contrib' files are under MIT, CC0 and LGPL2.
936 license:expat
937 license:cc0
938 license:lgpl2.0))))
939
940 (define-public ddclient
941 (package
942 (name "ddclient")
943 (version "3.9.1")
944 (source
945 (origin
946 (method git-fetch)
947 (uri (git-reference
948 (url "https://github.com/ddclient/ddclient")
949 (commit (string-append "v" version))))
950 (file-name (git-file-name name version))
951 (sha256
952 (base32 "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w"))))
953 (build-system trivial-build-system) ; no Makefile.PL
954 (native-inputs
955 `(("bash" ,bash)
956 ("perl" ,perl)))
957 (inputs
958 `(("inetutils" ,inetutils) ; logger
959 ("net-tools" ,net-tools)
960 ("perl-data-validate-ip" ,perl-data-validate-ip)
961 ("perl-digest-sha1" ,perl-digest-sha1)
962 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
963 (arguments
964 `(#:modules ((guix build utils)
965 (ice-9 match)
966 (srfi srfi-26))
967 #:builder
968 (begin
969 (use-modules (guix build utils)
970 (ice-9 match)
971 (srfi srfi-26))
972 (setenv "PATH" (string-append
973 (assoc-ref %build-inputs "bash") "/bin" ":"
974 (assoc-ref %build-inputs "perl") "/bin"))
975
976 ;; Copy the (read-only) source into the (writable) build directory.
977 (copy-recursively (assoc-ref %build-inputs "source") ".")
978
979 ;; Install.
980 (let* ((out (assoc-ref %outputs "out"))
981 (bin (string-append out "/bin")))
982 (let ((file "ddclient"))
983 (substitute* file
984 (("/usr/bin/perl") (which "perl"))
985 ;; Strictly use ‘/etc/ddclient/ddclient.conf’.
986 (("\\$\\{program\\}\\.conf") "/etc/ddclient/ddclient.conf")
987 (("\\$etc\\$program.conf") "/etc/ddclient/ddclient.conf")
988 ;; Strictly use ‘/var/cache/ddclient/ddclient.cache’
989 (("\\$cachedir\\$program\\.cache")
990 "/var/cache/ddclient/ddclient.cache"))
991 (install-file file bin)
992 (wrap-program (string-append bin "/" file)
993 `("PATH" ":" =
994 ("$PATH"
995 ,@(map (lambda (input)
996 (match input
997 ((name . store)
998 (string-append store "/bin"))))
999 %build-inputs)))
1000 `("PERL5LIB" ":" =
1001 ,(delete
1002 ""
1003 (map (match-lambda
1004 (((? (cut string-prefix? "perl-" <>) name) . dir)
1005 (string-append dir "/lib/perl5/site_perl"))
1006 (_ ""))
1007 %build-inputs)))))
1008 (for-each (cut install-file <> (string-append out
1009 "/share/ddclient"))
1010 (find-files "." "sample.*$"))))))
1011 (home-page "https://ddclient.net/")
1012 (synopsis "Address updating utility for dynamic DNS services")
1013 (description "This package provides a client to update dynamic IP
1014 addresses with several dynamic DNS service providers, such as
1015 @uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
1016
1017 This makes it possible to use a fixed hostname (such as myhost.dyndns.org) to
1018 access a machine with a dynamic IP address.
1019
1020 The client supports both dynamic and (near) static services, as well as MX
1021 record and alternative name management. It caches the address, and only
1022 attempts the update when it has changed.")
1023 (license license:gpl2+)))
1024
1025 (define-public hnsd
1026 ;; There have been no releases yet, hence this commit.
1027 (let ((revision "0")
1028 (commit "895d89c25d316d18df9d374fe78aae3902bc89fb"))
1029 (package
1030 (name "hnsd")
1031 (version (git-version "0.0" revision commit))
1032 (source (origin
1033 (method git-fetch)
1034 (uri (git-reference
1035 (url "https://github.com/handshake-org/hnsd")
1036 (commit commit)))
1037 (sha256
1038 (base32
1039 "0704y73sddn24jga9csw4gxyfb3pnrfnk0vdcph84n1h38490l16"))
1040 (file-name (git-file-name name version))
1041 (modules '((guix build utils)))
1042 (snippet
1043 '(begin
1044 ;; Delete the bundled copy of libuv.
1045 (delete-file-recursively "uv")
1046 (substitute* "configure.ac"
1047 (("AC_CONFIG_SUBDIRS\\(\\[uv\\]\\)") ""))
1048 (substitute* "Makefile.am"
1049 (("SUBDIRS = uv") "\n")
1050 (("\\$\\(top_builddir\\)/uv/libuv.la") "-luv")
1051
1052 ;; Make sure the 'hnsd' binary is installed and
1053 ;; dynamically-linked.
1054 (("noinst_PROGRAMS") "bin_PROGRAMS")
1055 (("hnsd_LDFLAGS = -static") ""))
1056
1057 ;; This script tries to chdir to "uv" and doesn't do more
1058 ;; than "autoreconf" so remove it.
1059 (delete-file "autogen.sh")
1060 #t))))
1061 (build-system gnu-build-system)
1062 (arguments
1063 '(#:configure-flags '("--disable-static"))) ;no need for libhsk.a
1064 (native-inputs
1065 `(("autoconf" ,autoconf)
1066 ("automake" ,automake)
1067 ("libtool" ,libtool)))
1068 (inputs
1069 `(("unbound" ,unbound)
1070 ("libuv" ,libuv)))
1071 (home-page "https://www.handshake.org/")
1072 (synopsis "Resolver daemon for the Handshake naming protocol")
1073 (description
1074 "@command{hnsd} is a @dfn{host name resolver} for the Handshake Naming
1075 System (HNS) peer-to-peer network.")
1076 (license license:expat))))
1077
1078 (define-public libmicrodns
1079 (package
1080 (name "libmicrodns")
1081 (version "0.1.2")
1082 (source (origin
1083 (method url-fetch)
1084 (uri (string-append "https://github.com/videolabs/libmicrodns/"
1085 "releases/download/" version "/microdns-"
1086 version ".tar.xz"))
1087 (sha256
1088 (base32
1089 "0p4va18zxgmzcdwhlbg2mmjwswlbgqy4ay5vaxrw7cxmhsflnv36"))))
1090 (build-system meson-build-system)
1091 (home-page "https://github.com/videolabs/libmicrodns")
1092 (synopsis "Minimal mDNS resolver library")
1093 (description "@code{libmicrodns} provides a minimal implementation of a
1094 mDNS resolver as well as an announcer. mDNS (Multicast Domain Name System) is
1095 a zero-config service that allows one to resolve host names to IP addresses in
1096 local networks.")
1097 (license license:lgpl2.1)))
1098
1099 (define-public public-suffix-list
1100 ;; Mozilla releases the official list here:
1101 ;;
1102 ;; https://publicsuffix.org/list/public_suffix_list.dat
1103 ;;
1104 ;; However, Mozilla syncs that file from the GitHub repository periodically,
1105 ;; so its contents will change over time. If you update this commit, please
1106 ;; make sure that the new commit refers to a list which is identical to the
1107 ;; officially published list available from the URL above.
1108 (let ((commit "9375b697baddb0827a5995c81bd3c75877a0b35d"))
1109 (package
1110 (name "public-suffix-list")
1111 (version (git-version "0" "1" commit))
1112 (source (origin
1113 (method git-fetch)
1114 (uri (git-reference
1115 (url "https://github.com/publicsuffix/list")
1116 (commit commit)))
1117 (file-name (git-file-name name version))
1118 (sha256
1119 (base32
1120 "1sm7pni01rnl4ldzi8z8nc4cbgq8nxda9gwc68v0s3ij7jd1jmik"))))
1121 (build-system trivial-build-system)
1122 (arguments
1123 `(#:modules ((guix build utils))
1124 #:builder
1125 (begin
1126 (use-modules (guix build utils))
1127 (let* ((out (assoc-ref %outputs "out"))
1128 ;; Install to /share because that is where "read-only
1129 ;; architecture-independent data files" should go (see:
1130 ;; (standards) Directory Variables). Include the version in
1131 ;; the directory name so that if multiple versions are ever
1132 ;; installed in the same profile, they will not conflict.
1133 (destination (string-append
1134 out "/share/public-suffix-list-" ,version))
1135 (source (assoc-ref %build-inputs "source")))
1136 (with-directory-excursion source
1137 (install-file "public_suffix_list.dat" destination)
1138 (install-file "LICENSE" destination))
1139 #t))))
1140 (home-page "https://publicsuffix.org/")
1141 (synopsis "Database of current and historical DNS suffixes")
1142 (description "This is the Public Suffix List maintained by Mozilla. A
1143 \"public suffix\" is one under which Internet users can (or historically
1144 could) directly register names in the Domain Name System (DNS). Some examples
1145 of public suffixes are .com, .co.uk and pvt.k12.ma.us. This is a list of all
1146 known public suffixes.")
1147 (license license:mpl2.0))))
1148
1149 (define-public maradns
1150 (package
1151 (name "maradns")
1152 (version "3.5.0007")
1153 (source
1154 (origin
1155 (method url-fetch)
1156 (uri (string-append "https://maradns.samiam.org/download/"
1157 (version-major+minor version) "/"
1158 version "/maradns-" version ".tar.xz"))
1159 (sha256
1160 (base32 "0bc19xylg4whww9qaj5i4izwxcrh0c0ja7l1pfcn2la02hlvg1a6"))))
1161 (build-system gnu-build-system)
1162 (arguments
1163 `(#:tests? #f ; need to be root to run tests
1164 #:make-flags
1165 (list
1166 ,(string-append "CC=" (cc-for-target))
1167 (string-append "PREFIX=" %output)
1168 (string-append "RPM_BUILD_ROOT=" %output))
1169 #:phases
1170 (modify-phases %standard-phases
1171 (replace 'configure
1172 (lambda* (#:key native-inputs target #:allow-other-keys)
1173 ;; make_32bit_tables generates a header file that is used during
1174 ;; compilation. Hence, during cross compilation, it should be
1175 ;; built for the host system.
1176 (when target
1177 (substitute* "rng/Makefile"
1178 (("\\$\\(CC\\) -o make_32bit_tables")
1179 (string-append (assoc-ref native-inputs "gcc")
1180 "/bin/gcc -o make_32bit_tables"))))
1181 (invoke "./configure")))
1182 (add-before 'install 'create-install-directories
1183 (lambda* (#:key outputs #:allow-other-keys)
1184 (let ((out (assoc-ref outputs "out")))
1185 (for-each (lambda (dir)
1186 (mkdir-p (string-append out dir)))
1187 (list "/bin" "/sbin" "/etc"
1188 "/share/man/man1"
1189 "/share/man/man5"
1190 "/share/man/man8"))
1191 #t))))))
1192 (home-page "https://maradns.samiam.org")
1193 (synopsis "Small lightweight DNS server")
1194 (description "MaraDNS is a small and lightweight DNS server. MaraDNS
1195 consists of a UDP-only authoritative DNS server for hosting domains, and a UDP
1196 and TCP-capable recursive DNS server for finding domains on the internet.")
1197 (license license:bsd-2)))
1198
1199 (define-public openresolv
1200 (package
1201 (name "openresolv")
1202 (version "3.10.0")
1203 (source (origin
1204 (method url-fetch)
1205 (uri (string-append "https://roy.marples.name/downloads/openresolv/"
1206 "openresolv-" version ".tar.xz"))
1207 (sha256
1208 (base32
1209 "01ms6c087la4hk0f0w6n2vpsb7dg4kklah2rqyhz88p0vr9bqy20"))
1210 (patches
1211 (search-patches "openresolv-restartcmd-guix.patch"))))
1212 (build-system gnu-build-system)
1213 (arguments
1214 `(#:tests? #f ; No test suite
1215 #:configure-flags
1216 (list (string-append "--sysconfdir=/etc"))
1217 #:make-flags
1218 (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))))
1219 (home-page "https://roy.marples.name/projects/openresolv/")
1220 (synopsis "Resolvconf POSIX compliant implementation, a middleman for resolv.conf")
1221 (description "openresolv is an implementation of @command{resolvconf}, the
1222 middleman between the network configuration services and
1223 @file{/etc/resolv.conf}. @command{resolvconf} itself is just a script that
1224 stores, removes and lists a full @file{resolv.conf} generated for the
1225 interface. It then calls all the helper scripts it knows about so it can
1226 configure the real @file{/etc/resolv.conf} and optionally any local
1227 nameservers other than libc.")
1228 (license license:bsd-2)))