nixpkgs/pkgs/applications/networking/browsers/mozilla-plugins/mplayerplug-in/default.nix
Ludovic Courtès 2e30347099 MPlayerPlugin: Allow compilation with GNU IceCat 3.
Similar changes would allow it to be compiled for Mozilla Firefox 3.

svn path=/nixpkgs/trunk/; revision=12929
2008-09-29 21:56:17 +00:00

43 lines
1.3 KiB
Nix

{stdenv, fetchurl, pkgconfig, browser, browserName, libXpm, gettext}:
stdenv.mkDerivation rec {
name = "mplayerplug-in-3.55";
src = fetchurl {
url = "mirror://sourceforge/mplayerplug-in/${name}.tar.gz";
sha256 = "0zkvqrzibrbljiccvz3rhbmgifxadlrfjylqpz48jnjx9kggynms";
};
patches =
(if browserName == "icecat" # FIXME: Should match Firefox 3 as well.
then [ ./icecat3-idldir.patch ]
else []);
postConfigure =
(if browserName == "icecat" # FIXME: Should match Firefox 3 as well.
then ''
# Cause a rebuild of these file from the IDL file, needed for GNU IceCat 3
# and Mozilla Firefox 3.
# See, e.g., http://article.gmane.org/gmane.comp.mozilla.mplayerplug-in/2104 .
rm -f Source/nsIScriptableMplayerPlugin.h
''
else "");
buildInputs = [ pkgconfig browser (browser.gtk) libXpm gettext ];
installPhase = ''
ensureDir $out/lib/mozilla/plugins
cp -p mplayerplug-in*.so mplayerplug-in*.xpt $out/lib/mozilla/plugins
'';
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
};
meta = {
description = "A browser plugin that uses mplayer to play digital media from websites";
homepage = http://mplayerplug-in.sourceforge.net/;
licenses = [ "GPLv2+" "LGPLv2+" "MPLv1+" ];
};
}