at 24.11-pre 1.5 kB view raw
1{ 2 lib, 3 aiohttp, 4 aresponses, 5 buildPythonPackage, 6 fetchFromGitHub, 7 fetchpatch, 8 poetry-core, 9 pytest-asyncio, 10 pytestCheckHook, 11 pythonOlder, 12 yarl, 13}: 14 15buildPythonPackage rec { 16 pname = "cemm"; 17 version = "0.5.1"; 18 format = "pyproject"; 19 20 disabled = pythonOlder "3.9"; 21 22 src = fetchFromGitHub { 23 owner = "klaasnicolaas"; 24 repo = "python-cemm"; 25 rev = "refs/tags/v${version}"; 26 hash = "sha256-BorgGHxoEeIGyJKqe9mFRDpcGHhi6/8IV7ubEI8yQE4="; 27 }; 28 29 patches = [ 30 # https://github.com/klaasnicolaas/python-cemm/pull/360 31 (fetchpatch { 32 name = "remove-setuptools-dependency.patch"; 33 url = "https://github.com/klaasnicolaas/python-cemm/commit/1e373dac078f18563264e6733baf6a93962cac4b.patch"; 34 hash = "sha256-DVNn4BZwi8yNpKFmzt7YSYhzzB4vaAyrd/My8TtYzj0="; 35 }) 36 ]; 37 38 postPatch = '' 39 substituteInPlace pyproject.toml \ 40 --replace '"0.0.0"' '"${version}"' \ 41 --replace 'addopts = "--cov"' "" 42 ''; 43 44 nativeBuildInputs = [ poetry-core ]; 45 46 propagatedBuildInputs = [ 47 aiohttp 48 yarl 49 ]; 50 51 __darwinAllowLocalNetworking = true; 52 53 nativeCheckInputs = [ 54 aresponses 55 pytest-asyncio 56 pytestCheckHook 57 ]; 58 59 pythonImportsCheck = [ "cemm" ]; 60 61 meta = with lib; { 62 description = "Module for interacting with CEMM devices"; 63 homepage = "https://github.com/klaasnicolaas/python-cemm"; 64 changelog = "https://github.com/klaasnicolaas/python-cemm/releases/tag/v${version}"; 65 license = with licenses; [ mit ]; 66 maintainers = with maintainers; [ fab ]; 67 }; 68}