2014-01-03 14:31:57 +01:00
|
|
|
{ stdenv, fetchurl, ant, jdk }:
|
|
|
|
|
|
|
|
let version = "4.4.2"; in
|
2010-07-28 13:55:54 +02:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
stdenv.mkDerivation {
|
2014-01-03 14:31:57 +01:00
|
|
|
name = "jedit-${version}";
|
2007-11-16 18:06:53 +01:00
|
|
|
|
2008-01-30 18:20:48 +01:00
|
|
|
src = fetchurl {
|
2014-01-03 14:31:57 +01:00
|
|
|
url = "mirror://sourceforge/jedit/jedit${version}source.tar.bz2";
|
2012-01-17 23:40:05 +01:00
|
|
|
sha256 = "5e9ad9c32871b77ef0b9fe46dcfcea57ec52558d36113b7280194a33430b8ceb";
|
2007-11-16 18:06:53 +01:00
|
|
|
};
|
|
|
|
|
2014-01-03 14:31:57 +01:00
|
|
|
buildInputs = [ ant jdk ];
|
2007-11-16 18:06:53 +01:00
|
|
|
|
2014-01-03 14:31:57 +01:00
|
|
|
sourceRoot = "jEdit";
|
|
|
|
|
|
|
|
buildPhase = "ant build";
|
2012-01-17 23:40:05 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/jEdit
|
2012-01-17 23:40:05 +01:00
|
|
|
cp build/jedit.jar $out/share/jEdit
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/jEdit/modes
|
2012-01-17 23:40:05 +01:00
|
|
|
cp -r modes/* $out/share/jEdit/modes
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/jEdit/icons
|
2012-01-17 23:40:05 +01:00
|
|
|
cp -r icons/* $out/share/jEdit/icons
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/jEdit/macros
|
2012-01-17 23:40:05 +01:00
|
|
|
cp -r macros/* $out/share/jEdit/macros
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/jEdit/doc
|
2012-01-17 23:40:05 +01:00
|
|
|
cp -r doc/* $out/share/jEdit/doc
|
2014-01-03 14:31:57 +01:00
|
|
|
|
2012-01-17 23:40:05 +01:00
|
|
|
sed -i "s|Icon=.*|Icon=$out/share/jEdit/icons/jedit-icon48.png|g" package-files/linux/deb/jedit.desktop
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/share/applications
|
2012-01-17 23:40:05 +01: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
|
2014-01-03 14:31:57 +01:00
|
|
|
> JAVA_HOME=${jdk.jre}/lib/openjdk/jre
|
2012-01-17 23:40:05 +01:00
|
|
|
>
|
|
|
|
EOF
|
|
|
|
sed -i "s|/usr/share/jEdit/@jar.filename@|$out/share/jEdit/jedit.jar|g" package-files/linux/jedit
|
2012-01-18 21:16:00 +01:00
|
|
|
mkdir -p $out/bin
|
2012-01-17 23:40:05 +01:00
|
|
|
cp package-files/linux/jedit $out/bin/jedit
|
|
|
|
chmod +x $out/bin/jedit
|
|
|
|
'';
|
2007-11-16 18:06:53 +01:00
|
|
|
|
2014-01-03 14:31:57 +01:00
|
|
|
meta = {
|
2012-01-17 23:40:05 +01:00
|
|
|
description = "Mature programmer's text editor (Java based)";
|
2010-07-28 13:55:54 +02:00
|
|
|
homepage = http://www.jedit.org;
|
|
|
|
license = "GPL";
|
2007-11-16 18:06:53 +01:00
|
|
|
};
|
|
|
|
}
|