diff --git a/pkgs/development/python-modules/tank-utility/default.nix b/pkgs/development/python-modules/tank-utility/default.nix new file mode 100644 index 000000000000..ebcec39f862d --- /dev/null +++ b/pkgs/development/python-modules/tank-utility/default.nix @@ -0,0 +1,50 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, mock +, pytestCheckHook +, pythonOlder +, requests +, responses +, setuptools +, urllib3 +}: + +buildPythonPackage rec { + pname = "tank-utility"; + version = "1.4.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "krismolendyke"; + repo = pname; + rev = version; + hash = "sha256-2cxAaSyreIzQzCUtiolEV7JbGFKL8Mob3337J0jlMsU="; + }; + + propagatedBuildInputs = [ + requests + urllib3 + setuptools + ] ++ urllib3.optional-dependencies.secure; + + checkInputs = [ + responses + mock + pytestCheckHook + ]; + + + pythonImportsCheck = [ + "tank_utility" + ]; + + meta = with lib; { + description = "Library for the Tank Utility API"; + homepage = "https://github.com/krismolendyke/tank-utility"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index d7e2a582e03b..6f4996b03fd6 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2719,7 +2719,8 @@ tailscale ]; "tank_utility" = ps: with ps; [ - ]; # missing inputs: tank_utility + tank-utility + ]; "tankerkoenig" = ps: with ps; [ pytankerkoenig ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c6d06e86b41..aeef12baa1f3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10621,6 +10621,8 @@ in { tailscale = callPackage ../development/python-modules/tailscale { }; + tank-utility = callPackage ../development/python-modules/tank-utility { }; + tappy = callPackage ../development/python-modules/tappy { }; tasklib = callPackage ../development/python-modules/tasklib { };