Closed matthiasbeyer closed 2 years ago
I also got hit by this problem. This seems caused by this PR: https://github.com/NixOS/nixpkgs/pull/145105 My system builds fine with the commit just before that (https://github.com/NixOS/nixpkgs/commit/d083ae6247661365d77c1e8b4633b02662ec7b14), but not after (https://github.com/NixOS/nixpkgs/commit/8605fbd737e526c40ff8f01219db42b5d0076e23)
It would be nice to reproduce it locally, to find a proper fix. @matthiasbeyer @sandhose are you doing anything special to install the vim plugins? Do you have your configuration somewhere online?
Sure. My config lives here: https://github.com/sandhose/nixconf/blob/c684f4c536a656ac4bf5ceb9508159f4b50b093b/profiles/home-manager/vim/default.nix
I'm configuring Neovim through the home-manager module.
@sandhose thanks, I'm using home-manager too, but so far I cannot reproduce it, I'll take a look to your config
@sandhose I can reproduce it, but looks like an error with you config, you are installing 2 times the same plugin, rust-tools-nvim
here:
https://github.com/sandhose/nixconf/blob/c684f4c536a656ac4bf5ceb9508159f4b50b093b/profiles/home-manager/vim/default.nix#L120
and here:
https://github.com/sandhose/nixconf/blob/c684f4c536a656ac4bf5ceb9508159f4b50b093b/profiles/home-manager/vim/default.nix#L133
@sandhose I can reproduce it, but looks like an error with you config, you are installing 2 times the same plugin,
rust-tools-nvim
here: https://github.com/sandhose/nixconf/blob/c684f4c536a656ac4bf5ceb9508159f4b50b093b/profiles/home-manager/vim/default.nix#L120 and here: https://github.com/sandhose/nixconf/blob/c684f4c536a656ac4bf5ceb9508159f4b50b093b/profiles/home-manager/vim/default.nix#L133
That was it 🤦 I was able to update nixpkgs, thanks!
@matthiasbeyer in your case, is the same reason? Maybe we could try to add a better error message
In my case it is
packages.nixbundle.start = with (pkgs.vimPlugins // plugins); [
vim-trailing-whitespace
vim-signify
fugitive
undotree
vim-toml
Tabular
editorconfig-vim
vim-signature
rust-vim
vinegar
ultisnips
vim-snippets
Tagbar
vim-addon-nix
vim-markbar
fzf-preview
ncm2
ncm2-ultisnips
ncm2-bufword
ncm2-path
ncm2-tmux
ncm2-look
ncm2-otherbuf
unstable.vimPlugins.vim-which-key
papercolor-theme
];
packages.nixbundle.opt = with pkgs.vimPlugins; [
LanguageClient-neovim
];
And I do not see that there is anything duplicated...
@matthiasbeyer I see that you are using some out of tree vim plugins (fzf-preview is not in nixpkgs). Is the nix expression with those plugins public? Maybe a copy/paste error with your plugins? Did you forget to change the name/pname attribute for one of your plugins?
fzf-preview: https://github.com/chengzeyi/fzf-preview.vim
None of my expressions are public, because they're in a git repository with private data. But here it is:
"fzf-preview" = buildVimPlugin {
name = "fzf-preview";
src = fetchgit {
url = "https://github.com/chengzeyi/fzf-preview.vim";
rev = "d2a65fa13e044a6e0c8346df0af8ca17dc9f57db";
sha256 = "1fw338mgn5y2nn6mhvcrgnw2i4ijga798ljpwbmkmfkvvjsb82ij";
};
dependencies = with pkgs; [ fzf vimPlugins.fzf-vim ];
};
I checked that my plugins are named correctly and they are.
The error:
builder for '/nix/store/5mi6qxrksizwnrvfnypxlsqj8mjx0llw-vim-pack-dir.drv' failed with exit code 1; last 10 log lines:
unpacking sources
unpacking source archive /nix/store/irgk3ry0ynqj8nx3v42ry3pcihcl74rk-vim-plugins
source root is vim-plugins
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
ln: /nix/store/0z4bqi4y3vckw7arfnfs8wp0yzd2mbd9-vim-pack-dir/pack/nixbundle/start/fzf/.: cannot overwrite directory
Indicates that there's something wrong with a fzf plugin, yes. But I do nothing fancy with fzf in my configuration:
$ rg fzf
basePackages.nix
9: pkgs.fzf
vim/plugins.nix
107: "fzf-preview" = buildVimPlugin {
108: name = "fzf-preview";
110: url = "https://github.com/chengzeyi/fzf-preview.vim";
114: dependencies = with pkgs; [ fzf vimPlugins.fzf-vim ];
vim/customization.nix
29: fzf-preview
I think that is caused by dependencies = with pkgs; [ fzf vimPlugins.fzf-vim ];
, fzf-vim also installs fzf in your vim plugins, you only need fzf-vim
you're right, that solved the issue for me! Thanks!
But now it does not find fugitive#statusline()
- I guess this is unrelated though!
I don't think that the fugitive#statusline()
error you are getting is related to this
Hm,... maybe it is... it seems that fugitive cannot be found, although it is installed...
Describe the bug
Steps To Reproduce
Not sure.
Metadata
Issue exists after updating unstable from 4f6d8095fd51954120a1d08ea5896fe42dc3923b to c5ed8beb478a8ca035f033f659b60c89500a3034