1{ lib
2, aiohttp
3, beautifulsoup4
4, buildPythonPackage
5, fetchFromGitHub
6, pkce
7, poetry-core
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "python-myq";
13 version = "3.1.13";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "Python-MyQ";
20 repo = "Python-MyQ";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-kW03swRXZdkh45I/up/FIxv0WGBRqTlDt1X71Ow/hrg=";
23 };
24
25 postPatch = ''
26 substituteInPlace pyproject.toml \
27 --replace "poetry-core==1.6.1" "poetry-core"
28 '';
29
30 nativeBuildInputs = [
31 poetry-core
32 ];
33
34 propagatedBuildInputs = [
35 aiohttp
36 beautifulsoup4
37 pkce
38 ];
39
40 # Project has no tests
41 doCheck = false;
42
43 pythonImportsCheck = [
44 "pymyq"
45 ];
46
47 meta = with lib; {
48 description = "Python wrapper for MyQ API";
49 homepage = "https://github.com/Python-MyQ/Python-MyQ";
50 changelog = "https://github.com/Python-MyQ/Python-MyQ/releases/tag/v${version}";
51 license = with licenses; [ mit ];
52 maintainers = with maintainers; [ fab ];
53 };
54}