You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
4.5 KiB

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