1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 flask,
7 pytest-asyncio,
8 pytest-httpserver,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "vt-py";
16 version = "0.18.3";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "VirusTotal";
23 repo = "vt-py";
24 rev = "refs/tags/${version}";
25 hash = "sha256-Zu4lUniXfKaZ1SvX3YCzMLa76HgUWpmddV2N9buNS3o=";
26 };
27
28 postPatch = ''
29 substituteInPlace setup.py \
30 --replace-fail "pytest-runner" ""
31 '';
32
33 pythonRelaxDeps = [ "aiohttp" ];
34
35 build-system = [ setuptools ];
36
37
38 dependencies = [ aiohttp ];
39
40 nativeCheckInputs = [
41 flask
42 pytest-asyncio
43 pytest-httpserver
44 pytestCheckHook
45 ];
46
47 pythonImportsCheck = [ "vt" ];
48
49 meta = with lib; {
50 description = "Python client library for VirusTotal";
51 homepage = "https://virustotal.github.io/vt-py/";
52 changelog = "https://github.com/VirusTotal/vt-py/releases/tag//${version}";
53 license = with licenses; [ asl20 ];
54 maintainers = with maintainers; [ fab ];
55 };
56}