1{ 2 lib, 3 buildPythonPackage, 4 colorama, 5 cpe, 6 fetchFromGitHub, 7 jsonschema, 8 python-dateutil, 9 pythonOlder, 10 requests, 11 setuptools, 12 simplejson, 13 stix2-patterns, 14}: 15 16buildPythonPackage rec { 17 pname = "stix2-validator"; 18 version = "3.2.0"; 19 pyproject = true; 20 21 disabled = pythonOlder "3.9"; 22 23 src = fetchFromGitHub { 24 owner = "oasis-open"; 25 repo = "cti-stix-validator"; 26 tag = "v${version}"; 27 hash = "sha256-OI1SXILyCRGl1ZsoyYDl+/RsBhTP24eqECtW3uazS2k="; 28 }; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 colorama 34 cpe 35 jsonschema 36 python-dateutil 37 requests 38 simplejson 39 stix2-patterns 40 ]; 41 42 # Tests need more work 43 # Exception: Could not deserialize ATN with version (expected 4). 44 doCheck = false; 45 46 # nativeCheckInputs = [ pytestCheckHook ]; 47 48 meta = { 49 description = "Validator for STIX 2.0 JSON normative requirements and best practices"; 50 homepage = "https://github.com/oasis-open/cti-stix-validator/"; 51 changelog = "https://github.com/oasis-open/cti-stix-validator/blob/${src.rev}/CHANGELOG"; 52 license = lib.licenses.bsd3; 53 maintainers = with lib.maintainers; [ fab ]; 54 }; 55}