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
vimPlugins: warn if alias is used inside overrides #46638
Conversation
cc @Mic92 |
pkgs/misc/vim-plugins/default.nix
Outdated
src = fzf.src; | ||
dependencies = []; | ||
}; | ||
toFix = lib.foldl' (lib.flip lib.extends) (self: generated) ([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this code. Is it also overriding aliases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think so. Seems excessive in this case. Though the way it is we could easily add a feature allowing people to add their own vimPlugins overlays.
49d4a63
to
32e572e
Compare
@Mic92 Okay, I simplified it. |
pkgs/misc/vim-plugins/default.nix
Outdated
rm -r third_party/ycmd | ||
ln -s ${ycmd}/lib/ycmd third_party | ||
''; | ||
aliases = lib.optionalAttrs (config.allowAliases or true) (import ./aliases.nix lib overriden); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Now it makes sense to me.
pkgs/misc/vim-plugins/default.nix
Outdated
|
||
let | ||
|
||
_skim = skim; | ||
inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we care about indentation in this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Mic92 fixed the indentation
@Mic92 Do you approve of this as is? We should probably merge it quickly before someone wants to do something with vim plugins. |
This changes the vimPlugins structure to be like stage.nix and top-level/aliases.nix.
vimPlugins was breaking evaluation if config.allowAliases was set to false, and we wanted to make sure it is harder to do that in the future.