about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix b/nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix
new file mode 100644
index 000000000000..39aa7974313c
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/aiowatttime/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, aiohttp
+, aresponses
+, buildPythonPackage
+, fetchFromGitHub
+, poetry-core
+, pytest-aiohttp
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "aiowatttime";
+  version = "0.1.1";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.8";
+
+  src = fetchFromGitHub {
+    owner = "bachya";
+    repo = pname;
+    rev = version;
+    sha256 = "1614p5ca7x9ipz7dgwhiz83dfwn6hyliawa8pr2j9y2kn8cg2sdm";
+  };
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    aiohttp
+  ];
+
+  checkInputs = [
+    aresponses
+    pytest-aiohttp
+    pytest-asyncio
+    pytestCheckHook
+  ];
+
+  # Ignore the examples directory as the files are prefixed with test_
+  disabledTestPaths = [ "examples/" ];
+
+  pythonImportsCheck = [ "aiowatttime" ];
+
+  meta = with lib; {
+    description = "Python library for interacting with WattTime";
+    homepage = "https://github.com/bachya/aiowatttime";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ fab ];
+  };
+}