579099e9d0
release directory. Better check again later... svn path=/nixpkgs/trunk/; revision=12138
79 lines
2.5 KiB
Nix
79 lines
2.5 KiB
Nix
{ 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
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "firefox-3.0";
|
|
|
|
src = fetchurl {
|
|
url = http://releases.mozilla.org/pub/mozilla.org/firefox/releases/3.0/source/firefox-3.0-source.tar.bz2;
|
|
sha1 = "2e21652b9cad2a6ac8f048f50e9e053c19760d4b";
|
|
};
|
|
|
|
buildInputs = [
|
|
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
|
|
];
|
|
|
|
configureFlags = [
|
|
"--enable-application=browser"
|
|
"--enable-optimize"
|
|
"--disable-debug"
|
|
"--enable-strip"
|
|
"--with-system-jpeg"
|
|
"--with-system-zlib"
|
|
"--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"
|
|
];
|
|
|
|
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;};
|
|
}
|
|
|
|
|