diff --git a/pkgs/development/python-modules/ledgerwallet/default.nix b/pkgs/development/python-modules/ledgerwallet/default.nix new file mode 100644 index 000000000000..e25e9d5d2a4f --- /dev/null +++ b/pkgs/development/python-modules/ledgerwallet/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, fetchFromGitHub +, buildPythonPackage +, cryptography +, click +, construct +, ecdsa +, hidapi +, intelhex +, pillow +, protobuf +, requests +, tabulate +, AppKit +}: + +buildPythonPackage rec { + pname = "ledgerwallet"; + version = "0.1.2"; + + src = fetchFromGitHub { + owner = "LedgerHQ"; + repo = "ledgerctl"; + rev = "v${version}"; + sha256 = "0fb93h2wxm9as9rsywlgz2ng4wrlbjphn6mgbhj6nls2i86rrdxk"; + }; + + buildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit ]; + propagatedBuildInputs = [ + cryptography click construct ecdsa hidapi intelhex pillow protobuf requests tabulate + ]; + + pythonImportsCheck = [ "ledgerwallet" ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/LedgerHQ/ledgerctl"; + description = "A library to control Ledger devices"; + license = licenses.mit; + maintainers = with maintainers; [ xwvvvvwx ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ff4fe6e1510b..159b43da72b8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3388,6 +3388,10 @@ in { ledgerblue = callPackage ../development/python-modules/ledgerblue { }; + ledgerwallet = callPackage ../development/python-modules/ledgerwallet { + inherit (pkgs.darwin.apple_sdk.frameworks) AppKit; + }; + lektor = callPackage ../development/python-modules/lektor { }; leveldb = callPackage ../development/python-modules/leveldb { };