1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 future, 6 mock, 7 pytestCheckHook, 8 pythonOlder, 9 setuptools, 10}: 11 12buildPythonPackage rec { 13 pname = "python-ipmi"; 14 version = "0.5.7"; 15 pyproject = true; 16 17 disabled = pythonOlder "3.6"; 18 19 src = fetchFromGitHub { 20 owner = "kontron"; 21 repo = "python-ipmi"; 22 tag = version; 23 hash = "sha256-vwjVUkTeVC1On1I1BtM0kBbne6CbX/6Os1+HA8WN9jU="; 24 }; 25 26 postPatch = '' 27 substituteInPlace setup.py \ 28 --replace-fail "version=version," "version='${version}'," 29 ''; 30 31 nativeBuildInputs = [ setuptools ]; 32 33 propagatedBuildInputs = [ future ]; 34 35 nativeCheckInputs = [ 36 mock 37 pytestCheckHook 38 ]; 39 40 pythonImportsCheck = [ "pyipmi" ]; 41 42 meta = with lib; { 43 description = "Python IPMI Library"; 44 mainProgram = "ipmitool.py"; 45 homepage = "https://github.com/kontron/python-ipmi"; 46 license = with licenses; [ lgpl2Plus ]; 47 maintainers = with maintainers; [ fab ]; 48 }; 49}