2010-01-27 16:25:31 +01:00
|
|
|
{ fetchurl, stdenv, pkgconfig, gtk, pango, perl, python, ply, zip, libIDL
|
2009-07-14 14:59:04 +02:00
|
|
|
, libjpeg, libpng, zlib, cairo, dbus, dbus_glib, bzip2, xlibs, alsaLib
|
2008-07-28 22:41:14 +02:00
|
|
|
, gnomevfs, libgnomeui
|
2008-09-29 23:58:25 +02:00
|
|
|
, freetype, fontconfig
|
|
|
|
, application ? "browser" }:
|
2008-07-28 17:55:11 +02:00
|
|
|
|
2010-01-27 09:53:31 +01:00
|
|
|
let version = "3.6"; in
|
2008-07-28 17:55:11 +02:00
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "icecat-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2010-01-27 16:25:31 +01:00
|
|
|
url = "mirror://gnu/gnuzilla/${version}/icecat-${version}.tar.bz2";
|
|
|
|
sha256 = "0fsf8zd8nncg1w1gg2jhlxwkbljvrx4mm9pywasklyi0gvi939ds";
|
2008-07-28 17:55:11 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2009-07-14 14:59:04 +02:00
|
|
|
libgnomeui gnomevfs alsaLib
|
2008-07-28 17:55:11 +02:00
|
|
|
pkgconfig gtk perl zip libIDL libjpeg libpng zlib cairo bzip2
|
2009-07-19 14:34:14 +02:00
|
|
|
python ply dbus dbus_glib pango freetype fontconfig
|
2008-07-28 17:55:11 +02:00
|
|
|
xlibs.libXi xlibs.libX11 xlibs.libXrender xlibs.libXft xlibs.libXt
|
|
|
|
];
|
|
|
|
|
2009-07-20 16:37:28 +02:00
|
|
|
patches = [
|
2009-08-09 20:26:16 +02:00
|
|
|
./skip-gre-registration.patch ./rpath-link.patch
|
2009-07-20 16:37:28 +02:00
|
|
|
];
|
2008-09-25 09:33:04 +02:00
|
|
|
|
2008-07-28 17:55:11 +02:00
|
|
|
configureFlags = [
|
2008-09-29 23:58:25 +02:00
|
|
|
"--enable-application=${application}"
|
2008-09-25 09:33:04 +02:00
|
|
|
"--enable-libxul"
|
|
|
|
"--disable-javaxpcom"
|
|
|
|
|
2008-07-28 17:55:11 +02:00
|
|
|
"--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"
|
2008-09-05 11:16:15 +02:00
|
|
|
"--enable-system-cairo"
|
2008-07-28 17:55:11 +02:00
|
|
|
#"--enable-system-sqlite" # <-- this seems to be discouraged
|
|
|
|
"--disable-crashreporter"
|
|
|
|
];
|
|
|
|
|
2008-10-04 18:21:28 +02:00
|
|
|
preConfigure = ''export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"'';
|
|
|
|
|
2008-07-28 17:55:11 +02:00
|
|
|
postInstall = ''
|
|
|
|
export dontPatchELF=1;
|
|
|
|
|
|
|
|
# Strip some more stuff
|
2009-11-01 15:47:13 +01:00
|
|
|
strip -S "$out/lib/"*"/"* || true
|
|
|
|
|
2008-07-28 17:55:11 +02:00
|
|
|
# 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"
|
|
|
|
|
2008-09-29 23:58:25 +02:00
|
|
|
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
|
2008-07-28 17:55:11 +02:00
|
|
|
|
|
|
|
# Put the GNU IceCat icon in the right place.
|
|
|
|
ensureDir $out/lib/$libDir/chrome/icons/default
|
|
|
|
ln -s ../../../icons/default.xpm $out/lib/$libDir/chrome/icons/default/
|
2009-11-01 15:47:13 +01:00
|
|
|
'';
|
2008-07-28 17:55:11 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "GNU IceCat, a free web browser based on Mozilla Firefox";
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
Gnuzilla is the GNU version of the Mozilla suite, and GNU IceCat
|
|
|
|
is the GNU version of the Firefox browser. Its main advantage
|
|
|
|
is an ethical one: it is entirely free software. While the
|
|
|
|
source code from the Mozilla project is free software, the
|
|
|
|
binaries that they release include additional non-free software.
|
|
|
|
Also, they distribute and recommend non-free software as
|
|
|
|
plug-ins. In addition, GNU IceCat includes some privacy
|
|
|
|
protection features.
|
|
|
|
'';
|
|
|
|
|
|
|
|
homepage = http://www.gnu.org/software/gnuzilla/;
|
|
|
|
licenses = [ "GPLv2+" "LGPLv2+" "MPLv1+" ];
|
2009-07-14 14:59:04 +02:00
|
|
|
|
|
|
|
maintainers = [ stdenv.lib.maintainers.ludo ];
|
2009-09-12 23:19:01 +02:00
|
|
|
platforms = stdenv.lib.platforms.gnu;
|
2008-07-28 17:55:11 +02:00
|
|
|
};
|
|
|
|
|
2008-10-30 14:00:50 +01:00
|
|
|
passthru = {
|
2008-12-12 10:39:14 +01:00
|
|
|
inherit gtk version;
|
2008-10-30 14:00:50 +01:00
|
|
|
isFirefox3Like = true;
|
|
|
|
};
|
2008-07-28 17:55:11 +02:00
|
|
|
}
|