gnu: Rename module gnutls to tls.
[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 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages dns)
20 #:use-module (gnu packages databases)
21 #:use-module (gnu packages linux)
22 #:use-module (gnu packages openssl)
23 #:use-module (gnu packages perl)
24 #:use-module (gnu packages tls)
25 #:use-module (gnu packages xml)
26 #:use-module ((guix licenses) #:prefix license:)
27 #:use-module (guix packages)
28 #:use-module (guix download)
29 #:use-module (guix build-system gnu))
30
31 (define-public dnsmasq
32 (package
33 (name "dnsmasq")
34 (version "2.72")
35 (source (origin
36 (method url-fetch)
37 (uri (string-append
38 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
39 version ".tar.xz"))
40 (sha256
41 (base32
42 "1c80hq09hfm8cp5pirfb8wdlc7dqkp7zzmbmdaradcvlblzx42vx"))))
43 (build-system gnu-build-system)
44 (arguments
45 `(#:phases
46 (alist-delete 'configure %standard-phases)
47 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
48 "CC=gcc")
49 ;; No 'check' target.
50 #:tests? #f))
51 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
52 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
53 (description
54 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
55 to provide DNS and optionally, DHCP, to a small network. It can serve the
56 names of local machines which are not in the global DNS. The DHCP server
57 integrates with the DNS server and allows machines with DHCP-allocated
58 addresses to appear in the DNS with names configured either in each host or in
59 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
60 and BOOTP/TFTP for network booting of diskless machines.")
61 ;; Source files only say GPL2 and GPL3 are allowed.
62 (license (list license:gpl2 license:gpl3))))
63
64 (define-public bind-utils
65 (package
66 (name "bind-utils")
67 (version "9.10.1-P2")
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "ftp://ftp.isc.org/isc/bind9/" version
71 "/bind-" version ".tar.gz"))
72 (sha256
73 (base32
74 "1svzia5vv0s4bv6r04j8bsvlf3klwyigmdz1iwb4fqds00iyvp22"))))
75 (build-system gnu-build-system)
76 (inputs
77 ;; it would be nice to add GeoIP and gssapi once there is package
78 `(("libcap" ,libcap)
79 ("libxml2" ,libxml2)
80 ("mysql" ,mysql)
81 ("openssl" ,openssl)
82 ("perl" ,perl)
83 ("p11-kit" ,p11-kit)))
84 (arguments
85 `(#:tests? #f ; no test phase implemented
86 #:configure-flags
87 (list (string-append "--with-openssl="
88 (assoc-ref %build-inputs "openssl"))
89 (string-append "--with-dlz-mysql="
90 (assoc-ref %build-inputs "mysql"))
91 (string-append "--with-pkcs11="
92 (assoc-ref %build-inputs "p11-kit")))
93 #:phases
94 (alist-replace
95 'build
96 (lambda _
97 (and (zero? (system* "make" "-C" "lib/dns"))
98 (zero? (system* "make" "-C" "lib/isc"))
99 (zero? (system* "make" "-C" "lib/bind9"))
100 (zero? (system* "make" "-C" "lib/isccfg"))
101 (zero? (system* "make" "-C" "lib/lwres"))
102 (zero? (system* "make" "-C" "bin/dig"))))
103 (alist-replace
104 'install
105 (lambda _ (zero? (system* "make" "-C" "bin/dig" "install")))
106 %standard-phases))))
107 (home-page "https://www.isc.org/downloads/bind/")
108 (synopsis "Tools for querying nameservers")
109 (description
110 "These tools, included with ISC BIND, are useful for analysis of DNS
111 issues or verification of configuration.")
112 (license (list license:isc))))