2024-04-10 12:39:07 +02:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
appdirs,
|
2024-06-19 05:04:41 +02:00
|
|
|
apsw,
|
2024-04-10 12:39:07 +02:00
|
|
|
buildPythonPackage,
|
|
|
|
cvss,
|
|
|
|
fetchFromGitHub,
|
|
|
|
httpx,
|
|
|
|
msgpack,
|
|
|
|
orjson,
|
|
|
|
packageurl-python,
|
2024-06-19 05:04:41 +02:00
|
|
|
pydantic,
|
2024-04-10 12:39:07 +02:00
|
|
|
pytestCheckHook,
|
2024-08-06 23:36:25 +02:00
|
|
|
pytest-cov-stub,
|
2024-04-10 12:39:07 +02:00
|
|
|
pythonOlder,
|
2024-06-19 05:04:41 +02:00
|
|
|
rich,
|
2024-04-10 12:39:07 +02:00
|
|
|
semver,
|
|
|
|
setuptools,
|
|
|
|
tabulate,
|
2022-01-25 16:26:21 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "appthreat-vulnerability-db";
|
2025-04-30 01:12:13 +02:00
|
|
|
version = "6.3.1";
|
2023-11-18 09:30:58 +01:00
|
|
|
pyproject = true;
|
2022-01-25 16:26:21 +01:00
|
|
|
|
2024-03-30 09:49:43 +01:00
|
|
|
disabled = pythonOlder "3.10";
|
2022-01-25 16:26:21 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "AppThreat";
|
|
|
|
repo = "vulnerability-db";
|
2024-12-17 18:24:50 +00:00
|
|
|
tag = "v${version}";
|
2025-04-30 01:12:13 +02:00
|
|
|
hash = "sha256-inyKxDF6q8+h2/tcGHEHztBz0uY512wIPebzu4wKYss=";
|
2022-01-25 16:26:21 +01:00
|
|
|
};
|
|
|
|
|
2023-05-04 08:58:22 +02:00
|
|
|
pythonRelaxDeps = [
|
2023-12-18 00:59:56 +01:00
|
|
|
"msgpack"
|
2023-05-04 08:58:22 +02:00
|
|
|
"semver"
|
|
|
|
];
|
|
|
|
|
2024-04-10 12:39:07 +02:00
|
|
|
build-system = [ setuptools ];
|
2024-03-30 09:49:04 +01:00
|
|
|
|
|
|
|
dependencies = [
|
2022-01-25 16:26:21 +01:00
|
|
|
appdirs
|
2024-06-19 05:04:41 +02:00
|
|
|
apsw
|
2022-11-24 15:31:53 +01:00
|
|
|
cvss
|
2022-12-18 10:30:09 +01:00
|
|
|
httpx
|
2022-01-25 16:26:21 +01:00
|
|
|
msgpack
|
|
|
|
orjson
|
|
|
|
packageurl-python
|
2024-06-19 05:04:41 +02:00
|
|
|
pydantic
|
|
|
|
rich
|
2022-11-24 15:31:53 +01:00
|
|
|
semver
|
|
|
|
tabulate
|
2022-12-20 08:09:36 +01:00
|
|
|
] ++ httpx.optional-dependencies.http2;
|
2022-01-25 16:26:21 +01:00
|
|
|
|
2024-08-06 23:36:25 +02:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-cov-stub
|
|
|
|
];
|
2022-01-25 16:26:21 +01:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d);
|
|
|
|
'';
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_bulk_search"
|
|
|
|
"test_download_recent"
|
|
|
|
];
|
|
|
|
|
2024-04-10 12:39:07 +02:00
|
|
|
pythonImportsCheck = [ "vdb" ];
|
2022-01-25 16:26:21 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Vulnerability database and package search for sources such as OSV, NVD, GitHub and npm";
|
|
|
|
homepage = "https://github.com/appthreat/vulnerability-db";
|
2022-11-24 15:31:53 +01:00
|
|
|
changelog = "https://github.com/AppThreat/vulnerability-db/releases/tag/v${version}";
|
2022-01-25 16:26:21 +01:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2024-03-30 09:49:04 +01:00
|
|
|
mainProgram = "vdb";
|
2022-01-25 16:26:21 +01:00
|
|
|
};
|
|
|
|
}
|