From 273dd192c0af39b5de30623d301f529b7118f9e6 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 24 Feb 2019 23:33:44 +0100 Subject: [PATCH] pythonPackages.adb-homeassistant: init at 1.3.1 --- .../adb-homeassistant/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/adb-homeassistant/default.nix diff --git a/pkgs/development/python-modules/adb-homeassistant/default.nix b/pkgs/development/python-modules/adb-homeassistant/default.nix new file mode 100644 index 000000000000..83dab71e2216 --- /dev/null +++ b/pkgs/development/python-modules/adb-homeassistant/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, libusb1 +, rsa +, pycryptodome +, pytest +, mock +}: +buildPythonPackage rec { + pname = "adb-homeassistant"; + version = "1.3.1"; + + # pypi does not contain tests, using github sources instead + src = fetchFromGitHub { + owner = "JeffLIrion"; + repo = "python-adb"; + rev = "5949bf432307cbba7128e84d7bc6add7f054a078"; + sha256 = "0s3fazvbzchn1fsvjrd1jl8w9y4dvvgq6q8m8p5lr2gri0npr581"; + + }; + + propagatedBuildInputs = [ + libusb1 + rsa + pycryptodome + ]; + + checkInputs = [ pytest mock ]; + checkPhase = '' + py.test test + ''; + + meta = with lib; { + description = "A pure python implementation of the Android ADB and Fastboot protocols"; + homepage = https://github.com/JeffLIrion/python-adb/tree/adb-homeassistant; + license = licenses.asl20; + maintainers = [ maintainers.makefu ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0fe80fdfd32d..cf2933751cfe 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -146,6 +146,8 @@ in { absl-py = callPackage ../development/python-modules/absl-py { }; + adb-homeassistant = callPackage ../development/python-modules/adb-homeassistant { }; + aenum = callPackage ../development/python-modules/aenum { }; affinity = callPackage ../development/python-modules/affinity { };