1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 setuptools, 6 mock, 7 psutil, 8 pytestCheckHook, 9 pythonOlder, 10 six, 11}: 12 13buildPythonPackage rec { 14 pname = "pylink-square"; 15 version = "1.4.0"; 16 pyproject = true; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "square"; 22 repo = "pylink"; 23 tag = "v${version}"; 24 hash = "sha256-Fjulh2wmcVO+/608uTO10orRz8Pq0I+ZhJ8zMa3YFC0="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 psutil 31 six 32 ]; 33 34 nativeCheckInputs = [ 35 mock 36 pytestCheckHook 37 ]; 38 39 pythonImportsCheck = [ "pylink" ]; 40 41 disabledTests = [ 42 # AttributeError: 'called_once_with' is not a valid assertion 43 "test_cp15_register_write_success" 44 "test_jlink_restarted" 45 "test_set_log_file_success" 46 ]; 47 48 meta = with lib; { 49 description = "Python interface for the SEGGER J-Link"; 50 homepage = "https://github.com/square/pylink"; 51 changelog = "https://github.com/square/pylink/blob/${src.tag}/CHANGELOG.md"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ dump_stack ]; 54 }; 55}