1{
2 lib,
3 fetchFromGitHub,
4 buildPythonPackage,
5 poetry-core,
6 jsonpath-ng,
7 jsonschema,
8 jinja2,
9 python,
10 python-docx,
11 matplotlib,
12 pyyaml,
13 pytestCheckHook,
14 pythonOlder,
15}:
16
17buildPythonPackage rec {
18 pname = "sarif-tools";
19 version = "3.0.5";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "microsoft";
24 repo = "sarif-tools";
25 tag = "v${version}";
26 hash = "sha256-Dt8VcYIIpujRp2sOlK2JPGzy5cYZDXdXgnvT/+h3DuU=";
27 };
28
29 disabled = pythonOlder "3.8";
30
31 build-system = [ poetry-core ];
32
33 dependencies = [
34 jinja2
35 jsonpath-ng
36 matplotlib
37 python
38 python-docx
39 pyyaml
40 ];
41
42 nativeCheckInputs = [
43 jsonschema
44 pytestCheckHook
45 ];
46
47 pythonRelaxDeps = [ "python-docx" ];
48
49 disabledTests = [
50 # Broken, re-enable once https://github.com/microsoft/sarif-tools/pull/41 is merged
51 "test_version"
52 ];
53
54 pythonImportsCheck = [ "sarif" ];
55
56 meta = {
57 description = "Set of command line tools and Python library for working with SARIF files";
58 homepage = "https://github.com/microsoft/sarif-tools";
59 changelog = "https://github.com/microsoft/sarif-tools/releases/tag/${src.tag}";
60 license = lib.licenses.mit;
61 maintainers = with lib.maintainers; [ puzzlewolf ];
62 mainProgram = "sarif";
63 };
64}