2008-06-17 12:53:08 +02:00
|
|
|
{ stdenv, fetchurl, pkgconfig, gtk, pango, perl, python, zip, libIDL
|
|
|
|
, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs
|
|
|
|
, freetype, fontconfig
|
|
|
|
|
|
|
|
, # If you want the resulting program to call itself "Firefox" instead
|
|
|
|
# of "Deer Park", enable this option. However, those binaries may
|
|
|
|
# not be distributed without permission from the Mozilla Foundation,
|
|
|
|
# see http://www.mozilla.org/foundation/trademarks/.
|
|
|
|
enableOfficialBranding ? false
|
|
|
|
|
|
|
|
}:
|
2008-02-13 11:36:53 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2008-06-17 12:53:08 +02:00
|
|
|
name = "firefox-3.0";
|
2008-02-13 11:36:53 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2008-06-17 12:53:08 +02:00
|
|
|
url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0/source/firefox-3.0-source.tar.bz2;
|
|
|
|
sha256 = "1l1wp3w8zck55fr3spzfzzmgh326vifixa2cdiq3hf4wflf3yr36";
|
2008-02-13 11:36:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2008-06-17 12:53:08 +02:00
|
|
|
pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
|
|
|
|
python dbus dbus_glib pango freetype fontconfig
|
|
|
|
xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt
|
2008-02-13 11:36:53 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-application=browser"
|
|
|
|
"--enable-optimize"
|
|
|
|
"--disable-debug"
|
|
|
|
"--enable-strip"
|
|
|
|
"--with-system-jpeg"
|
|
|
|
"--with-system-zlib"
|
2008-06-17 12:53:08 +02:00
|
|
|
"--with-system-bz2"
|
|
|
|
# "--with-system-png" # <-- "--with-system-png won't work because the system's libpng doesn't have APNG support"
|
|
|
|
"--enable-system-cairo" # <-- disabled for now because Firefox needs a alpha version of Cairo
|
|
|
|
#"--enable-system-sqlite" # <-- this seems to be discouraged
|
|
|
|
"--disable-crashreporter"
|
2008-02-13 11:36:53 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
export dontPatchELF=1;
|
|
|
|
|
|
|
|
# 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 .
|
|
|
|
|
|
|
|
# Register extensions etc.
|
|
|
|
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/
|
|
|
|
''; # */
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Mozilla Firefox - the browser, reloaded";
|
|
|
|
homepage = http://www.mozilla.com/en-US/firefox/;
|
|
|
|
};
|
|
|
|
|
|
|
|
passthru = {inherit gtk;};
|
|
|
|
}
|
|
|
|
|
2008-03-16 09:01:31 +01:00
|
|
|
|