22 lib ,
33 buildPythonApplication ,
44 fetchFromGitHub ,
5- # aiohttp[speedups]
6- aiodns ,
5+
6+ # build-system
7+ setuptools ,
8+
9+ # dependencies
710 aiohttp ,
811 beautifulsoup4 ,
912 brotlipy ,
1013 cvss ,
1114 distro ,
1215 filetype ,
13- google-cloud-sdk ,
1416 jinja2 ,
1517 jsonschema ,
1618 lib4sbom ,
19+ lib4vex ,
1720 packageurl-python ,
1821 packaging ,
1922 plotly ,
20- pytestCheckHook ,
2123 python-gnupg ,
2224 pyyaml ,
2325 requests ,
2426 rich ,
2527 rpmfile ,
26- setuptools ,
2728 xmlschema ,
29+ zipp ,
2830 zstandard ,
31+
32+ # optional-dependencies
2933 reportlab ,
30- pip ,
31- testers ,
32- cve-bin-tool ,
34+
35+ # runtime-dependencies
36+ google-cloud-sdk ,
37+
38+ # tests
39+ versionCheckHook ,
3340} :
3441
3542buildPythonApplication rec {
3643 pname = "cve-bin-tool" ;
37- version = "3.3 " ;
38- format = "setuptools" ;
44+ version = "3.4 " ;
45+ pyproject = true ;
3946
4047 src = fetchFromGitHub {
4148 owner = "intel" ;
4249 repo = "cve-bin-tool" ;
4350 tag = "v${ version } " ;
44- hash = "sha256-A5w4U5EDX+UZWNMuz8GTOcubo8N2KfDlVV0aRNsO8/E =" ;
51+ hash = "sha256-pv8XjKjZBUw5FmmUn1dakGeS1uw2xzF3wSIZOYQ2/3c =" ;
4552 } ;
4653
47- # Wants to open a sqlite database, access the internet, etc
48- doCheck = false ;
54+ build-system = [ setuptools ] ;
4955
5056 dependencies = [
51- # aiohttp[speedups]
52- aiodns
5357 aiohttp
5458 beautifulsoup4
5559 brotlipy
5660 cvss
5761 distro
5862 filetype
59- google-cloud-sdk # gsutil
6063 jinja2
6164 jsonschema
6265 lib4sbom
66+ lib4vex
6367 packageurl-python
6468 packaging
6569 plotly
@@ -70,24 +74,41 @@ buildPythonApplication rec {
7074 rpmfile
7175 setuptools
7276 xmlschema
77+ zipp
7378 zstandard
74- ] ;
79+ ] ++ aiohttp . optional-dependencies . speedups ;
7580
7681 optional-dependencies = {
7782 pdf = [ reportlab ] ;
7883 } ;
7984
80- propagatedBuildInputs = [ pip ] ;
85+ pythonRemoveDeps = [
86+ # gsutil is only called as a binary at runtime instead of being used as a library
87+ "gsutil"
88+ ] ;
8189
82- nativeCheckInputs = [ pytestCheckHook ] ++ lib . flatten ( lib . attrValues optional-dependencies ) ;
90+ # don't run pytestCheckHook because it wants to open a sqlite database, access the internet, etc
91+ nativeCheckInputs = [
92+ versionCheckHook
93+ ] ++ lib . flatten ( lib . attrValues optional-dependencies ) ;
8394
84- pythonImportsCheck = [ "cve_bin_tool" ] ;
95+ pythonImportsCheck = [
96+ "cve_bin_tool"
97+ "cve_bin_tool.mismatch_loader"
98+ ] ;
8599
86- passthru . tests . version = testers . testVersion { package = cve-bin-tool ; } ;
100+ # provide gsutil
101+ makeWrapperArgs = [
102+ "--prefix"
103+ "PATH"
104+ ":"
105+ ( lib . makeBinPath [ google-cloud-sdk ] )
106+ ] ;
87107
88108 meta = with lib ; {
89109 description = "CVE Binary Checker Tool" ;
90110 homepage = "https://github.com/intel/cve-bin-tool" ;
111+ changelog = "https://github.com/intel/cve-bin-tool/releases/tag/${ src . tag } " ;
91112 license = licenses . gpl3Plus ;
92113 maintainers = [ ] ;
93114 } ;
0 commit comments