summary refs log tree commit diff
path: root/pkgs/applications/networking/browsers/firefox-wrapper/builder.sh
blob: b4fdf2e0275a3e081cded76113bd40044c92693d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
. $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