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