Fixed Python StringTemplate library.

Most importantly, this change required updating the ANTLR 2.x expression to
install the Python run-time library. While we're at it, we're building the
run-time library for C++ and Java, too. There is still work to be done: the
stringtemplate library doesn't find antlr.py without help yet.

svn path=/nixpkgs/trunk/; revision=14489
This commit is contained in:
Peter Simons 2009-03-10 12:01:22 +00:00
parent 68e6471a70
commit 610aac30c3
4 changed files with 9 additions and 31 deletions

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, python}: {stdenv, fetchurl, python, antlr}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "PyStringTemplate-${version}"; name = "PyStringTemplate-${version}";
@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
url = "http://www.stringtemplate.org/download/${name}.tar.gz"; url = "http://www.stringtemplate.org/download/${name}.tar.gz";
sha256 = "0lbib0l8c1q7i1j610rwcdagymr1idahrql4dkgnm5rzyg2vk3ml"; sha256 = "0lbib0l8c1q7i1j610rwcdagymr1idahrql4dkgnm5rzyg2vk3ml";
}; };
propagatedBuildInputs = [python]; propagatedBuildInputs = [python antlr];
buildPhase = "true"; buildPhase = "true";
installPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1"; installPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1";
} }

View File

@ -1,11 +1,10 @@
{stdenv, fetchurl, jre}: {stdenv, fetchurl, jdk, python}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "antlr-2.7.6"; name = "antlr-2.7.6";
builder = ./builder2.sh;
src = fetchurl { src = fetchurl {
url = http://www.antlr.org/download/antlr-2.7.6.tar.gz; url = http://www.antlr.org/download/antlr-2.7.6.tar.gz;
md5 = "17d8bf2e814f0a26631aadbbda8d7324"; md5 = "17d8bf2e814f0a26631aadbbda8d7324";
}; };
inherit jre; buildInputs = [jdk python];
} }

View File

@ -1,16 +0,0 @@
source $stdenv/setup
tar zxvf $src
cd antlr-*
ensureDir $out/bin
ensureDir $out/lib/$name
cp antlr.jar $out/lib/$name
cat > $out/bin/antlr <<EOF
#! $SHELL
$jre/bin/java -cp $out/lib/$name/antlr.jar -Xms200M -Xmx400M antlr.Tool \$*
EOF
chmod u+x $out/bin/antlr

View File

@ -1077,12 +1077,7 @@ let
}; };
pystringtemplate = import ../development/python-modules/stringtemplate { pystringtemplate = import ../development/python-modules/stringtemplate {
inherit stdenv fetchurl python; inherit stdenv fetchurl python antlr;
/* TODO: Some parts of this package depend on the ANTLR run-time library
* for Python. We have a package for ANTLR3, too, but that one is
* rather big and contains much more than we need. I guess this issue
* calls for some clever refactoring.
*/
}; };
qtparted = import ../tools/misc/qtparted { qtparted = import ../tools/misc/qtparted {
@ -2226,7 +2221,7 @@ let
}; };
antlr = import ../development/tools/parsing/antlr/antlr-2.7.6.nix { antlr = import ../development/tools/parsing/antlr/antlr-2.7.6.nix {
inherit fetchurl stdenv jre; inherit fetchurl stdenv jdk python;
}; };
antlr3 = import ../development/tools/parsing/antlr { antlr3 = import ../development/tools/parsing/antlr {