home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

Make `neovim.extraPackages` prepend to `PATH`

Open carschandler opened this issue 1 year ago • 5 comments

Description

As it stands, programs.neovim.extraPackages appends to the end of PATH rather than prepending to the beginning. Intuition would say that if I am explicitly including a package for neovim to have access to, though, that it would get access to that package before anything else... why would I explicitly declare its use of the package if I wanted it to be overshadowed by some other one that may or may not exist already? A practical example of this would be using home-manager on a non-NixOS distro to install neovim but use Lazy as a package manager and nvim-treesitter as a plugin. To compile parsers properly, treesitter needs to access a nix version of gcc, since neovim was installed with nix. However, the system is almost guaranteed to have its own gcc that is already on PATH, so adding extraPackages = [ pkgs.gcc ] has no real effect. There are ways to get around this by providing a custom wrapper around the package, but it would be much simpler to use the option that is already in-place!

@ncfavier

carschandler avatar Aug 11 '23 04:08 carschandler

Changed from prefix to suffix in https://github.com/nix-community/home-manager/pull/1756, cc @teto

ncfavier avatar Aug 11 '23 12:08 ncfavier

Shoot... would you consider an additional option or some kind of optional parameter to the existing one to allow for the choice to prepend?

carschandler avatar Aug 11 '23 13:08 carschandler

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

stale[bot] avatar Nov 10 '23 10:11 stale[bot]

Goal is to make it possible but I need to get some more code in before that. I've been waiting for nixpkgs' staging merge for > 1 month

teto avatar Nov 12 '23 16:11 teto

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.
Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

stale[bot] avatar Feb 14 '24 00:02 stale[bot]