summary refs log tree commit diff
path: root/pkgs/applications/editors/eclipse/plugins.nix
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2015-07-26 10:38:04 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2015-08-10 23:12:02 +0200
commit733d9022993277dd5ef3b352244631c32c24f09a (patch)
treec16d7b5fc89861d448dfeeb14765551e2a338f13 /pkgs/applications/editors/eclipse/plugins.nix
parent3310ebe993affad7c91eb912985c16be452ee86f (diff)
downloadnixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.tar
nixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.tar.gz
nixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.tar.bz2
nixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.tar.lz
nixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.tar.xz
nixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.tar.zst
nixpkgs-733d9022993277dd5ef3b352244631c32c24f09a.zip
eclipse-anyedittools: init at 2.4.15.201504172030
This commit also introduces some infrastructure surrounding Eclipse
plugins.
Diffstat (limited to 'pkgs/applications/editors/eclipse/plugins.nix')
-rw-r--r--pkgs/applications/editors/eclipse/plugins.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix
new file mode 100644
index 00000000000..a280df08f15
--- /dev/null
+++ b/pkgs/applications/editors/eclipse/plugins.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchurl, unzip }:
+
+let
+
+  # Helper for the common case where we have separate feature and
+  # plugin JARs.
+  buildEclipsePlugin = { name, version, javaName, srcFeature, srcPlugin, meta }:
+    stdenv.mkDerivation {
+      name = "eclipse-" + name;
+      inherit meta;
+
+      srcs = [ srcFeature srcPlugin ];
+
+      buildInputs = [ unzip ];
+      phases = [ "installPhase" ];
+
+      installPhase = ''
+        dropinDir="$out/eclipse/dropins/${name}"
+        mkdir -p $dropinDir/features/${javaName}_${version}
+        unzip ${srcFeature} -d $dropinDir/features/${javaName}_${version}
+
+        mkdir -p $dropinDir/plugins
+        cp -v ${srcPlugin} $dropinDir/plugins/${javaName}_${version}.jar
+      '';
+
+    };
+
+in {
+
+  anyedittools = buildEclipsePlugin rec {
+    name = "anyedit-${version}";
+    version = "2.4.15.201504172030";
+    javaName = "de.loskutov.anyedit.AnyEditTools";
+
+    srcFeature = fetchurl {
+      url = "http://andrei.gmxhome.de/eclipse/features/AnyEditTools_${version}.jar";
+      sha256 = "19hbwgqn02ghflbcp5cw3qy203mym5kwgzq4xrn0xcl8ckl5s2pp";
+    };
+
+    srcPlugin = fetchurl {
+      url = "http://dl.bintray.com/iloveeclipse/plugins/${javaName}_${version}.jar";
+      sha256 = "1i3ghf2mhdfhify30hlyxqmyqcp40pkd5zhsiyg6finn4w81sxv2";
+    };
+
+    meta = with stdenv.lib; {
+      homepage = http://andrei.gmxhome.de/anyedit/;
+      description = "Adds new tools to the context menu of text-based editors";
+      license = licenses.epl10;
+      platforms = platforms.all;
+      maintainers = [ maintainers.rycee ];
+    };
+  };
+
+}