nixpkgs/pkgs/applications/networking/browsers/firefox-2/builder.sh
Eelco Dolstra 7689a348c4 * Got rid of a lot of "postInstall=postInstall" and similar lines in
builders.  These are redundant now.
* Inlined some trivial builders.
* Removed a few explicit setup-hook creations.  This is done
  automatically now if setupHook is set.
* Deleted the initscripts package.  NixOS doesn't use it anymore.

svn path=/nixpkgs/branches/stdenv-updates/; revision=15276
2009-04-23 13:31:10 +00:00

36 lines
1.1 KiB
Bash

source $stdenv/setup
postInstall() {
# 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-*)
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
echo "running regxpcom..."
(cd $out/lib/$libDir && LD_LIBRARY_PATH=. ./regxpcom) || 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/
}
genericBuild