1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonOlder, 6 poetry-core, 7 pytest-asyncio, 8 pytestCheckHook, 9}: 10 11buildPythonPackage rec { 12 pname = "discovery30303"; 13 version = "0.2.1"; 14 format = "pyproject"; 15 16 disabled = pythonOlder "3.7"; 17 18 src = fetchFromGitHub { 19 owner = "bdraco"; 20 repo = pname; 21 # Commit points to 0.2.1, https://github.com/bdraco/discovery30303/issues/1 22 rev = "0d0b0fdca1a98662dd2e6174d25853703bd6bf07"; 23 hash = "sha256-WSVMhiJxASxAkxs6RGuAVvEFS8TPxDKE9M99Rp8HKGM="; 24 }; 25 26 nativeBuildInputs = [ poetry-core ]; 27 28 nativeCheckInputs = [ 29 pytest-asyncio 30 pytestCheckHook 31 ]; 32 33 pytestFlagsArray = [ "--asyncio-mode=auto" ]; 34 35 postPatch = '' 36 substituteInPlace pyproject.toml \ 37 --replace " --cov=discovery30303" "" 38 ''; 39 40 pythonImportsCheck = [ "discovery30303" ]; 41 42 meta = with lib; { 43 description = "Module to discover devices that respond on port 30303"; 44 homepage = "https://github.com/bdraco/discovery30303"; 45 license = with licenses; [ asl20 ]; 46 maintainers = with maintainers; [ fab ]; 47 }; 48}