gnu: Add bind

* gnu/packags/dns.scm (bind): New variable, (bind-utils): Remove.
This commit is contained in:
John Darrington 2016-09-11 00:03:10 +02:00
parent 9d126aa2b5
commit be86b7adbc
No known key found for this signature in database
GPG key ID: 8A67719C2DE827B3

View file

@ -3,6 +3,7 @@
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -63,56 +64,67 @@ (define-public dnsmasq
;; Source files only say GPL2 and GPL3 are allowed. ;; Source files only say GPL2 and GPL3 are allowed.
(license (list license:gpl2 license:gpl3)))) (license (list license:gpl2 license:gpl3))))
(define-public bind-utils (define-public bind
(package (package
(name "bind-utils") (name "bind")
(version "9.10.4") (version "9.10.4-P2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://ftp.isc.org/isc/bind9/" version (uri (string-append
"/bind-" version ".tar.gz")) "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0mmhzi4483mkak47wj255a36g3v0yilxwfwlbckr1hssinri5m7q")))) "08s48h5p916ixjiwgar4w6skc20crmg7yj1y7g89c083zvw8lnxk"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs `("out" "utils"))
(inputs (inputs
;; it would be nice to add GeoIP and gssapi once there is package ;; it would be nice to add GeoIP and gssapi once there is package
`(("libcap" ,libcap) `(("libcap" ,libcap)
("libxml2" ,libxml2) ("libxml2" ,libxml2)
("mysql" ,mysql)
("openssl" ,openssl) ("openssl" ,openssl)
("perl" ,perl)
("p11-kit" ,p11-kit))) ("p11-kit" ,p11-kit)))
(native-inputs `(("perl" ,perl)
("net-tools" ,net-tools)))
(arguments (arguments
`(#:tests? #f ; no test phase implemented `(#:configure-flags
#:configure-flags
(list (string-append "--with-openssl=" (list (string-append "--with-openssl="
(assoc-ref %build-inputs "openssl")) (assoc-ref %build-inputs "openssl"))
(string-append "--with-dlz-mysql="
(assoc-ref %build-inputs "mysql"))
(string-append "--with-pkcs11=" (string-append "--with-pkcs11="
(assoc-ref %build-inputs "p11-kit"))) (assoc-ref %build-inputs "p11-kit")))
#:modules ((srfi srfi-1)
(srfi srfi-26)
,@%gnu-build-system-modules)
#:phases #:phases
(let ((libs '("dns" "isc" "bind9" "isccfg" "lwres")) (modify-phases %standard-phases
(bins '("dig" "nsupdate"))) (add-after 'strip 'move-to-utils
(modify-phases %standard-phases (lambda _
(replace 'build (for-each
(lambda _ (lambda (file)
(every (lambda (dir) (let ((target (string-append (assoc-ref %outputs "utils") file))
(zero? (system* "make" "-C" dir))) (src (string-append (assoc-ref %outputs "out") file)))
(append (map (cut string-append "lib/" <>) libs) (mkdir-p (dirname target))
(map (cut string-append "bin/" <>) bins))))) (link src target)
(replace 'install (delete-file src)))
(lambda _ '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
(every (lambda (dir) "/share/man/man1/dig.1"
(zero? (system* "make" "-C" dir "install"))) "/share/man/man1/host.1"
(map (cut string-append "bin/" <>) bins)))))))) "/share/man/man1/nslookup.1"
(home-page "https://www.isc.org/downloads/bind/") "/share/man/man1/nsupdate.1"))))
(synopsis "Tools for querying nameservers") ;; When and if guix provides user namespaces for the build process,
(description ;; then the following can be uncommented and the subsequent "force-test"
"These tools, included with ISC BIND, are useful for analysis of DNS ;; will not be necessary.
issues or verification of configuration.") ;;
;; (add-before 'check 'set-up-loopback
;; (lambda _
;; (system "bin/tests/system/ifconfig.sh up")))
(replace 'check
(lambda _
(zero? (system* "make" "force-test")))))))
(synopsis "An implementation of the Domain Name System")
(description "BIND is an implementation of the Domain Name System (DNS)
protocols for the Internet. It is a reference implementation of those
protocols, but it is also production-grade software, suitable for use in
high-volume and high-reliability applications. The name BIND stands for
\"Berkeley Internet Name Domain\", because the software originated in the early
1980s at the University of California at Berkeley.")
(home-page "https://www.isc.org/downloads/bind")
(license (list license:isc)))) (license (list license:isc))))