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