nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 colorama,
5 cpe,
6 fetchFromGitHub,
7 jsonschema,
8 python-dateutil,
9 requests,
10 setuptools,
11 simplejson,
12 stix2-patterns,
13}:
14
15buildPythonPackage rec {
16 pname = "stix2-validator";
17 version = "3.2.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "oasis-open";
22 repo = "cti-stix-validator";
23 tag = "v${version}";
24 hash = "sha256-OI1SXILyCRGl1ZsoyYDl+/RsBhTP24eqECtW3uazS2k=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 colorama
31 cpe
32 jsonschema
33 python-dateutil
34 requests
35 simplejson
36 stix2-patterns
37 ];
38
39 # Tests need more work
40 # Exception: Could not deserialize ATN with version (expected 4).
41 doCheck = false;
42
43 # nativeCheckInputs = [ pytestCheckHook ];
44
45 meta = {
46 description = "Validator for STIX 2.0 JSON normative requirements and best practices";
47 homepage = "https://github.com/oasis-open/cti-stix-validator/";
48 changelog = "https://github.com/oasis-open/cti-stix-validator/blob/${src.rev}/CHANGELOG";
49 license = lib.licenses.bsd3;
50 maintainers = with lib.maintainers; [ fab ];
51 };
52}