From b02bc1ef59f4d3728509150ea5a04cfb323f31a9 Mon Sep 17 00:00:00 2001 From: Arie Middelkoop Date: Tue, 17 Jan 2012 22:40:05 +0000 Subject: [PATCH] Update of the 'jedit' package. svn path=/nixpkgs/trunk/; revision=31614 --- pkgs/applications/editors/jedit/default.nix | 53 +++++++++++++++------ 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/editors/jedit/default.nix b/pkgs/applications/editors/jedit/default.nix index f49919b70bb4..5349f10c0c36 100644 --- a/pkgs/applications/editors/jedit/default.nix +++ b/pkgs/applications/editors/jedit/default.nix @@ -1,28 +1,53 @@ -{ stdenv, fetchurl, ant }: +{ stdenv, fetchurl, ant, jre }: stdenv.mkDerivation { - name = "jedit-4.2"; + name = "jedit-4.4.2"; src = fetchurl { - url = mirror://sf/jedit/jedit42source.tar.gz; - sha256 = "1ckqghsw2r30kfkqfgjl4k47gdwpz8c1h85haw0y0ymq4rqh798j"; + url = mirror://sf/jedit/jedit4.4.2source.tar.bz2; + sha256 = "5e9ad9c32871b77ef0b9fe46dcfcea57ec52558d36113b7280194a33430b8ceb"; }; - phases = "unpackPhase buildPhase"; + setSourceRoot = '' + sourceRoot=jEdit + ''; - buildPhase = " - sed -i 's/\\/org.gjt.sp.jedit.gui.SplashScreen/g' org/gjt/sp/jedit/GUIUtilities.java - ant dist - ensureDir $out/lib - cp jedit.jar $out/lib - ensureDir \$out/lib/modes - cp modes/catalog \$out/lib/modes - "; + buildPhase = '' + ant build + ''; + + installPhase = '' + ensureDir $out/share/jEdit + cp build/jedit.jar $out/share/jEdit + ensureDir $out/share/jEdit/modes + cp -r modes/* $out/share/jEdit/modes + ensureDir $out/share/jEdit/icons + cp -r icons/* $out/share/jEdit/icons + ensureDir $out/share/jEdit/macros + cp -r macros/* $out/share/jEdit/macros + ensureDir $out/share/jEdit/doc + cp -r doc/* $out/share/jEdit/doc + + sed -i "s|Icon=.*|Icon=$out/share/jEdit/icons/jedit-icon48.png|g" package-files/linux/deb/jedit.desktop + ensureDir $out/share/applications + mv package-files/linux/deb/jedit.desktop $out/share/applications/jedit.desktop + + patch package-files/linux/jedit << EOF + 5a6,8 + > # specify the correct JAVA_HOME + > JAVA_HOME=${jre} + > + EOF + sed -i "s|/usr/share/jEdit/@jar.filename@|$out/share/jEdit/jedit.jar|g" package-files/linux/jedit + ensureDir $out/bin + cp package-files/linux/jedit $out/bin/jedit + chmod +x $out/bin/jedit + ''; buildInputs = [ ant ]; meta = { - description = "really nice programmers editor written in Java. Give it a try"; + description = "Mature programmer's text editor (Java based)"; homepage = http://www.jedit.org; license = "GPL"; };