1{ lib
2, aiohttp
3, buildPythonPackage
4, fetchFromGitHub
5, pytest-asyncio
6, pytest-httpserver
7, pytestCheckHook
8, pythonOlder
9}:
10
11buildPythonPackage rec {
12 pname = "vt-py";
13 version = "0.8.0";
14 format = "setuptools";
15
16 disabled = pythonOlder "3.6";
17
18 src = fetchFromGitHub {
19 owner = "VirusTotal";
20 repo = pname;
21 rev = version;
22 sha256 = "sha256-j9TlZDzl9sWFPt8TeuyoJi01JhyPBVXs1w3YJMoVvLw=";
23 };
24
25 propagatedBuildInputs = [
26 aiohttp
27 ];
28
29 checkInputs = [
30 pytest-asyncio
31 pytest-httpserver
32 pytestCheckHook
33 ];
34
35 postPatch = ''
36 substituteInPlace setup.py \
37 --replace "'pytest-runner'" ""
38 '';
39
40 pythonImportsCheck = [
41 "vt"
42 ];
43
44 meta = with lib; {
45 description = "Python client library for VirusTotal";
46 homepage = "https://virustotal.github.io/vt-py/";
47 license = with licenses; [ asl20 ];
48 maintainers = with maintainers; [ fab ];
49 };
50}