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