2012-01-17 22:40:05 +00:00
|
|
|
{ stdenv, fetchurl, ant, jre }:
|
2010-07-28 12:55:54 +01:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
stdenv.mkDerivation {
|
2012-01-17 22:40:05 +00:00
|
|
|
name = "jedit-4.4.2";
|
2007-11-16 17:06:53 +00:00
|
|
|
|
2008-01-30 17:20:48 +00:00
|
|
|
src = fetchurl {
|
2012-01-17 22:40:05 +00:00
|
|
|
url = mirror://sf/jedit/jedit4.4.2source.tar.bz2;
|
|
|
|
sha256 = "5e9ad9c32871b77ef0b9fe46dcfcea57ec52558d36113b7280194a33430b8ceb";
|
2007-11-16 17:06:53 +00:00
|
|
|
};
|
|
|
|
|
2012-01-17 22:40:05 +00:00
|
|
|
setSourceRoot = ''
|
|
|
|
sourceRoot=jEdit
|
|
|
|
'';
|
2007-11-16 17:06:53 +00:00
|
|
|
|
2012-01-17 22:40:05 +00:00
|
|
|
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
|
|
|
|
'';
|
2007-11-16 17:06:53 +00:00
|
|
|
|
2010-07-28 12:55:54 +01:00
|
|
|
buildInputs = [ ant ];
|
2007-11-16 17:06:53 +00:00
|
|
|
|
|
|
|
meta = {
|
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;
|
|
|
|
license = "GPL";
|
2007-11-16 17:06:53 +00:00
|
|
|
};
|
|
|
|
}
|