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 Efraim Flashner <efraim@flashner.co.il>
6 ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
7 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
8 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
11 ;;; This file is part of GNU Guix.
13 ;;; GNU Guix is free software; you can redistribute it and/or modify it
14 ;;; under the terms of the GNU General Public License as published by
15 ;;; the Free Software Foundation; either version 3 of the License, or (at
16 ;;; your option) any later version.
18 ;;; GNU Guix is distributed in the hope that it will be useful, but
19 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;;; GNU General Public License for more details.
23 ;;; You should have received a copy of the GNU General Public License
24 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26 (define-module (gnu packages dns)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages databases)
30 #:use-module (gnu packages crypto)
31 #:use-module (gnu packages groff)
32 #:use-module (gnu packages libevent)
33 #:use-module (gnu packages linux)
34 #:use-module (gnu packages perl)
35 #:use-module (gnu packages pkg-config)
36 #:use-module (gnu packages tls)
37 #:use-module (gnu packages xml)
38 #:use-module ((guix licenses) #:prefix license:)
39 #:use-module (guix packages)
40 #:use-module (guix download)
41 #:use-module (guix build-system gnu))
43 (define-public dnsmasq
50 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
54 "15lzih6671gh9knzpl8mxchiml7z5lfqzr7jm2r0rjhrxs6nk4jb"))))
55 (build-system gnu-build-system)
58 (alist-delete 'configure %standard-phases)
59 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
63 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
64 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
66 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
67 to provide DNS and optionally, DHCP, to a small network. It can serve the
68 names of local machines which are not in the global DNS. The DHCP server
69 integrates with the DNS server and allows machines with DHCP-allocated
70 addresses to appear in the DNS with names configured either in each host or in
71 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
72 and BOOTP/TFTP for network booting of diskless machines.")
73 ;; Source files only say GPL2 and GPL3 are allowed.
74 (license (list license:gpl2 license:gpl3))))
83 "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
87 "11lxkb7d79c75scrs28q4xmr0ii2li69zj1c650al3qxir8yf754"))))
88 (build-system gnu-build-system)
89 (outputs `("out" "utils"))
91 ;; it would be nice to add GeoIP and gssapi once there is package
95 ("p11-kit" ,p11-kit)))
96 (native-inputs `(("perl" ,perl)
97 ("net-tools" ,net-tools)))
100 (list (string-append "--with-openssl="
101 (assoc-ref %build-inputs "openssl"))
102 (string-append "--with-pkcs11="
103 (assoc-ref %build-inputs "p11-kit")))
105 (modify-phases %standard-phases
106 (add-after 'strip 'move-to-utils
110 (let ((target (string-append (assoc-ref %outputs "utils") file))
111 (src (string-append (assoc-ref %outputs "out") file)))
112 (mkdir-p (dirname target))
115 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
116 "/share/man/man1/dig.1"
117 "/share/man/man1/host.1"
118 "/share/man/man1/nslookup.1"
119 "/share/man/man1/nsupdate.1"))))
120 ;; When and if guix provides user namespaces for the build process,
121 ;; then the following can be uncommented and the subsequent "force-test"
122 ;; will not be necessary.
124 ;; (add-before 'check 'set-up-loopback
126 ;; (system "bin/tests/system/ifconfig.sh up")))
129 (zero? (system* "make" "force-test")))))))
130 (synopsis "An implementation of the Domain Name System")
131 (description "BIND is an implementation of the Domain Name System (DNS)
132 protocols for the Internet. It is a reference implementation of those
133 protocols, but it is also production-grade software, suitable for use in
134 high-volume and high-reliability applications. The name BIND stands for
135 \"Berkeley Internet Name Domain\", because the software originated in the early
136 1980s at the University of California at Berkeley.")
137 (home-page "https://www.isc.org/downloads/bind")
138 (license (list license:isc))))
140 (define-public dnscrypt-proxy
142 (name "dnscrypt-proxy")
147 "https://download.dnscrypt.org/dnscrypt-proxy/"
148 "dnscrypt-proxy-" version ".tar.bz2"))
151 "1qw2nib0d5ia8581lbdnjxgn9c7pf2qw8vhpnnh1wjcjj3gpgbqx"))
152 (modules '((guix build utils)))
154 ;; Delete bundled libltdl. XXX: This package also bundles
155 ;; a modified libevent that cannot currently be removed.
156 '(delete-file-recursively "libltdl"))))
157 (build-system gnu-build-system)
160 (modify-phases %standard-phases
161 (add-before 'configure 'autoreconf
163 ;; Re-generate build files due to unbundling ltdl.
164 ;; TODO: Prevent generating new libltdl and building it.
165 ;; The system version is still favored and referenced.
166 (zero? (system* "autoreconf" "-vif")))))))
168 `(("pkg-config" ,pkg-config)
169 ("automake" ,automake)
170 ("autoconf" ,autoconf)
171 ("libtool" ,libtool)))
173 `(("libltdl" ,libltdl)
174 ("libsodium" ,libsodium)))
175 (home-page "https://www.dnscrypt.org/")
176 (synopsis "Securely send DNS requests to a remote server")
178 "@command{dnscrypt-proxy} is a tool for securing communications
179 between a client and a DNS resolver. It verifies that responses you get
180 from a DNS provider was actually sent by that provider, and haven't been
181 tampered with. For optimal performance it is recommended to use this as
182 a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
183 can also be used as a normal DNS \"server\". A list of public dnscrypt
184 servers is included, and an up-to-date version is available at
185 @url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
186 (license (list license:isc
187 ;; Libevent and src/ext/queue.h is 3-clause BSD.
190 (define-public dnscrypt-wrapper
192 (name "dnscrypt-wrapper")
197 "https://github.com/cofyc/dnscrypt-wrapper/releases"
198 "/download/v" version "/" name "-v" version ".tar.bz2"))
201 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
202 (build-system gnu-build-system)
204 `(#:make-flags '("CC=gcc")
205 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
208 (modify-phases %standard-phases
209 (add-before 'configure 'create-configure
211 (zero? (system* "make" "configure")))))))
213 `(("autoconf" ,autoconf)))
215 `(("libevent" ,libevent)
216 ("libsodium" ,libsodium)))
217 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
218 (synopsis "Server-side dnscrypt proxy")
220 "@command{dnscrypt-wrapper} is a tool to expose a name server over
221 the @code{dnscrypt} protocol. It can be used as an endpoint for the
222 @command{dnscrypt-proxy} client to securely tunnel DNS requests between
224 (license (list license:isc
225 ;; Bundled argparse is MIT. TODO: package and unbundle.
227 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
231 (define-public libasr
234 (version "201602131606")
238 (uri (string-append "https://www.opensmtpd.org/archives/"
239 name "-" version ".tar.gz"))
242 "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
243 (build-system gnu-build-system)
245 `(("autoconf" ,autoconf)
246 ("automake" ,automake)
247 ("pkg-config" ,pkg-config)
249 (home-page "https://www.opensmtpd.org")
250 (synopsis "Asynchronous resolver library by the OpenBSD project")
252 "libasr is a free, simple and portable asynchronous resolver library.
253 It allows to run DNS queries and perform hostname resolutions in a fully
254 asynchronous fashion.")
255 (license (list license:isc
256 license:bsd-2 ; last part of getrrsetbyname_async.c
258 (license:non-copyleft "file://LICENSE") ; includes.h
261 (define-public yadifa
264 (version "2.2.1-6281")
268 (uri (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
269 name "-" version ".tar.gz"))
272 "0vj71z7i9lfbnp93k28aplwldp5mfli0kvrbwmha6fjha6kcr910"))))
273 (build-system gnu-build-system)
277 `(("openssl" ,openssl)))
279 `(#:phases (modify-phases %standard-phases
280 (add-before 'configure 'omit-example-configurations
281 (lambda _ (substitute* "Makefile.in"
282 ((" (etc|var)") "")))))
283 #:configure-flags (list "--sysconfdir=/etc" "--localstatedir=/var"
284 "--enable-shared" "--disable-static"
285 "--enable-messages" "--enable-ctrl"
286 ;; NSID is a rarely-used debugging aid, that also
287 ;; causes the build to fail. Just disable it.
289 (home-page "http://www.yadifa.eu/")
290 (synopsis "Authoritative DNS name server")
291 (description "YADIFA is an authorative name server for the Domain Name
292 System (DNS). It aims for both higher performance and a smaller memory
293 footprint than other implementations, while remaining fully RFC-compliant.
294 YADIFA supports dynamic record updates and the Domain Name System Security
295 Extensions (DNSSEC).")
296 (license license:bsd-3)))