Unverified Commit b39a0219 authored by Pavol Rusnak's avatar Pavol Rusnak Committed by GitHub
Browse files

python3Packages.trezor: 0.13.10 -> 0.20.0 (#455630)

parents a6d92faa 05ae75ce
Loading
Loading
Loading
Loading
+33 −13
Original line number Diff line number Diff line
@@ -3,53 +3,73 @@
  lib,
  buildPythonPackage,
  fetchPypi,
  hatchling,
  pytestCheckHook,
  pytest-random-order,
  # dependencies
  click,
  construct,
  construct-classes,
  cryptography,
  ecdsa,
  keyring,
  libusb1,
  mnemonic,
  noiseprotocol,
  platformdirs,
  requests,
  setuptools,
  shamir-mnemonic,
  slip10,
  typing-extensions,
  trezor-udev-rules,
  pytestCheckHook,
  # optional-dependencies
  bleak,
  pillow,
  hidapi,
  web3,
  pyqt5,
}:

buildPythonPackage rec {
  pname = "trezor";
  version = "0.13.10";
  version = "0.20.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-egtq5GKN0MMaXOtRJYkY2bvdOthROIg3IlgmsijuUE8=";
    hash = "sha256-TAmOIDFbJxZnOr3vQCgi5xiRAVmMfAPyN0ndIBDuJQQ=";
  };

  build-system = [ setuptools ];
  build-system = [ hatchling ];

  dependencies = [
    click
    construct
    construct-classes
    cryptography
    ecdsa
    keyring
    libusb1
    mnemonic
    noiseprotocol
    platformdirs
    requests
    shamir-mnemonic
    slip10
    typing-extensions
  ]
  ++ lib.optionals stdenv.hostPlatform.isLinux [ trezor-udev-rules ];
  ];

  # fix "click<8.2,>=7 not satisfied by version 8.3.1"
  pythonRelaxDeps = [ "click" ];
  optional-dependencies = {
    ble = [ bleak ];
    extra = [ pillow ];
    hidapi = [ hidapi ];
    ethereum = [ web3 ];
    qt-widgets = [ pyqt5 ];
    # stellar = [ stellar-sdk ]; # missing in nixpkgs
    full = lib.flatten (lib.attrValues (lib.removeAttrs optional-dependencies [ "full" ]));
  };

  nativeCheckInputs = [ pytestCheckHook ];
  nativeCheckInputs = [
    pytestCheckHook
    pytest-random-order
  ];

  disabledTestPaths = [
    "tests/test_stellar.py" # requires stellar-sdk
+7 −1
Original line number Diff line number Diff line
@@ -3575,7 +3575,13 @@ with pkgs;

  trackma-qt = trackma.override { withQT = true; };

  trezorctl = with python3Packages; toPythonApplication trezor;
  trezorctl =
    with python3Packages;
    toPythonApplication (
      trezor.overridePythonAttrs (oldAttrs: {
        dependencies = oldAttrs.dependencies ++ oldAttrs.optional-dependencies.full;
      })
    );

  trezor-agent = with python3Packages; toPythonApplication trezor-agent;