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 glib)
32 #:use-module (gnu packages groff)
33 #:use-module (gnu packages libevent)
34 #:use-module (gnu packages linux)
35 #:use-module (gnu packages perl)
36 #:use-module (gnu packages pkg-config)
37 #:use-module (gnu packages tls)
38 #:use-module (gnu packages xml)
39 #:use-module ((guix licenses) #:prefix license:)
40 #:use-module (guix packages)
41 #:use-module (guix download)
42 #:use-module (guix build-system gnu))
44 (define-public dnsmasq
51 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
55 "15lzih6671gh9knzpl8mxchiml7z5lfqzr7jm2r0rjhrxs6nk4jb"))))
56 (build-system gnu-build-system)
58 `(("pkg-config" ,pkg-config)))
63 (alist-delete 'configure %standard-phases)
64 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
66 "COPTS=\"-DHAVE_DBUS\"")
69 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
70 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
72 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
73 to provide DNS and optionally, DHCP, to a small network. It can serve the
74 names of local machines which are not in the global DNS. The DHCP server
75 integrates with the DNS server and allows machines with DHCP-allocated
76 addresses to appear in the DNS with names configured either in each host or in
77 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
78 and BOOTP/TFTP for network booting of diskless machines.")
79 ;; Source files only say GPL2 and GPL3 are allowed.
80 (license (list license:gpl2 license:gpl3))))
89 "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
93 "0rgffdm0h6dks0np4h9q4kd8nyb3azrdxw2skqnjzd8ws78vzpx1"))))
94 (build-system gnu-build-system)
95 (outputs `("out" "utils"))
97 ;; it would be nice to add GeoIP and gssapi once there is package
101 ("p11-kit" ,p11-kit)))
102 (native-inputs `(("perl" ,perl)
103 ("net-tools" ,net-tools)))
106 (list (string-append "--with-openssl="
107 (assoc-ref %build-inputs "openssl"))
108 (string-append "--with-pkcs11="
109 (assoc-ref %build-inputs "p11-kit")))
111 (modify-phases %standard-phases
112 (add-after 'strip 'move-to-utils
116 (let ((target (string-append (assoc-ref %outputs "utils") file))
117 (src (string-append (assoc-ref %outputs "out") file)))
118 (mkdir-p (dirname target))
121 '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
122 "/share/man/man1/dig.1"
123 "/share/man/man1/host.1"
124 "/share/man/man1/nslookup.1"
125 "/share/man/man1/nsupdate.1"))))
126 ;; When and if guix provides user namespaces for the build process,
127 ;; then the following can be uncommented and the subsequent "force-test"
128 ;; will not be necessary.
130 ;; (add-before 'check 'set-up-loopback
132 ;; (system "bin/tests/system/ifconfig.sh up")))
135 (zero? (system* "make" "force-test")))))))
136 (synopsis "An implementation of the Domain Name System")
137 (description "BIND is an implementation of the Domain Name System (DNS)
138 protocols for the Internet. It is a reference implementation of those
139 protocols, but it is also production-grade software, suitable for use in
140 high-volume and high-reliability applications. The name BIND stands for
141 \"Berkeley Internet Name Domain\", because the software originated in the early
142 1980s at the University of California at Berkeley.")
143 (home-page "https://www.isc.org/downloads/bind")
144 (license (list license:isc))))
146 (define-public dnscrypt-proxy
148 (name "dnscrypt-proxy")
153 "https://download.dnscrypt.org/dnscrypt-proxy/"
154 "dnscrypt-proxy-" version ".tar.bz2"))
157 "07piwsjczamwvdpv1585kg4awqakip51bwsm8nqi6bljww4agx7x"))
158 (modules '((guix build utils)))
160 ;; Delete bundled libltdl. XXX: This package also bundles
161 ;; a modified libevent that cannot currently be removed.
162 '(delete-file-recursively "libltdl"))))
163 (build-system gnu-build-system)
166 (modify-phases %standard-phases
167 (add-before 'configure 'autoreconf
169 ;; Re-generate build files due to unbundling ltdl.
170 ;; TODO: Prevent generating new libltdl and building it.
171 ;; The system version is still favored and referenced.
172 (zero? (system* "autoreconf" "-vif")))))))
174 `(("pkg-config" ,pkg-config)
175 ("automake" ,automake)
176 ("autoconf" ,autoconf)
177 ("libtool" ,libtool)))
179 `(("libltdl" ,libltdl)
180 ("libsodium" ,libsodium)))
181 (home-page "https://www.dnscrypt.org/")
182 (synopsis "Securely send DNS requests to a remote server")
184 "@command{dnscrypt-proxy} is a tool for securing communications
185 between a client and a DNS resolver. It verifies that responses you get
186 from a DNS provider was actually sent by that provider, and haven't been
187 tampered with. For optimal performance it is recommended to use this as
188 a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
189 can also be used as a normal DNS \"server\". A list of public dnscrypt
190 servers is included, and an up-to-date version is available at
191 @url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
192 (license (list license:isc
193 ;; Libevent and src/ext/queue.h is 3-clause BSD.
196 (define-public dnscrypt-wrapper
198 (name "dnscrypt-wrapper")
203 "https://github.com/cofyc/dnscrypt-wrapper/releases"
204 "/download/v" version "/" name "-v" version ".tar.bz2"))
207 "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
208 (build-system gnu-build-system)
210 `(#:make-flags '("CC=gcc")
211 ;; TODO: Tests require ruby-cucumber and ruby-aruba.
214 (modify-phases %standard-phases
215 (add-before 'configure 'create-configure
217 (zero? (system* "make" "configure")))))))
219 `(("autoconf" ,autoconf)))
221 `(("libevent" ,libevent)
222 ("libsodium" ,libsodium)))
223 (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
224 (synopsis "Server-side dnscrypt proxy")
226 "@command{dnscrypt-wrapper} is a tool to expose a name server over
227 the @code{dnscrypt} protocol. It can be used as an endpoint for the
228 @command{dnscrypt-proxy} client to securely tunnel DNS requests between
230 (license (list license:isc
231 ;; Bundled argparse is MIT. TODO: package and unbundle.
233 ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
237 (define-public libasr
240 (version "201602131606")
244 (uri (string-append "https://www.opensmtpd.org/archives/"
245 name "-" version ".tar.gz"))
248 "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
249 (build-system gnu-build-system)
251 `(("autoconf" ,autoconf)
252 ("automake" ,automake)
253 ("pkg-config" ,pkg-config)
255 (home-page "https://www.opensmtpd.org")
256 (synopsis "Asynchronous resolver library by the OpenBSD project")
258 "libasr is a free, simple and portable asynchronous resolver library.
259 It allows to run DNS queries and perform hostname resolutions in a fully
260 asynchronous fashion.")
261 (license (list license:isc
262 license:bsd-2 ; last part of getrrsetbyname_async.c
264 (license:non-copyleft "file://LICENSE") ; includes.h
267 (define-public yadifa
272 (let ((revision "6711"))
276 (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
277 name "-" version "-" revision ".tar.gz"))
280 "0ikfm40gx0zjw3gnxsw3rn1k4wb8jacgklja3ygcj1knq6hy2zaa")))))
281 (build-system gnu-build-system)
285 `(("openssl" ,openssl)))
287 `(#:phases (modify-phases %standard-phases
288 (add-before 'configure 'omit-example-configurations
289 (lambda _ (substitute* "Makefile.in"
290 ((" (etc|var)") "")))))
291 #:configure-flags (list "--sysconfdir=/etc" "--localstatedir=/var"
292 "--enable-shared" "--disable-static"
293 "--enable-messages" "--enable-ctrl"
294 "--enable-nsec" "--enable-nsec3"
295 "--enable-tsig" "--enable-caching"
296 ;; NSID is a rarely-used debugging aid, that also
297 ;; causes the build to fail. Just disable it.
299 (home-page "http://www.yadifa.eu/")
300 (synopsis "Authoritative DNS name server")
301 (description "YADIFA is an authorative name server for the Domain Name
302 System (DNS). It aims for both higher performance and a smaller memory
303 footprint than other implementations, while remaining fully RFC-compliant.
304 YADIFA supports dynamic record updates and the Domain Name System Security
305 Extensions (DNSSEC).")
306 (license license:bsd-3)))