1{ lib
2, aiohttp
3, aresponses
4, buildPythonPackage
5, fetchFromGitHub
6, poetry-core
7, pytest-asyncio
8, pytestCheckHook
9, pythonOlder
10, yarl
11}:
12
13buildPythonPackage rec {
14 pname = "cemm";
15 version = "0.5.1";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "klaasnicolaas";
22 repo = "python-cemm";
23 rev = "refs/tags/v${version}";
24 hash = "sha256-BorgGHxoEeIGyJKqe9mFRDpcGHhi6/8IV7ubEI8yQE4=";
25 };
26
27 postPatch = ''
28 substituteInPlace pyproject.toml \
29 --replace '"0.0.0"' '"${version}"' \
30 --replace 'addopts = "--cov"' ""
31 '';
32
33 nativeBuildInputs = [
34 poetry-core
35 ];
36
37 propagatedBuildInputs = [
38 aiohttp
39 yarl
40 ];
41
42 nativeCheckInputs = [
43 aresponses
44 pytest-asyncio
45 pytestCheckHook
46 ];
47
48 pythonImportsCheck = [
49 "cemm"
50 ];
51
52 meta = with lib; {
53 description = "Module for interacting with CEMM devices";
54 homepage = "https://github.com/klaasnicolaas/python-cemm";
55 changelog = "https://github.com/klaasnicolaas/python-cemm/releases/tag/v${version}";
56 license = with licenses; [ mit ];
57 maintainers = with maintainers; [ fab ];
58 };
59}