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
Conversation
repo = "vrapper"; | ||
date = "20170311"; | ||
|
||
src = fetchzip { |
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.
Why not fetchFromGitHub
?
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 believe this has to be fetchzip
because it needs to download the generated update site, not the actual repository content.
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.
Oh right interesting, my bad.
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.
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.
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.
@rycee is correct, the generated update site is required rather than the repo content so I've left that as is.
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.
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.
@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.
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.
@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
).
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.
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"; |
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.
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; { |
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.
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; | ||
}; |
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.
Add maintainers
.
f6a03c7
to
bed8a6b
Compare
bed8a6b
to
2a80d56
Compare
Looking good now. Rebased to master in 796b3a2. Many thanks for your contribution! |
Motivation for this change
Add the vrapper plugin to eclipse
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)