[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#52009] [PATCH core-updates-frozen] openresolv: Wrap it.
From: |
Ludovic Courtès |
Subject: |
[bug#52009] [PATCH core-updates-frozen] openresolv: Wrap it. |
Date: |
Mon, 22 Nov 2021 22:48:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Vivien Kraus <vivien@planete-kraus.eu> skribis:
> From 426c613e226b5c7e041d6a8476c09abfeffe151c Mon Sep 17 00:00:00 2001
> From: Vivien Kraus <vivien@planete-kraus.eu>
> Date: Sat, 20 Nov 2021 23:48:17 +0100
> Subject: [PATCH] gnu: openresolv: Wrap resolvconf.
>
> * gnu/packages/dns.scm (openresolv) [phases]: Wrap resolvconf to set PATH, for
> coreutils programs mkdir and rm.
> * gnu/packages/dns.scm (openresolv) [inputs]: Add coreutils, and bash-minimal
> to run the wrapper and the wrapped script.
[...]
> + (add-after 'install 'wrap-program
> + (lambda* (#:key inputs outputs #:allow-other-keys)
> + (let ((out (assoc-ref outputs "out"))
> + (coreutils (assoc-ref inputs "coreutils")))
> + (wrap-program (string-append out "/sbin/resolvconf")
> + `("PATH" ":" = (,(string-append coreutils "/bin"))))))))))
> + (inputs
> + `(("bash-minimal" ,bash-minimal)
> + ("coreutils" ,coreutils)))
Since /sbin/resolvconf is a shell script, how about, instead of wrapping
it, inserting with ‘substitute*’ something like:
PATH=/gnu/store/…-coreutils/bin:$PATH
somewhere at the top?
That would be more lightweight.
(We could also use ‘coreutils-minimal’ here.)
Thanks,
Ludo’.