2023-04-12 12:48:02 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, regex
|
2023-08-04 22:07:22 +00:00
|
|
|
, requests
|
2023-04-12 12:48:02 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "iocextract";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.16.0";
|
2023-04-12 12:48:02 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "InQuest";
|
|
|
|
repo = "python-iocextract";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-jwMu4G146FpH6aFCiZK9tI/3CKnZYC2RCtO9QXXaquQ=";
|
2023-04-12 12:48:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
regex
|
2023-08-04 22:07:22 +00:00
|
|
|
requests
|
2023-04-12 12:48:02 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"iocextract"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests.py"
|
|
|
|
];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: 'http://exampledotcom/test' != 'http://example.com/test'
|
|
|
|
"test_refang_data"
|
|
|
|
];
|
|
|
|
|
2023-04-12 12:48:02 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Module to extract Indicator of Compromises (IOC)";
|
|
|
|
homepage = "https://github.com/InQuest/python-iocextract";
|
|
|
|
changelog = "https://github.com/InQuest/python-iocextract/releases/tag/v${version}";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|