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.vim-clang-format: init at 2019-05-15 #95366

Merged
merged 2 commits into from Aug 15, 2020

Conversation

siriobalmelli
Copy link
Contributor

Signed-off-by: Sirio Balmelli sirio@b-ad.ch

Motivation for this change

I daily-drive nixpkgs.neovim on Darwin and Linux, and wanted vim-clang-format plugin

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

Comment on lines 582 to 584
vim-clang-format = super.vim-clang-format.overrideAttrs(old: {
propagatedBuildInputs = [ clang-tools ];
});
Copy link
Contributor

Choose a reason for hiding this comment

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

I would prefer patching, and avoid adding stuff to a user's path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, tracking.

My experience falls a bit short here, and I didn't see any other examples in overrides.nix of how one would patch in a dependency like that 😅

For simplicity's sake I've opted for just the standard plugin for now, and I'm betting a large majority of users for this plugin will already have clang-format in their environment.

If you're not happy with this approach I'm happy to figure out patching, please point to any docs/examples and I'll got work through it 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I can't find any great examples either, but I'm fine with refining it in a different PR.

I think most people will figure out that they need clang-format available for it to work.

maybe propagating is the solution, and I've been reviewing too many python packages

@siriobalmelli
Copy link
Contributor Author

also, please follow https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/vim.section.md#adding-new-plugins-to-nixpkgs

There should be two commits

Ok, fixed, thank you.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

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

LGTM

Result of nixpkgs-review pr 95366 1

60 packages built: - vimPlugins.NeoSolarized - vimPlugins.YouCompleteMe - vimPlugins.ale - vimPlugins.coc-fzf - vimPlugins.coc-go - vimPlugins.coc-nvim - vimPlugins.completion-nvim - vimPlugins.conjure - vimPlugins.dart-vim-plugin - vimPlugins.defx-git - vimPlugins.defx-icons - vimPlugins.defx-nvim - vimPlugins.deoplete-fish - vimPlugins.deoplete-jedi - vimPlugins.deoplete-khard - vimPlugins.deoplete-nvim - vimPlugins.fzf-vim - vimPlugins.ghcid - vimPlugins.kotlin-vim - vimPlugins.lh-vim-lib - vimPlugins.lightline-vim - vimPlugins.ncm2-jedi - vimPlugins.neocomplete-vim - vimPlugins.neoterm - vimPlugins.nerdtree - vimPlugins.neuron-vim - vimPlugins.nvim-lsp - vimPlugins.nvim-treesitter - vimPlugins.onedark-vim - vimPlugins.palenight-vim - vimPlugins.syntastic - vimPlugins.unicode-vim - vimPlugins.vim-airline - vimPlugins.vim-bazel - vimPlugins.vim-beancount - vimPlugins.vim-clang-format - vimPlugins.vim-codefmt - vimPlugins.vim-css-color - vimPlugins.vim-devicons - vimPlugins.vim-eunuch - vimPlugins.vim-fireplace - vimPlugins.vim-floaterm - vimPlugins.vim-gitgutter - vimPlugins.vim-go - vimPlugins.vim-maktaba - vimPlugins.vim-monokai - vimPlugins.vim-one - vimPlugins.vim-pandoc-syntax - vimPlugins.vim-plug - vimPlugins.vim-polyglot - vimPlugins.vim-signify - vimPlugins.vim-slime - vimPlugins.vim-snippets - vimPlugins.vim-terraform - vimPlugins.vim-test - vimPlugins.vim-visual-multi - vimPlugins.vim-vsnip - vimPlugins.vim-which-key - vimPlugins.vimtex - vimPlugins.vista-vim

@jonringer jonringer merged commit b8b19c6 into NixOS:master Aug 15, 2020
@siriobalmelli siriobalmelli deleted the add/vim-clang-format branch August 15, 2020 11:19
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

2 participants