* Let the Mozilla plugins announce where in their output the actual

plugins are, rather then requiring certain fixed directories.

svn path=/nixpkgs/trunk/; revision=2242
This commit is contained in:
Eelco Dolstra
2005-02-16 11:24:40 +00:00
parent b930967805
commit 3bf404a3f2
6 changed files with 22 additions and 19 deletions

View File

@@ -5,20 +5,18 @@ shopt -s nullglob
pluginPath=
extraLibPath=
for i in $plugins; do
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
for p in $plugins; 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
done
fi
done
makeWrapper "$firefox/bin/firefox" "$out/bin/firefox" \
--suffix MOZ_PLUGIN_PATH ':' $pluginPath \
--suffix LD_LIBRARY_PATH ':' $extraLibPath
--suffix MOZ_PLUGIN_PATH ':' "$pluginPath" \
--suffix LD_LIBRARY_PATH ':' "$extraLibPath"
# --add-to-env MOZ_PLUGIN_PATH ':' --each lib/mozilla/plugins "$plugins" \
# --add-to-env MOZ_PLUGIN_PATH ':' --each 'jre/plugin/*/mozilla' "$plugins" \

View File

@@ -6,5 +6,9 @@ stdenv.mkDerivation {
builder = ./builder.sh;
makeWrapper = ../../../../build-support/make-wrapper/make-wrapper.sh;
inherit firefox plugins;
inherit firefox;
# Let each plugin tell us (through its `mozillaPlugin') attribute
# where to find the plugin in its tree.
plugins = map (x: x ~ x.mozillaPlugin) plugins;
}

View File

@@ -1,6 +1,6 @@
{stdenv, fetchurl, zlib, libXmu}:
stdenv.mkDerivation {
(stdenv.mkDerivation {
name = "flashplayer-7.0r25";
builder = ./builder.sh;
@@ -10,4 +10,4 @@ stdenv.mkDerivation {
};
inherit zlib libXmu;
}
}) // {mozillaPlugin = "/lib/mozilla/plugins";}

View File

@@ -4,7 +4,7 @@
# are the include files so that we can access the plugin API (I
# think).
stdenv.mkDerivation {
(stdenv.mkDerivation {
name = "mplayerplug-in-2.70";
builder = ./builder.sh;
@@ -16,4 +16,4 @@ stdenv.mkDerivation {
buildInputs = [pkgconfig firefox (firefox.gtk) libXpm];
inherit firefox;
}
}) // {mozillaPlugin = "/lib/mozilla/plugins";}