Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7b6b361ee96d
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1d097a6c9b3c
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 24, 2020

  1. Copy the full SHA
    681268d View commit details
  2. Merge pull request #93767 from mmilata/trezorctl-shell-completion

    pythonPackages.trezor: enable shell completion
    mmahut authored Jul 24, 2020

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1d097a6 View commit details
Showing with 13 additions and 0 deletions.
  1. +13 −0 pkgs/development/python-modules/trezor/default.nix
13 changes: 13 additions & 0 deletions pkgs/development/python-modules/trezor/default.nix
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
, rlp
, shamir-mnemonic
, trezor-udev-rules
, installShellFiles
}:

buildPythonPackage rec {
@@ -25,6 +26,8 @@ buildPythonPackage rec {
sha256 = "0ycmpwjv5xp25993divjhaq5j766zgcy22xx39xfc1pcvldq5g7n";
};

nativeBuildInputs = [ installShellFiles ];

propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp shamir-mnemonic trezor-udev-rules ];

checkInputs = [
@@ -38,6 +41,16 @@ buildPythonPackage rec {
runHook postCheck
'';

postFixup = ''
mkdir completions
_TREZORCTL_COMPLETE=source_bash $out/bin/trezorctl > completions/trezorctl || true
_TREZORCTL_COMPLETE=source_zsh $out/bin/trezorctl > completions/_trezorctl || true
_TREZORCTL_COMPLETE=source_fish $out/bin/trezorctl > completions/trezorctl.fish || true
installShellCompletion --bash completions/trezorctl
installShellCompletion --zsh completions/_trezorctl
installShellCompletion --fish completions/trezorctl.fish
'';

meta = with lib; {
description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
homepage = "https://github.com/trezor/trezor-firmware/tree/master/python";