nixpkgs/pkgs/applications/networking/browsers/firefox-wrapper/builder.sh
Eelco Dolstra 8b01d4ef0a * Added the Flash Player plugin.
* Plugins can specify extra directories to be added to LD_LIBRARY_PATH
  by the Firefox wrapper.  The Flash plugin need this since it's
  installed from a binary distribution, and so doesn't set the RPATH
  properly.
* Moved the MPlayer plugin to a plugins directory.

svn path=/nixpkgs/trunk/; revision=1566
2004-10-17 13:56:56 +00:00

25 lines
510 B
Bash

. $stdenv/setup
mkdir -p $out/bin
pluginPath=
extraLibPath=
for i in $plugins; do
p=$i/lib/mozilla/plugins
if test -e $p; then
pluginPath=$pluginPath${pluginPath:+:}$p
if test -e $p/extra-library-path; then
extraLibPath=$extraLibPath${extraLibPath:+:}$(cat $p/extra-library-path)
fi
fi
done
cat > $out/bin/firefox <<EOF
#! $SHELL
export LD_LIBRARY_PATH=$extraLibPath
export MOZ_PLUGIN_PATH=$pluginPath
exec $firefox/bin/firefox
EOF
chmod +x $out/bin/firefox