about summary refs log tree commit diff
path: root/pkgs/development/python-modules/smart-meter-texas
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-06-29 14:01:05 +0200
committerRobert Schütz <dev@schuetz-co.de>2021-06-29 15:33:59 +0200
commitf71e493dea00c9fc9f585f1cc4ffdbf8c3862876 (patch)
tree0d23050cb7806d9e43bb7370050c893b3416ce5f /pkgs/development/python-modules/smart-meter-texas
parent8f353edb83e3c71191171b053af0a412f41950f9 (diff)
python3Packages.smart-meter-texas: init at 0.4.3
Diffstat (limited to 'pkgs/development/python-modules/smart-meter-texas')
-rw-r--r--pkgs/development/python-modules/smart-meter-texas/default.nix43
1 files changed, 43 insertions, 0 deletions
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 0000000000000..abdcd7317bc54
--- /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 ];
+  };
+}