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()
|
gid = os.getgid()
|
||||||
home = os.getenv("HOME")
|
home = os.getenv("HOME")
|
||||||
|
|
||||||
path_entries = [
|
|
||||||
f"/etc/profiles/per-user/{username}/bin",
|
|
||||||
"/run/current-system/sw/bin",
|
|
||||||
]
|
|
||||||
|
|
||||||
argument_groups = {
|
argument_groups = {
|
||||||
"base": (
|
"base": (
|
||||||
True,
|
True,
|
||||||
|
@ -111,11 +106,13 @@ argument_groups = {
|
||||||
"path": (
|
"path": (
|
||||||
True,
|
True,
|
||||||
[
|
[
|
||||||
*flat_map(ro_bind_try, path_entries),
|
*flat_map(
|
||||||
*setenv("PATH", ":".join(path_entries)),
|
ro_bind,
|
||||||
*ro_bind_try(
|
[
|
||||||
"/run/current-system/sw"
|
"/run/current-system/sw", # not exclusive to path, but also libraries etc.
|
||||||
), # not really path, but also libraries etc.
|
f"/etc/profiles/per-user/{username}/bin",
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
"gui": (
|
"gui": (
|
||||||
|
|
Loading…
Reference in a new issue