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

eclipse-plugin-vrapper: init at 0.72.0 #29948

Closed
wants to merge 1 commit into from

Conversation

stumoss
Copy link
Contributor

@stumoss stumoss commented Sep 30, 2017

Motivation for this change

Add the vrapper plugin to eclipse

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

repo = "vrapper";
date = "20170311";

src = fetchzip {
Copy link
Member

Choose a reason for hiding this comment

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

Why not fetchFromGitHub?

Copy link
Member

Choose a reason for hiding this comment

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

I believe this has to be fetchzip because it needs to download the generated update site, not the actual repository content.

Copy link
Member

Choose a reason for hiding this comment

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

Oh right interesting, my bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mainly this was done as there is no other plugin currently using fetchFromGithub. I'm happy to use it if that's the preferred way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rycee is correct, the generated update site is required rather than the repo content so I've left that as is.

Copy link
Member

Choose a reason for hiding this comment

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

@rycee @stumoss If you don't mind, what do you mean by the generated update site? (I'm not disputing just curious.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vyp I'm not an expert on eclipse plugins (I just had an itch for vim compatible keybindings) but as far as I understand an update site is just the "Eclipse way" of packaging plugins. Essentially you generate a directory structure and xml file that describes the structure. This can then be pointed to from within eclipse's "Install New Software" menu. Eclipse will know how to install the software assuming you have packaged it correctly.

I believe this link might help describe it better than I can.

Copy link
Member

Choose a reason for hiding this comment

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

@vyp Eclipse has this concept of an "update site" that it uses to download plugins (and check for updates). This is just a static web site having a special directory structure holding one or more plugins (in Java JAR files) and some meta files. For vrapper the update site seems to be here: http://vrapper.sourceforge.net/update-site/stable/ and the root file is typically called site.xml. To install plugins through Eclipse you can add the update site URL and Eclipse will let you install any plugins found there.

Fortunately for us, many plugin authors also provide the update site as a downloadable ZIP file and the support code in plugins.nix knows about the directory structure and can install plugins from this downloaded update site.

As a consequence we have that the Eclipse plugins in NixOS are all installed as prebuilt JARs. None of them are built from source and therefore one typically wouldn't set the derivation src to download the plugin source code (like using fetchFromGitHub).

Copy link
Member

Choose a reason for hiding this comment

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

Wow that's super interesting, thank you both for your detailed answers!


meta = with stdenv.lib; {
homepage = "https://github.com/vrapper/vrapper";
description = "Vrapper is an Eclipse plugin which acts as a wrapper for Eclipse text editors to provide a Vim-like input scheme for moving around and editing text";
Copy link
Member

Choose a reason for hiding this comment

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

Description should not start with the package name.

url = "https://github.com/${owner}/${repo}/releases/download/${version}/vrapper_${version}_${date}.zip";
sha256 = "0nyirf6km97q211cxfy01kidxac20m8ba3kk9xj73ykrhsk3cxjp";

meta = with stdenv.lib; {
Copy link
Member

Choose a reason for hiding this comment

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

Move the meta block outside of src.

description = "Vrapper is an Eclipse plugin which acts as a wrapper for Eclipse text editors to provide a Vim-like input scheme for moving around and editing text";
license = licenses.gpl3;
platforms = platforms.all;
};
Copy link
Member

Choose a reason for hiding this comment

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

Add maintainers.

@rycee
Copy link
Member

rycee commented Oct 2, 2017

Looking good now. Rebased to master in 796b3a2. Many thanks for your contribution!

@rycee rycee closed this Oct 2, 2017
@stumoss stumoss deleted the new-eclipse-plugin-vrapper branch October 3, 2017 08:16
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

4 participants