gnu: Move content of openssl module into tls module.
[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 perl)
23 #:use-module (gnu packages tls)
24 #:use-module (gnu packages xml)
25 #:use-module ((guix licenses) #:prefix license:)
26 #:use-module (guix packages)
27 #:use-module (guix download)
28 #:use-module (guix build-system gnu))
29
30 (define-public dnsmasq
31 (package
32 (name "dnsmasq")
33 (version "2.72")
34 (source (origin
35 (method url-fetch)
36 (uri (string-append
37 "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
38 version ".tar.xz"))
39 (sha256
40 (base32
41 "1c80hq09hfm8cp5pirfb8wdlc7dqkp7zzmbmdaradcvlblzx42vx"))))
42 (build-system gnu-build-system)
43 (arguments
44 `(#:phases
45 (alist-delete 'configure %standard-phases)
46 #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
47 "CC=gcc")
48 ;; No 'check' target.
49 #:tests? #f))
50 (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
51 (synopsis "Small caching DNS proxy and DHCP/TFTP server")
52 (description
53 "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
54 to provide DNS and optionally, DHCP, to a small network. It can serve the
55 names of local machines which are not in the global DNS. The DHCP server
56 integrates with the DNS server and allows machines with DHCP-allocated
57 addresses to appear in the DNS with names configured either in each host or in
58 a central configuration file. Dnsmasq supports static and dynamic DHCP leases
59 and BOOTP/TFTP for network booting of diskless machines.")
60 ;; Source files only say GPL2 and GPL3 are allowed.
61 (license (list license:gpl2 license:gpl3))))
62
63 (define-public bind-utils
64 (package
65 (name "bind-utils")
66 (version "9.10.1-P2")
67 (source (origin
68 (method url-fetch)
69 (uri (string-append "ftp://ftp.isc.org/isc/bind9/" version
70 "/bind-" version ".tar.gz"))
71 (sha256
72 (base32
73 "1svzia5vv0s4bv6r04j8bsvlf3klwyigmdz1iwb4fqds00iyvp22"))))
74 (build-system gnu-build-system)
75 (inputs
76 ;; it would be nice to add GeoIP and gssapi once there is package
77 `(("libcap" ,libcap)
78 ("libxml2" ,libxml2)
79 ("mysql" ,mysql)
80 ("openssl" ,openssl)
81 ("perl" ,perl)
82 ("p11-kit" ,p11-kit)))
83 (arguments
84 `(#:tests? #f ; no test phase implemented
85 #:configure-flags
86 (list (string-append "--with-openssl="
87 (assoc-ref %build-inputs "openssl"))
88 (string-append "--with-dlz-mysql="
89 (assoc-ref %build-inputs "mysql"))
90 (string-append "--with-pkcs11="
91 (assoc-ref %build-inputs "p11-kit")))
92 #:phases
93 (alist-replace
94 'build
95 (lambda _
96 (and (zero? (system* "make" "-C" "lib/dns"))
97 (zero? (system* "make" "-C" "lib/isc"))
98 (zero? (system* "make" "-C" "lib/bind9"))
99 (zero? (system* "make" "-C" "lib/isccfg"))
100 (zero? (system* "make" "-C" "lib/lwres"))
101 (zero? (system* "make" "-C" "bin/dig"))))
102 (alist-replace
103 'install
104 (lambda _ (zero? (system* "make" "-C" "bin/dig" "install")))
105 %standard-phases))))
106 (home-page "https://www.isc.org/downloads/bind/")
107 (synopsis "Tools for querying nameservers")
108 (description
109 "These tools, included with ISC BIND, are useful for analysis of DNS
110 issues or verification of configuration.")
111 (license (list license:isc))))