2015-03-08 14:07:29 +00:00
|
|
|
{ stdenv, fetchurl, ant, jdk, commonsBsf, commonsLogging }:
|
2014-01-03 13:31:57 +00:00
|
|
|
|
2014-11-08 14:00:55 +00:00
|
|
|
let
|
2015-03-08 14:07:29 +00:00
|
|
|
version = "5.2.0";
|
2014-11-08 14:00:55 +00:00
|
|
|
bsh = fetchurl {
|
|
|
|
url = http://www.beanshell.org/bsh-2.0b4.jar;
|
|
|
|
sha256 = "1di7hj2yms1m3wa8k70jpw0wzfnrgibpqnvdk33ahfaqi03mqfci";
|
|
|
|
};
|
|
|
|
bcpg = fetchurl {
|
|
|
|
url = http://central.maven.org/maven2/org/bouncycastle/bcpg-jdk16/1.46/bcpg-jdk16-1.46.jar;
|
|
|
|
sha256 = "16xhmwks4l65m5x150nd23y5lyppha9sa5fj65rzhxw66gbli82d";
|
|
|
|
};
|
|
|
|
jsr305 = fetchurl {
|
|
|
|
url = http://central.maven.org/maven2/com/google/code/findbugs/jsr305/2.0.0/jsr305-2.0.0.jar;
|
|
|
|
sha256 = "0s74pv8qjc42c7q8nbc0c3b1hgx0bmk3b8vbk1z80p4bbgx56zqy";
|
|
|
|
};
|
|
|
|
in
|
2010-07-28 12:55:54 +01:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
stdenv.mkDerivation {
|
2014-01-03 13:31:57 +00:00
|
|
|
name = "jedit-${version}";
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2014-01-03 13:31:57 +00:00
|
|
|
url = "mirror://sourceforge/jedit/jedit${version}source.tar.bz2";
|
2015-03-08 14:07:29 +00:00
|
|
|
sha256 = "03wmbh90rl5lsc35d7jwcp9j5qyyzq1nccxf4fal8bmnx8n4si0x";
|
2007-11-16 17:06:53 +00:00
|
|
|
};
|
|
|
|
|
2014-11-08 14:00:55 +00:00
|
|
|
buildInputs = [ ant jdk commonsBsf commonsLogging ];
|
|
|
|
|
|
|
|
# This patch removes from the build process:
|
|
|
|
# - the automatic download of dependencies (see configurePhase);
|
|
|
|
# - the tests
|
|
|
|
patches = [ ./build.xml.patch ];
|
2007-11-16 17:06:53 +00:00
|
|
|
|
2014-11-08 14:00:55 +00:00
|
|
|
configurePhase = ''
|
|
|
|
mkdir -p lib/ant-contrib/ lib/scripting lib/compile lib/default-plugins
|
|
|
|
cp ${ant}/lib/ant/lib/ant-contrib-*.jar lib/ant-contrib/
|
|
|
|
cp ${bsh} ${bcpg} lib/scripting/
|
|
|
|
cp ${jsr305} lib/compile/
|
|
|
|
'';
|
2014-01-03 13:31:57 +00:00
|
|
|
|
|
|
|
buildPhase = "ant build";
|
2012-01-17 22:40:05 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/jEdit
|
2014-11-08 14:00:55 +00:00
|
|
|
cp -r build/jedit.jar doc icons keymaps macros modes startup $out/share/jEdit
|
2014-01-03 13:31:57 +00:00
|
|
|
|
2012-01-17 22:40:05 +00:00
|
|
|
sed -i "s|Icon=.*|Icon=$out/share/jEdit/icons/jedit-icon48.png|g" package-files/linux/deb/jedit.desktop
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/share/applications
|
2012-01-17 22:40:05 +00:00
|
|
|
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
|
2015-01-01 23:49:20 +00:00
|
|
|
> JAVA_HOME=${jdk.jre.home}/jre
|
2012-01-17 22:40:05 +00:00
|
|
|
>
|
|
|
|
EOF
|
|
|
|
sed -i "s|/usr/share/jEdit/@jar.filename@|$out/share/jEdit/jedit.jar|g" package-files/linux/jedit
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p $out/bin
|
2012-01-17 22:40:05 +00:00
|
|
|
cp package-files/linux/jedit $out/bin/jedit
|
|
|
|
chmod +x $out/bin/jedit
|
|
|
|
'';
|
2007-11-16 17:06:53 +00:00
|
|
|
|
2014-11-08 14:00:55 +00:00
|
|
|
meta = with stdenv.lib; {
|
2012-01-17 22:40:05 +00:00
|
|
|
description = "Mature programmer's text editor (Java based)";
|
2010-07-28 12:55:54 +01:00
|
|
|
homepage = http://www.jedit.org;
|
2014-11-08 14:00:55 +00:00
|
|
|
license = licenses.gpl2;
|
2015-03-08 14:07:29 +00:00
|
|
|
platforms = platforms.unix;
|
2014-11-08 14:00:55 +00:00
|
|
|
maintainers = [ maintainers.vbgl ];
|
2007-11-16 17:06:53 +00:00
|
|
|
};
|
|
|
|
}
|