aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-10-05 17:48:11 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-10-05 18:22:50 +0200
commitca4143c730a41abb9cc1bbedc9cc9a039ed4f98c (patch)
tree087b2e06534b1ed00fab51d39a1773e042b935e7
parent2b73e50c31a61b5dcef35a1e4b9484d9dbcb0fbc (diff)
downloadguix-ca4143c730a41abb9cc1bbedc9cc9a039ed4f98c.tar
guix-ca4143c730a41abb9cc1bbedc9cc9a039ed4f98c.tar.gz
gnu: knot: Snip more pregenerated nonsource.
ypbody.c is generated from ypbody.rl by update-parser.sh, both of which are missing from the release tarball. Rather than add another git file to native-inputs, we now build from git and remove the generated files. This follows up on commit 2b73e50c31a61b5dcef35a1e4b9484d9dbcb0fbc, now that everyone's finished building it. * gnu/packages/dns.scm (knot)[source]: Use GIT-FETCH and GIT-FILE-NAME. [arguments]: Add ‘--enable-fast-parser’ to #:configure-flags. Invoke the in-tree update-parser.sh. [native-inputs]: Remove separate update-parser.sh origin. Add autoconf, automake, and libtool.
-rw-r--r--gnu/packages/dns.scm36
1 files changed, 17 insertions, 19 deletions
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index 1a6c51f654..fb16355bb8 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -804,19 +804,22 @@ Extensions} (DNSSEC).")
(define-public knot
(package
(name "knot")
- (version "3.0.0") ; also update update-parser.sh below
+ (version "3.0.0")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://secure.nic.cz/files/knot-dns/"
- "knot-" version ".tar.xz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gitlab.nic.cz/knot/knot-dns")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "1i76zflc49jbsaj3idxx7a6x87c0lzal294c3fdjyfl7dvznmjgi"))
+ (base32 "0fkvip7n5ihjfwnnivdc3jf44y8p85ifglvq7b0anxvj9cg1m78f"))
(modules '((guix build utils)))
(snippet
'(begin
;; Remove Ragel-generated C files. We'll recreate them below.
(for-each delete-file (find-files "." "\\.c\\.[gt]."))
+ (delete-file "src/libknot/yparser/ypbody.c")
#t))))
(build-system gnu-build-system)
(arguments
@@ -824,16 +827,17 @@ Extensions} (DNSSEC).")
(list "--sysconfdir=/etc"
"--localstatedir=/var"
"--enable-dnstap" ; let tools read/write capture files
+ "--enable-fast-parser" ; disabled by default when .git/ exists
"--with-module-dnstap=yes" ; detailed query capturing & logging
(string-append "--with-bash-completions="
(assoc-ref %outputs "out")
"/etc/bash_completion.d"))
#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'update-parser
- (lambda* (#:key inputs #:allow-other-keys)
+ (add-before 'bootstrap 'update-parser
+ (lambda _
(with-directory-excursion "src"
- (invoke "sh" "-x" (assoc-ref inputs "update-parser.sh")))))
+ (invoke "sh" "../scripts/update-parser.sh"))))
(add-before 'configure 'disable-directory-pre-creation
(lambda _
;; Don't install empty directories like ‘/etc’ outside the store.
@@ -849,17 +853,11 @@ Extensions} (DNSSEC).")
(string-append "config_dir=" etc)
"install")))))))
(native-inputs
- `(("pkg-config" ,pkg-config)
- ("ragel" ,ragel)
- ;; The release tarball doesn't include scripts/update-parser.sh.
- ("update-parser.sh"
- ,(origin
- (method url-fetch)
- (uri (string-append "https://gitlab.nic.cz/knot/knot-dns/-/raw/v"
- version "/scripts/update-parser.sh"))
- (file-name (string-append name "-" version "-update-parser.sh"))
- (sha256
- (base32 "1a0s71lbnklpzkh97gm4g4lnxgg60zdf0hr8qr0732kqgsva1sjl"))))))
+ `(("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("libtool" ,libtool)
+ ("pkg-config" ,pkg-config)
+ ("ragel" ,ragel)))
(inputs
`(("fstrm" ,fstrm)
("gnutls" ,gnutls)