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

vimPlugis.gist-vim: depend on vimPlugins.WebAPI #43399

Closed
wants to merge 1 commit into from

Conversation

kalbasit
Copy link
Member

Motivation for this change

I'm trying to use :Gist from NeoVim, but I get the following error:

Gist: require 'webapi', install https://github.com/mattn/webapi-vim
Gist: require 'webapi', install https://github.com/mattn/webapi-vim
E117: Unknown function: gist#Gist
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

When I try to generate with nix-shell -p vimPlugins.pluginnames2nix --command "vim-plugin-names-to-nix", I do not see the dependency I've just added. Can someone help to get this fixed? Thanks!

This fixes the following error when using `:Gist`

```vimL
Gist: require 'webapi', install https://github.com/mattn/webapi-vim
Gist: require 'webapi', install https://github.com/mattn/webapi-vim
E117: Unknown function: gist#Gist
```
@@ -1863,7 +1863,7 @@ rec {
rev = "f0d63579eab7548cf12f979dc52ef5a370ecbe63";
sha256 = "06nix49j4inxy3rkcv32f4ka89g4crqwfqnrm3b76iwwky8m2p17";
};
dependencies = [];
dependencies = ["WebAPI"];
Copy link
Member

Choose a reason for hiding this comment

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

This will get overwritten unless persisted in nixpkgs/pkgs/misc/vim-plugins/vim2nix/additional-nix-code/. Also I am not sure how this would work for the dependencies field that is usually interfered by vim2nix. If there is no easy way to do this it is better to remove this plugin from nixpkgs/pkgs/misc/vim-plugins/vim-plugin-names and move it up in the file so it will not be automatically updated.

Copy link
Member

Choose a reason for hiding this comment

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

Dependencies are usually found by a file like this in the plugin repository: https://github.com/MarcWeber/vim-addon-manager/blob/master/addon-info.json
You could make a pull request for gist-vim to add this file. Otherwise you can stick to the alternative I described before.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you @Mic92 for the review. I filed a PR upstream, if @mattn is not willing to add it upstream, my other options would be to extend nix#NixDerivation to support a concept of additional_dependencies.

Copy link
Member

Choose a reason for hiding this comment

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

@Mic92 problem with that is it's text substitution and dependencies = []; already gets defined 😕

Copy link
Member

@Mic92 Mic92 Jul 13, 2018

Choose a reason for hiding this comment

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

Yes I would love to finish my non-viml rewrite some time, so we could get rid of those stupid limitations.

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

5 participants