From f6d7cefa7ba6429ec2a324ac3ae1fcefb45bdf0b Mon Sep 17 00:00:00 2001 From: Arseniy Seroka Date: Wed, 27 Apr 2016 00:04:14 +0300 Subject: [PATCH] esteidfirefoxplugin: init at 3.12.1.1142 --- .../networking/browsers/firefox/wrapper.nix | 2 + .../esteidfirefoxplugin/default.nix | 45 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 49 insertions(+) create mode 100644 pkgs/applications/networking/browsers/mozilla-plugins/esteidfirefoxplugin/default.nix diff --git a/pkgs/applications/networking/browsers/firefox/wrapper.nix b/pkgs/applications/networking/browsers/firefox/wrapper.nix index 5fb887bda22..1904d720dbd 100644 --- a/pkgs/applications/networking/browsers/firefox/wrapper.nix +++ b/pkgs/applications/networking/browsers/firefox/wrapper.nix @@ -6,6 +6,7 @@ , supportsJDK, jrePlugin, icedtea_web , trezor-bridge, bluejeans, djview4, adobe-reader , google_talk_plugin, fribid, gnome3/*.gnome_shell*/ +, esteidfirefoxplugin }: ## configurability of the wrapper itself @@ -42,6 +43,7 @@ let ++ lib.optional (cfg.enableTrezor or false) trezor-bridge ++ lib.optional (cfg.enableBluejeans or false) bluejeans ++ lib.optional (cfg.enableAdobeReader or false) adobe-reader + ++ lib.optional (cfg.enableEsteid or false) esteidfirefoxplugin ); libs = [ gst_all.gstreamer gst_all.gst-plugins-base ] ++ lib.optionals (cfg.enableQuakeLive or false) diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/esteidfirefoxplugin/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/esteidfirefoxplugin/default.nix new file mode 100644 index 00000000000..039d8bbe406 --- /dev/null +++ b/pkgs/applications/networking/browsers/mozilla-plugins/esteidfirefoxplugin/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl, gtk2, openssl, pcsclite, pkgconfig, opensc }: + +stdenv.mkDerivation rec { + version = "3.12.1.1142"; + name = "esteidfirefoxplugin-${version}"; + + src = fetchurl { + url = "https://installer.id.ee/media/ubuntu/pool/main/e/esteidfirefoxplugin/esteidfirefoxplugin_3.12.1.1142.orig.tar.xz"; + sha256 = "0y7759x1xr00p5r3c5wpllcqqnnxh2zi74cmy4m9m690z3ywn0fx"; + }; + + unpackPhase = '' + mkdir src + tar xf $src -C src + cd src + ''; + + buildInputs = [ gtk2 openssl pcsclite pkgconfig opensc ]; + + buildPhase = '' + sed -i "s|opensc-pkcs11.so|${opensc}/lib/pkcs11/opensc-pkcs11.so|" Makefile + make plugin + ''; + + installPhase = '' + plugins=$out/lib/mozilla/plugins + mkdir -p $plugins + cp -a npesteid-firefox-plugin.so $plugins/ + rp=$(patchelf --print-rpath $plugins/npesteid-firefox-plugin.so) + patchelf --set-rpath "$rp:${opensc}/lib:${opensc}/lib/pkcs11" $plugins/npesteid-firefox-plugin.so + ''; + + passthru.mozillaPlugin = "/lib/mozilla/plugins"; + + dontStrip = true; + dontPatchELF = true; + + meta = with stdenv.lib; { + description = "Firefox ID card signing plugin"; + homepage = "http://www.id.ee/"; + license = licenses.lgpl2; + platforms = platforms.linux; + maintainers = [ maintainers.jagajaga ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2368123afff..cdb894998f7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2979,6 +2979,8 @@ in }; qesteidutil = qt5.callPackage ../tools/security/qesteidutil { } ; + qdigidoc = qt5.callPackage ../tools/security/qdigidoc { } ; + esteidfirefoxplugin = callPackage ../applications/networking/browsers/mozilla-plugins/esteidfirefoxplugin { }; qgifer = callPackage ../applications/video/qgifer { giflib = giflib_4_1;