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>
This commit is contained in:
Vivien Kraus 2021-11-20 23:48:17 +01:00 committed by Ludovic Courtès
parent 30cc14f140
commit 12f68319e8
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -1417,7 +1417,21 @@ (define-public openresolv
#: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