summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/icecat-3/default.nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-09-29 21:58:25 +0000
committerLudovic Courtès <ludo@gnu.org>2008-09-29 21:58:25 +0000
commitb46faa7a45e72efbf32162f6f11e05f06de6c18d (patch)
tree93c356c189823969ff847f91a1c5f633d94d1039 /pkgs/applications/networking/browsers/icecat-3/default.nix
parent2e3034709991fa20f1833137cddbb4c8b6511b8d (diff)
GNU IceCat: Allow compilation of XulRunner.
In turn, this allows compilation of plug-ins like MPlayer's.

svn path=/nixpkgs/trunk/; revision=12930
Diffstat (limited to 'pkgs/applications/networking/browsers/icecat-3/default.nix')
-rw-r--r--pkgs/applications/networking/browsers/icecat-3/default.nix38
1 files changed, 25 insertions, 13 deletions
diff --git a/pkgs/applications/networking/browsers/icecat-3/default.nix b/pkgs/applications/networking/browsers/icecat-3/default.nix
index 061c471dc6579..26b42a6714648 100644
--- a/pkgs/applications/networking/browsers/icecat-3/default.nix
+++ b/pkgs/applications/networking/browsers/icecat-3/default.nix
@@ -1,7 +1,8 @@
 { stdenv, fetchurl, lzma, pkgconfig, gtk, pango, perl, python, zip, libIDL
 , libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
 , gnomevfs, libgnomeui
-, freetype, fontconfig }:
+, freetype, fontconfig
+, application ? "browser" }:
 
 let version = "3.0.2-g1"; in
 stdenv.mkDerivation {
@@ -25,7 +26,7 @@ stdenv.mkDerivation {
   patches = [ ./skip-gre-registration.patch ];
 
   configureFlags = [
-    "--enable-application=browser"
+    "--enable-application=${application}"
     "--enable-libxul"
     "--disable-javaxpcom"
 
@@ -47,24 +48,35 @@ stdenv.mkDerivation {
 
     # Strip some more stuff
     strip -S $out/lib/*/* || true
-
-    # Fix some references to /bin paths in the IceCat shell script.
-    substituteInPlace $out/bin/icecat \
-        --replace /bin/pwd "$(type -tP pwd)" \
-        --replace /bin/ls "$(type -tP ls)"
     
     # This fixes starting IceCat when there already is a running
     # instance.  The `icecat' wrapper script actually expects to be
     # in the same directory as `run-mozilla.sh', apparently.
     libDir=$(cd $out/lib && ls -d icecat-[0-9]*)
     test -n "$libDir"
-    cd $out/bin
-    mv icecat ../lib/$libDir/
-    ln -s ../lib/$libDir/icecat .
 
-    # Register extensions etc.
-    echo "running icecat -register..."
-    (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./icecat-bin -register) || false
+    if [ -f "$out/bin/icecat" ]
+    then
+        # Fix references to /bin paths in the IceCat shell script.
+        substituteInPlace $out/bin/icecat		\
+            --replace /bin/pwd "$(type -tP pwd)"	\
+            --replace /bin/ls "$(type -tP ls)"
+
+        cd $out/bin
+        mv icecat ../lib/$libDir/
+        ln -s ../lib/$libDir/icecat .
+
+        # Register extensions etc.
+        echo "running \`icecat -register'..."
+        (cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./icecat-bin -register) || false
+    fi
+
+    if [ -f "$out/lib/$libDir/xpidl" ]
+    then
+        # XulRunner's IDL compiler.
+        echo "linking \`xpidl'..."
+        ln -s "$out/lib/$libDir/xpidl" "$out/bin"
+    fi
 
     # Put the GNU IceCat icon in the right place.
     ensureDir $out/lib/$libDir/chrome/icons/default