1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 asn1crypto,
6 bincopy,
7 bitstring,
8 click,
9 click-command-tree,
10 click-option-group,
11 colorama,
12 crcmod,
13 cryptography,
14 deepmerge,
15 fastjsonschema,
16 hexdump,
17 libusbsio,
18 oscrypto,
19 packaging,
20 platformdirs,
21 prettytable,
22 pyocd,
23 pyserial,
24 requests,
25 ruamel-yaml,
26 setuptools-scm,
27 sly,
28 spsdk,
29 testers,
30 typing-extensions,
31 ipykernel,
32 pytest-notebook,
33 pytestCheckHook,
34 voluptuous,
35}:
36
37buildPythonPackage rec {
38 pname = "spsdk";
39 version = "2.2.0";
40 pyproject = true;
41
42 src = fetchFromGitHub {
43 owner = "nxp-mcuxpresso";
44 repo = "spsdk";
45 rev = "refs/tags/${version}";
46 hash = "sha256-2CFxJAP87ysly0i4AfODbwUt5W287+OK7fatdPco7e4=";
47 };
48
49 build-system = [ setuptools-scm ];
50
51 pythonRelaxDeps = [
52 "requests"
53 "packaging"
54 "typing-extensions"
55 ];
56
57 # Remove unneeded unfree package. pyocd-pemicro is only used when
58 # generating a pyinstaller package, which we don't do.
59 pythonRemoveDeps = [ "pyocd-pemicro" ];
60
61 dependencies = [
62 asn1crypto
63 bincopy
64 bitstring
65 click
66 click-command-tree
67 click-option-group
68 colorama
69 crcmod
70 cryptography
71 deepmerge
72 fastjsonschema
73 hexdump
74 libusbsio
75 oscrypto
76 packaging
77 platformdirs
78 prettytable
79 pyocd
80 pyserial
81 requests
82 ruamel-yaml
83 sly
84 typing-extensions
85 ];
86
87 nativeCheckInputs = [
88 ipykernel
89 pytest-notebook
90 pytestCheckHook
91 voluptuous
92 ];
93
94 pythonImportsCheck = [ "spsdk" ];
95
96 passthru.tests.version = testers.testVersion { package = spsdk; };
97
98 meta = with lib; {
99 changelog = "https://github.com/nxp-mcuxpresso/spsdk/blob/${src.rev}/docs/release_notes.rst";
100 description = "NXP Secure Provisioning SDK";
101 homepage = "https://github.com/nxp-mcuxpresso/spsdk";
102 license = licenses.bsd3;
103 maintainers = with maintainers; [
104 frogamic
105 sbruder
106 ];
107 mainProgram = "spsdk";
108 };
109}