nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 antlr4-python3-runtime,
4 buildPythonPackage,
5 fetchFromGitHub,
6 pytestCheckHook,
7 setuptools,
8 six,
9}:
10
11buildPythonPackage rec {
12 pname = "stix2-patterns";
13 version = "2.0.0";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "oasis-open";
18 repo = "cti-pattern-validator";
19 tag = "v${version}";
20 hash = "sha256-lFgnvI5a7U7/Qj4Pqjr3mx4TNDnC2/Ru7tVG7VggR7Y=";
21 };
22
23 build-system = [ setuptools ];
24
25 dependencies = [
26 antlr4-python3-runtime
27 six
28 ];
29
30 nativeCheckInputs = [ pytestCheckHook ];
31
32 pythonImportsCheck = [ "stix2patterns" ];
33
34 meta = {
35 broken = lib.versionAtLeast antlr4-python3-runtime.version "4.10";
36 description = "Validate patterns used to express cyber observable content in STIX Indicators";
37 mainProgram = "validate-patterns";
38 homepage = "https://github.com/oasis-open/cti-pattern-validator";
39 changelog = "https://github.com/oasis-open/cti-pattern-validator/blob/${version}/CHANGELOG.rst";
40 license = lib.licenses.bsd3;
41 maintainers = with lib.maintainers; [ fab ];
42 };
43}