2009-07-07 17:13:45 +01:00
|
|
|
{ fetchsvn, stdenv, emacs, cedet, ant }:
|
|
|
|
|
|
|
|
let
|
2009-08-21 09:43:07 +01:00
|
|
|
revision = "137";
|
2009-07-07 17:13:45 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "jdee-svn${revision}";
|
|
|
|
|
|
|
|
# Last release is too old, so use SVN.
|
|
|
|
# See http://www.emacswiki.org/emacs/JavaDevelopmentEnvironment .
|
|
|
|
src = fetchsvn {
|
2010-03-01 17:08:08 +00:00
|
|
|
url = "https://jdee.svn.sourceforge.net/svnroot/jdee/trunk/jdee";
|
2009-07-07 17:13:45 +01:00
|
|
|
rev = revision;
|
2013-06-08 11:28:49 +01:00
|
|
|
sha256 = "1z1y957glbqm7z3dhah9h4jysw3173pq1gpx5agfwcw614n516xz";
|
2009-07-07 17:13:45 +01:00
|
|
|
};
|
|
|
|
|
2010-03-01 17:08:08 +00:00
|
|
|
patchFlags = "-p1 --ignore-whitespace";
|
|
|
|
|
2009-07-07 17:13:45 +01:00
|
|
|
patches = [
|
2009-08-21 09:43:07 +01:00
|
|
|
./build-properties.patch
|
|
|
|
./cedet-paths.patch ./elib-avltree.patch
|
|
|
|
./java-directory.patch
|
2009-07-07 17:13:45 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
configurePhase = ''
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "dist"
|
2009-07-07 17:13:45 +01:00
|
|
|
cat > build.properties <<EOF
|
|
|
|
dist.lisp.dir = dist/share/emacs/site-lisp
|
2014-01-09 12:01:38 +00:00
|
|
|
dist.java.lib.dir = dist/share/java
|
|
|
|
dist.jar.jde.file = dist/share/java/jde.jar
|
2009-07-07 17:13:45 +01:00
|
|
|
dist.java.src.dir = dist/src/${name}/java
|
|
|
|
dist.doc.dir dist/doc/${name}
|
|
|
|
prefix.dir = $out
|
|
|
|
cedet.dir = ${cedet}/share/emacs/site-lisp
|
2009-08-21 09:43:07 +01:00
|
|
|
elib.dir = /nowhere
|
2009-07-07 17:13:45 +01:00
|
|
|
build.bin.emacs = ${emacs}/bin/emacs
|
|
|
|
EOF
|
2009-07-08 14:23:32 +01:00
|
|
|
|
2009-07-16 16:21:15 +01:00
|
|
|
# Substitute variables, à la Autoconf.
|
2009-08-21 09:43:07 +01:00
|
|
|
for i in "lisp/"*.el
|
2009-07-08 14:23:32 +01:00
|
|
|
do
|
2009-07-16 16:21:15 +01:00
|
|
|
sed -i "$i" -e "s|@out@|$out|g ;
|
2014-01-09 12:01:38 +00:00
|
|
|
s|@javadir@|$out/share/java|g ;
|
2009-07-16 16:21:15 +01:00
|
|
|
s|@datadir@|$out/share/${name}|g"
|
2009-07-08 14:23:32 +01:00
|
|
|
done
|
2009-07-07 17:13:45 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = "ant dist";
|
2009-07-16 16:21:15 +01:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
ant install
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
mkdir -p "$out/share/${name}"
|
2009-07-16 16:21:15 +01:00
|
|
|
cp -rv java/bsh-commands "$out/share/${name}"
|
2009-07-16 16:39:05 +01:00
|
|
|
|
|
|
|
# Move everything that's not a JAR to $datadir. This includes
|
|
|
|
# `sun_checks.xml', license files, etc.
|
2014-01-09 12:01:38 +00:00
|
|
|
cd "$out/share/java"
|
2009-07-16 16:39:05 +01:00
|
|
|
for i in *
|
|
|
|
do
|
|
|
|
if echo $i | grep -qv '\.jar''$'
|
|
|
|
then
|
|
|
|
mv -v "$i" "$out/share/${name}"
|
|
|
|
fi
|
|
|
|
done
|
2009-07-16 16:21:15 +01:00
|
|
|
'';
|
2009-07-07 17:13:45 +01:00
|
|
|
|
|
|
|
buildInputs = [ emacs ant ];
|
|
|
|
propagatedBuildInputs = [ cedet ];
|
2009-07-16 15:05:14 +01:00
|
|
|
propagatedUserEnvPkgs = propagatedBuildInputs; # FIXME: Not honored
|
2009-07-07 17:13:45 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "JDEE, a Java development environment for Emacs";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
The JDEE is a software package that interfaces Emacs to
|
|
|
|
command-line Java development tools (for example, JavaSoft's
|
|
|
|
JDK). JDEE features include:
|
|
|
|
|
|
|
|
* JDEE menu with compile, run, debug, build, browse, project,
|
|
|
|
and help commands
|
|
|
|
* syntax coloring
|
|
|
|
* auto indentation
|
|
|
|
* compile error to source links
|
|
|
|
* source-level debugging
|
|
|
|
* source code browsing
|
|
|
|
* make file support
|
|
|
|
* automatic code generation
|
|
|
|
* Java source interpreter (Pat Neimeyer's BeanShell)
|
|
|
|
'';
|
|
|
|
|
2014-06-19 05:19:00 +01:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2009-07-07 17:13:45 +01:00
|
|
|
|
2013-08-16 22:44:33 +01:00
|
|
|
maintainers = [ ];
|
2010-03-01 17:08:08 +00:00
|
|
|
platforms = stdenv.lib.platforms.gnu; # arbitrary choice
|
2014-08-08 16:58:34 +01:00
|
|
|
|
|
|
|
broken = true;
|
2009-07-07 17:13:45 +01:00
|
|
|
};
|
|
|
|
}
|