Skip to content

Commit

Permalink
python3Packages.stix2-patterns: fix dependency on incorrect version o…
Browse files Browse the repository at this point in the history
…f antlr4
  • Loading branch information
PapayaJackal committed Oct 29, 2024
1 parent edc46e4 commit 454faa3
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions pkgs/development/python-modules/stix2-patterns/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
lib,
antlr4_9,
antlr4-python3-runtime,
buildPythonPackage,
fetchFromGitHub,
Expand All @@ -23,30 +24,17 @@ buildPythonPackage rec {
hash = "sha256-lFgnvI5a7U7/Qj4Pqjr3mx4TNDnC2/Ru7tVG7VggR7Y=";
};

postPatch = ''
substituteInPlace setup.py \
--replace-fail "antlr4-python3-runtime~=" "antlr4-python3-runtime>="
'';

build-system = [ setuptools ];

dependencies = [
antlr4-python3-runtime
(antlr4-python3-runtime.override { antlr4 = antlr4_9; })
six
];

nativeCheckInputs = [ pytestCheckHook ];

pythonImportsCheck = [ "stix2patterns" ];

disabledTestPaths = [
# Exception: Could not deserialize ATN with version (expected 4)
"stix2patterns/test/v20/test_inspector.py"
"stix2patterns/test/v21/test_inspector.py"
"stix2patterns/test/v20/test_validator.py"
"stix2patterns/test/v21/test_validator.py"
];

meta = with lib; {
description = "Validate patterns used to express cyber observable content in STIX Indicators";
mainProgram = "validate-patterns";
Expand Down

0 comments on commit 454faa3

Please sign in to comment.