about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/luftdaten/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/luftdaten/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/luftdaten/default.nix41
1 files changed, 31 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/luftdaten/default.nix b/nixpkgs/pkgs/development/python-modules/luftdaten/default.nix
index 71daa4bdbfa4..c8ca8254b363 100644
--- a/nixpkgs/pkgs/development/python-modules/luftdaten/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/luftdaten/default.nix
@@ -1,20 +1,41 @@
-{ lib, buildPythonPackage, isPy3k, fetchPypi, aiohttp, async-timeout }:
+{ lib
+, buildPythonPackage
+, pythonOlder
+, fetchFromGitHub
+, poetry-core
+, httpx
+, pytest-asyncio
+, pytest-httpx
+, pytestCheckHook
+}:
 
 buildPythonPackage rec {
   pname = "luftdaten";
-  version = "0.6.5";
+  version = "0.7.1";
+  format = "pyproject";
 
-  disabled = !isPy3k;
+  disabled = pythonOlder "3.8";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "sha256-5SFb+psULyg9UKVY3oJPNLF3TGS/W+Bxoj79iTzReL4=";
+  src = fetchFromGitHub {
+    owner = "home-assistant-ecosystem";
+    repo = "python-luftdaten";
+    rev = version;
+    sha256 = "sha256-76Y5TJet0WtzYXuK8Og0rmpsUIlXK7b37oesh+MliU8=";
   };
 
-  propagatedBuildInputs = [ aiohttp async-timeout ];
+  nativeBuildInputs = [
+    poetry-core
+  ];
 
-  # No tests implemented
-  doCheck = false;
+  propagatedBuildInputs = [
+    httpx
+  ];
+
+  checkInputs = [
+    pytest-asyncio
+    pytest-httpx
+    pytestCheckHook
+  ];
 
   pythonImportsCheck = [ "luftdaten" ];
 
@@ -22,6 +43,6 @@ buildPythonPackage rec {
     description = "Python API for interacting with luftdaten.info";
     homepage = "https://github.com/home-assistant-ecosystem/python-luftdaten";
     license = licenses.mit;
-    maintainers = with maintainers; [ dotlambda ];
+    maintainers = with maintainers; [ dotlambda fab ];
   };
 }