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-10-09 19:29:22 +00:00
|
|
|
version = "1.16.1";
|
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-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-cCp9ug/TuVY1zL+kiDlFGBmfFJyAmVwxLD36WT0oRAE=";
|
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)";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "iocextract";
|
2023-04-12 12:48:02 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|