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

vimPlugins: warn if alias is used inside overrides #46638

Merged
merged 1 commit into from Sep 18, 2018
Merged

Conversation

ryantm
Copy link
Member

@ryantm ryantm commented Sep 14, 2018

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.

@ryantm
Copy link
Member Author

ryantm commented Sep 14, 2018

cc @Mic92

src = fzf.src;
dependencies = [];
};
toFix = lib.foldl' (lib.flip lib.extends) (self: generated) ([
Copy link
Member

@Mic92 Mic92 Sep 14, 2018

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?

Copy link
Member Author

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.

@ryantm ryantm force-pushed the aliases branch 3 times, most recently from 49d4a63 to 32e572e Compare September 14, 2018 14:26
@ryantm
Copy link
Member Author

ryantm commented Sep 14, 2018

@Mic92 Okay, I simplified it.

rm -r third_party/ycmd
ln -s ${ycmd}/lib/ycmd third_party
'';
aliases = lib.optionalAttrs (config.allowAliases or true) (import ./aliases.nix lib overriden);
Copy link
Member

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.


let

_skim = skim;
inherit (vimUtils.override {inherit vim;}) buildVimPluginFrom2Nix;
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mic92 fixed the indentation

@ryantm
Copy link
Member Author

ryantm commented Sep 18, 2018

@Mic92 Do you approve of this as is? We should probably merge it quickly before someone wants to do something with vim plugins.

@Mic92 Mic92 merged commit cb293ec into NixOS:master Sep 18, 2018
@ryantm ryantm deleted the aliases branch September 19, 2018 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants