mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
* Build Firefox 3 on top of xulrunner. This significantly reduces the
build time and makes Firefox itself only 3 megabytes or so large. * Fixed building the mplayerplug-in on Firefox 3. Since the latter now uses xulrunner, we no longer need the firefox3Xul hack. TODO: do this for Icecat as well. svn path=/nixpkgs/trunk/; revision=13160
This commit is contained in:
parent
b5e0436e5c
commit
afb0530e3d
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
|
||||
, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
|
||||
, freetype, fontconfig
|
||||
, libjpeg, zlib, cairo, dbus, dbus_glib, bzip2
|
||||
, freetype, fontconfig, xulrunner
|
||||
|
||||
, # If you want the resulting program to call itself "Firefox" instead
|
||||
# of "Deer Park", enable this option. However, those binaries may
|
||||
@ -19,11 +19,12 @@ stdenv.mkDerivation {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
|
||||
pkgconfig gtk perl zip libIDL libjpeg zlib cairo bzip2
|
||||
python dbus dbus_glib pango freetype fontconfig
|
||||
xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [xulrunner];
|
||||
|
||||
configureFlags = [
|
||||
"--enable-application=browser"
|
||||
"--enable-optimize"
|
||||
@ -36,35 +37,21 @@ stdenv.mkDerivation {
|
||||
"--enable-system-cairo"
|
||||
#"--enable-system-sqlite" # <-- this seems to be discouraged
|
||||
"--disable-crashreporter"
|
||||
"--with-libxul-sdk=${xulrunner}/lib/xulrunner-devel-${xulrunner.version}"
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
export dontPatchELF=1;
|
||||
|
||||
# Strip some more stuff
|
||||
# Strip some more stuff.
|
||||
strip -S $out/lib/*/* || true
|
||||
|
||||
# Fix some references to /bin paths in the Firefox shell script.
|
||||
substituteInPlace $out/bin/firefox \
|
||||
--replace /bin/pwd "$(type -tP pwd)" \
|
||||
--replace /bin/ls "$(type -tP ls)"
|
||||
|
||||
# This fixes starting Firefox when there already is a running
|
||||
# instance. The `firefox' wrapper script actually expects to be
|
||||
# in the same directory as `run-mozilla.sh', apparently.
|
||||
libDir=$(cd $out/lib && ls -d firefox-[0-9]*)
|
||||
test -n "$libDir"
|
||||
cd $out/bin
|
||||
mv firefox ../lib/$libDir/
|
||||
ln -s ../lib/$libDir/firefox .
|
||||
|
||||
ln -s ${xulrunner}/lib/xulrunner-${xulrunner.version} $out/lib/$libDir/xulrunner
|
||||
|
||||
# Register extensions etc.
|
||||
# Register extensions etc. !!! is this needed anymore?
|
||||
echo "running firefox -register..."
|
||||
(cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./firefox-bin -register) || false
|
||||
|
||||
# Put the Firefox icon in the right place.
|
||||
ensureDir $out/lib/$libDir/chrome/icons/default
|
||||
ln -s ../../../icons/default.xpm $out/lib/$libDir/chrome/icons/default/
|
||||
$out/bin/firefox -register
|
||||
''; # */
|
||||
|
||||
meta = {
|
||||
@ -72,7 +59,10 @@ stdenv.mkDerivation {
|
||||
homepage = http://www.mozilla.com/en-US/firefox/;
|
||||
};
|
||||
|
||||
passthru = {inherit gtk;};
|
||||
passthru = {
|
||||
inherit gtk;
|
||||
isFirefox3Like = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,12 +9,18 @@
|
||||
enableOfficialBranding ? false
|
||||
}:
|
||||
|
||||
let
|
||||
|
||||
version = "1.9.0.3"; # this attribute is used by other packages
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "xulrunner-1.9.0.1";
|
||||
name = "xulrunner-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.1/source/firefox-3.0.1-source.tar.bz2;
|
||||
sha1 = "ba3bb0b02404cf1abfb6189b156b2f4eb02e8975";
|
||||
url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0.3/source/firefox-3.0.3-source.tar.bz2;
|
||||
sha1 = "089a41ff079cd37d39d19cf3a51daba07337db2c";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@ -75,7 +81,7 @@ stdenv.mkDerivation {
|
||||
homepage = http://www.mozilla.com/en-US/firefox/;
|
||||
};
|
||||
|
||||
passthru = {inherit gtk;};
|
||||
passthru = { inherit gtk version; };
|
||||
}
|
||||
|
||||
|
||||
|
@ -103,7 +103,10 @@ stdenv.mkDerivation {
|
||||
licenses = [ "GPLv2+" "LGPLv2+" "MPLv1+" ];
|
||||
};
|
||||
|
||||
passthru = {inherit gtk;};
|
||||
passthru = {
|
||||
inherit gtk;
|
||||
isFirefox3Like = true;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
{stdenv, fetchurl, pkgconfig, browser, browserName, libXpm, gettext}:
|
||||
{stdenv, fetchurl, pkgconfig, browser, libXpm, gettext}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "mplayerplug-in-3.55";
|
||||
@ -9,13 +9,10 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
patches =
|
||||
(if browserName == "icecat" # FIXME: Should match Firefox 3 as well.
|
||||
then [ ./icecat3-idldir.patch ]
|
||||
else []);
|
||||
stdenv.lib.optional (browser ? isFirefox3Like) ./icecat3-idldir.patch;
|
||||
|
||||
postConfigure =
|
||||
(if browserName == "icecat" # FIXME: Should match Firefox 3 as well.
|
||||
then ''
|
||||
(if browser ? isFirefox3Like then ''
|
||||
# Cause a rebuild of these file from the IDL file, needed for GNU IceCat 3
|
||||
# and Mozilla Firefox 3.
|
||||
# See, e.g., http://article.gmane.org/gmane.comp.mozilla.mplayerplug-in/2104 .
|
||||
|
@ -7144,11 +7144,12 @@ let
|
||||
firefoxWrapper = wrapFirefox firefox "firefox" "";
|
||||
|
||||
firefox3 = lowPrio (import ../applications/networking/browsers/firefox-3 {
|
||||
inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
|
||||
python dbus dbus_glib freetype fontconfig bzip2 xlibs;
|
||||
inherit fetchurl stdenv pkgconfig perl zip libjpeg zlib cairo
|
||||
python dbus dbus_glib freetype fontconfig bzip2;
|
||||
inherit (gtkLibs) gtk pango;
|
||||
inherit (gnome) libIDL;
|
||||
#enableOfficialBranding = true;
|
||||
xulrunner = xulrunner3;
|
||||
});
|
||||
|
||||
xulrunner3 = lowPrio (import ../applications/networking/browsers/firefox-3/xulrunner.nix {
|
||||
@ -7159,10 +7160,6 @@ let
|
||||
#enableOfficialBranding = true;
|
||||
});
|
||||
|
||||
firefox3Xul = lowPrio ((symlinkJoin "firefox-3-with-xulrunner" [firefox3 xulrunner3]) // {
|
||||
inherit (firefox) gtk;
|
||||
});
|
||||
|
||||
firefox3b1Bin = lowPrio (import ../applications/networking/browsers/firefox-3/binary.nix {
|
||||
inherit fetchurl stdenv pkgconfig perl zip libjpeg libpng zlib cairo
|
||||
python curl coreutils freetype fontconfig;
|
||||
@ -7180,7 +7177,7 @@ let
|
||||
|
||||
flac = getVersion "flac" flacAlts;
|
||||
|
||||
flashplayer = flashplayer9;
|
||||
flashplayer = flashplayer10;
|
||||
|
||||
flashplayer9 = import ../applications/networking/browsers/mozilla-plugins/flashplayer-9 {
|
||||
inherit fetchurl stdenv zlib alsaLib;
|
||||
@ -7519,9 +7516,9 @@ let
|
||||
};
|
||||
*/
|
||||
|
||||
MPlayerPlugin = browser: browserName:
|
||||
MPlayerPlugin = browser:
|
||||
import ../applications/networking/browsers/mozilla-plugins/mplayerplug-in {
|
||||
inherit browser browserName;
|
||||
inherit browser;
|
||||
inherit fetchurl stdenv pkgconfig gettext;
|
||||
inherit (xlibs) libXpm;
|
||||
# !!! should depend on MPlayer
|
||||
@ -7967,7 +7964,7 @@ let
|
||||
++ lib.optional (enableAdobeFlash) flashplayer
|
||||
# RealPlayer is disabled by default for legal reasons.
|
||||
++ lib.optional (system != "i686-linux" && getConfig [browserName "enableRealPlayer"] false) RealPlayer
|
||||
++ lib.optional (getConfig [browserName "enableMPlayer"] true) (MPlayerPlugin browser browserName)
|
||||
++ lib.optional (getConfig [browserName "enableMPlayer"] true) (MPlayerPlugin browser)
|
||||
++ lib.optional (supportsJDK && getConfig [browserName "jre"] false && jrePlugin ? mozillaPlugin) jrePlugin
|
||||
);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user