bwrap-helper: Reuse system’s PATH

Otherwise running in nix-shell does not make the binaries from the
temporary environment available inside the sandbox.
neomutt
Simon Bruder 2021-09-10 23:33:31 +02:00
parent 9190c83c97
commit 5c0d4439e8
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 7 additions and 10 deletions

View File

@ -72,11 +72,6 @@ uid = os.getuid()
gid = os.getgid()
home = os.getenv("HOME")
path_entries = [
f"/etc/profiles/per-user/{username}/bin",
"/run/current-system/sw/bin",
]
argument_groups = {
"base": (
True,
@ -111,11 +106,13 @@ argument_groups = {
"path": (
True,
[
*flat_map(ro_bind_try, path_entries),
*setenv("PATH", ":".join(path_entries)),
*ro_bind_try(
"/run/current-system/sw"
), # not really path, but also libraries etc.
*flat_map(
ro_bind,
[
"/run/current-system/sw", # not exclusive to path, but also libraries etc.
f"/etc/profiles/per-user/{username}/bin",
],
),
],
),
"gui": (