about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2023-09-07 15:23:49 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2023-09-08 01:29:42 +0200
commitf2e1a4b0cdab05a2744a3e44ee1675f077167b9c (patch)
tree8f36e42791eeccbe0aa2c59001b96533e0baffef
parentc1985b815f3ac2cb411567a184beb6fd73ab442f (diff)
downloadnixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.tar
nixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.tar.gz
nixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.tar.bz2
nixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.tar.lz
nixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.tar.xz
nixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.tar.zst
nixlib-f2e1a4b0cdab05a2744a3e44ee1675f077167b9c.zip
python311Packages.aiowaqi: init at 1.1.0
https://github.com/joostlek/python-waqi
-rw-r--r--pkgs/development/python-modules/aiowaqi/default.nix60
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/aiowaqi/default.nix b/pkgs/development/python-modules/aiowaqi/default.nix
new file mode 100644
index 000000000000..ba2d16c7e3e9
--- /dev/null
+++ b/pkgs/development/python-modules/aiowaqi/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, aiohttp
+, aresponses
+, buildPythonPackage
+, fetchFromGitHub
+, poetry-core
+, pytest-asyncio
+, pytestCheckHook
+, pythonOlder
+, syrupy
+, yarl
+}:
+
+buildPythonPackage rec {
+  pname = "aiowaqi";
+  version = "1.1.0";
+  format = "pyproject";
+
+  disabled = pythonOlder "3.11";
+
+  src = fetchFromGitHub {
+    owner = "joostlek";
+    repo = "python-waqi";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-CQCF59Tp0VE7PNHPdVzzZegLUNDkslzKapELDjZn1k4=";
+  };
+
+  postPatch = ''
+    substituteInPlace pyproject.toml \
+      --replace "--cov" ""
+  '';
+
+  nativeBuildInputs = [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = [
+    aiohttp
+    yarl
+  ];
+
+  nativeCheckInputs = [
+    aresponses
+    pytest-asyncio
+    pytestCheckHook
+    syrupy
+  ];
+
+  pythonImportsCheck = [
+    "aiowaqi"
+  ];
+
+  meta = with lib; {
+    description = "Module to interact with the WAQI API";
+    homepage = "https://github.com/joostlek/python-waqi";
+    changelog = "https://github.com/joostlek/python-waqi/releases/tag/v${version}";
+    license = licenses.mit;
+    maintainers = with maintainers; [ fab ];
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index ce9c0e6a0371..d944f1c7c959 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -402,6 +402,8 @@ self: super: with self; {
 
   aiowatttime = callPackage ../development/python-modules/aiowatttime { };
 
+  aiowaqi = callPackage ../development/python-modules/aiowaqi { };
+
   aioweenect = callPackage ../development/python-modules/aioweenect { };
 
   aiowebostv = callPackage ../development/python-modules/aiowebostv { };