mozilla-plugins: remove all npapi plugins except for flash player

Firefox from version 52 onwards no longer supports npapi plugins (see https://support.mozilla.org/en-US/kb/npapi-plugins).
This commit is contained in:
Dominik Xaver Hörl 2020-04-16 22:44:12 +02:00
parent c51b0afd54
commit c415d67284
13 changed files with 0 additions and 443 deletions

View file

@ -1,55 +0,0 @@
{ stdenv, fetchurl, xorg, gtk2, glib, gdk-pixbuf, dpkg, libXext, libXfixes
, libXrender, libuuid, libXrandr, libXcomposite, libpulseaudio
}:
with stdenv.lib;
let
rpathInstaller = makeLibraryPath
[gtk2 glib stdenv.cc.cc];
rpathPlugin = makeLibraryPath
([ stdenv.cc.cc gtk2 glib xorg.libX11 gdk-pixbuf libXext libXfixes libXrender libXrandr libXcomposite libpulseaudio ] ++ optional (libuuid != null) libuuid);
in
stdenv.mkDerivation rec {
pname = "bluejeans";
version = "2.180.71.8";
src = fetchurl {
url = "https://swdl.bluejeans.com/skinny/bjnplugin_${version}-1_amd64.deb";
sha256 = "1fgjgzss0ghk734xpfidazyknfdn11pmyw77pc3wigl83dvx4nb2";
};
unpackPhase = "${dpkg}/bin/dpkg-deb -x $src .";
installPhase =
''
mkdir -p $out
cp -R usr/lib $out/
plugins=$out/lib/mozilla/plugins
patchelf \
--set-rpath "${rpathPlugin}" \
$plugins/npbjnplugin_${version}.so
patchelf \
--set-rpath "${rpathInstaller}" \
$plugins/npbjninstallplugin_${version}.so
'';
dontStrip = true;
dontPatchELF = true;
passthru.mozillaPlugin = "/lib/mozilla/plugins";
meta = {
homepage = "http://bluejeans.com";
license = stdenv.lib.licenses.unfree;
maintainers = with maintainers; [ ocharles kamilchm ];
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,4 +0,0 @@
source $stdenv/setup
export PREFIX=$out
configureFlags="--plugin-path=$out/lib/mozilla/plugins"
genericBuild

View file

@ -1,38 +0,0 @@
{ stdenv, fetchurl, pkgconfig, openssl, glib, libX11, gtk2, gettext, intltool }:
stdenv.mkDerivation rec {
pname = "fribid";
version = "1.0.4";
builder = ./builder.sh;
src = fetchurl {
url = "https://fribid.se/releases/source/${pname}-${version}.tar.bz2";
sha256 = "a679f3a0534d5f05fac10b16b49630a898c0b721cfa24d2c827fa45485476649";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ openssl libX11 gtk2 glib gettext intltool ];
patches = [
./translation-xgettext-to-intltool.patch
./plugin-linkfix.patch
./ipc-lazytrace.patch
];
postPatch = "substituteInPlace plugin/pluginutil.c --replace strndup strndup_";
passthru.mozillaPlugin = "/lib/mozilla/plugins";
meta = with stdenv.lib; {
description = "A browser plugin to manage Swedish BankID:s";
longDescription = ''
FriBID is an open source software for the Swedish e-id system
called BankID. FriBID also supports processor architectures and
Linux/BSD distributions that the official software doesn't
support.
'';
homepage = "http://fribid.se";
license = with licenses; [ gpl2 mpl10 ];
maintainers = [ maintainers.edwtjo ];
platforms = platforms.linux;
};
}

View file

@ -1,10 +0,0 @@
--- a/plugin/ipc.c 2012-11-14 18:02:43.000000000 +0100
+++ b/plugin/ipc.c 2013-09-21 08:55:39.960265058 +0200
@@ -74,6 +74,7 @@
//close(pipeOut[PIPE_READ_END]);
execvp(mainBinary, (char *const *)argv);
+ fprintf(stderr, "Wanted signing executable\t<%s>\n", mainBinary);
perror(BINNAME ": Failed to execute main binary");
exit(1);
} else {

View file

@ -1,11 +0,0 @@
--- a/plugin/Makefile 2013-09-18 13:55:11.091652553 +0200
+++ b/plugin/Makefile 2013-09-18 13:58:27.513618750 +0200
@@ -60,7 +60,7 @@
for path in $(NPAPI_PLUGIN_PATHS); do \
(../configure --internal--remove-link $(DESTDIR)$$path/libfribidplugin.so $(NPAPI_PLUGIN_LIB) || exit 1) && \
install -d $(DESTDIR)$$path && \
- ln -sf $(NPAPI_PLUGIN_LIB) $(DESTDIR)$$path/libfribidplugin.so; \
+ ln -sf $(DESTDIR)$(NPAPI_PLUGIN_LIB) $(DESTDIR)$$path/libfribidplugin.so; \
done
uninstall:

View file

@ -1,16 +0,0 @@
--- a/translations/Makefile 2013-09-18 07:25:16.503800613 +0200
+++ b/translations/Makefile 2013-09-18 07:25:29.495869405 +0200
@@ -38,7 +38,7 @@
all: template.pot $(MOFILES)
template.pot: $(POTFILES) $(DEFINES)
- xgettext -k_ -ktranslatable -d $(DOMAIN) --package-name=$(PACKAGENAME) --package-version=$(PACKAGEVERSION) --copyright-holder='YOUR NAME' -o $@ $(POTFILES)
+ intltool-update --gettext-package=$(PACKAGENAME) -o $@ sv
.po.mo:
msgfmt $< -o $@
--- a/translations/POTFILES.in 2013-09-16 20:28:56.766106014 +0200
+++ b/translations/POTFILES.in 2013-09-18 13:15:05.252689648 +0200
@@ -0,0 +1,2 @@
+client/gtk.c
+client/gtk/sign.glade

View file

@ -1,117 +0,0 @@
{ stdenv, fetchurl, libGL, xorg, cairo
, libpng, gtk2, glib, gdk-pixbuf, fontconfig, freetype, curl
, dbus-glib, alsaLib, libpulseaudio, systemd, pango
}:
with stdenv.lib;
let
baseURL = "http://dl.google.com/linux/talkplugin/deb/pool/main/g/google-talkplugin";
rpathPlugin = makeLibraryPath
[ libGL
xorg.libXt
xorg.libX11
xorg.libXrender
cairo
libpng
gtk2
glib
fontconfig
freetype
curl
];
rpathProgram = makeLibraryPath
[ gdk-pixbuf
glib
gtk2
xorg.libX11
xorg.libXcomposite
xorg.libXfixes
xorg.libXrender
xorg.libXrandr
xorg.libXext
stdenv.cc.cc
alsaLib
libpulseaudio
dbus-glib
systemd
curl
pango
cairo
];
in
stdenv.mkDerivation rec {
pname = "google-talk-plugin";
# You can get the upstream version and SHA-256 hash from the following URLs:
# curl -s http://dl.google.com/linux/talkplugin/deb/dists/stable/main/binary-amd64/Packages | grep -E 'Version|SHA256'
# curl -s http://dl.google.com/linux/talkplugin/deb/dists/stable/main/binary-i386/Packages | grep -E 'Version|SHA256'
version = "5.41.3.0";
src =
if stdenv.hostPlatform.system == "x86_64-linux" then
fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_amd64.deb";
sha256 = "af7e23d2b6215afc547f96615b99f04e0561557cc58c0c9302364b5a3840d97d";
}
else if stdenv.hostPlatform.system == "i686-linux" then
fetchurl {
url = "${baseURL}/google-talkplugin_${version}-1_i386.deb";
sha256 = "4c46d2b7f2018640288cd7ac49adc47e309d0beadfd979eb03030e672016b4a7";
}
else throw "Google Talk does not support your platform.";
unpackPhase = ''
ar p "$src" data.tar.gz | tar xz
'';
installPhase =
''
plugins=$out/lib/mozilla/plugins
mkdir -p $plugins
cp opt/google/talkplugin/*.so $plugins
for i in libnpgoogletalk.so libppgoogletalk.so libppo1d.so; do
patchelf --set-rpath "${makeLibraryPath [ stdenv.cc.cc xorg.libX11 ]}:${stdenv.cc.cc.lib}/lib64" $plugins/$i
done
for i in libgoogletalkremoting.so libnpo1d.so; do
patchelf --set-rpath "$out/libexec/google/talkplugin/lib:${rpathPlugin}:${stdenv.cc.cc.lib}/lib64" $plugins/$i
done
mkdir -p $out/libexec/google/talkplugin
cp -prd opt/google/talkplugin/{data,GoogleTalkPlugin,locale,remoting24x24.png,windowpicker.glade} $out/libexec/google/talkplugin/
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${rpathProgram}:${stdenv.cc.cc.lib}/lib64" \
$out/libexec/google/talkplugin/GoogleTalkPlugin
# Generate an LD_PRELOAD wrapper to redirect execvp() calls to
# /opt/../GoogleTalkPlugin.
preload=$out/libexec/google/talkplugin/libpreload.so
mkdir -p $(dirname $preload)
gcc -shared ${./preload.c} -o $preload -ldl -DOUT=\"$out\" -fPIC
echo $preload > $plugins/extra-ld-preload
# Prevent a dependency on gcc.
strip -S $preload
patchELF $preload
'';
dontStrip = true;
dontPatchELF = true;
passthru.mozillaPlugin = "/lib/mozilla/plugins";
meta = {
homepage = "http://www.google.com/chat/video/";
license = stdenv.lib.licenses.unfree;
maintainers = [ stdenv.lib.maintainers.eelco ];
};
}

View file

@ -1,60 +0,0 @@
/* Google Talk Plugin executes a helper program in /opt. This
LD_PRELOAD library intercepts execvp() calls to redirect them to
the corresponding location in $out. */
#define _GNU_SOURCE
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
char origDir [] = "/opt/google/talkplugin";
char realDir [] = OUT "/libexec/google/talkplugin";
const char * rewrite(const char * path, char * buf)
{
if (strncmp(path, origDir, sizeof(origDir) - 1) != 0) return path;
if (snprintf(buf, PATH_MAX, "%s%s", realDir, path + sizeof(origDir) - 1) >= PATH_MAX)
abort();
return buf;
}
int execvp(const char * path, char * const argv[])
{
int (*_execvp) (const char *, char * const argv[]) = dlsym(RTLD_NEXT, "execvp");
char buf[PATH_MAX];
return _execvp(rewrite(path, buf), argv);
}
int open(const char *path, int flags, ...)
{
char buf[PATH_MAX];
int (*_open) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open");
mode_t mode = 0;
if (flags & O_CREAT) {
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
}
return _open(rewrite(path, buf), flags, mode);
}
int open64(const char *path, int flags, ...)
{
char buf[PATH_MAX];
int (*_open64) (const char *, int, mode_t) = dlsym(RTLD_NEXT, "open64");
mode_t mode = 0;
if (flags & O_CREAT) {
va_list ap;
va_start(ap, flags);
mode = va_arg(ap, mode_t);
va_end(ap);
}
return _open64(rewrite(path, buf), flags, mode);
}

View file

@ -1,31 +0,0 @@
{ stdenv, fetchurl, firefox, libX11, xorgproto }:
stdenv.mkDerivation rec {
pname = "mozplugger";
version = "2.1.6";
src = fetchurl {
url = "http://mozplugger.mozdev.org/files/mozplugger-${version}.tar.gz";
sha256 = "1vszkq4kdbaxsrqr2xn9rq6ipza9fngdri79gvjqk3bvsdmg0k19";
};
buildInputs = [ firefox libX11 xorgproto ];
installPhase = ''
mkdir -p "$out/etc" "$out/bin" "$out/lib/mozilla/plugins" "$out/share/man/man7"
cp mozpluggerrc "$out/etc"
cp mozplugger-{helper,controller,linker,update} "$out/bin"
cp mozplugger.so "$out/lib/mozilla/plugins"
cp mozplugger.7 "$out/share/man/man7"
mkdir -p "$out/share/${pname}-${version}/plugin"
ln -s "$out/lib/mozilla/plugins/mozplugger.so" "$out/share/${pname}-${version}/plugin"
'';
meta = {
description = "Mozilla plugin for launching external program for handling in-page objects";
homepage = "http://mozplugger.mozdev.org/";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.linux;
};
}

View file

@ -1,37 +0,0 @@
{stdenv, fetchurl, pkgconfig, browser, libXpm, gettext}:
stdenv.mkDerivation rec {
name = "mplayerplug-in-3.55";
src = fetchurl {
url = "mirror://sourceforge/mplayerplug-in/${name}.tar.gz";
sha256 = "0zkvqrzibrbljiccvz3rhbmgifxadlrfjylqpz48jnjx9kggynms";
};
postConfigure =
(if browser ? isFirefox3Like 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 "");
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ browser (browser.gtk) libXpm gettext ];
installPhase = ''
mkdir -p $out/lib/mozilla/plugins
cp -p mplayerplug-in*.so mplayerplug-in*.xpt $out/lib/mozilla/plugins
'';
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
};
meta = with stdenv.lib; {
description = "A browser plugin that uses mplayer to play digital media from websites";
homepage = "http://mplayerplug-in.sourceforge.net/";
license = with licenses; [ gpl2Plus lgpl2Plus "MPLv1+" ];
};
}

View file

@ -1,40 +0,0 @@
{stdenv, fetchurl, which, pkgconfig, file, glib, gtk2, gtk3, curl, libXt}:
let
srcData = # Generated upstream information
rec {
baseName="nspluginwrapper";
version="1.4.4";
name="${baseName}-${version}";
hash="1fxjz9ifhw0drm12havlsl4jpsq1nv930gqa005kgddv5pa99vgj";
url="http://nspluginwrapper.org/download/nspluginwrapper-1.4.4.tar.gz";
};
in
stdenv.mkDerivation {
inherit (srcData) name version;
src = fetchurl{
inherit (srcData) url;
sha256 = srcData.hash;
};
preConfigure = ''
sed -e 's@/usr/bin/@@g' -i configure
sed -e '/gthread[.]h/d' -i src/npw-player.c
export NIX_LDFLAGS="$NIX_LDFLAGS -lgthread-2.0"
export configureFlags="$configureFlags --target-cpu=$(uname -m)"
'';
nativeBuildInputs = [ pkgconfig ];
buildInputs = [which file glib gtk2 gtk3 curl libXt];
preferLocalBuild = true;
meta = {
description = ''A wrapper to run browser plugins out-of-process'';
homepage = "http://nspluginwrapper.org/";
license = stdenv.lib.licenses.gpl2;
platforms = [ "x64_64-linux" "i686-linux" ];
maintainers = [ stdenv.lib.maintainers.raskin ];
inherit (srcData) version;
};
}

View file

@ -1,4 +0,0 @@
name nspluginwrapper
target default.nix
url http://nspluginwrapper.org/download/
version_link /nspluginwrapper-[0-9]+

View file

@ -18622,8 +18622,6 @@ in
gtk = gtk3;
};
bluejeans = callPackage ../applications/networking/browsers/mozilla-plugins/bluejeans { };
bluejeans-gui = callPackage ../applications/networking/instant-messengers/bluejeans { };
blugon = callPackage ../applications/misc/blugon { };
@ -19276,10 +19274,6 @@ in
freewheeling = callPackage ../applications/audio/freewheeling { };
fribid = callPackage ../applications/networking/browsers/mozilla-plugins/fribid {
openssl = openssl_1_0_2;
};
fritzing = libsForQt5.callPackage ../applications/science/electronics/fritzing { };
fsv = callPackage ../applications/misc/fsv { };
@ -19734,10 +19728,6 @@ in
inherit (gnome2) GConf;
};
google_talk_plugin = callPackage ../applications/networking/browsers/mozilla-plugins/google-talk-plugin {
libpng = libpng12;
};
gosmore = callPackage ../applications/misc/gosmore { };
gpsbabel = libsForQt5.callPackage ../applications/misc/gpsbabel {
@ -20672,8 +20662,6 @@ in
motif = callPackage ../development/libraries/motif { };
mozplugger = callPackage ../applications/networking/browsers/mozilla-plugins/mozplugger {};
mozjpeg = callPackage ../applications/graphics/mozjpeg { };
easytag = callPackage ../applications/audio/easytag { };
@ -20728,12 +20716,6 @@ in
libdvdnav = libdvdnav_4_2_1;
} // (config.mplayer or {}));
MPlayerPlugin = browser:
callPackage ../applications/networking/browsers/mozilla-plugins/mplayerplug-in {
inherit browser;
# !!! should depend on MPlayer
};
mpv = callPackage ../applications/video/mpv {
inherit lua;
inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa CoreAudio MediaPlayer;
@ -21043,8 +21025,6 @@ in
nova-filters = callPackage ../applications/audio/nova-filters { };
nspluginwrapper = callPackage ../applications/networking/browsers/mozilla-plugins/nspluginwrapper {};
nvi = callPackage ../applications/editors/nvi { };
nvpy = callPackage ../applications/editors/nvpy { };