nixpkgs/pkgs/applications/networking/browsers/firefox/builder.sh
Eelco Dolstra 5ef6c2a34e * Extensions now work properly. The extensions datasource etc. are
now generated at build time (it turns out to be possible to do that
  non-interactively, after all).

* Fixed creation of the bookmarks file (and other stuff) when creating
  a new profile.  When a new profile is created, it's copied from a
  default profile which is part of the Firefox installation.  However,
  since the default profile directory is in the Nix store, it's
  read-only.  Firefox keeps the read-only permission when copying the
  profile, so creating files in it (such as adding the bookmarks file)
  fails.  The `writable-copies' patch is a quick hack that adds write
  permission when copying files/directories.

svn path=/nixpkgs/trunk/; revision=1542
2004-10-05 19:54:56 +00:00

53 lines
1.4 KiB
Bash

. $stdenv/setup
preConfigure=preConfigure
preConfigure() {
cat > .mozconfig <<EOF
. \$topsrcdir/browser/config/mozconfig
ac_add_options --prefix=$out
ac_add_options --enable-optimize
ac_add_options --disable-debug
ac_add_options --enable-xft
#ac_add_options --enable-swg
ac_add_options --enable-strip
ac_add_options --enable-default-toolkit=gtk2
#ac_add_options --disable-shared
#ac_add_options --enable-static
#ac_add_options --with-system-jpeg
#ac_add_options --with-system-png
#ac_add_options --with-system-zlib
EOF
}
postInstall=postInstall
postInstall() {
# Strip some more stuff
strip -S $out/lib/*/* || true
# We don't need this (do we?)
rm -rf $out/include
# 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.
cd $out/bin
mv firefox ../lib/firefox-*/
ln -s ../lib/firefox-*/firefox .
# Register extension etc.
echo "running firefox -register..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./firefox-bin -register) || false
echo "running regxpcom..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./regxpcom) || false
echo "running regchrome..."
(cd $out/lib/firefox-* && LD_LIBRARY_PATH=. ./regchrome) || false
}
makeFlags="-f client.mk build"
genericBuild