Skip to content

Allow creating some environment variables (compatibility gtk, pxthon…) #215

@tobiasBora

Description

@tobiasBora

Some app will not work out of the box with nix-ld like gtk-based app (see https://discourse.nixos.org/t/nix-ld-no-gsettings-schemas-are-installed-on-the-system/74064/6) or python (see doc of this module) and require extra environment variables. Unfortunately, setting them globally may harm other nixos app (e.g. LD_PRELOAD may have dangerous effects) so I'd need a way to set these environment variables direcly inside nix-ld (I shown a while ago that this is an elegant way to create less-intrusive wrappers).

In term of implementation, we could for instance look for environment variables like NIX_LD_ENV_CREATE_FOO and export them as FOO. To allow prefixing/suffixing an existing environment variable we could prefix to FOO (similarly for suffix) env called like NIX_LD_ENV_PREFIX_FOO.

Would you consider adding this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions