1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 mock, 6 pynose, 7 pyserial, 8 pytestCheckHook, 9 pythonOlder, 10}: 11 12buildPythonPackage rec { 13 pname = "pylacrosse"; 14 version = "0.4"; 15 format = "setuptools"; 16 17 disabled = pythonOlder "3.7"; 18 19 src = fetchFromGitHub { 20 owner = "hthiery"; 21 repo = "python-lacrosse"; 22 rev = "refs/tags/${version}"; 23 hash = "sha256-jrkehoPLYbutDfxMBO/vlx4nMylTNs/gtvoBTFHFsDw="; 24 }; 25 26 postPatch = '' 27 substituteInPlace setup.py \ 28 --replace "version = version," "version = '${version}'," 29 ''; 30 31 propagatedBuildInputs = [ pyserial ]; 32 33 nativeCheckInputs = [ 34 mock 35 pynose 36 pytestCheckHook 37 ]; 38 39 pythonImportsCheck = [ "pylacrosse" ]; 40 41 meta = with lib; { 42 description = "Python library for Jeelink LaCrosse"; 43 mainProgram = "pylacrosse"; 44 homepage = "https://github.com/hthiery/python-lacrosse"; 45 license = with licenses; [ lgpl2Plus ]; 46 maintainers = with maintainers; [ fab ]; 47 }; 48}