1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytest-asyncio,
7 pytest-httpserver,
8 pytestCheckHook,
9 pythonRelaxDepsHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "vt-py";
16 version = "0.18.2";
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-Uspd422JlBKlsD/K7NciYhYUb12wInN/Z7zTw7aYP28=";
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 nativeBuildInputs = [ pythonRelaxDepsHook ];
38
39 dependencies = [ aiohttp ];
40
41 nativeCheckInputs = [
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}