summary refs log tree commit diff
path: root/gnu/packages/dns.scm
diff options
context:
space:
mode:
authorRaghav Gururajan <raghavgururajan@disroot.org>2020-07-29 12:50:18 -0400
committerDanny Milosavljevic <dannym@scratchpost.org>2020-08-18 23:11:16 +0200
commit6a7256fc808e60ae671c1fdbac63961052a2cf1a (patch)
tree9bf32ed668f55981d8ec6ae4ea4b410f76e66458 /gnu/packages/dns.scm
parent14528483fb78fbeb8fcb6136c080799b58b31854 (diff)
downloadguix-6a7256fc808e60ae671c1fdbac63961052a2cf1a.tar.gz
gnu: Add ldns.
* gnu/packages/dns.scm (ldns): New variable.
* gnu/packages/patches/ldns-drill-examples.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/packages/dns.scm')
-rw-r--r--gnu/packages/dns.scm87
1 files changed, 87 insertions, 0 deletions
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 3c69fd9858..4639df96ed 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -38,6 +38,7 @@
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
+  #:use-module (gnu packages certs)
   #:use-module (gnu packages check)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages documentation)
@@ -62,6 +63,7 @@
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-xyz)
+  #:use-module (gnu packages shells)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tls)
@@ -77,6 +79,91 @@
   #:use-module (guix build-system meson)
   #:use-module (guix build-system trivial))
 
+(define-public ldns
+  (package
+    (name "ldns")
+    (version "1.7.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append "https://www.nlnetlabs.nl/downloads/"
+                       name "/" name "-" version ".tar.gz"))
+       (sha256
+        (base32 "0ac242n7996fswq1a3nlh1bbbhrsdwsq4mx7xq8ffq6aplb4rj4a"))
+       (patches
+        (search-patches
+         ;; To create make-flag vairables,
+         ;; for splitting installation of drill and examples.
+         "ldns-drill-examples.patch"))))
+    (build-system gnu-build-system)
+    (outputs '("out" "drill" "examples" "pyldns"))
+    (arguments
+     `( ;; Tests require Tpkg.
+       ;; https://tpkg.github.io/
+       #:tests? #f
+       #:configure-flags
+       (list
+        "--disable-static"
+        "--enable-gost-anyway"
+        "--enable-rrtype-ninfo"
+        "--enable-rrtype-rkey"
+        "--enable-rrtype-ta"
+        "--enable-rrtype-avc"
+        "--enable-rrtype-doa"
+        "--enable-rrtype-amtrelay"
+        "--with-drill"
+        "--with-examples"
+        "--with-pyldns"
+        ;; Perl module DNS::LDNS not available.
+        ;; https://github.com/erikoest/DNS-LDNS.git
+        ;; "--with-p5-dns-ldns"
+        (string-append "--with-ssl="
+                       (assoc-ref %build-inputs "openssl"))
+        (string-append "--with-ca-path="
+                       (assoc-ref %build-inputs "nss-certs")
+                       "/etc/ssl/certs"))
+       #:make-flags
+       (list
+        (string-append "drillbindir="
+                       (assoc-ref %outputs "drill")
+                       "/bin")
+        (string-append "drillmandir="
+                       (assoc-ref %outputs "drill")
+                       "/share/man")
+        (string-append "examplesbindir="
+                       (assoc-ref %outputs "examples")
+                       "/bin")
+        (string-append "examplesmandir="
+                       (assoc-ref %outputs "examples")
+                       "/share/man")
+        (string-append "python_site="
+                       (assoc-ref %outputs "pyldns")
+                       "/lib/python"
+                       ,(version-major+minor
+                         (package-version python))
+                       "/site-packages"))))
+    (native-inputs
+     `(("doxygen" ,doxygen)
+       ("ksh" ,oksh)
+       ("perl" ,perl)
+       ("perl-devel-checklib" ,perl-devel-checklib)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("swig" ,swig)))
+    (inputs
+     `(("libpcap" ,libpcap)
+       ("nss-certs" ,nss-certs)
+       ("openssl" ,openssl)))
+    (synopsis "DNS library that facilitates DNS tool programming")
+    (description "LDNS aims to simplify DNS programming, it supports recent
+RFCs like the DNSSEC documents, and allows developers to easily create
+software conforming to current RFCs, and experimental software for current
+Internet Drafts.  A secondary benefit of using ldns is speed; ldns is written in
+C it should be a lot faster than Perl.")
+    (home-page "https://nlnetlabs.nl/projects/ldns/about/")
+    (license license:bsd-3)))
+
 (define-public dnsmasq
   (package
     (name "dnsmasq")