You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve been exploring the possibility of porting this package to NixOS and was able to identify the root cause of the issue. It appears to stem from the subprocess calls that fully purge the environment variables. For example, in localplatformlinux.py:14:
While it’s possible to pass in the full os.environ, it seems that PATH is the most relevant variable in this context. Passing something like env={"PATH": os.environ["PATH"]} is sufficient to work around the issue on NixOS.
May I ask if there is a specific reason for purging all environment variables? From my understanding, preserving the session environment, at least partially, would improve compatibility across different distributions, not just NixOS.
Additionally, since poetry2nix is now deprecated and unmaintained, I updated the pyproject.toml and migrated to uv for improved support. When building the actual Nix package, I rely on system-provided dependencies instead. For reference, the flake I am using is available on my fork:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I’ve been exploring the possibility of porting this package to NixOS and was able to identify the root cause of the issue. It appears to stem from the
subprocesscalls that fully purge the environment variables. For example, inlocalplatformlinux.py:14:And in
helper.py:99:While it’s possible to pass in the full
os.environ, it seems thatPATHis the most relevant variable in this context. Passing something likeenv={"PATH": os.environ["PATH"]}is sufficient to work around the issue on NixOS.May I ask if there is a specific reason for purging all environment variables? From my understanding, preserving the session environment, at least partially, would improve compatibility across different distributions, not just NixOS.
Additionally, since
poetry2nixis now deprecated and unmaintained, I updated thepyproject.tomland migrated touvfor improved support. When building the actual Nix package, I rely on system-provided dependencies instead. For reference, the flake I am using is available on my fork:https://github.com/hftsai256/decky-loader/blob/nixos/flake.nix
I hope this may be helpful for others interested in Nix. Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions