dns.scm 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  3. ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
  5. ;;; Copyright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2016 John Darrington <jmd@gnu.org>
  7. ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
  8. ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
  9. ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
  10. ;;; Copyright © 2017 Vasile Dumitrascu <va511e@yahoo.com>
  11. ;;; Copyright © 2017 Gregor Giesen <giesen@zaehlwerk.net>
  12. ;;;
  13. ;;; This file is part of GNU Guix.
  14. ;;;
  15. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  16. ;;; under the terms of the GNU General Public License as published by
  17. ;;; the Free Software Foundation; either version 3 of the License, or (at
  18. ;;; your option) any later version.
  19. ;;;
  20. ;;; GNU Guix is distributed in the hope that it will be useful, but
  21. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  22. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. ;;; GNU General Public License for more details.
  24. ;;;
  25. ;;; You should have received a copy of the GNU General Public License
  26. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  27. (define-module (gnu packages dns)
  28. #:use-module (gnu packages admin)
  29. #:use-module (gnu packages autotools)
  30. #:use-module (gnu packages base)
  31. #:use-module (gnu packages databases)
  32. #:use-module (gnu packages crypto)
  33. #:use-module (gnu packages datastructures)
  34. #:use-module (gnu packages flex)
  35. #:use-module (gnu packages glib)
  36. #:use-module (gnu packages groff)
  37. #:use-module (gnu packages groff)
  38. #:use-module (gnu packages libedit)
  39. #:use-module (gnu packages libevent)
  40. #:use-module (gnu packages libidn)
  41. #:use-module (gnu packages linux)
  42. #:use-module (gnu packages ncurses)
  43. #:use-module (gnu packages nettle)
  44. #:use-module (gnu packages perl)
  45. #:use-module (gnu packages pkg-config)
  46. #:use-module (gnu packages protobuf)
  47. #:use-module (gnu packages python)
  48. #:use-module (gnu packages swig)
  49. #:use-module (gnu packages tls)
  50. #:use-module (gnu packages web)
  51. #:use-module (gnu packages xml)
  52. #:use-module ((guix licenses) #:prefix license:)
  53. #:use-module (guix packages)
  54. #:use-module (guix download)
  55. #:use-module (guix utils)
  56. #:use-module (guix build-system gnu))
  57. (define-public dnsmasq
  58. (package
  59. (name "dnsmasq")
  60. (version "2.78")
  61. (source (origin
  62. (method url-fetch)
  63. (uri (string-append
  64. "http://www.thekelleys.org.uk/dnsmasq/dnsmasq-"
  65. version ".tar.xz"))
  66. (sha256
  67. (base32
  68. "0ar5h5v3kas2qx2wgy5iqin15gc4jhqrqs067xacgc3lii1rz549"))))
  69. (build-system gnu-build-system)
  70. (native-inputs
  71. `(("pkg-config" ,pkg-config)))
  72. (inputs
  73. `(("dbus" ,dbus)))
  74. (arguments
  75. `(#:phases
  76. (alist-delete 'configure %standard-phases)
  77. #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
  78. "CC=gcc"
  79. "COPTS=\"-DHAVE_DBUS\"")
  80. ;; No 'check' target.
  81. #:tests? #f))
  82. (home-page "http://www.thekelleys.org.uk/dnsmasq/doc.html")
  83. (synopsis "Small caching DNS proxy and DHCP/TFTP server")
  84. (description
  85. "Dnsmasq is a lightweight DNS forwarder and DHCP server. It is designed
  86. to provide DNS and optionally, DHCP, to a small network. It can serve the
  87. names of local machines which are not in the global DNS. The DHCP server
  88. integrates with the DNS server and allows machines with DHCP-allocated
  89. addresses to appear in the DNS with names configured either in each host or in
  90. a central configuration file. Dnsmasq supports static and dynamic DHCP leases
  91. and BOOTP/TFTP for network booting of diskless machines.")
  92. ;; Source files only say GPL2 and GPL3 are allowed.
  93. (license (list license:gpl2 license:gpl3))))
  94. ;; 'bind' is the name of a built-in Guile procedure, which is why we choose a
  95. ;; different name here.
  96. (define-public isc-bind
  97. (package
  98. (name "bind")
  99. (version "9.11.2")
  100. (source (origin
  101. (method url-fetch)
  102. (uri (string-append
  103. "ftp://ftp.isc.org/isc/bind9/" version "/" name "-"
  104. version ".tar.gz"))
  105. (sha256
  106. (base32
  107. "0yn7wgi2y8mpmvbjbkl4va7p0xsnn48m4yjx6ynb1hzp423asikz"))))
  108. (build-system gnu-build-system)
  109. (outputs `("out" "utils"))
  110. (inputs
  111. ;; it would be nice to add GeoIP and gssapi once there is package
  112. `(("libcap" ,libcap)
  113. ("libxml2" ,libxml2)
  114. ("openssl" ,openssl)
  115. ("p11-kit" ,p11-kit)))
  116. (native-inputs `(("perl" ,perl)
  117. ("net-tools" ,net-tools)))
  118. (arguments
  119. `(#:configure-flags
  120. (list (string-append "--with-openssl="
  121. (assoc-ref %build-inputs "openssl"))
  122. (string-append "--with-pkcs11="
  123. (assoc-ref %build-inputs "p11-kit")))
  124. #:phases
  125. (modify-phases %standard-phases
  126. (add-after 'strip 'move-to-utils
  127. (lambda _
  128. (for-each
  129. (lambda (file)
  130. (let ((target (string-append (assoc-ref %outputs "utils") file))
  131. (src (string-append (assoc-ref %outputs "out") file)))
  132. (mkdir-p (dirname target))
  133. (link src target)
  134. (delete-file src)))
  135. '("/bin/dig" "/bin/delv" "/bin/nslookup" "/bin/host" "/bin/nsupdate"
  136. "/share/man/man1/dig.1"
  137. "/share/man/man1/host.1"
  138. "/share/man/man1/nslookup.1"
  139. "/share/man/man1/nsupdate.1"))))
  140. ;; When and if guix provides user namespaces for the build process,
  141. ;; then the following can be uncommented and the subsequent "force-test"
  142. ;; will not be necessary.
  143. ;;
  144. ;; (add-before 'check 'set-up-loopback
  145. ;; (lambda _
  146. ;; (system "bin/tests/system/ifconfig.sh up")))
  147. (replace 'check
  148. (lambda _
  149. (zero? (system* "make" "force-test")))))))
  150. (synopsis "An implementation of the Domain Name System")
  151. (description "BIND is an implementation of the @dfn{Domain Name System}
  152. (DNS) protocols for the Internet. It is a reference implementation of those
  153. protocols, but it is also production-grade software, suitable for use in
  154. high-volume and high-reliability applications. The name BIND stands for
  155. \"Berkeley Internet Name Domain\", because the software originated in the early
  156. 1980s at the University of California at Berkeley.")
  157. (home-page "https://www.isc.org/downloads/bind")
  158. (license (list license:mpl2.0))))
  159. (define-public dnscrypt-proxy
  160. (package
  161. (name "dnscrypt-proxy")
  162. (version "1.9.5")
  163. (source (origin
  164. (method url-fetch)
  165. (uri (string-append
  166. "https://download.dnscrypt.org/dnscrypt-proxy/"
  167. "dnscrypt-proxy-" version ".tar.bz2"))
  168. (sha256
  169. (base32
  170. "1dhvklr4dg2vlw108n11xbamacaryyg3dbrg629b76lp7685p7z8"))
  171. (modules '((guix build utils)))
  172. (snippet
  173. ;; Delete bundled libltdl. XXX: This package also bundles
  174. ;; a modified libevent that cannot currently be removed.
  175. '(delete-file-recursively "libltdl"))))
  176. (build-system gnu-build-system)
  177. (arguments
  178. `(#:phases
  179. (modify-phases %standard-phases
  180. (add-after 'unpack 'autoreconf
  181. (lambda _
  182. ;; Re-generate build files due to unbundling ltdl.
  183. ;; TODO: Prevent generating new libltdl and building it.
  184. ;; The system version is still favored and referenced.
  185. (zero? (system* "autoreconf" "-vif")))))))
  186. (native-inputs
  187. `(("pkg-config" ,pkg-config)
  188. ("automake" ,automake)
  189. ("autoconf" ,autoconf)
  190. ("libtool" ,libtool)))
  191. (inputs
  192. `(("libltdl" ,libltdl)
  193. ("libsodium" ,libsodium)))
  194. (home-page "https://www.dnscrypt.org/")
  195. (synopsis "Securely send DNS requests to a remote server")
  196. (description
  197. "@command{dnscrypt-proxy} is a tool for securing communications
  198. between a client and a DNS resolver. It verifies that responses you get
  199. from a DNS provider was actually sent by that provider, and haven't been
  200. tampered with. For optimal performance it is recommended to use this as
  201. a forwarder for a caching DNS resolver such as @command{dnsmasq}, but it
  202. can also be used as a normal DNS \"server\". A list of public dnscrypt
  203. servers is included, and an up-to-date version is available at
  204. @url{https://download.dnscrypt.org/dnscrypt-proxy/dnscrypt-resolvers.csv}.")
  205. (license (list license:isc
  206. ;; Libevent and src/ext/queue.h is 3-clause BSD.
  207. license:bsd-3))))
  208. (define-public dnscrypt-wrapper
  209. (package
  210. (name "dnscrypt-wrapper")
  211. (version "0.2.2")
  212. (source (origin
  213. (method url-fetch)
  214. (uri (string-append
  215. "https://github.com/cofyc/dnscrypt-wrapper/releases"
  216. "/download/v" version "/" name "-v" version ".tar.bz2"))
  217. (sha256
  218. (base32
  219. "1vhg4g0r687f51wcdn7z9w1hxapazx6vyh5rsr8wa48sljzd583g"))))
  220. (build-system gnu-build-system)
  221. (arguments
  222. `(#:make-flags '("CC=gcc")
  223. ;; TODO: Tests require ruby-cucumber and ruby-aruba.
  224. #:tests? #f
  225. #:phases
  226. (modify-phases %standard-phases
  227. (add-after 'unpack 'create-configure
  228. (lambda _
  229. (zero? (system* "make" "configure")))))))
  230. (native-inputs
  231. `(("autoconf" ,autoconf)))
  232. (inputs
  233. `(("libevent" ,libevent)
  234. ("libsodium" ,libsodium)))
  235. (home-page "https://github.com/Cofyc/dnscrypt-wrapper")
  236. (synopsis "Server-side dnscrypt proxy")
  237. (description
  238. "@command{dnscrypt-wrapper} is a tool to expose a name server over
  239. the @code{dnscrypt} protocol. It can be used as an endpoint for the
  240. @command{dnscrypt-proxy} client to securely tunnel DNS requests between
  241. the two.")
  242. (license (list license:isc
  243. ;; Bundled argparse is MIT. TODO: package and unbundle.
  244. license:expat
  245. ;; dns-protocol.h and rfc1035.{c,h} is gpl2 or gpl3 (either).
  246. license:gpl2
  247. license:gpl3))))
  248. (define-public libasr
  249. (package
  250. (name "libasr")
  251. (version "201602131606")
  252. (source
  253. (origin
  254. (method url-fetch)
  255. (uri (string-append "https://www.opensmtpd.org/archives/"
  256. name "-" version ".tar.gz"))
  257. (sha256
  258. (base32
  259. "18kdmbjsxrfai16d66qslp48b1zf7gr8him2jj5dcqgbsl44ls75"))))
  260. (build-system gnu-build-system)
  261. (native-inputs
  262. `(("autoconf" ,autoconf)
  263. ("automake" ,automake)
  264. ("pkg-config" ,pkg-config)
  265. ("groff" ,groff)))
  266. (home-page "https://www.opensmtpd.org")
  267. (synopsis "Asynchronous resolver library by the OpenBSD project")
  268. (description
  269. "libasr is a free, simple and portable asynchronous resolver library.
  270. It allows to run DNS queries and perform hostname resolutions in a fully
  271. asynchronous fashion.")
  272. (license (list license:isc
  273. license:bsd-2 ; last part of getrrsetbyname_async.c
  274. license:bsd-3
  275. (license:non-copyleft "file://LICENSE") ; includes.h
  276. license:openssl))))
  277. (define-public unbound
  278. (package
  279. (name "unbound")
  280. (version "1.6.3")
  281. (source
  282. (origin
  283. (method url-fetch)
  284. (uri (string-append "https://www.unbound.net/downloads/unbound-"
  285. version ".tar.gz"))
  286. (sha256
  287. (base32
  288. "0pw4m4z5qspsagxzbjb61xq5bhd57amw26xqvqzi6b8d3mf6azjc"))))
  289. (build-system gnu-build-system)
  290. (outputs '("out" "python"))
  291. (native-inputs
  292. `(("flex" ,flex)
  293. ("swig" ,swig)))
  294. (inputs
  295. `(("expat" ,expat)
  296. ("libevent" ,libevent)
  297. ("protobuf" ,protobuf)
  298. ("python" ,python-3)
  299. ("python-wrapper" ,python-wrapper)
  300. ("openssl" ,openssl)))
  301. (arguments
  302. `(#:configure-flags
  303. (list "--disable-static" ;save space and non-determinism in libunbound.a
  304. (string-append
  305. "--with-ssl=" (assoc-ref %build-inputs "openssl"))
  306. (string-append
  307. "--with-libevent=" (assoc-ref %build-inputs "libevent"))
  308. (string-append
  309. "--with-libexpat=" (assoc-ref %build-inputs "expat"))
  310. "--with-pythonmodule" "--with-pyunbound")
  311. #:phases
  312. (modify-phases %standard-phases
  313. (add-after 'configure 'fix-python-site-package-path
  314. ;; Move python modules into their own output.
  315. (lambda* (#:key outputs #:allow-other-keys)
  316. (let ((pyout (assoc-ref outputs "python"))
  317. (ver ,(version-major+minor (package-version python))))
  318. (substitute* "Makefile"
  319. (("^PYTHON_SITE_PKG=.*$")
  320. (string-append
  321. "PYTHON_SITE_PKG="
  322. pyout "/lib/python-" ver "/site-packages\n"))))
  323. #t))
  324. (add-before 'check 'fix-missing-nss-for-tests
  325. ;; Unfortunately, the package's unittests involve some checks
  326. ;; looking up protocols and services which are not provided
  327. ;; by the minimalistic build environment, in particular,
  328. ;; /etc/protocols and /etc/services are missing.
  329. ;; Also, after plain substitution of protocol and service names
  330. ;; in the test data, the tests still fail because the
  331. ;; corresponding Resource Records have been signed by
  332. ;; RRSIG records.
  333. ;; The following LD_PRELOAD library overwrites the glibc
  334. ;; functions ‘get{proto,serv}byname’, ‘getprotobynumber’ and
  335. ;; ‘getservbyport’ providing the few records required for the
  336. ;; unit tests to pass.
  337. (lambda* (#:key inputs outputs #:allow-other-keys)
  338. (let* ((source (assoc-ref %build-inputs "source"))
  339. (gcc (assoc-ref %build-inputs "gcc")))
  340. (call-with-output-file "/tmp/nss_preload.c"
  341. (lambda (port)
  342. (display "#include <stdlib.h>
  343. #include <string.h>
  344. #include <strings.h>
  345. #include <netdb.h>
  346. struct protoent *getprotobyname(const char *name) {
  347. struct protoent *p = malloc(sizeof(struct protoent));
  348. p->p_aliases = malloc(sizeof(char*));
  349. if (strcasecmp(name, \"tcp\") == 0) {
  350. p->p_name = \"tcp\";
  351. p->p_proto = 6;
  352. p->p_aliases[0] = \"TCP\";
  353. } else if (strcasecmp(name, \"udp\") == 0) {
  354. p->p_name = \"udp\";
  355. p->p_proto = 17;
  356. p->p_aliases[0] = \"UDP\";
  357. } else
  358. p = NULL;
  359. return p;
  360. }
  361. struct protoent *getprotobynumber(int proto) {
  362. struct protoent *p = malloc(sizeof(struct protoent));
  363. p->p_aliases = malloc(sizeof(char*));
  364. switch(proto) {
  365. case 6:
  366. p->p_name = \"tcp\";
  367. p->p_proto = 6;
  368. p->p_aliases[0] = \"TCP\";
  369. break;
  370. case 17:
  371. p->p_name = \"udp\";
  372. p->p_proto = 17;
  373. p->p_aliases[0] = \"UDP\";
  374. break;
  375. default:
  376. p = NULL;
  377. break;
  378. }
  379. return p;
  380. }
  381. struct servent *getservbyname(const char *name, const char *proto) {
  382. struct servent *s = malloc(sizeof(struct servent));
  383. char* buf = malloc((strlen(proto)+1)*sizeof(char));
  384. strcpy(buf, proto);
  385. s->s_aliases = malloc(sizeof(char*));
  386. s->s_aliases[0] = NULL;
  387. if (strcasecmp(name, \"domain\") == 0) {
  388. s->s_name = \"domain\";
  389. s->s_port = htons(53);
  390. s->s_proto = buf;
  391. } else
  392. s = NULL;
  393. return s;
  394. }
  395. struct servent *getservbyport(int port, const char *proto) {
  396. char buf[32];
  397. struct servent *s = malloc(sizeof(struct servent));
  398. strcpy(buf, proto);
  399. s->s_aliases = malloc(sizeof(char*));
  400. s->s_aliases[0] = NULL;
  401. switch(port) {
  402. case 53:
  403. s->s_name = \"domain\";
  404. s->s_port = 53;
  405. s->s_proto = \"udp\";
  406. break;
  407. default:
  408. s = NULL;
  409. break;
  410. }
  411. return s;
  412. }" port)))
  413. (system* (string-append gcc "/bin/gcc")
  414. "-shared" "-fPIC" "-o" "/tmp/nss_preload.so"
  415. "/tmp/nss_preload.c")
  416. ;; The preload library only affects the unittests.
  417. (substitute* "Makefile"
  418. (("./unittest")
  419. "LD_PRELOAD=/tmp/nss_preload.so ./unittest")))
  420. #t)))))
  421. (home-page "https://www.unbound.net")
  422. (synopsis "Validating, recursive, and caching DNS resolver")
  423. (description
  424. "Unbound is a recursive-only caching DNS server which can perform DNSSEC
  425. validation of results. It implements only a minimal amount of authoritative
  426. service to prevent leakage to the root nameservers: forward lookups for
  427. localhost, reverse for @code{127.0.0.1} and @code{::1}, and NXDOMAIN for zones
  428. served by AS112. Stub and forward zones are supported.")
  429. (license license:bsd-4)))
  430. (define-public yadifa
  431. (package
  432. (name "yadifa")
  433. (version "2.2.5")
  434. (source
  435. (let ((build "6937"))
  436. (origin
  437. (method url-fetch)
  438. (uri
  439. (string-append "http://cdn.yadifa.eu/sites/default/files/releases/"
  440. name "-" version "-" build ".tar.gz"))
  441. (sha256
  442. (base32
  443. "146fs52izf6dfwsxal3srpwin2yyl41g31cy4pyvbi5mqy2craj7")))))
  444. (build-system gnu-build-system)
  445. (native-inputs
  446. `(("which" ,which)))
  447. (inputs
  448. `(("openssl" ,openssl)))
  449. (arguments
  450. `(#:phases (modify-phases %standard-phases
  451. (add-before 'configure 'omit-example-configurations
  452. (lambda _
  453. (substitute* "Makefile.in"
  454. ((" (etc|var)") ""))
  455. #t)))
  456. #:configure-flags (list "--sysconfdir=/etc" "--localstatedir=/var"
  457. "--enable-shared" "--disable-static"
  458. "--enable-messages" "--enable-ctrl"
  459. "--enable-nsec" "--enable-nsec3"
  460. "--enable-tsig" "--enable-caching")))
  461. (home-page "http://www.yadifa.eu/")
  462. (synopsis "Authoritative DNS name server")
  463. (description "YADIFA is an authoritative name server for the @dfn{Domain
  464. Name System} (DNS). It aims for both higher performance and a smaller memory
  465. footprint than other implementations, while remaining fully RFC-compliant.
  466. YADIFA supports dynamic record updates and the @dfn{Domain Name System Security
  467. Extensions} (DNSSEC).")
  468. (license license:bsd-3)))
  469. (define-public knot
  470. (package
  471. (name "knot")
  472. (version "2.6.0")
  473. (source (origin
  474. (method url-fetch)
  475. (uri (string-append "https://secure.nic.cz/files/knot-dns/"
  476. name "-" version ".tar.xz"))
  477. (sha256
  478. (base32
  479. "1zc3ybhcxgbysyy68kbmndh6xzy4jnr5iikyrf9s2sxzs1hlkq38"))
  480. (modules '((guix build utils)))
  481. (snippet
  482. '(begin
  483. ;; Remove bundled libraries and dependencies on them.
  484. (substitute* "configure"
  485. (("src/contrib/dnstap/Makefile") ""))
  486. (substitute* "src/Makefile.in"
  487. (("contrib/dnstap ") ""))
  488. (with-directory-excursion "src/contrib"
  489. (for-each delete-file-recursively
  490. (list "dnstap" "lmdb")))
  491. #t))))
  492. (build-system gnu-build-system)
  493. (native-inputs
  494. `(("pkg-config" ,pkg-config)))
  495. (inputs
  496. `(("gnutls" ,gnutls)
  497. ("jansson" ,jansson)
  498. ("libcap-ng" ,libcap-ng)
  499. ("libedit" ,libedit)
  500. ("libidn" ,libidn)
  501. ("liburcu" ,liburcu)
  502. ("lmdb" ,lmdb)
  503. ("ncurses" ,ncurses)
  504. ("nettle" ,nettle)
  505. ;; For ‘pykeymgr’, needed to migrate keys from versions <= 2.4.
  506. ("python" ,python-2)
  507. ("python-lmdb" ,python2-lmdb)))
  508. (arguments
  509. `(#:phases
  510. (modify-phases %standard-phases
  511. (add-before 'configure 'disable-directory-pre-creation
  512. (lambda _
  513. ;; Don't install empty directories like ‘/etc’ outside the store.
  514. (substitute* "src/Makefile.in" (("\\$\\(INSTALL\\) -d") "true"))
  515. #t))
  516. (replace 'install
  517. (lambda* (#:key outputs #:allow-other-keys)
  518. (let* ((out (assoc-ref outputs "out"))
  519. (doc (string-append out "/share/doc/knot"))
  520. (etc (string-append doc "/examples/etc")))
  521. (zero?
  522. (system* "make"
  523. (string-append "config_dir=" etc)
  524. "install")))))
  525. (add-after 'install 'wrap-python-scripts
  526. (lambda* (#:key outputs #:allow-other-keys)
  527. (let* ((out (assoc-ref outputs "out"))
  528. (path (getenv "PYTHONPATH")))
  529. (wrap-program (string-append out "/sbin/pykeymgr")
  530. `("PYTHONPATH" ":" prefix (,path))))
  531. #t)))
  532. #:configure-flags
  533. (list "--sysconfdir=/etc"
  534. "--localstatedir=/var"
  535. "--with-module-rosedb=yes" ; serve static records from a database
  536. (string-append "--with-bash-completions="
  537. (assoc-ref %outputs "out")
  538. "/etc/bash_completion.d"))))
  539. (home-page "https://www.knot-dns.cz/")
  540. (synopsis "Authoritative DNS name server")
  541. (description "Knot DNS is an authoritative name server for the @dfn{Domain
  542. Name System} (DNS), designed to meet the needs of root and @dfn{top-level
  543. domain} (TLD) name servers. It is implemented as a threaded daemon and uses a
  544. number of programming techniques to improve speed. For example, the responder
  545. is completely lock-free, resulting in a very high response rate. Other features
  546. include automatic @dfn{DNS Security Extensions} (DNSSEC) signing, dynamic record
  547. synthesis, and on-the-fly re-configuration.")
  548. (license (list license:expat ; src/contrib/{hat-trie,murmurhash3}
  549. license:lgpl2.0+ ; parts of scr/contrib/ucw
  550. license:gpl3+)))) ; everything else