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 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 databases)
38 #:use-module (gnu packages compression)
39 #:use-module (gnu packages crypto)
40 #:use-module (gnu packages datastructures)
41 #:use-module (gnu packages flex)
42 #:use-module (gnu packages glib)
43 #:use-module (gnu packages groff)
44 #:use-module (gnu packages groff)
45 #:use-module (gnu packages libedit)
46 #:use-module (gnu packages libevent)
47 #:use-module (gnu packages libidn)
48 #:use-module (gnu packages linux)
49 #:use-module (gnu packages ncurses)
50 #:use-module (gnu packages nettle)
51 #:use-module (gnu packages networking)
52 #:use-module (gnu packages perl)
53 #:use-module (gnu packages pkg-config)
54 #:use-module (gnu packages protobuf)
55 #:use-module (gnu packages python)
56 #:use-module (gnu packages python-xyz)
57 #:use-module (gnu packages swig)
58 #:use-module (gnu packages tls)
59 #:use-module (gnu packages web)
60 #:use-module (gnu packages xml)
61 #:use-module (gnu packages)
62 #:use-module ((guix licenses) #:prefix license:)
63 #:use-module (guix packages)
64 #:use-module (guix download)
65 #:use-module (guix git-download)
66 #:use-module (guix utils)
67 #:use-module (guix build-system gnu)
68 #:use-module (guix build-system trivial))
70 (define-public dnsmasq
77 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
81 "1fv3g8vikj3sn37x1j6qsywn09w1jipvlv34j3q5qrljbrwa5ayd"))))
82 (build-system gnu-build-system)
84 `(("pkg-config" ,pkg-config)))
89 (modify-phases %standard-phases (delete 'configure))
90 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
92 "COPTS=\"-DHAVE_DBUS\"")
93 #:tests? #f)) ; no ‘check’ target
94 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
95 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
97 "Dnsmasq is a light-weight DNS forwarder and DHCP server. It is designed
98 to provide DNS and, optionally, DHCP to a small network. It can serve the
99 names of local machines which are not in the global DNS. The DHCP server
100 integrates with the DNS server and allows machines with DHCP-allocated
101 addresses to appear in the DNS with names configured either on each host or in
102 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
103 and BOOTP/TFTP for network booting of diskless machines.")
104 ;; Source files only say GPL2 and GPL3 are allowed.
105 (license (list license:gpl2 license:gpl3))))
107 ;; 'bind' is the name of a built-in Guile procedure, which is why we choose a
108 ;; different name here.
109 (define-public isc-bind
116 "https://ftp.isc.org/isc/bind9/" version
117 "/bind-" version ".tar.gz"))
120 "0ic0k0kpavwnbyf10rwx6yypxg66f65fprwc0dbmp61xp0n6gl0j"))))
121 (build-system gnu-build-system)
122 (outputs `("out" "utils"))
124 ;; It would be nice to add GeoIP and gssapi once there are packages.
130 ("python-ply" ,python-ply)))
131 (native-inputs `(("perl" ,perl)
132 ("net-tools" ,net-tools)))
135 (list (string-append "--with-openssl="
136 (assoc-ref %build-inputs "openssl"))
137 (string-append "--with-pkcs11="
138 (assoc-ref %build-inputs "p11-kit")))
140 (modify-phases %standard-phases
141 (add-after 'strip 'move-to-utils
145 (let ((target (string-append (assoc-ref %outputs "utils") file))
146 (src (string-append (assoc-ref %outputs "out") file)))
147 (mkdir-p (dirname target))
150 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
151 "/share/man/man1/dig.1"
152 "/share/man/man1/host.1"
153 "/share/man/man1/nslookup.1"
154 "/share/man/man1/nsupdate.1"))
156 ;; When and if guix provides user namespaces for the build process,
157 ;; then the following can be uncommented and the subsequent "force-test"
158 ;; will not be necessary.
160 ;; (add-before 'check 'set-up-loopback
162 ;; (system "bin/tests/system/ifconfig.sh up")))
165 ;; XXX Even ‘make force-test’ tries to create network interfaces
166 ;; and fails. The only working target is the (trivial) fuzz test.
167 (with-directory-excursion "fuzz"
168 (invoke "make" "check"))
170 (synopsis "An implementation of the Domain Name System")
171 (description "BIND is an implementation of the @dfn{Domain Name System}
172 (DNS) protocols for the Internet. It is a reference implementation of those
173 protocols, but it is also production-grade software, suitable for use in
174 high-volume and high-reliability applications. The name BIND stands for
175 \"Berkeley Internet Name Domain\", because the software originated in the early
176 1980s at the University of California at Berkeley.")
177 (home-page "https://www.isc.org/downloads/bind")
178 (license (list license:mpl2.0))))
180 (define-public dnscrypt-proxy
182 (name "dnscrypt-proxy")
187 "https://download.dnscrypt.org/dnscrypt-proxy/"
188 "dnscrypt-proxy-" version ".tar.bz2"))
191 "1dhvklr4dg2vlw108n11xbamacaryyg3dbrg629b76lp7685p7z8"))
192 (modules '((guix build utils)))
194 ;; Delete bundled libltdl. XXX: This package also bundles
195 ;; a modified libevent that cannot currently be removed.
197 (delete-file-recursively "libltdl")
199 (build-system gnu-build-system)
202 (modify-phases %standard-phases
203 (add-after 'unpack 'autoreconf
205 ;; Re-generate build files due to unbundling ltdl.
206 ;; TODO: Prevent generating new libltdl and building it.
207 ;; The system version is still favored and referenced.
208 (invoke "autoreconf" "-vif"))))))
210 `(("pkg-config" ,pkg-config)
211 ("automake" ,automake)
212 ("autoconf" ,autoconf)
213 ("libtool" ,libtool)))
215 `(("libltdl" ,libltdl)
216 ("libsodium" ,libsodium)))
217 (home-page "https://www.dnscrypt.org/")
218 (synopsis "Securely send DNS requests to a remote server")
220 "@command{dnscrypt-proxy} is a tool for securing communications
221 between a client and a DNS resolver. It verifies that responses you get
222 from a DNS provider was actually sent by that provider, and haven't been
223 tampered with. For optimal performance it is recommended to use this as
224 a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
225 can also be used as a normal DNS \"server\". A list of public dnscrypt
226 servers is included, and an up-to-date version is available at
227 @url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
228 (license (list license:isc
229 ;; Libevent and src/ext/queue.h is 3-clause BSD.
232 (define-public dnscrypt-wrapper
234 (name "dnscrypt-wrapper")
239 "https://github.com/cofyc/dnscrypt-wrapper/releases"
240 "/download/v" version "/" name "-v" version ".tar.bz2"))
243 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
244 (build-system gnu-build-system)
246 `(#:make-flags '("CC=gcc")
247 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
250 (modify-phases %standard-phases
251 (add-after 'unpack 'create-configure
253 (invoke "make" "configure"))))))
255 `(("autoconf" ,autoconf)))
257 `(("libevent" ,libevent)
258 ("libsodium" ,libsodium)))
259 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
260 (synopsis "Server-side dnscrypt proxy")
262 "@command{dnscrypt-wrapper} is a tool to expose a name server over
263 the @code{dnscrypt} protocol. It can be used as an endpoint for the
264 @command{dnscrypt-proxy} client to securely tunnel DNS requests between
266 (license (list license:isc
267 ;; Bundled argparse is MIT. TODO: package and unbundle.
269 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
273 (define-public libasr
276 (version "201602131606")
280 (uri (string-append "https://www.opensmtpd.org/archives/"
281 name "-" version ".tar.gz"))
284 "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
285 (build-system gnu-build-system)
287 `(("autoconf" ,autoconf)
288 ("automake" ,automake)
289 ("pkg-config" ,pkg-config)
291 (home-page "https://www.opensmtpd.org")
292 (synopsis "Asynchronous resolver library by the OpenBSD project")
294 "libasr is a free, simple and portable asynchronous resolver library.
295 It allows to run DNS queries and perform hostname resolutions in a fully
296 asynchronous fashion.")
297 (license (list license:isc
298 license:bsd-2 ; last part of getrrsetbyname_async.c
300 (license:non-copyleft "file://LICENSE") ; includes.h
310 (uri (string-append "https://www.nlnetlabs.nl/downloads/nsd/nsd-"
313 (base32 "1ys608jyp5scc957q4brm094c97sxlwymina7d2nvzi51aa37cw3"))))
314 (build-system gnu-build-system)
317 (list "--enable-pie" ; fully benefit from ASLR
320 "--enable-relro-now" ; protect GOT and .dtor areas
321 "--disable-radix-tree"
322 (string-append "--with-libevent="
323 (assoc-ref %build-inputs "libevent"))
324 (string-append "--with-ssl="
325 (assoc-ref %build-inputs "openssl"))
326 "--with-configdir=/etc"
327 "--with-nsd_conf_file=/etc/nsd/nsd.conf"
328 "--with-logfile=/var/log/nsd.log"
329 "--with-pidfile=/var/db/nsd/nsd.pid"
330 "--with-dbfile=/var/db/nsd/nsd.db"
331 "--with-zonesdir=/etc/nsd"
332 "--with-xfrdfile=/var/db/nsd/xfrd.state"
333 "--with-zonelistfile=/var/db/nsd/zone.list")
335 (modify-phases %standard-phases
336 (add-before 'configure 'patch-installation-paths
337 (lambda* (#:key outputs #:allow-other-keys)
338 (let* ((out (assoc-ref outputs "out"))
339 (doc (string-append out "/share/doc/" ,name "-" ,version)))
340 ;; The ‘make install’ target tries to create the parent
341 ;; directories of run-time things like ‘pidfile’ above, and
342 ;; useless empty directories like 'configdir'. Remove such
343 ;; '$(INSTALL)' lines and install the example configuration file
344 ;; in an appropriate location.
345 (substitute* "Makefile.in"
346 ((".*INSTALL.*\\$\\((config|pid|xfr|db)dir" command)
347 (string-append "#" command))
348 (("\\$\\(nsdconfigfile\\)\\.sample" file-name)
349 (string-append doc "/examples/" file-name)))
351 #:tests? #f)) ; no tests
353 `(("libevent" ,libevent)
354 ("openssl" ,openssl)))
355 (home-page "https://www.nlnetlabs.nl/projects/nsd/about/")
356 (synopsis "Authoritative DNS name server")
357 (description "@dfn{NSD}, short for Name Server Daemon, is an authoritative
358 name server for the Domain Name System (@dfn{DNS}). It aims to be a fast and
359 RFC-compliant nameserver.
361 NSD uses zone information compiled via @command{zonec} into a binary database
362 file (@file{nsd.db}). This allows fast startup of the name service daemon and
363 allows syntax-structural errors in zone files to be flagged at compile time,
364 before being made available to NSD service itself. However, most traditional
365 BIND-style zone files can be directly imported into NSD without modification.
367 The collection of programs and processes that make up NSD are designed so that
368 the daemon itself runs as a non-privileged user and can be easily configured to
369 run in a @code{chroot} jail, thus making any security flaws in NSD less likely
370 to result in system-wide compromise.")
371 (license (list license:bsd-3))))
373 (define-public unbound
380 (uri (string-append "https://www.unbound.net/downloads/unbound-"
383 (base32 "1ykdy62sgzv33ggkmzwx2h0ifm7hyyxyfkb4zckv7gz4f28xsm8v"))))
384 (build-system gnu-build-system)
385 (outputs '("out" "python"))
391 ("libevent" ,libevent)
392 ("protobuf" ,protobuf)
394 ("python-wrapper" ,python-wrapper)
395 ("openssl" ,openssl)))
398 (list "--disable-static" ; save space and non-determinism in libunbound.a
400 "--with-ssl=" (assoc-ref %build-inputs "openssl"))
402 "--with-libevent=" (assoc-ref %build-inputs "libevent"))
404 "--with-libexpat=" (assoc-ref %build-inputs "expat"))
405 "--with-pythonmodule" "--with-pyunbound")
407 (modify-phases %standard-phases
408 (add-after 'configure 'fix-python-site-package-path
409 ;; Move python modules into their own output.
410 (lambda* (#:key outputs #:allow-other-keys)
411 (let ((pyout (assoc-ref outputs "python"))
412 (ver ,(version-major+minor (package-version python))))
413 (substitute* "Makefile"
414 (("^PYTHON_SITE_PKG=.*$")
417 pyout "/lib/python-" ver "/site-packages\n"))))
419 (add-before 'check 'fix-missing-nss-for-tests
420 ;; Unfortunately, the package's unittests involve some checks
421 ;; looking up protocols and services which are not provided
422 ;; by the minimalistic build environment, in particular,
423 ;; /etc/protocols and /etc/services are missing.
424 ;; Also, after plain substitution of protocol and service names
425 ;; in the test data, the tests still fail because the
426 ;; corresponding Resource Records have been signed by
428 ;; The following LD_PRELOAD library overwrites the glibc
429 ;; functions ‘get{proto,serv}byname’, ‘getprotobynumber’ and
430 ;; ‘getservbyport’ providing the few records required for the
431 ;; unit tests to pass.
432 (lambda* (#:key inputs outputs #:allow-other-keys)
433 (let* ((source (assoc-ref %build-inputs "source"))
434 (gcc (assoc-ref %build-inputs "gcc")))
435 (call-with-output-file "/tmp/nss_preload.c"
437 (display "#include <stdlib.h>
443 struct protoent *getprotobyname(const char *name) {
444 struct protoent *p = malloc(sizeof(struct protoent));
445 p->p_aliases = malloc(sizeof(char*));
446 if (strcasecmp(name, \"tcp\") == 0) {
449 p->p_aliases[0] = \"TCP\";
450 } else if (strcasecmp(name, \"udp\") == 0) {
453 p->p_aliases[0] = \"UDP\";
459 struct protoent *getprotobynumber(int proto) {
460 struct protoent *p = malloc(sizeof(struct protoent));
461 p->p_aliases = malloc(sizeof(char*));
466 p->p_aliases[0] = \"TCP\";
471 p->p_aliases[0] = \"UDP\";
480 struct servent *getservbyname(const char *name, const char *proto) {
481 struct servent *s = malloc(sizeof(struct servent));
482 char* buf = malloc((strlen(proto)+1)*sizeof(char));
484 s->s_aliases = malloc(sizeof(char*));
485 s->s_aliases[0] = NULL;
486 if (strcasecmp(name, \"domain\") == 0) {
487 s->s_name = \"domain\";
488 s->s_port = htons(53);
495 struct servent *getservbyport(int port, const char *proto) {
497 struct servent *s = malloc(sizeof(struct servent));
499 s->s_aliases = malloc(sizeof(char*));
500 s->s_aliases[0] = NULL;
503 s->s_name = \"domain\";
505 s->s_proto = \"udp\";
513 (invoke (string-append gcc "/bin/gcc")
514 "-shared" "-fPIC" "-o" "/tmp/nss_preload.so"
515 "/tmp/nss_preload.c")
516 ;; The preload library only affects the unittests.
517 (substitute* "Makefile"
519 "LD_PRELOAD=/tmp/nss_preload.so ./unittest")))
521 (home-page "https://www.unbound.net")
522 (synopsis "Validating, recursive, and caching DNS resolver")
524 "Unbound is a recursive-only caching DNS server which can perform DNSSEC
525 validation of results. It implements only a minimal amount of authoritative
526 service to prevent leakage to the root nameservers: forward lookups for
527 localhost, reverse for @code{127.0.0.1} and @code{::1}, and NXDOMAIN for zones
528 served by AS112. Stub and forward zones are supported.")
529 (license license:bsd-4)))
531 (define-public yadifa
536 (let ((build "8497"))
540 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
541 "yadifa-" version "-" build ".tar.gz"))
543 (base32 "0xvyr91sfgzkpw6g3h893ldbwnki3w2472n56rr18w67qghs1sa5")))))
544 (build-system gnu-build-system)
548 `(("openssl" ,openssl)))
551 (modify-phases %standard-phases
552 (add-before 'configure 'omit-example-configurations
554 (substitute* "Makefile.in"
558 (list "--sysconfdir=/etc"
559 "--localstatedir=/var"
560 "--disable-build-timestamp" ; build reproducibly
565 "--enable-ctrl" ; enable remote control
569 (home-page "http://www.yadifa.eu/")
570 (synopsis "Authoritative DNS name server")
571 (description "YADIFA is an authoritative name server for the @dfn{Domain
572 Name System} (DNS). It aims for both higher performance and a smaller memory
573 footprint than other implementations, while remaining fully RFC-compliant.
574 YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
575 Extensions} (DNSSEC).")
576 (license license:bsd-3)))
585 (uri (string-append "https://secure.nic.cz/files/knot-dns/"
586 "knot-" version ".tar.xz"))
588 (base32 "0dx1lp4w33rpa54nns41k4vfdfin6naaskwh132r4qs0l9hl7lh0"))
589 (modules '((guix build utils)))
592 ;; Delete bundled libraries.
593 (with-directory-excursion "src/contrib"
594 (delete-file-recursively "lmdb"))
596 (build-system gnu-build-system)
598 `(("pkg-config" ,pkg-config)))
603 ("libcap-ng" ,libcap-ng)
609 ("protobuf-c" ,protobuf-c)))
612 (modify-phases %standard-phases
613 (add-before 'configure 'disable-directory-pre-creation
615 ;; Don't install empty directories like ‘/etc’ outside the store.
616 ;; This is needed even when using ‘make config_dir=... install’.
617 (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
620 (lambda* (#:key outputs #:allow-other-keys)
621 (let* ((out (assoc-ref outputs "out"))
622 (doc (string-append out "/share/doc/" ,name "-" ,version))
623 (etc (string-append doc "/examples/etc")))
625 (string-append "config_dir=" etc)
628 (list "--sysconfdir=/etc"
629 "--localstatedir=/var"
630 "--enable-dnstap" ; let tools read/write capture files
631 "--with-module-dnstap=yes" ; detailed query capturing & logging
632 (string-append "--with-bash-completions="
633 (assoc-ref %outputs "out")
634 "/etc/bash_completion.d"))))
635 (home-page "https://www.knot-dns.cz/")
636 (synopsis "Authoritative DNS name server")
637 (description "Knot DNS is an authoritative name server for the @dfn{Domain
638 Name System} (DNS), designed to meet the needs of root and @dfn{top-level
639 domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
640 number of programming techniques to improve speed. For example, the responder
641 is completely lock-free, resulting in a very high response rate. Other features
642 include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
643 synthesis, and on-the-fly re-configuration.")
646 ;; src/contrib/{hat-trie,murmurhash3,openbsd},
647 ;; src/dnssec/contrib/vpool.[ch], and parts of libtap/ are ‘MIT’ (expat).
649 license:lgpl2.0+ ; parts of scr/contrib/ucw
650 license:public-domain ; src/contrib/fnv and possibly murmurhash3
651 license:gpl3+)))) ; everything else
653 (define-public ddclient
659 (uri (string-append "mirror://sourceforge/ddclient/ddclient/ddclient-"
660 version "/ddclient-" version ".tar.gz"))
663 "0fwyhab8yga2yi1kdfkbqxa83wxhwpagmj1w1mwkg2iffh1fjjlw"))))
664 (build-system trivial-build-system) ; no Makefile.PL
671 `(("inetutils" ,inetutils) ; logger
672 ("net-tools" ,net-tools)
673 ("perl-data-validate-ip" ,perl-data-validate-ip)
674 ("perl-digest-sha1" ,perl-digest-sha1)
675 ("perl-io-socket-ssl" ,perl-io-socket-ssl)))
677 `(#:modules ((guix build utils)
682 (use-modules (guix build utils)
686 (setenv "PATH" (string-append
687 (assoc-ref %build-inputs "bash") "/bin" ":"
688 (assoc-ref %build-inputs "tar") "/bin" ":"
689 (assoc-ref %build-inputs "gzip") "/bin" ":"
690 (assoc-ref %build-inputs "perl") "/bin"))
692 (invoke "tar" "xvf" (assoc-ref %build-inputs "source"))
694 (with-directory-excursion (string-append ,name "-" ,version)
695 (let* ((out (assoc-ref %outputs "out"))
696 (bin (string-append out "/bin")))
697 (let ((file "ddclient"))
699 (("/usr/bin/perl") (which "perl"))
700 ;; Strictly use ‘/etc/ddclient/ddclient.conf’.
701 (("\\$\\{program\\}\\.conf") "/etc/ddclient/ddclient.conf")
702 (("\\$etc\\$program.conf") "/etc/ddclient/ddclient.conf")
703 ;; Strictly use ‘/var/cache/ddclient/ddclient.cache’
704 (("\\$cachedir\\$program\\.cache")
705 "/var/cache/ddclient/ddclient.cache"))
706 (install-file file bin)
707 (wrap-program (string-append bin "/" file)
710 ,@(map (lambda (input)
713 (string-append store "/bin"))))
719 (((? (cut string-prefix? "perl-" <>) name) . dir)
720 (string-append dir "/lib/perl5/site_perl"))
723 (for-each (cut install-file <> (string-append out
725 (find-files "." "sample.*$")))))))
726 (home-page "https://sourceforge.net/projects/ddclient/")
727 (synopsis "Address updating utility for dynamic DNS services")
728 (description "This package provides a client to update dynamic IP
729 addresses with several dynamic DNS service providers, such as
730 @uref{https://www.dyndns.com/account/login.html,DynDNS.com}.
732 This makes it possible to use a fixed hostname (such as myhost.dyndns.org) to
733 access a machine with a dynamic IP address.
735 The client supports both dynamic and (near) static services, as well as MX
736 record and alternative name management. It caches the address, and only
737 attempts the update when it has changed.")
738 (license license:gpl2+)))
741 ;; There have been no releases yet, hence this commit.
743 (commit "895d89c25d316d18df9d374fe78aae3902bc89fb"))
746 (version (git-version "0.0" revision commit))
750 (url "https://github.com/handshake-org/hnsd")
754 "0704y73sddn24jga9csw4gxyfb3pnrfnk0vdcph84n1h38490l16"))
755 (file-name (git-file-name name version))
756 (modules '((guix build utils)))
759 ;; Delete the bundled copy of libuv.
760 (delete-file-recursively "uv")
761 (substitute* "configure.ac"
762 (("AC_CONFIG_SUBDIRS\\(\\[uv\\]\\)") ""))
763 (substitute* "Makefile.am"
764 (("SUBDIRS = uv") "\n")
765 (("\\$\\(top_builddir\\)/uv/libuv.la") "-luv")
767 ;; Make sure the 'hnsd' binary is installed and
768 ;; dynamically-linked.
769 (("noinst_PROGRAMS") "bin_PROGRAMS")
770 (("hnsd_LDFLAGS = -static") ""))
772 ;; This script tries to chdir to "uv" and doesn't do more
773 ;; than "autoreconf" so remove it.
774 (delete-file "autogen.sh")
776 (build-system gnu-build-system)
778 '(#:configure-flags '("--disable-static"))) ;no need for libhsk.a
780 `(("autoconf" ,autoconf)
781 ("automake" ,automake)
782 ("libtool" ,libtool)))
784 `(("unbound" ,unbound)
786 (home-page "https://www.handshake.org/")
787 (synopsis "Resolver daemon for the Handshake naming protocol")
789 "@command{hnsd} is a @dfn{host name resolver} for the Handshake Naming
790 System (HNS) peer-to-peer network.")
791 (license license:expat))))
793 (define-public libmicrodns
800 (url "https://github.com/videolabs/libmicrodns")
802 (file-name (git-file-name name version))
805 "1xvl9k49ng35wbsqmnjnyqvkyjf8dcq2ywsq3jp3wh0rgmxhq2fh"))))
806 (build-system gnu-build-system)
808 `(("pkg-config" ,pkg-config)
809 ("autoconf" ,autoconf)
810 ("automake" ,automake)
811 ("libtool" ,libtool)))
812 (home-page "https://github.com/videolabs/libmicrodns")
813 (synopsis "Minimal mDNS resolver library")
814 (description "@code{libmicrodns} provides a minimal implementation of a
815 mDNS resolver as well as an announcer. mDNS (Multicast Domain Name System) is
816 a zero-config service that allows one to resolve host names to IP addresses in
818 (license license:lgpl2.1)))
820 (define-public public-suffix-list
821 ;; Mozilla releases the official list here:
823 ;; https://publicsuffix.org/list/public_suffix_list.dat
825 ;; However, Mozilla syncs that file from the GitHub repository periodically,
826 ;; so its contents will change over time. If you update this commit, please
827 ;; make sure that the new commit refers to a list which is identical to the
828 ;; officially published list available from the URL above.
829 (let ((commit "9375b697baddb0827a5995c81bd3c75877a0b35d"))
831 (name "public-suffix-list")
832 (version (git-version "0" "1" commit))
836 (url "https://github.com/publicsuffix/list.git")
838 (file-name (git-file-name name version))
841 "1sm7pni01rnl4ldzi8z8nc4cbgq8nxda9gwc68v0s3ij7jd1jmik"))))
842 (build-system trivial-build-system)
844 `(#:modules ((guix build utils))
847 (use-modules (guix build utils))
848 (let* ((out (assoc-ref %outputs "out"))
849 ;; Install to /share because that is where "read-only
850 ;; architecture-independent data files" should go (see:
851 ;; (standards) Directory Variables). Include the version in
852 ;; the directory name so that if multiple versions are ever
853 ;; installed in the same profile, they will not conflict.
854 (destination (string-append
855 out "/share/public-suffix-list-" ,version))
856 (source (assoc-ref %build-inputs "source")))
857 (with-directory-excursion source
858 (install-file "public_suffix_list.dat" destination)
859 (install-file "LICENSE" destination))
861 (home-page "https://publicsuffix.org/")
862 (synopsis "Database of current and historical DNS suffixes")
863 (description "This is the Public Suffix List maintained by Mozilla. A
864 \"public suffix\" is one under which Internet users can (or historically
865 could) directly register names in the Domain Name System (DNS). Some examples
866 of public suffixes are .com, .co.uk and pvt.k12.ma.us. This is a list of all
867 known public suffixes.")
868 (license license:mpl2.0))))