about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2019-01-23 13:46:24 +0000
committerGitHub <noreply@github.com>2019-01-23 13:46:24 +0000
commit20343f0ab476886a20e530a54bd9695efaa3c7b9 (patch)
tree9ef8a6635900f738a0d0adde77ca92eacba5c29c /pkgs
parentb4cd25c2439b1b900b2dd4ab5d0c3243b101ed87 (diff)
parentbdb81a8d29334416d74e0f60940ea58917047c64 (diff)
downloadnixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.tar
nixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.tar.gz
nixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.tar.bz2
nixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.tar.lz
nixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.tar.xz
nixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.tar.zst
nixlib-20343f0ab476886a20e530a54bd9695efaa3c7b9.zip
Merge pull request #52741 from prusnak/python-trezor
pythonPackages: trezor: 0.10.2 -> 0.11.1
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/trezor/default.nix37
1 files changed, 29 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/trezor/default.nix b/pkgs/development/python-modules/trezor/default.nix
index 878de1875190..7808eb359326 100644
--- a/pkgs/development/python-modules/trezor/default.nix
+++ b/pkgs/development/python-modules/trezor/default.nix
@@ -1,27 +1,48 @@
-{ lib, fetchPypi, buildPythonPackage,
-  protobuf, hidapi, ecdsa, mnemonic, requests, pyblake2, click, libusb1, rlp, isPy3k
+{ lib, fetchPypi, buildPythonPackage, isPy3k, python, pytest
+, typing-extensions
+, protobuf
+, hidapi
+, ecdsa
+, mnemonic
+, requests
+, pyblake2
+, click
+, construct
+, libusb1
+, rlp
 }:
 
 buildPythonPackage rec {
   pname = "trezor";
-  version = "0.10.2";
+  version = "0.11.1";
 
   disabled = !isPy3k;
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "4dba4d5c53d3ca22884d79fb4aa68905fb8353a5da5f96c734645d8cf537138d";
+    sha256 = "6043f321d856e1b45b9df0c37810264f08d065bb56cd999f61a05fe2906e9e18";
   };
 
-  propagatedBuildInputs = [ protobuf hidapi ecdsa mnemonic requests pyblake2 click libusb1 rlp ];
+  propagatedBuildInputs = [ typing-extensions protobuf hidapi ecdsa mnemonic requests pyblake2 click construct libusb1 rlp ];
 
-  # There are no actual tests: "ImportError: No module named tests"
-  doCheck = false;
+  # build requires UTF-8 locale
+  LANG = "en_US.UTF-8";
+
+  checkInputs = [
+    pytest
+  ];
+
+  # disable test_tx_api.py as it requires being online
+  checkPhase = ''
+    runHook preCheck
+    ${python.interpreter} -m pytest --pyarg trezorlib.tests.unit_tests --ignore trezorlib/tests/unit_tests/test_tx_api.py
+    runHook postCheck
+  '';
 
   meta = {
     description = "Python library for communicating with TREZOR Bitcoin Hardware Wallet";
     homepage = https://github.com/trezor/python-trezor;
     license = lib.licenses.gpl3;
-    maintainers = with lib.maintainers; [ np ];
+    maintainers = with lib.maintainers; [ np prusnak ];
   };
 }