2004-10-17 15:28:28 +02:00
|
|
|
. $stdenv/setup
|
|
|
|
|
2004-10-17 16:30:11 +02:00
|
|
|
shopt -s nullglob
|
|
|
|
|
2004-10-17 15:28:28 +02:00
|
|
|
mkdir -p $out/bin
|
|
|
|
|
|
|
|
pluginPath=
|
2004-10-17 15:56:56 +02:00
|
|
|
extraLibPath=
|
2004-10-17 15:28:28 +02:00
|
|
|
for i in $plugins; do
|
2004-10-17 16:30:11 +02:00
|
|
|
for p in $i/lib/mozilla/plugins $i/jre/plugin/*/mozilla; do
|
|
|
|
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
|
2004-10-17 15:56:56 +02:00
|
|
|
fi
|
2004-10-17 16:30:11 +02:00
|
|
|
done
|
2004-10-17 15:28:28 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
cat > $out/bin/firefox <<EOF
|
|
|
|
#! $SHELL
|
2004-10-17 15:56:56 +02:00
|
|
|
export LD_LIBRARY_PATH=$extraLibPath
|
2004-10-17 15:28:28 +02:00
|
|
|
export MOZ_PLUGIN_PATH=$pluginPath
|
2004-10-31 19:58:48 +01:00
|
|
|
exec $firefox/bin/firefox "\$@"
|
2004-10-17 15:28:28 +02:00
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x $out/bin/firefox
|