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 ng0 <ng0@n0.is>
8 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2016 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>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages dns)
33 #:use-module (gnu packages admin)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages bash)
37 #:use-module (gnu packages check)
38 #:use-module (gnu packages databases)
39 #:use-module (gnu packages documentation)
40 #:use-module (gnu packages compression)
41 #:use-module (gnu packages crypto)
42 #:use-module (gnu packages datastructures)
43 #:use-module (gnu packages flex)
44 #:use-module (gnu packages glib)
45 #:use-module (gnu packages groff)
46 #:use-module (gnu packages groff)
47 #:use-module (gnu packages libedit)
48 #:use-module (gnu packages libevent)
49 #:use-module (gnu packages libidn)
50 #:use-module (gnu packages linux)
51 #:use-module (gnu packages lua)
52 #:use-module (gnu packages ncurses)
53 #:use-module (gnu packages nettle)
54 #:use-module (gnu packages networking)
55 #:use-module (gnu packages perl)
56 #:use-module (gnu packages pkg-config)
57 #:use-module (gnu packages protobuf)
58 #:use-module (gnu packages python)
59 #:use-module (gnu packages python-xyz)
60 #:use-module (gnu packages sphinx)
61 #:use-module (gnu packages swig)
62 #:use-module (gnu packages tls)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages xml)
65 #:use-module (gnu packages)
66 #:use-module ((guix licenses) #:prefix license:)
67 #:use-module (guix packages)
68 #:use-module (guix download)
69 #:use-module (guix git-download)
70 #:use-module (guix utils)
71 #:use-module (guix build-system gnu)
72 #:use-module (guix build-system meson)
73 #:use-module (guix build-system trivial))
75 (define-public dnsmasq
82 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
86 "1fv3g8vikj3sn37x1j6qsywn09w1jipvlv34j3q5qrljbrwa5ayd"))))
87 (build-system gnu-build-system)
89 `(("pkg-config" ,pkg-config)))
94 (modify-phases %standard-phases (delete 'configure))
95 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
97 "COPTS=\"-DHAVE_DBUS\"")
98 #:tests? #f)) ; no ‘check’ target
99 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
100 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
102 "Dnsmasq is a light-weight DNS forwarder and DHCP server. It is designed
103 to provide DNS and, optionally, DHCP to a small network. It can serve the
104 names of local machines which are not in the global DNS. The DHCP server
105 integrates with the DNS server and allows machines with DHCP-allocated
106 addresses to appear in the DNS with names configured either on each host or in
107 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
108 and BOOTP/TFTP for network booting of diskless machines.")
109 ;; Source files only say GPL2 and GPL3 are allowed.
110 (license (list license:gpl2 license:gpl3))))
112 ;; 'bind' is the name of a built-in Guile procedure, which is why we choose a
113 ;; different name here.
114 (define-public isc-bind
121 "https://ftp.isc.org/isc/bind9/" version
122 "/bind-" version ".tar.xz"))
125 "0a1f1wrlbnmq79q6s15fny36ip81malg6wlr8acp7amimsyxjjxg"))))
126 (build-system gnu-build-system)
127 (outputs `("out" "utils"))
129 ;; It would be nice to add GeoIP and gssapi once there are packages.
136 ("python-ply" ,python-ply)))
139 ("pkg-config" ,pkg-config)))
142 (list (string-append "--with-pkcs11="
143 (assoc-ref %build-inputs "p11-kit")))
145 (modify-phases %standard-phases
146 (add-after 'strip 'move-to-utils
150 (let ((target (string-append (assoc-ref %outputs "utils") file))
151 (src (string-append (assoc-ref %outputs "out") file)))
152 (mkdir-p (dirname target))
155 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
156 "/share/man/man1/dig.1"
157 "/share/man/man1/host.1"
158 "/share/man/man1/nslookup.1"
159 "/share/man/man1/nsupdate.1"))
161 ;; When and if guix provides user namespaces for the build process,
162 ;; then the following can be uncommented and the subsequent "force-test"
163 ;; will not be necessary.
165 ;; (add-before 'check 'set-up-loopback
167 ;; (system "bin/tests/system/ifconfig.sh up")))
170 ;; XXX Even ‘make force-test’ tries to create network interfaces
171 ;; and fails. The only working target is the (trivial) fuzz test.
172 (with-directory-excursion "fuzz"
173 (invoke "make" "check"))
175 (synopsis "An implementation of the Domain Name System")
176 (description "BIND is an implementation of the @dfn{Domain Name System}
177 (DNS) protocols for the Internet. It is a reference implementation of those
178 protocols, but it is also production-grade software, suitable for use in
179 high-volume and high-reliability applications. The name BIND stands for
180 \"Berkeley Internet Name Domain\", because the software originated in the early
181 1980s at the University of California at Berkeley.")
182 (home-page "https://www.isc.org/downloads/bind")
183 (license (list license:mpl2.0))))
185 (define-public dnscrypt-proxy
187 (name "dnscrypt-proxy")
192 "https://download.dnscrypt.org/dnscrypt-proxy/"
193 "dnscrypt-proxy-" version ".tar.bz2"))
196 "1dhvklr4dg2vlw108n11xbamacaryyg3dbrg629b76lp7685p7z8"))
197 (modules '((guix build utils)))
199 ;; Delete bundled libltdl. XXX: This package also bundles
200 ;; a modified libevent that cannot currently be removed.
202 (delete-file-recursively "libltdl")
204 (build-system gnu-build-system)
207 (modify-phases %standard-phases
208 (add-after 'unpack 'autoreconf
210 ;; Re-generate build files due to unbundling ltdl.
211 ;; TODO: Prevent generating new libltdl and building it.
212 ;; The system version is still favored and referenced.
213 (invoke "autoreconf" "-vif"))))))
215 `(("pkg-config" ,pkg-config)
216 ("automake" ,automake)
217 ("autoconf" ,autoconf)
218 ("libtool" ,libtool)))
220 `(("libltdl" ,libltdl)
221 ("libsodium" ,libsodium)))
222 (home-page "https://www.dnscrypt.org/")
223 (synopsis "Securely send DNS requests to a remote server")
225 "@command{dnscrypt-proxy} is a tool for securing communications
226 between a client and a DNS resolver. It verifies that responses you get
227 from a DNS provider was actually sent by that provider, and haven't been
228 tampered with. For optimal performance it is recommended to use this as
229 a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
230 can also be used as a normal DNS \"server\". A list of public dnscrypt
231 servers is included, and an up-to-date version is available at
232 @url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
233 (license (list license:isc
234 ;; Libevent and src/ext/queue.h is 3-clause BSD.
237 (define-public dnscrypt-wrapper
239 (name "dnscrypt-wrapper")
244 "https://github.com/cofyc/dnscrypt-wrapper/releases"
245 "/download/v" version "/" name "-v" version ".tar.bz2"))
248 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
249 (build-system gnu-build-system)
251 `(#:make-flags '("CC=gcc")
252 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
255 (modify-phases %standard-phases
256 (add-after 'unpack 'create-configure
258 (invoke "make" "configure"))))))
260 `(("autoconf" ,autoconf)))
262 `(("libevent" ,libevent)
263 ("libsodium" ,libsodium)))
264 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
265 (synopsis "Server-side dnscrypt proxy")
267 "@command{dnscrypt-wrapper} is a tool to expose a name server over
268 the @code{dnscrypt} protocol. It can be used as an endpoint for the
269 @command{dnscrypt-proxy} client to securely tunnel DNS requests between
271 (license (list license:isc
272 ;; Bundled argparse is MIT. TODO: package and unbundle.
274 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
278 (define-public libasr
285 (uri (string-append "https://www.opensmtpd.org/archives/"
286 "libasr-" version ".tar.gz"))
288 (base32 "1d6s8njqhvayx2gp47409sp1fn8m608ws26hr1srfp6i23nnpyqr"))))
289 (build-system gnu-build-system)
292 (modify-phases %standard-phases
293 (add-after 'install 'install-documentation
294 (lambda* (#:key outputs #:allow-other-keys)
295 (let ((out (assoc-ref outputs "out")))
296 (install-file "src/asr_run.3"
297 (string-append out "/share/man/man3"))
300 `(("autoconf" ,autoconf)
301 ("automake" ,automake)
303 ("pkg-config" ,pkg-config)))
304 (home-page "https://www.opensmtpd.org")
305 (synopsis "Asynchronous resolver library by the OpenBSD project")
307 "libasr is a free, simple and portable asynchronous resolver library.
308 It allows to run DNS queries and perform hostname resolutions in a fully
309 asynchronous fashion.")
310 (license (list license:isc
311 license:bsd-2 ; last part of getrrsetbyname_async.c
313 (license:non-copyleft "file://LICENSE") ; includes.h
323 (uri (string-append "https://www.nlnetlabs.nl/downloads/nsd/nsd-"
326 (base32 "0z7j3vwqqj0hh8n5irb2yqwzl45k4sn2wczbq1b1lqv5cxv6vgcy"))))
327 (build-system gnu-build-system)
330 (list "--enable-pie" ; fully benefit from ASLR
333 "--enable-relro-now" ; protect GOT and .dtor areas
334 "--disable-radix-tree"
335 (string-append "--with-libevent="
336 (assoc-ref %build-inputs "libevent"))
337 (string-append "--with-ssl="
338 (assoc-ref %build-inputs "openssl"))
339 "--with-configdir=/etc"
340 "--with-nsd_conf_file=/etc/nsd/nsd.conf"
341 "--with-logfile=/var/log/nsd.log"
342 "--with-pidfile=/var/db/nsd/nsd.pid"
343 "--with-dbfile=/var/db/nsd/nsd.db"
344 "--with-zonesdir=/etc/nsd"
345 "--with-xfrdfile=/var/db/nsd/xfrd.state"
346 "--with-zonelistfile=/var/db/nsd/zone.list")
348 (modify-phases %standard-phases
349 (add-before 'configure 'patch-installation-paths
350 (lambda* (#:key outputs #:allow-other-keys)
351 (let* ((out (assoc-ref outputs "out"))
352 (doc (string-append out "/share/doc/" ,name "-" ,version)))
353 ;; The ‘make install’ target tries to create the parent
354 ;; directories of run-time things like ‘pidfile’ above, and
355 ;; useless empty directories like 'configdir'. Remove such
356 ;; '$(INSTALL)' lines and install the example configuration file
357 ;; in an appropriate location.
358 (substitute* "Makefile.in"
359 ((".*INSTALL.*\\$\\((config|pid|xfr|db)dir" command)
360 (string-append "#" command))
361 (("\\$\\(nsdconfigfile\\)\\.sample" file-name)
362 (string-append doc "/examples/" file-name)))
364 #:tests? #f)) ; no tests
366 `(("libevent" ,libevent)
367 ("openssl" ,openssl)))
368 (home-page "https://www.nlnetlabs.nl/projects/nsd/about/")
369 (synopsis "Authoritative DNS name server")
370 (description "@dfn{NSD}, short for Name Server Daemon, is an authoritative
371 name server for the Domain Name System (@dfn{DNS}). It aims to be a fast and
372 RFC-compliant nameserver.
374 NSD uses zone information compiled via @command{zonec} into a binary database
375 file (@file{nsd.db}). This allows fast startup of the name service daemon and
376 allows syntax-structural errors in zone files to be flagged at compile time,
377 before being made available to NSD service itself. However, most traditional
378 BIND-style zone files can be directly imported into NSD without modification.
380 The collection of programs and processes that make up NSD are designed so that
381 the daemon itself runs as a non-privileged user and can be easily configured to
382 run in a @code{chroot} jail, thus making any security flaws in NSD less likely
383 to result in system-wide compromise.")
384 (license (list license:bsd-3))))
386 (define-public unbound
393 (uri (string-append "https://www.unbound.net/downloads/unbound-"
396 (base32 "0mg9divpysr42sp0m693a70693dp8025v6c9dv1yabr4g1jlhbqm"))))
397 (build-system gnu-build-system)
398 (outputs '("out" "python"))
404 ("libevent" ,libevent)
405 ("protobuf" ,protobuf)
406 ("python-wrapper" ,python-wrapper)
407 ("openssl" ,openssl)))
410 (list "--disable-static" ; save space and non-determinism in libunbound.a
412 "--with-ssl=" (assoc-ref %build-inputs "openssl"))
414 "--with-libevent=" (assoc-ref %build-inputs "libevent"))
416 "--with-libexpat=" (assoc-ref %build-inputs "expat"))
417 "--with-pythonmodule" "--with-pyunbound")
419 (modify-phases %standard-phases
420 (add-after 'configure 'fix-python-site-package-path
421 ;; Move python modules into their own output.
422 (lambda* (#:key outputs #:allow-other-keys)
423 (let ((pyout (assoc-ref outputs "python"))
424 (ver ,(version-major+minor (package-version python))))
425 (substitute* "Makefile"
426 (("^PYTHON_SITE_PKG=.*$")
429 pyout "/lib/python-" ver "/site-packages\n"))))
431 (add-before 'check 'fix-missing-nss-for-tests
432 ;; Unfortunately, the package's unittests involve some checks
433 ;; looking up protocols and services which are not provided
434 ;; by the minimalistic build environment, in particular,
435 ;; /etc/protocols and /etc/services are missing.
436 ;; Also, after plain substitution of protocol and service names
437 ;; in the test data, the tests still fail because the
438 ;; corresponding Resource Records have been signed by
440 ;; The following LD_PRELOAD library overwrites the glibc
441 ;; functions ‘get{proto,serv}byname’, ‘getprotobynumber’ and
442 ;; ‘getservbyport’ providing the few records required for the
443 ;; unit tests to pass.
444 (lambda* (#:key inputs outputs #:allow-other-keys)
445 (let* ((source (assoc-ref %build-inputs "source"))
446 (gcc (assoc-ref %build-inputs "gcc")))
447 (call-with-output-file "/tmp/nss_preload.c"
449 (display "#include <stdlib.h>
455 struct protoent *getprotobyname(const char *name) {
456 struct protoent *p = malloc(sizeof(struct protoent));
457 p->p_aliases = malloc(sizeof(char*));
458 if (strcasecmp(name, \"tcp\") == 0) {
461 p->p_aliases[0] = \"TCP\";
462 } else if (strcasecmp(name, \"udp\") == 0) {
465 p->p_aliases[0] = \"UDP\";
471 struct protoent *getprotobynumber(int proto) {
472 struct protoent *p = malloc(sizeof(struct protoent));
473 p->p_aliases = malloc(sizeof(char*));
478 p->p_aliases[0] = \"TCP\";
483 p->p_aliases[0] = \"UDP\";
492 struct servent *getservbyname(const char *name, const char *proto) {
493 struct servent *s = malloc(sizeof(struct servent));
494 char* buf = malloc((strlen(proto)+1)*sizeof(char));
496 s->s_aliases = malloc(sizeof(char*));
497 s->s_aliases[0] = NULL;
498 if (strcasecmp(name, \"domain\") == 0) {
499 s->s_name = \"domain\";
500 s->s_port = htons(53);
507 struct servent *getservbyport(int port, const char *proto) {
509 struct servent *s = malloc(sizeof(struct servent));
511 s->s_aliases = malloc(sizeof(char*));
512 s->s_aliases[0] = NULL;
515 s->s_name = \"domain\";
517 s->s_proto = \"udp\";
525 (invoke (string-append gcc "/bin/gcc")
526 "-shared" "-fPIC" "-o" "/tmp/nss_preload.so"
527 "/tmp/nss_preload.c")
528 ;; The preload library only affects the unittests.
529 (substitute* "Makefile"
531 "LD_PRELOAD=/tmp/nss_preload.so ./unittest")))
533 (home-page "https://www.unbound.net")
534 (synopsis "Validating, recursive, and caching DNS resolver")
536 "Unbound is a recursive-only caching DNS server which can perform DNSSEC
537 validation of results. It implements only a minimal amount of authoritative
538 service to prevent leakage to the root nameservers: forward lookups for
539 localhost, reverse for @code{127.0.0.1} and @code{::1}, and NXDOMAIN for zones
540 served by AS112. Stub and forward zones are supported.")
541 (license license:bsd-4)))
543 (define-public yadifa
548 (let ((build "8497"))
552 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
553 "yadifa-" version "-" build ".tar.gz"))
555 (base32 "0xvyr91sfgzkpw6g3h893ldbwnki3w2472n56rr18w67qghs1sa5")))))
556 (build-system gnu-build-system)
560 `(("openssl" ,openssl)))
563 (modify-phases %standard-phases
564 (add-before 'configure 'omit-example-configurations
566 (substitute* "Makefile.in"
570 (list "--sysconfdir=/etc"
571 "--localstatedir=/var"
572 "--disable-build-timestamp" ; build reproducibly
577 "--enable-ctrl" ; enable remote control
581 (home-page "https://www.yadifa.eu/")
582 (synopsis "Authoritative DNS name server")
583 (description "YADIFA is an authoritative name server for the @dfn{Domain
584 Name System} (DNS). It aims for both higher performance and a smaller memory
585 footprint than other implementations, while remaining fully RFC-compliant.
586 YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
587 Extensions} (DNSSEC).")
588 (license license:bsd-3)))
597 (uri (string-append "https://secure.nic.cz/files/knot-dns/"
598 "knot-" version ".tar.xz"))
600 (base32 "0zm0642hkb16sqkqpa84f89f3s0bw44m837r1nia8m89swvz3bgj"))
601 (modules '((guix build utils)))
604 ;; Delete bundled libraries.
605 (with-directory-excursion "src/contrib"
606 (delete-file-recursively "lmdb"))
608 (build-system gnu-build-system)
610 `(("pkg-config" ,pkg-config)))
615 ("libcap-ng" ,libcap-ng)
621 ("protobuf-c" ,protobuf-c)))
624 (modify-phases %standard-phases
625 (add-before 'configure 'disable-directory-pre-creation
627 ;; Don't install empty directories like ‘/etc’ outside the store.
628 ;; This is needed even when using ‘make config_dir=... install’.
629 (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
632 (lambda* (#:key outputs #:allow-other-keys)
633 (let* ((out (assoc-ref outputs "out"))
634 (doc (string-append out "/share/doc/" ,name "-" ,version))
635 (etc (string-append doc "/examples/etc")))
637 (string-append "config_dir=" etc)
640 (list "--sysconfdir=/etc"
641 "--localstatedir=/var"
642 "--enable-dnstap" ; let tools read/write capture files
643 "--with-module-dnstap=yes" ; detailed query capturing & logging
644 (string-append "--with-bash-completions="
645 (assoc-ref %outputs "out")
646 "/etc/bash_completion.d"))))
647 (home-page "https://www.knot-dns.cz/")
648 (synopsis "Authoritative DNS name server")
649 (description "Knot DNS is an authoritative name server for the @dfn{Domain
650 Name System} (DNS), designed to meet the needs of root and @dfn{top-level
651 domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
652 number of programming techniques to improve speed. For example, the responder
653 is completely lock-free, resulting in a very high response rate. Other features
654 include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
655 synthesis, and on-the-fly re-configuration.")
658 ;; src/contrib/{hat-trie,murmurhash3,openbsd},
659 ;; src/dnssec/contrib/vpool.[ch], and parts of libtap/ are ‘MIT’ (expat).
661 license:lgpl2.0+ ; parts of scr/contrib/ucw
662 license:public-domain ; src/contrib/fnv and possibly murmurhash3
663 license:gpl3+)))) ; everything else
665 (define-public knot-resolver
667 (name "knot-resolver")
671 (uri (string-append "https://secure.nic.cz/files/knot-resolver/"
672 "knot-resolver-" version ".tar.xz"))
675 "09ffmqx79lv5psr433x4n946njgsn071b9b7161pcb9bmrqz380c"))))
676 (build-system meson-build-system)
678 '(#:configure-flags '("-Ddoc=enabled")
680 (modify-phases %standard-phases
681 (add-before 'configure 'disable-default-ta
683 ;; Disable the default managed root TA, since we don't have
684 ;; write access to the keyfile and its directory in store.
685 (substitute* "daemon/lua/sandbox.lua.in"
686 (("^trust_anchors\\.add_file.*") ""))
688 (add-after 'build 'build-doc
690 (invoke "ninja" "doc")))
691 (add-after 'install 'wrap-binary
692 (lambda* (#:key inputs outputs #:allow-other-keys)
693 (let* ((out (assoc-ref outputs "out"))
694 (lua-* (map cdr (filter
696 (string-prefix? "lua-" (car input)))
698 (lua-path (lambda (p)
699 (string-append p "/share/lua/5.1/?.lua")))
700 (lua-cpath (lambda (p)
701 (string-append p "/lib/lua/5.1/?.so"))))
702 (wrap-program (string-append out "/sbin/kresd")
703 `("LUA_PATH" ";" prefix ,(map lua-path lua-*))
704 `("LUA_CPATH" ";" prefix ,(map lua-cpath lua-*)))
707 `(("cmocka" ,cmocka) ; for unit tests
709 ("protobuf-c" ,protobuf-c)
710 ("pkg-config" ,pkg-config)
711 ("python-breathe" ,python-breathe)
712 ("python-sphinx" ,python-sphinx)
713 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)))
721 ;; TODO: Add optional lua modules: basexx, cqueues and psl.
722 ("lua-bitop" ,lua5.1-bitop)
723 ("lua-filesystem" ,lua5.1-filesystem)
724 ("lua-sec" ,lua5.1-sec)
725 ("lua-socket" ,lua5.1-socket)))
726 (home-page "https://www.knot-resolver.cz/")
727 (synopsis "Caching validating DNS resolver")
729 "Knot Resolver is a caching full resolver implementation written in C and
730 LuaJIT, both a resolver library and a daemon.")
731 (license (list license:gpl3+
732 ;; Some 'contrib' files are under MIT, CC0 and LGPL2.
737 (define-public ddclient
745 (url "https://github.com/ddclient/ddclient.git")
746 (commit (string-append "v" version))))
747 (file-name (git-file-name name version))
749 (base32 "0hf377g4j9r9sac75xp17nk2h58mazswz4vkg4g2gl2yyhvzq91w"))))
750 (build-system trivial-build-system) ; no Makefile.PL
755 `(("inetutils" ,inetutils) ; logger
756 ("net-tools" ,net-tools)
757 ("perl-data-validate-ip" ,perl-data-validate-ip)
758 ("perl-digest-sha1" ,perl-digest-sha1)
759 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
761 `(#:modules ((guix build utils)
766 (use-modules (guix build utils)
769 (setenv "PATH" (string-append
770 (assoc-ref %build-inputs "bash") "/bin" ":"
771 (assoc-ref %build-inputs "perl") "/bin"))
773 ;; Copy the (read-only) source into the (writable) build directory.
774 (copy-recursively (assoc-ref %build-inputs "source") ".")
777 (let* ((out (assoc-ref %outputs "out"))
778 (bin (string-append out "/bin")))
779 (let ((file "ddclient"))
781 (("/usr/bin/perl") (which "perl"))
782 ;; Strictly use ‘/etc/ddclient/ddclient.conf’.
783 (("\\$\\{program\\}\\.conf") "/etc/ddclient/ddclient.conf")
784 (("\\$etc\\$program.conf") "/etc/ddclient/ddclient.conf")
785 ;; Strictly use ‘/var/cache/ddclient/ddclient.cache’
786 (("\\$cachedir\\$program\\.cache")
787 "/var/cache/ddclient/ddclient.cache"))
788 (install-file file bin)
789 (wrap-program (string-append bin "/" file)
792 ,@(map (lambda (input)
795 (string-append store "/bin"))))
801 (((? (cut string-prefix? "perl-" <>) name) . dir)
802 (string-append dir "/lib/perl5/site_perl"))
805 (for-each (cut install-file <> (string-append out
807 (find-files "." "sample.*$"))))))
808 (home-page "https://ddclient.net/")
809 (synopsis "Address updating utility for dynamic DNS services")
810 (description "This package provides a client to update dynamic IP
811 addresses with several dynamic DNS service providers, such as
812 @uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
814 This makes it possible to use a fixed hostname (such as myhost.dyndns.org) to
815 access a machine with a dynamic IP address.
817 The client supports both dynamic and (near) static services, as well as MX
818 record and alternative name management. It caches the address, and only
819 attempts the update when it has changed.")
820 (license license:gpl2+)))
823 ;; There have been no releases yet, hence this commit.
825 (commit "895d89c25d316d18df9d374fe78aae3902bc89fb"))
828 (version (git-version "0.0" revision commit))
832 (url "https://github.com/handshake-org/hnsd")
836 "0704y73sddn24jga9csw4gxyfb3pnrfnk0vdcph84n1h38490l16"))
837 (file-name (git-file-name name version))
838 (modules '((guix build utils)))
841 ;; Delete the bundled copy of libuv.
842 (delete-file-recursively "uv")
843 (substitute* "configure.ac"
844 (("AC_CONFIG_SUBDIRS\\(\\[uv\\]\\)") ""))
845 (substitute* "Makefile.am"
846 (("SUBDIRS = uv") "\n")
847 (("\\$\\(top_builddir\\)/uv/libuv.la") "-luv")
849 ;; Make sure the 'hnsd' binary is installed and
850 ;; dynamically-linked.
851 (("noinst_PROGRAMS") "bin_PROGRAMS")
852 (("hnsd_LDFLAGS = -static") ""))
854 ;; This script tries to chdir to "uv" and doesn't do more
855 ;; than "autoreconf" so remove it.
856 (delete-file "autogen.sh")
858 (build-system gnu-build-system)
860 '(#:configure-flags '("--disable-static"))) ;no need for libhsk.a
862 `(("autoconf" ,autoconf)
863 ("automake" ,automake)
864 ("libtool" ,libtool)))
866 `(("unbound" ,unbound)
868 (home-page "https://www.handshake.org/")
869 (synopsis "Resolver daemon for the Handshake naming protocol")
871 "@command{hnsd} is a @dfn{host name resolver} for the Handshake Naming
872 System (HNS) peer-to-peer network.")
873 (license license:expat))))
875 (define-public libmicrodns
882 (url "https://github.com/videolabs/libmicrodns")
884 (file-name (git-file-name name version))
887 "1xvl9k49ng35wbsqmnjnyqvkyjf8dcq2ywsq3jp3wh0rgmxhq2fh"))))
888 (build-system gnu-build-system)
890 `(("pkg-config" ,pkg-config)
891 ("autoconf" ,autoconf)
892 ("automake" ,automake)
893 ("libtool" ,libtool)))
894 (home-page "https://github.com/videolabs/libmicrodns")
895 (synopsis "Minimal mDNS resolver library")
896 (description "@code{libmicrodns} provides a minimal implementation of a
897 mDNS resolver as well as an announcer. mDNS (Multicast Domain Name System) is
898 a zero-config service that allows one to resolve host names to IP addresses in
900 (license license:lgpl2.1)))
902 (define-public public-suffix-list
903 ;; Mozilla releases the official list here:
905 ;; https://publicsuffix.org/list/public_suffix_list.dat
907 ;; However, Mozilla syncs that file from the GitHub repository periodically,
908 ;; so its contents will change over time. If you update this commit, please
909 ;; make sure that the new commit refers to a list which is identical to the
910 ;; officially published list available from the URL above.
911 (let ((commit "9375b697baddb0827a5995c81bd3c75877a0b35d"))
913 (name "public-suffix-list")
914 (version (git-version "0" "1" commit))
918 (url "https://github.com/publicsuffix/list.git")
920 (file-name (git-file-name name version))
923 "1sm7pni01rnl4ldzi8z8nc4cbgq8nxda9gwc68v0s3ij7jd1jmik"))))
924 (build-system trivial-build-system)
926 `(#:modules ((guix build utils))
929 (use-modules (guix build utils))
930 (let* ((out (assoc-ref %outputs "out"))
931 ;; Install to /share because that is where "read-only
932 ;; architecture-independent data files" should go (see:
933 ;; (standards) Directory Variables). Include the version in
934 ;; the directory name so that if multiple versions are ever
935 ;; installed in the same profile, they will not conflict.
936 (destination (string-append
937 out "/share/public-suffix-list-" ,version))
938 (source (assoc-ref %build-inputs "source")))
939 (with-directory-excursion source
940 (install-file "public_suffix_list.dat" destination)
941 (install-file "LICENSE" destination))
943 (home-page "https://publicsuffix.org/")
944 (synopsis "Database of current and historical DNS suffixes")
945 (description "This is the Public Suffix List maintained by Mozilla. A
946 \"public suffix\" is one under which Internet users can (or historically
947 could) directly register names in the Domain Name System (DNS). Some examples
948 of public suffixes are .com, .co.uk and pvt.k12.ma.us. This is a list of all
949 known public suffixes.")
950 (license license:mpl2.0))))