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

[staging] setup.sh: Support XDG_DATA_DIRS (bash completion in nix-shell) #103501

Merged
merged 3 commits into from
Nov 25, 2020

Commits on Nov 22, 2020

  1. setup.sh: Support XDG_DATA_DIRS

    XDG_DATA_DIRS is to /share as PATH is to /bin.
    
    It was defined as part of the XDG basedir specification.
    https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
    
    While it originated from the X Desktop Group, it is not limited to
    the X11 ecosystem, as evidenced by its use in bash-completion.
    
    The removal of ` && -d "$pkg/bin"` is ok, because this optimization is
    already performed by `addToSearchPath`.
    roberth committed Nov 22, 2020
    Configuration menu
    Copy the full SHA
    c43bcf7 View commit details
    Browse the repository at this point in the history
  2. setup.sh: Only load XDG_DATA_DIRS for executable inputs

    This avoids the scenario where strictDeps is off and cross-compiled
    XDG_DATA_DIRS content is brought into the environment.
    
    While probably harmless for data like manpages and completion scripts,
    this would cause issues when XDG_DATA_DIRS is used to find executables
    or plugins. The Qt framework is known to behave like this and might
    have run into incompatibilities.
    roberth committed Nov 22, 2020
    Configuration menu
    Copy the full SHA
    9289ece View commit details
    Browse the repository at this point in the history
  3. setup.sh: export XDG_DATA_DIRS for consistency

    By exporting it, we always make the new directories available
    to subprocesses, regardless of whether the environment
    variable existed before `nix-shell` was invoked.
    roberth committed Nov 22, 2020
    Configuration menu
    Copy the full SHA
    be76099 View commit details
    Browse the repository at this point in the history