2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
aiohttp,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytest-httpserver,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonRelaxDepsHook,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "vt-py";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.18.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "VirusTotal";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "vt-py";
|
2022-09-30 11:47:45 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-rWzANh7tkayFR6V3JaF3BLhIjUlnrPMmEmI36Ncqz2M=";
|
2021-10-01 09:20:50 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
2024-04-21 15:54:59 +00:00
|
|
|
--replace-fail "pytest-runner" ""
|
2024-01-02 11:29:13 +00:00
|
|
|
'';
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDeps = [ "aiohttp" ];
|
2024-01-02 11:29:13 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
|
|
|
|
|
|
|
dependencies = [ aiohttp ];
|
2021-10-01 09:20:50 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-01 09:20:50 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytest-httpserver
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "vt" ];
|
2021-10-01 09:20:50 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python client library for VirusTotal";
|
|
|
|
homepage = "https://virustotal.github.io/vt-py/";
|
2022-10-06 18:32:54 +00:00
|
|
|
changelog = "https://github.com/VirusTotal/vt-py/releases/tag//${version}";
|
2021-10-01 09:20:50 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|