mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 14:04:52 +00:00
Merge pull request #149912 from prusnak/python3-trezor
python3Packages.trezor: 0.12.4 -> 0.13.0
This commit is contained in:
commit
3f50bcc917
@ -2,6 +2,7 @@
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, wrapQtAppsHook
|
||||
, python3
|
||||
, zbar
|
||||
@ -78,6 +79,14 @@ python3.pkgs.buildPythonApplication {
|
||||
--replace "dnspython>=2.0,<2.1" "dnspython>=2.0"
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# trezorlib 0.13 compatibility
|
||||
(fetchpatch {
|
||||
url = "https://github.com/spesmilo/electrum/commit/97e61cfacdca374103e4184f0f9a07a0c5757afb.patch";
|
||||
sha256 = "sha256-RGVBO9IskC+lQOHNGjrqH6EM/inNPJlcD9sSWedyT5E=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = lib.optionals enableQt [ wrapQtAppsHook ];
|
||||
|
||||
propagatedBuildInputs = with py.pkgs; [
|
||||
|
@ -1,5 +1,13 @@
|
||||
{ lib, fetchFromGitHub, buildPythonPackage, pytest
|
||||
, ecdsa , mnemonic, protobuf, hidapi, trezor }:
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, ecdsa
|
||||
, hidapi
|
||||
, libusb1
|
||||
, mnemonic
|
||||
, protobuf
|
||||
, pytest
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "keepkey";
|
||||
@ -12,9 +20,7 @@ buildPythonPackage rec {
|
||||
sha256 = "00hqppdj3s9y25x4ad59y8axq94dd4chhw9zixq32sdrd9v8z55a";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ protobuf hidapi trezor ];
|
||||
|
||||
buildInputs = [ ecdsa mnemonic ];
|
||||
propagatedBuildInputs = [ ecdsa hidapi libusb1 mnemonic protobuf ];
|
||||
|
||||
checkInputs = [ pytest ];
|
||||
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mnemonic";
|
||||
version = "0.19";
|
||||
version = "0.20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "trezor";
|
||||
repo = "python-${pname}";
|
||||
rev = "v${version}";
|
||||
sha256 = "0rs3szdikkgypiwn43ad3lwh7zvpccw39j5ggkziq6v7pnw3isaq";
|
||||
sha256 = "sha256-YYgWlYfVd1iALOziaUI8uVYjJDCIVk/dXcUmJd2jcvQ=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "shamir-mnemonic";
|
||||
version = "0.2.1";
|
||||
version = "0.2.2";
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
@ -18,14 +18,9 @@ buildPythonPackage rec {
|
||||
owner = "trezor";
|
||||
repo = "python-${pname}";
|
||||
rev = "v${version}";
|
||||
sha256 = "1mi1n01yw8yycbiv1l0xnfzlhhq2arappyvyi2jm5yq65jln77kg";
|
||||
sha256 = "sha256-b9tBXN9dBdAeGg3xf5ZBdd6kPpFzseJl6wRTTfNZEwo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "click>=7,<8" "click"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
attrs
|
||||
click
|
||||
|
@ -24,13 +24,13 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "trezor";
|
||||
version = "0.12.4";
|
||||
version = "0.13.0";
|
||||
|
||||
disabled = !isPy3k;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "3e180d9f9f8b69176b5ef36311b6161f5b793b538eb2dfd4babbb4d3fb1e374e";
|
||||
sha256 = "4571aa09dbfe88b31eb2f16c7c359b4809621b75a04b7b5bc9dbffe17046c99a";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
@ -56,6 +56,10 @@ buildPythonPackage rec {
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/test_stellar.py" # requires stellar-sdk
|
||||
];
|
||||
|
||||
postFixup = ''
|
||||
mkdir completions
|
||||
_TREZORCTL_COMPLETE=source_bash $out/bin/trezorctl > completions/trezorctl || true
|
||||
|
@ -24,6 +24,12 @@ buildPythonPackage rec {
|
||||
|
||||
propagatedBuildInputs = [ setuptools trezor libagent ecdsa ed25519 mnemonic keepkey semver wheel pinentry ];
|
||||
|
||||
# relax dependency constraint
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "trezor[hidapi]>=0.12.0,<0.13" "trezor[hidapi]>=0.12.0,<0.14"
|
||||
'';
|
||||
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "libagent" ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user