initial package for TREZOR browser plugin

This plugin allows a browser to access a TREZOR device.
It requires a udev rule and a wrapped browser to operate.

Closes #3475
This commit is contained in:
Emery Hemingway 2014-08-05 20:02:26 -04:00 committed by Mateusz Kowalczyk
parent 1a87e651e9
commit d566fffc43
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,44 @@
{ stdenv, fetchurl, dpkg, zlib }:
assert stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux";
stdenv.mkDerivation {
name = "TREZOR-bridge-1.0.5";
passthru = {
mozillaPlugin = "/lib/mozilla/plugins";
};
src =
if stdenv.system == "x86_64-linux" then
fetchurl {
url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_amd64.deb;
sha256 = "0097h4v88yca4aayzprrh4pk03xvvj7ncz2mi83chm81gsr2v67z";
}
else
fetchurl {
url = https://mytrezor.com/data/plugin/1.0.5/browser-plugin-trezor_1.0.5_i386.deb;
sha256 = "0xzbq78s3ivg00f0bj6gyjgf47pvjx2l4mm05jjmdar60bf1xr1n";
};
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
dontStrip = true;
dontPatchELF = true;
unpackPhase = "${dpkg}/bin/dpkg-deb -x $src .";
installPhase = ''
mkdir -p $out/etc/udev/rules.d/ $out/lib/mozilla/plugins
cp ./lib/udev/rules.d/51-trezor-udev.rules $out/etc/udev/rules.d/
cp ./usr/lib/mozilla/plugins/npBitcoinTrezorPlugin.so $out/lib/mozilla/plugins
'';
meta = with stdenv.lib;
{ description = "Plugin for browser to TREZOR device communication";
homepage = https://mytrezor.com;
license = licenses.unfree;
maintainers = with maintainers; [ emery ];
};
}

View File

@ -10234,6 +10234,8 @@ let
tree = callPackage ../tools/system/tree {};
trezor-bridge = callPackage ../applications/networking/browsers/mozilla-plugins/trezor { };
tribler = callPackage ../applications/networking/p2p/tribler { };
twister = callPackage ../applications/networking/p2p/twister { };
@ -10423,6 +10425,7 @@ let
++ lib.optional (cfg.enableGoogleTalkPlugin or false) google_talk_plugin
++ lib.optional (cfg.enableFriBIDPlugin or false) fribid
++ lib.optional (cfg.enableGnomeExtensions or false) gnome3.gnome_shell
++ lib.optional (cfg.enableTrezor or false) trezor-bridge
);
libs = [ gstreamer gst_plugins_base ] ++ lib.optionals (cfg.enableQuakeLive or false)
(with xlibs; [ stdenv.gcc libX11 libXxf86dga libXxf86vm libXext libXt alsaLib zlib ]);