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