Commit eb2bb25e authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.stix2-validator: init at 3.2.0

Validator for STIX 2.0 JSON normative requirements and best practices

https://github.com/oasis-open/cti-stix-validator/
parent 6847ffb2
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  colorama,
  cpe,
  fetchFromGitHub,
  jsonschema,
  python-dateutil,
  pythonOlder,
  requests,
  setuptools,
  simplejson,
  stix2-patterns,
}:

buildPythonPackage rec {
  pname = "stix2-validator";
  version = "3.2.0";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "oasis-open";
    repo = "cti-stix-validator";
    rev = "refs/tags/v${version}";
    hash = "sha256-OI1SXILyCRGl1ZsoyYDl+/RsBhTP24eqECtW3uazS2k=";
  };

  build-system = [ setuptools ];

  dependencies = [
    colorama
    cpe
    jsonschema
    python-dateutil
    requests
    simplejson
    stix2-patterns
  ];

  # Tests need more work
  # Exception: Could not deserialize ATN with version  (expected 4).
  doCheck = false;

  # nativeCheckInputs = [ pytestCheckHook ];

  meta = {
    description = "Validator for STIX 2.0 JSON normative requirements and best practices";
    homepage = "https://github.com/oasis-open/cti-stix-validator/";
    changelog = "https://github.com/oasis-open/cti-stix-validator/blob/${src.rev}/CHANGELOG";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ fab ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -14894,6 +14894,8 @@ self: super: with self; {
  stix2-patterns = callPackage ../development/python-modules/stix2-patterns { };
  stix2-validator = callPackage ../development/python-modules/stix2-validator { };
  stm32loader = callPackage ../development/python-modules/stm32loader { };
  stone = callPackage ../development/python-modules/stone { };