Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add XDG_DATA_DIRS to nix-profile.sh #2443

Closed
wants to merge 1 commit into from

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Sep 23, 2018

This is helpful for locating resources with Nix, especially in
unmanaged situations like on macOS or non-NixOS Linux. Like MANPATH,
it should be harmless to have these set when the directory doesn’t
exist. If anyone knows of other variables like this, please mention them
here! We should include as many as possible so things work out-of-the-box.

@edolstra
Copy link
Member

No, I feel that Nix on non-NixOS systems should pollute the user's environment as little as necessary, to minimize the probability that installing a Nix package breaks the host system. (E.g. setting MANPATH is not harmless: it overrides man's builtin default of searching directories relative to PATH.)

This is helpful for locating resources with Nix, especially in
unmanaged situations like on macOS or non-NixOS Linux.
@matthewbauer matthewbauer changed the title Add INFOPATH & XDG_DATA_DIRS to nix-profile.sh Add XDG_DATA_DIRS to nix-profile.sh Sep 24, 2018
@matthewbauer
Copy link
Member Author

The most common need for this is with qt5 apps where qtbase is in propagated-user-env-pkgs. The qt5 runtime can't find the plugins provided by qt5 base, even when qtbase is installed. It needs to be able to find these plugins in XDG_DATA_DIRS. This leads to a lot of apps in Nixpkgs being nonfunctional to new users. See issue NixOS/nixpkgs#42893.

@rnhmjoj
Copy link

rnhmjoj commented Feb 10, 2020

The qt5 runtime can't find the plugins provided by qt5 base, even when qtbase is installed.

Is this still an issue after the wrapQtAppsHook changes? (Assuming every app has been wrapped)

@matthewbauer
Copy link
Member Author

Is this still an issue after the wrapQtAppsHook changes? (Assuming every app has been wrapped)

Not so much, although you can still run into situations when setting XDG_DATA_DIRS helps. Qt is not so important though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants