diff --git a/pkgs/development/python-modules/vt-py/default.nix b/pkgs/development/python-modules/vt-py/default.nix new file mode 100644 index 000000000000..e208e3a76822 --- /dev/null +++ b/pkgs/development/python-modules/vt-py/default.nix @@ -0,0 +1,47 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytest-httpserver +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "vt-py"; + version = "0.7.4"; + + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "VirusTotal"; + repo = pname; + rev = version; + sha256 = "149fgrqnwf8nyv3msj6p614zbdi7m7s785y3fvh8fm8k7lmgqk8w"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + checkInputs = [ + pytest-asyncio + pytest-httpserver + pytestCheckHook + ]; + + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-runner'" "" + ''; + + pythonImportsCheck = [ "vt" ]; + + meta = with lib; { + description = "Python client library for VirusTotal"; + homepage = "https://virustotal.github.io/vt-py/"; + license = with licenses; [ asl20 ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 686dd8c0f363..d2fe49e54a8a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9477,6 +9477,8 @@ in { vsure = callPackage ../development/python-modules/vsure { }; + vt-py = callPackage ../development/python-modules/vt-py { }; + vtk = toPythonModule (pkgs.vtk.override { pythonInterpreter = python; enablePython = true;