bwrap-helper: Reuse system’s PATH
Otherwise running in nix-shell does not make the binaries from the temporary environment available inside the sandbox.
This commit is contained in:
parent
9190c83c97
commit
5c0d4439e8
|
@ -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": (
|
||||
|
|
Loading…
Reference in a new issue