Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / stix2-patterns / default.nix
blobb291e2cd724272810bed5ad92bfcdaf5de9b1abe
1 { lib
2 , antlr4-python3-runtime
3 , buildPythonPackage
4 , fetchFromGitHub
5 , pythonOlder
6 , setuptools
7 , pytestCheckHook
8 , wheel
9 , six
12 buildPythonPackage rec {
13   pname = "stix2-patterns";
14   version = "2.0.0";
15   pyproject = true;
17   disabled = pythonOlder "3.7";
19   src = fetchFromGitHub {
20     owner = "oasis-open";
21     repo = "cti-pattern-validator";
22     rev = "refs/tags/v${version}";
23     hash = "sha256-lFgnvI5a7U7/Qj4Pqjr3mx4TNDnC2/Ru7tVG7VggR7Y=";
24   };
26   postPatch = ''
27     substituteInPlace setup.py \
28       --replace "antlr4-python3-runtime~=" "antlr4-python3-runtime>="
29   '';
31   nativeBuildInputs = [
32     setuptools
33     wheel
34   ];
36   propagatedBuildInputs = [
37     antlr4-python3-runtime
38     six
39   ];
41   nativeCheckInputs = [
42     pytestCheckHook
43   ];
45   pythonImportsCheck = [
46     "stix2patterns"
47   ];
49   disabledTestPaths = [
50     # Exception: Could not deserialize ATN with version  (expected 4)
51     "stix2patterns/test/v20/test_inspector.py"
52     "stix2patterns/test/v21/test_inspector.py"
53     "stix2patterns/test/v20/test_validator.py"
54     "stix2patterns/test/v21/test_validator.py"
55   ];
57   meta = with lib; {
58     description = "Validate patterns used to express cyber observable content in STIX Indicators";
59     mainProgram = "validate-patterns";
60     homepage = "https://github.com/oasis-open/cti-pattern-validator";
61     changelog = "https://github.com/oasis-open/cti-pattern-validator/blob/${version}/CHANGELOG.rst";
62     license = licenses.bsd3;
63     maintainers = with maintainers; [ fab ];
64   };