From 454faa381584dc79ff68841f07984d21e1819f47 Mon Sep 17 00:00:00 2001 From: PapayaJackal <145766029+PapayaJackal@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:26:22 +0000 Subject: [PATCH] python3Packages.stix2-patterns: fix dependency on incorrect version of antlr4 --- .../python-modules/stix2-patterns/default.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/stix2-patterns/default.nix b/pkgs/development/python-modules/stix2-patterns/default.nix index 4ca5ee040a75..16898cb624d4 100644 --- a/pkgs/development/python-modules/stix2-patterns/default.nix +++ b/pkgs/development/python-modules/stix2-patterns/default.nix @@ -1,5 +1,6 @@ { lib, + antlr4_9, antlr4-python3-runtime, buildPythonPackage, fetchFromGitHub, @@ -23,15 +24,10 @@ 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 ]; @@ -39,14 +35,6 @@ buildPythonPackage rec { 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";