aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/dns.scm
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-11-20 23:48:17 +0100
committerLudovic Courtès <ludo@gnu.org>2021-11-22 23:50:56 +0100
commit12f68319e8d341b10ba88a11a4e61a0d44e175e6 (patch)
treecd7955b8cac4c544582e7e53bcc485de2a939afb /gnu/packages/dns.scm
parent30cc14f1406ac9254cfbcf8c343531a253a3c2ea (diff)
downloadguix-12f68319e8d341b10ba88a11a4e61a0d44e175e6.tar
guix-12f68319e8d341b10ba88a11a4e61a0d44e175e6.tar.gz
gnu: openresolv: Wrap resolvconf.
* gnu/packages/dns.scm (openresolv) [phases]: Wrap resolvconf to set PATH, for coreutils programs mkdir and rm. [inputs]: Add coreutils-minimal. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/packages/dns.scm')
-rw-r--r--gnu/packages/dns.scm16
1 files changed, 15 insertions, 1 deletions
diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm
index b289aa999e..7de16a94a5 100644
--- a/gnu/packages/dns.scm
+++ b/gnu/packages/dns.scm
@@ -1417,7 +1417,21 @@ and TCP-capable recursive DNS server for finding domains on the internet.")
#:configure-flags
(list (string-append "--sysconfdir=/etc"))
#:make-flags
- (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))))
+ (list (string-append "SYSCONFDIR=/" (assoc-ref %outputs "out") "/etc"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'wrap-program
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (coreutils (assoc-ref inputs "coreutils-minimal")))
+ (substitute* (string-append out "/sbin/resolvconf")
+ (("RESOLVCONF=\"\\$0\"")
+ (format #f "\
+RESOLVCONF=\"$0\"
+PATH=~a/bin:$PATH"
+ coreutils)))))))))
+ (inputs
+ `(("coreutils-minimal" ,coreutils-minimal)))
(home-page "https://roy.marples.name/projects/openresolv/")
(synopsis "Resolvconf POSIX compliant implementation, a middleman for resolv.conf")
(description "openresolv is an implementation of @command{resolvconf}, the