1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 lxml,
6 ordered-set,
7 pytestCheckHook,
8 python-dateutil,
9 pythonOlder,
10 setuptools,
11}:
12
13buildPythonPackage rec {
14 pname = "mixbox";
15 version = "1.0.5";
16 pyproject = true;
17
18 disabled = pythonOlder "3.9";
19
20 src = fetchFromGitHub {
21 owner = "CybOXProject";
22 repo = "mixbox";
23 tag = "v${version}";
24 hash = "sha256-qK3cKOf0s345M1pVFro5NFhDj4lch12UegOY1ZUEOBQ=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 lxml
31 ordered-set
32 python-dateutil
33 ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 pythonImportsCheck = [ "mixbox" ];
38
39 enabledTestPaths = [ "test/*.py" ];
40
41 disabledTests = [
42 # Tests are out-dated
43 "test_serialize_datetime_as_date"
44 "test_preferred_prefixes"
45 ];
46
47 meta = {
48 description = "Library of common code leveraged by cybox, maec and stix";
49 homepage = "https://github.com/CybOXProject/mixbox";
50 changelog = "https://github.com/CybOXProject/mixbox/releases/tag/v${version}";
51 license = lib.licenses.bsd3;
52 maintainers = with lib.maintainers; [ fab ];
53 };
54}