Unverified Commit e4ca2852 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python312Packages.taxii2-client: init at 2.3.0 (#341858)

parents 908a7f09 2031cc55
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  lxml,
  mixbox,
  pytestCheckHook,
  python-dateutil,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "cybox";
  version = "2.1.0.21";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "CybOXProject";
    repo = "python-cybox";
    rev = "refs/tags/v${version}";
    hash = "sha256-Gn/gH7pvvOqLIGExgCNa5KswPazIZUZXdQe3LRAUVjw=";
  };

  patches = [
    # Import ABC from collections.abc for Python 3 compatibility, https://github.com/CybOXProject/python-cybox/pull/332
    (fetchpatch {
      name = "collections-abc.patch";
      url = "https://github.com/CybOXProject/python-cybox/commit/fd4631dac12943d89e9ea2e94105cbc3b81d52f9.patch";
      hash = "sha256-dXEsJujtbU/SuUBge8abWgMPeYO1ZR3c5758Bd0dnwE=";
    })
  ];

  build-system = [ setuptools ];

  dependencies = [
    lxml
    mixbox
    python-dateutil
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "cybox" ];

  meta = {
    description = "Library for parsing, manipulating, and generating CybOX content";
    homepage = "https://github.com/CybOXProject/python-cybox/";
    changelog = "https://github.com/CybOXProject/python-cybox/blob/${src.rev}/CHANGES.txt";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ fab ];
  };
}
+50 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  cybox,
  distutils,
  fetchFromGitHub,
  lxml,
  mixbox,
  pytestCheckHook,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "maec";
  version = "4.1.0.17";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "MAECProject";
    repo = "python-maec";
    rev = "refs/tags/v${version}";
    hash = "sha256-I2Ov2AQiC9D8ivHqn7owcTsNS7Kw+CWVyijK3VO52Og=";
  };

  build-system = [
    distutils
    setuptools
  ];

  dependencies = [
    cybox
    lxml
    mixbox
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "maec" ];

  meta = {
    description = "Library for parsing, manipulating, and generating MAEC content";
    homepage = "https://github.com/MAECProject/python-maec/";
    changelog = "https://github.com/MAECProject/python-maec/blob/${src.rev}/CHANGES.txt";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ fab ];
  };
}
+54 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  lxml,
  ordered-set,
  pytestCheckHook,
  python-dateutil,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "mixbox";
  version = "1.0.5";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "CybOXProject";
    repo = "mixbox";
    rev = "refs/tags/v${version}";
    hash = "sha256-qK3cKOf0s345M1pVFro5NFhDj4lch12UegOY1ZUEOBQ=";
  };

  build-system = [ setuptools ];

  dependencies = [
    lxml
    ordered-set
    python-dateutil
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "mixbox" ];

  pytestFlagsArray = [ "test/*.py" ];

  disabledTests = [
    # Tests are out-dated
    "test_serialize_datetime_as_date"
    "test_preferred_prefixes"
  ];

  meta = {
    description = "Library of common code leveraged by cybox, maec and stix";
    homepage = "https://github.com/CybOXProject/mixbox";
    changelog = "https://github.com/CybOXProject/mixbox/releases/tag/v${version}";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ fab ];
  };
}
+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 ];
  };
}
+43 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  pytz,
  requests,
  setuptools,
  six,
}:

buildPythonPackage rec {
  pname = "taxii2-client";
  version = "2.3.0";
  pyproject = true;

  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "oasis-open";
    repo = "cti-taxii-client";
    rev = "refs/tags/v${version}";
    hash = "sha256-e22bJdLAlm30vv/xIgLSjcwmzfN0Pwt2JydLgEbA+Is=";
  };

  build-system = [ setuptools ];

  dependencies = [
    pytz
    requests
    six
  ];

  pythonImportsCheck = [ "taxii2client" ];

  meta = {
    description = "TAXII 2 client library";
    homepage = "https://github.com/oasis-open/cti-taxii-client/";
    changelog = "https://github.com/oasis-open/cti-taxii-client/blob/${src.rev}/CHANGES.txt";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ fab ];
  };
}
Loading