1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, fetchpatch
6, pythonOlder
7, setuptools
8, wheel
9}:
10
11buildPythonPackage rec {
12 pname = "pyprusalink";
13 version = "1.1.0";
14 format = "pyproject";
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchFromGitHub {
19 owner = "home-assistant-libs";
20 repo = pname;
21 rev = "refs/tags/${version}";
22 hash = "sha256-XRtbb7kceiqi8pioTWStRo0drCtQfy1t62jCMihlIec=";
23 };
24
25 patches = [
26 # https://github.com/home-assistant-libs/pyprusalink/pull/55
27 (fetchpatch {
28 name = "unpin-setuptools-dependency.patch";
29 url = "https://github.com/home-assistant-libs/pyprusalink/commit/8efc3229c491a1763456f0f4017251d5789c6d0a.patch";
30 hash = "sha256-kTu1+IwDrcdqelyK/vfhxw8MQBis5I1jag7YTytKQhs=";
31 })
32 ];
33
34 nativeBuildInputs = [
35 setuptools
36 wheel
37 ];
38
39 propagatedBuildInputs = [
40 aiohttp
41 ];
42
43 # Module doesn't have tests
44 doCheck = false;
45
46 pythonImportsCheck = [
47 "pyprusalink"
48 ];
49
50 meta = with lib; {
51 description = "Library to communicate with PrusaLink ";
52 homepage = "https://github.com/home-assistant-libs/pyprusalink";
53 license = with licenses; [ asl20 ];
54 maintainers = with maintainers; [ fab ];
55 };
56}