diff --git a/pkgs/development/python-modules/smart-meter-texas/default.nix b/pkgs/development/python-modules/smart-meter-texas/default.nix new file mode 100644 index 00000000000..abdcd7317bc --- /dev/null +++ b/pkgs/development/python-modules/smart-meter-texas/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, aiohttp +, python-dateutil +, tenacity +}: + +buildPythonPackage rec { + pname = "smart-meter-texas"; + version = "0.4.3"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "grahamwetzler"; + repo = "smart-meter-texas"; + rev = "v${version}"; + sha256 = "09n03wbyjh1b1gsiibf17fg86x7k1i1r1kpp94p7w1lcdbmn8v5c"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "pytest-runner" "" + ''; + + propagatedBuildInputs = [ + aiohttp + python-dateutil + tenacity + ]; + + # no tests implemented + doCheck = false; + + meta = with lib; { + description = "Connect to and retrieve data from the unofficial Smart Meter Texas API"; + homepage = "https://github.com/grahamwetzler/smart-meter-texas"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index efe5f426878..ef6b5270294 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7984,6 +7984,8 @@ in { sly = callPackage ../development/python-modules/sly { }; + smart-meter-texas = callPackage ../development/python-modules/smart-meter-texas { }; + smart-open = callPackage ../development/python-modules/smart-open { }; smarthab = callPackage ../development/python-modules/smarthab { };