See db236e588d "steam: Do $PATH lookup in steam.desktop [...]".
tl;dr: Otherwise widget/panel/desktop icons in DEs like KDE break.
Simply stop adding the full derivation path for neovim and stick with
how upstream uses no path at all.
While here, take care of gnvim.desktop as well by adjusting the sed(1)
expression (and simplifying it in one go); I do not use gnvim.desktop
but built it and confirmed the resulting files to contain no full paths
any longer.
Current nixpkgs always wraps neovim with the "-u" which has sideeffects as explained in https://github.com/NixOS/nixpkgs/issues/55376 :
1. vim won't set the variable $MYVIMRC as explained #34215
2. vim skips loading folder-specific .vimrc / .nvimrc
I wanted to provide a way for users to better control what flags are used to wrap neovim. This is achived by introducing wrapNeovimUnstable et neovimUtils, utilities to help with that. We provide a compatibility layer so that wrapNeovim still works and to let us experiment with wrapNeovimUnstable to better control neovim configuration, plugin dependencies, haskell environment etc so that it becomes easier to generate per-project neovim config.
With this commit, it's possible for instance for home-manager to wrap neovim without the `-u` and just write the config in the
expected $XDG_CONFIG_HOME/nvim/init.vim .
Expect wrapNeovimUnstable interface to evolve in the upcoming months.
first will register the config under the name init.vim which is more
appropriate for neovim.
Pass the generated config to passthru so that one can easily pass the
current config to a
raw/unwrapped neovim (helps with development).
For instance, home-manager can reference the config in $XDG_CONFIG_HOME/nvim/init.vim
without the need to wrap nvim with its config.
Cleanups:
- Removed unneeded neovim.meta.description reset.
- Remove unnecessary -x checks in `postBuild`.
- Use a ${placeholder "out"} if needed.
Changes:
- Switch to symlinkJoin, so e.g manpages link to the environment (#87929).
- Use nvim-node from $out/bin/ just like all other providers.
- Compute all arguments to makeWrapper in pure Nix "before" `postBuild`.
- Prevent double wrapping in case `configure != {}` and rplugin.vim
needs to be generated.
Co-authored-by: Silvan Mosberger <contact@infinisil.com>
Vim Terraform expects the `filetypedetect` group to exist. However, since we were enabling the filetype and the syntax *after* loading the plugins, it was exiting with an error preventing us from generating the remote plugins manifest with the plugin enabled. See #65894 for context.
This makes sure the user doesn't have to call `UpdateRemotePlugins`
manually for plugins installed through nix. A minor patch to neovim is
necessary, but it should be harmless. See
https://github.com/neovim/neovim/issues/9413 for a discussion about
the patch.
They are both as powerful, but buildEnv is treacherous: if you pass a
package which depends on another python (for example the one of unstable
when you are on stable) it will be *silently* dropped, leading to hair
pulling.
Use case:
override neovim from unstable, but still keep stable's pythonPackages.
This solves the following bug:
opening neovim in nix-shell -p pythonPackages.numpy does not enable to
run successfully
:!python -c "import numpy"
because the PYTHONPATH is wiped by the neovim wrapper.
This wiping is necessary for the python providers, though, otherwise a
python2 nix-shell will make the python3 provider read python2 files.
We wrap the providers only, instead of neovim as whole.
Lots of packages are missing versions in their name. This adds them
where appropriate. These were found with this command:
$ nix-env -qa -f. | grep -v '\-[0-9A-Za-z.-_+]*$' | grep -v '^hook$'
See issue #41007.