summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2009-03-10 12:01:22 +0000
committerPeter Simons <simons@cryp.to>2009-03-10 12:01:22 +0000
commit610aac30c39d7bbf0caf41e46d75e8842542facd (patch)
tree93a3402e65dc7463d75a013737d21e1520d228e3
parent68e6471a70f60ac68145a3da0d9aab83f087813b (diff)
downloadnixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.tar
nixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.tar.gz
nixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.tar.bz2
nixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.tar.lz
nixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.tar.xz
nixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.tar.zst
nixlib-610aac30c39d7bbf0caf41e46d75e8842542facd.zip
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
-rw-r--r--pkgs/development/python-modules/stringtemplate/default.nix4
-rw-r--r--pkgs/development/tools/parsing/antlr/antlr-2.7.6.nix5
-rw-r--r--pkgs/development/tools/parsing/antlr/builder2.sh16
-rw-r--r--pkgs/top-level/all-packages.nix15
4 files changed, 9 insertions, 31 deletions
diff --git a/pkgs/development/python-modules/stringtemplate/default.nix b/pkgs/development/python-modules/stringtemplate/default.nix
index 650edc7dab51..f70888f102fc 100644
--- a/pkgs/development/python-modules/stringtemplate/default.nix
+++ b/pkgs/development/python-modules/stringtemplate/default.nix
@@ -1,4 +1,4 @@
-{stdenv, fetchurl, python}:
+{stdenv, fetchurl, python, antlr}:
 
 stdenv.mkDerivation rec {
   name = "PyStringTemplate-${version}";
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
     url = "http://www.stringtemplate.org/download/${name}.tar.gz";
     sha256 = "0lbib0l8c1q7i1j610rwcdagymr1idahrql4dkgnm5rzyg2vk3ml";
   };
-  propagatedBuildInputs = [python];
+  propagatedBuildInputs = [python antlr];
   buildPhase = "true";
   installPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1";
 }
diff --git a/pkgs/development/tools/parsing/antlr/antlr-2.7.6.nix b/pkgs/development/tools/parsing/antlr/antlr-2.7.6.nix
index 43151ba589af..baadc510f89f 100644
--- a/pkgs/development/tools/parsing/antlr/antlr-2.7.6.nix
+++ b/pkgs/development/tools/parsing/antlr/antlr-2.7.6.nix
@@ -1,11 +1,10 @@
-{stdenv, fetchurl, jre}:
+{stdenv, fetchurl, jdk, python}:
 
 stdenv.mkDerivation {
   name = "antlr-2.7.6";
-  builder = ./builder2.sh;
   src = fetchurl {
     url = http://www.antlr.org/download/antlr-2.7.6.tar.gz;
     md5 = "17d8bf2e814f0a26631aadbbda8d7324";
   };
-  inherit jre;
+  buildInputs = [jdk python];
 }
diff --git a/pkgs/development/tools/parsing/antlr/builder2.sh b/pkgs/development/tools/parsing/antlr/builder2.sh
deleted file mode 100644
index 75477393aa22..000000000000
--- a/pkgs/development/tools/parsing/antlr/builder2.sh
+++ /dev/null
@@ -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
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index c450f5bb6056..39df23903f44 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1077,12 +1077,7 @@ let
   };
 
   pystringtemplate = import ../development/python-modules/stringtemplate {
-    inherit stdenv fetchurl python;
-    /* 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.
-     */
+    inherit stdenv fetchurl python antlr;
   };
 
   qtparted = import ../tools/misc/qtparted {
@@ -2226,7 +2221,7 @@ let
   };
 
   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 {
@@ -2885,7 +2880,7 @@ let
     inherit fetchurl stdenv builderDefs stringsWithDeps;
     singlePrecision = false;
   };
-  
+
   fftwSinglePrec = import ../development/libraries/fftw {
     inherit fetchurl stdenv builderDefs stringsWithDeps;
     singlePrecision = true;
@@ -6233,7 +6228,7 @@ let
   rhpl = import ../development/python-modules/rhpl {
     inherit stdenv fetchurl rpm cpio python wirelesstools gettext;
   };
-  
+
   sip = import ../development/python-modules/python-sip {
     inherit stdenv fetchurl python;
   };
@@ -8432,7 +8427,7 @@ let
     imagemagick = imagemagickBig;
     inherit (gtkLibs) glib gtk;
   };
-  
+
   pidginlatexSF = builderDefsPackage
     (import ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix)
     {