Adding FriBID browser plugin

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.

https://fribid.se/index.en.html

FriBID plugin is a firefoxWrapper plugin. Enabled by setting:

nixpkgs.config.enableFriBIDPlugin = true

+87
+4
pkgs/applications/networking/browsers/mozilla-plugins/fribid/builder.sh
··· 1 + source $stdenv/setup 2 + export PREFIX=$out 3 + configureFlags="--plugin-path=$out/lib/mozilla/plugins" 4 + genericBuild
+31
pkgs/applications/networking/browsers/mozilla-plugins/fribid/default.nix
··· 1 + { stdenv, fetchurl, pkgconfig, openssl, glib, libX11, gtk3, gettext, intltool }: 2 + 3 + let version = "1.0.2"; in 4 + stdenv.mkDerivation rec { 5 + name = "fribid-${version}"; 6 + builder = ./builder.sh; 7 + 8 + src = fetchurl { 9 + url = "https://fribid.se/releases/source/${name}.tar.bz2"; 10 + sha256 = "d7cd9adf04fedf50b266a5c14ddb427cbb263d3bc160ee0ade03aca9d5356e5c"; 11 + }; 12 + 13 + buildInputs = [ pkgconfig openssl libX11 gtk3 glib gettext intltool ]; 14 + patches = [ 15 + ./translation-xgettext-to-intltool.patch 16 + ./plugin-linkfix.patch 17 + ./emulated-version.patch 18 + ./ipc-lazytrace.patch 19 + ]; 20 + 21 + passthru.mozillaPlugin = "/lib/mozilla/plugins"; 22 + 23 + meta = { 24 + description = "A browser plugin to manage Swedish BankID:s"; 25 + homepage = http://fribid.se; 26 + licenses = [ "GPLv2" "MPLv1" ]; 27 + maintainers = [ stdenv.lib.maintainers.edwtjo ]; 28 + platforms = with stdenv.lib.platforms; linux; 29 + }; 30 + } 31 +
+12
pkgs/applications/networking/browsers/mozilla-plugins/fribid/emulated-version.patch
··· 1 + --- a/common/defines.h 2012-11-14 18:02:43.000000000 +0100 2 + +++ b/common/defines.h 2013-09-20 19:17:45.669290630 +0200 3 + @@ -39,7 +39,7 @@ 4 + #define RELEASE_TIME 1352912534 5 + #define IPCVERSION "10" 6 + 7 + -#define EMULATED_VERSION "4.15.0.14" 8 + +#define EMULATED_VERSION "4.17.0.11" // Was 4.15.0.14 9 + #define DNSVERSION "2" 10 + #define STATUSDOMAIN ".status.fribid.se" 11 + 12 +
+10
pkgs/applications/networking/browsers/mozilla-plugins/fribid/ipc-lazytrace.patch
··· 1 + --- a/plugin/ipc.c 2012-11-14 18:02:43.000000000 +0100 2 + +++ b/plugin/ipc.c 2013-09-21 08:55:39.960265058 +0200 3 + @@ -74,6 +74,7 @@ 4 + //close(pipeOut[PIPE_READ_END]); 5 + 6 + execvp(mainBinary, (char *const *)argv); 7 + + fprintf(stderr, "Wanted signing executable\t<%s>\n", mainBinary); 8 + perror(BINNAME ": Failed to execute main binary"); 9 + exit(1); 10 + } else {
+11
pkgs/applications/networking/browsers/mozilla-plugins/fribid/plugin-linkfix.patch
··· 1 + --- a/plugin/Makefile 2013-09-18 13:55:11.091652553 +0200 2 + +++ b/plugin/Makefile 2013-09-18 13:58:27.513618750 +0200 3 + @@ -60,7 +60,7 @@ 4 + for path in $(NPAPI_PLUGIN_PATHS); do \ 5 + (../configure --internal--remove-link $(DESTDIR)$$path/libfribidplugin.so $(NPAPI_PLUGIN_LIB) || exit 1) && \ 6 + install -d $(DESTDIR)$$path && \ 7 + - ln -sf $(NPAPI_PLUGIN_LIB) $(DESTDIR)$$path/libfribidplugin.so; \ 8 + + ln -sf $(DESTDIR)$(NPAPI_PLUGIN_LIB) $(DESTDIR)$$path/libfribidplugin.so; \ 9 + done 10 + 11 + uninstall:
+16
pkgs/applications/networking/browsers/mozilla-plugins/fribid/translation-xgettext-to-intltool.patch
··· 1 + --- a/translations/Makefile 2013-09-18 07:25:16.503800613 +0200 2 + +++ b/translations/Makefile 2013-09-18 07:25:29.495869405 +0200 3 + @@ -38,7 +38,7 @@ 4 + all: template.pot $(MOFILES) 5 + 6 + template.pot: $(POTFILES) $(DEFINES) 7 + - xgettext -k_ -ktranslatable -d $(DOMAIN) --package-name=$(PACKAGENAME) --package-version=$(PACKAGEVERSION) --copyright-holder='YOUR NAME' -o $@ $(POTFILES) 8 + + intltool-update --gettext-package=$(PACKAGENAME) -o $@ sv 9 + 10 + .po.mo: 11 + msgfmt $< -o $@ 12 + --- a/translations/POTFILES.in 2013-09-16 20:28:56.766106014 +0200 13 + +++ b/translations/POTFILES.in 2013-09-18 13:15:05.252689648 +0200 14 + @@ -0,0 +1,2 @@ 15 + +client/gtk.c 16 + +client/gtk/sign.glade
+3
pkgs/top-level/all-packages.nix
··· 7727 7727 7728 7728 fossil = callPackage ../applications/version-management/fossil { }; 7729 7729 7730 + fribid = callPackage ../applications/networking/browsers/mozilla-plugins/fribid { }; 7731 + 7730 7732 fvwm = callPackage ../applications/window-managers/fvwm { }; 7731 7733 7732 7734 geany = callPackage ../applications/editors/geany { }; ··· 8939 8941 ++ lib.optional (cfg.enableGeckoMediaPlayer or false) gecko_mediaplayer 8940 8942 ++ lib.optional (supportsJDK && cfg.jre or false && jrePlugin ? mozillaPlugin) jrePlugin 8941 8943 ++ lib.optional (cfg.enableGoogleTalkPlugin or false) google_talk_plugin 8944 + ++ lib.optional (cfg.enableFriBIDPlugin or false) fribid 8942 8945 ); 8943 8946 libs = 8944 8947 if cfg.enableQuakeLive or false