3cf86aa23c
Diff: https://github.com/AppThreat/vulnerability-db/compare/v6.6.0...v6.6.1 Changelog: https://github.com/AppThreat/vulnerability-db/releases/tag/v6.6.1
93 lines
1.7 KiB
Nix
93 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
appdirs,
|
|
apsw,
|
|
buildPythonPackage,
|
|
cvss,
|
|
fetchFromGitHub,
|
|
httpx,
|
|
msgpack,
|
|
oras,
|
|
orjson,
|
|
packageurl-python,
|
|
pydantic,
|
|
pytest-cov-stub,
|
|
pytestCheckHook,
|
|
pyyaml,
|
|
rich,
|
|
semver,
|
|
setuptools,
|
|
tabulate,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
buildPythonPackage (finalAttrs: {
|
|
pname = "appthreat-vulnerability-db";
|
|
version = "6.6.1";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "AppThreat";
|
|
repo = "vulnerability-db";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-g4KY08In4/cNBPzQ30ZTjv67rLpFACUAHXb0CQ6LF2M=";
|
|
};
|
|
|
|
pythonRelaxDeps = [
|
|
"msgpack"
|
|
"semver"
|
|
];
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
appdirs
|
|
apsw
|
|
cvss
|
|
httpx
|
|
msgpack
|
|
orjson
|
|
packageurl-python
|
|
pydantic
|
|
rich
|
|
semver
|
|
tabulate
|
|
]
|
|
++ httpx.optional-dependencies.http2
|
|
++ pydantic.optional-dependencies.email;
|
|
|
|
optional-dependencies = {
|
|
all = [
|
|
oras
|
|
pyyaml
|
|
];
|
|
custom = [ pyyaml ];
|
|
oras = [ oras ];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
pytest-cov-stub
|
|
pytestCheckHook
|
|
writableTmpDirAsHomeHook
|
|
]
|
|
++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
|
|
|
|
disabledTests = [
|
|
# Tests require network access
|
|
"test_bulk_search"
|
|
"test_download_recent"
|
|
"test_parse_purl"
|
|
];
|
|
|
|
pythonImportsCheck = [ "vdb" ];
|
|
|
|
meta = {
|
|
description = "Vulnerability database and package search for sources such as OSV, NVD, GitHub and npm";
|
|
homepage = "https://github.com/appthreat/vulnerability-db";
|
|
changelog = "https://github.com/AppThreat/vulnerability-db/releases/tag/${finalAttrs.src.tag}";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ fab ];
|
|
mainProgram = "vdb";
|
|
};
|
|
})
|