From 83f8ffb11d0a229873d6e4895865a1eed11aa1f0 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Fri, 11 Aug 2017 13:32:05 +0200 Subject: [PATCH] Revert "trezor-bridge: remove" This reverts commit fac1ded619c8a4ecb6b7fdb5a119e4ea7f586f20. missed one use --- .../mozilla-plugins/trezor/default.nix | 47 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix new file mode 100644 index 00000000000..db871c0c9a5 --- /dev/null +++ b/pkgs/applications/networking/browsers/mozilla-plugins/trezor/default.nix @@ -0,0 +1,47 @@ +{ 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; [ ehmry ]; + # Download URL, .deb content & hash (yikes) changed, not version. + # New archive doesn't contain any Mozilla plugin at all. + broken = true; + }; + +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 82b971a96c5..bab28228b1c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16393,6 +16393,8 @@ with pkgs; treesheets = callPackage ../applications/office/treesheets { wxGTK = wxGTK30; }; + trezor-bridge = callPackage ../applications/networking/browsers/mozilla-plugins/trezor { }; + tribler = callPackage ../applications/networking/p2p/tribler { }; trojita = libsForQt56.callPackage ../applications/networking/mailreaders/trojita { };