about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2015-07-27 21:49:52 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2015-08-10 23:12:03 +0200
commitd16bb1af3da9686ca48120bafb7e049d2ab60dc4 (patch)
tree1671d26008d419317cecfbaa52704dcd5c6befb3 /pkgs/applications
parent28bb4e4018115b6e35801876de135e526db663b3 (diff)
downloadnixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.tar
nixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.tar.gz
nixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.tar.bz2
nixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.tar.lz
nixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.tar.xz
nixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.tar.zst
nixlib-d16bb1af3da9686ca48120bafb7e049d2ab60dc4.zip
eclipse-checkstyle: init at 6.5.0.201504121610
Also add helper function for building packages from downloaded Eclipse
update site.
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/editors/eclipse/plugins.nix48
1 files changed, 47 insertions, 1 deletions
diff --git a/pkgs/applications/editors/eclipse/plugins.nix b/pkgs/applications/editors/eclipse/plugins.nix
index 1f851815858d..d65d1a48b88f 100644
--- a/pkgs/applications/editors/eclipse/plugins.nix
+++ b/pkgs/applications/editors/eclipse/plugins.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, unzip }:
+{ stdenv, fetchurl, fetchzip, unzip }:
 
 let
 
@@ -25,6 +25,32 @@ let
 
     };
 
+  # Helper for the case where we have a ZIP file containing an Eclipse
+  # update site.
+  buildEclipseUpdateSite = { name, version, src, meta }:
+    stdenv.mkDerivation {
+      name = "eclipse-" + name;
+      inherit meta src;
+
+      buildInputs = [ unzip ];
+      phases = [ "unpackPhase" "installPhase" ];
+
+      installPhase = ''
+        dropinDir="$out/eclipse/dropins/${name}"
+
+        cd features
+        for feature in *.jar; do
+          feat=''${feature%.jar}
+          mkdir -p $dropinDir/features/$feat
+          unzip $feature -d $dropinDir/features/$feat
+        done
+        cd ..
+
+        mkdir -p $dropinDir/plugins
+        cp -v "plugins/"*.jar $dropinDir/plugins/
+      '';
+    };
+
 in {
 
   anyedittools = buildEclipsePlugin rec {
@@ -51,6 +77,26 @@ in {
     };
   };
 
+  checkstyle = buildEclipseUpdateSite rec {
+    name = "checkstyle-${version}";
+    version = "6.5.0.201504121610";
+
+    src = fetchzip {
+      stripRoot = false;
+      url = "mirror://sourceforge/project/eclipse-cs/Eclipse%20Checkstyle%20Plug-in/6.5.0/net.sf.eclipsecs-updatesite_6.5.0.201504121610-bin.zip";
+      sha256 = "1zikpkss0c3l460ipvznp22kpak8w31n7k6yk41nc1w49zflvcf0";
+    };
+
+    meta = with stdenv.lib; {
+      homepage = http://eclipse-cs.sourceforge.net/;
+      description = "Checkstyle integration into the Eclipse IDE";
+      license = licenses.lgpl21;
+      platforms = platforms.all;
+      maintainers = [ maintainers.rycee ];
+    };
+
+  };
+
   color-theme = buildEclipsePlugin rec {
     name = "color-theme-${version}";
     version = "1.0.0.201410260308";