1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonRelaxDepsHook,
6 asn1crypto,
7 astunparse,
8 bincopy,
9 bitstring,
10 click,
11 click-command-tree,
12 click-option-group,
13 colorama,
14 crcmod,
15 cryptography,
16 deepmerge,
17 fastjsonschema,
18 hexdump,
19 libusbsio,
20 oscrypto,
21 platformdirs,
22 prettytable,
23 pylink-square,
24 pyocd,
25 pyocd-pemicro,
26 pypemicro,
27 pyserial,
28 requests,
29 ruamel-yaml,
30 setuptools,
31 sly,
32 spsdk,
33 testers,
34 typing-extensions,
35 ipykernel,
36 pytest-notebook,
37 pytestCheckHook,
38 voluptuous,
39}:
40
41buildPythonPackage rec {
42 pname = "spsdk";
43 version = "2.1.1";
44 pyproject = true;
45
46 src = fetchFromGitHub {
47 owner = "nxp-mcuxpresso";
48 repo = "spsdk";
49 rev = "refs/tags/${version}";
50 hash = "sha256-cWz2zML/gb9l2C5VEBti+nX3ZLyGbLFyLZGjk5GfTJw=";
51 };
52
53 nativeBuildInputs = [
54 pythonRelaxDepsHook
55 setuptools
56 ];
57
58 pythonRelaxDeps = [
59 "click"
60 "cryptography"
61 "platformdirs"
62 "typing-extensions"
63 ];
64
65 propagatedBuildInputs = [
66 asn1crypto
67 astunparse
68 bincopy
69 bitstring
70 click
71 click-command-tree
72 click-option-group
73 colorama
74 crcmod
75 cryptography
76 deepmerge
77 fastjsonschema
78 hexdump
79 libusbsio
80 oscrypto
81 platformdirs
82 prettytable
83 pylink-square
84 pyocd
85 pyocd-pemicro
86 pypemicro
87 pyserial
88 requests
89 ruamel-yaml
90 sly
91 typing-extensions
92 ];
93
94 nativeCheckInputs = [
95 ipykernel
96 pytest-notebook
97 pytestCheckHook
98 voluptuous
99 ];
100
101 disabledTests = [
102 "test_nxpcrypto_create_signature_algorithm"
103 "test_nxpimage_sb31_kaypair_not_matching"
104 ];
105
106 pythonImportsCheck = [ "spsdk" ];
107
108 passthru.tests.version = testers.testVersion { package = spsdk; };
109
110 meta = with lib; {
111 changelog = "https://github.com/nxp-mcuxpresso/spsdk/blob/${src.rev}/docs/release_notes.rst";
112 description = "NXP Secure Provisioning SDK";
113 homepage = "https://github.com/nxp-mcuxpresso/spsdk";
114 license = licenses.bsd3;
115 maintainers = with maintainers; [
116 frogamic
117 sbruder
118 ];
119 mainProgram = "spsdk";
120 };
121}