* 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
This commit is contained in:
Eelco Dolstra
2004-10-17 13:56:56 +00:00
parent c233d6f67c
commit 8b01d4ef0a
6 changed files with 38 additions and 2 deletions
@@ -3,15 +3,20 @@
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
@@ -0,0 +1,13 @@
. $stdenv/setup
dontBuild=1
dontMakeInstall=1
postInstall=postInstall
postInstall() {
mkdir -p $out/lib/mozilla/plugins
cp -p flashplayer.xpt libflashplayer.so $out/lib/mozilla/plugins
echo "$zlib/lib:$libXmu/lib" > $out/lib/mozilla/plugins/extra-library-path
}
genericBuild
@@ -0,0 +1,13 @@
{stdenv, fetchurl, zlib, libXmu}:
stdenv.mkDerivation {
name = "flashplayer-7.0r25";
builder = ./builder.sh;
src = fetchurl {
url = http://fpdownload.macromedia.com/get/shockwave/flash/english/linux/7.0r25/install_flash_player_7_linux.tar.gz;
md5 = "79c59a5ea29347e01c8e6575dd054cd1";
};
inherit zlib libXmu;
}
@@ -0,0 +1,24 @@
. $stdenv/setup
# The Firefox pkgconfig files are buggy; they are called firefox-*.pc,
# but they refer to mozilla-*.pc. Also, mplayerplug-in requires
# mozilla-*.pc.
mkdir pkgconfig
for i in $firefox/lib/pkgconfig/*.pc; do
ln -s $i pkgconfig/$(echo $(basename $i) | sed s/firefox/mozilla/)
done
PKG_CONFIG_PATH=$NIX_BUILD_TOP/pkgconfig:$PKG_CONFIG_PATH
firefoxIncl=$(echo $firefox/include/firefox-*)
export NIX_CFLAGS_COMPILE="-I$firefoxIncl $NIX_CFLAGS_COMPILE"
dontMakeInstall=1
postInstall=postInstall
postInstall() {
mkdir -p $out/lib/mozilla/plugins
cp -p mplayerplug-in.so mplayerplug-in.xpt $out/lib/mozilla/plugins
}
genericBuild
@@ -0,0 +1,19 @@
{stdenv, fetchurl, pkgconfig, firefox, libXpm}:
# Note: we shouldn't be dependent on Firefox. The only thing we need
# are the include files so that we can access the plugin API (I
# think).
stdenv.mkDerivation {
name = "mplayerplug-in-2.70";
builder = ./builder.sh;
src = fetchurl {
url = http://heanet.dl.sourceforge.net/sourceforge/mplayerplug-in/mplayerplug-in-2.70.tar.gz;
md5 = "90784c7ccb40037b446053f0c1d1c2b4";
};
buildInputs = [pkgconfig firefox (firefox.gtk) libXpm];
inherit firefox;
}