* 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= pluginPath=
extraLibPath= extraLibPath=
for i in $plugins; do for p in $plugins; do
for p in $i/lib/mozilla/plugins $i/jre/plugin/*/mozilla; do if test -e $p; then
if test -e $p; then pluginPath=$pluginPath${pluginPath:+:}$p
pluginPath=$pluginPath${pluginPath:+:}$p if test -e $p/extra-library-path; then
if test -e $p/extra-library-path; then extraLibPath=$extraLibPath${extraLibPath:+:}$(cat $p/extra-library-path)
extraLibPath=$extraLibPath${extraLibPath:+:}$(cat $p/extra-library-path)
fi
fi fi
done fi
done done
makeWrapper "$firefox/bin/firefox" "$out/bin/firefox" \ makeWrapper "$firefox/bin/firefox" "$out/bin/firefox" \
--suffix MOZ_PLUGIN_PATH ':' $pluginPath \ --suffix MOZ_PLUGIN_PATH ':' "$pluginPath" \
--suffix LD_LIBRARY_PATH ':' $extraLibPath --suffix LD_LIBRARY_PATH ':' "$extraLibPath"
# --add-to-env MOZ_PLUGIN_PATH ':' --each lib/mozilla/plugins "$plugins" \ # --add-to-env MOZ_PLUGIN_PATH ':' --each lib/mozilla/plugins "$plugins" \
# --add-to-env MOZ_PLUGIN_PATH ':' --each 'jre/plugin/*/mozilla' "$plugins" \ # --add-to-env MOZ_PLUGIN_PATH ':' --each 'jre/plugin/*/mozilla' "$plugins" \

View File

@ -6,5 +6,9 @@ stdenv.mkDerivation {
builder = ./builder.sh; builder = ./builder.sh;
makeWrapper = ../../../../build-support/make-wrapper/make-wrapper.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, fetchurl, zlib, libXmu}:
stdenv.mkDerivation { (stdenv.mkDerivation {
name = "flashplayer-7.0r25"; name = "flashplayer-7.0r25";
builder = ./builder.sh; builder = ./builder.sh;
@ -10,4 +10,4 @@ stdenv.mkDerivation {
}; };
inherit zlib libXmu; 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 # are the include files so that we can access the plugin API (I
# think). # think).
stdenv.mkDerivation { (stdenv.mkDerivation {
name = "mplayerplug-in-2.70"; name = "mplayerplug-in-2.70";
builder = ./builder.sh; builder = ./builder.sh;
@ -16,4 +16,4 @@ stdenv.mkDerivation {
buildInputs = [pkgconfig firefox (firefox.gtk) libXpm]; buildInputs = [pkgconfig firefox (firefox.gtk) libXpm];
inherit firefox; inherit firefox;
} }) // {mozillaPlugin = "/lib/mozilla/plugins";}

View File

@ -11,12 +11,13 @@ makeWrapper() {
p=${params[$n]} p=${params[$n]}
if test "$p" = "--suffix"; then if test "$p" = "--suffix"; then
echo FOOBAR
varName=${params[$((n + 1))]} varName=${params[$((n + 1))]}
separator=${params[$((n + 2))]} separator=${params[$((n + 2))]}
value=${params[$((n + 3))]} value=${params[$((n + 3))]}
n=$((n + 3)) n=$((n + 3))
echo "export $varName=\$$varName\${$varName:+$separator}$value" >> $wrapper if test -n "$value"; then
echo "export $varName=\$$varName\${$varName:+$separator}$value" >> $wrapper
fi
fi fi
done done

View File

@ -2,7 +2,7 @@
assert stdenv.system == "i686-linux"; assert stdenv.system == "i686-linux";
stdenv.mkDerivation { (stdenv.mkDerivation {
name = "blackdown-1.4.2"; name = "blackdown-1.4.2";
dirname = "j2sdk1.4.2"; dirname = "j2sdk1.4.2";
builder = ./builder.sh; builder = ./builder.sh;
@ -10,4 +10,4 @@ stdenv.mkDerivation {
url = http://catamaran.labs.cs.uu.nl/dist/tarballs/j2sdk-1.4.2-rc1-linux-i586-gcc3.2.bin; url = http://catamaran.labs.cs.uu.nl/dist/tarballs/j2sdk-1.4.2-rc1-linux-i586-gcc3.2.bin;
md5 = "52ff3a059845ee8487faeaa7b0c157c8"; md5 = "52ff3a059845ee8487faeaa7b0c157c8";
}; };
} }) // {mozillaPlugin = "/jre/plugin/i386/mozilla";}