From 5cb1d65110f1c3a8222279227ef64650c75396b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 16 Nov 2021 14:27:43 -0800 Subject: [PATCH] python3Packages.luftdaten: 0.6.5 -> 0.7.0 https://github.com/home-assistant-ecosystem/python-luftdaten/blob/0.7.0/CHANGES.rst --- .../python-modules/luftdaten/default.nix | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/luftdaten/default.nix b/pkgs/development/python-modules/luftdaten/default.nix index 71daa4bdbfa4..b78d1beeeb58 100644 --- a/pkgs/development/python-modules/luftdaten/default.nix +++ b/pkgs/development/python-modules/luftdaten/default.nix @@ -1,20 +1,42 @@ -{ 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.0"; - disabled = !isPy3k; + disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-5SFb+psULyg9UKVY3oJPNLF3TGS/W+Bxoj79iTzReL4="; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "home-assistant-ecosystem"; + repo = "python-luftdaten"; + rev = version; + sha256 = "0ij56zmdxwlqla11ii32nrv0fxd96d9m7q4bzlkrvw5hkp9lvrqq"; }; - propagatedBuildInputs = [ aiohttp async-timeout ]; + nativeBuildInputs = [ + poetry-core + ]; - # No tests implemented - doCheck = false; + propagatedBuildInputs = [ + httpx + ]; + + checkInputs = [ + pytest-asyncio + pytest-httpx + pytestCheckHook + ]; pythonImportsCheck = [ "luftdaten" ];