1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 poetry-core, 6 jsonpath-ng, 7 jinja2, 8 python, 9 python-docx, 10 matplotlib, 11 pyyaml, 12 pytestCheckHook, 13 pythonOlder, 14 pythonRelaxDepsHook, 15}: 16 17buildPythonPackage rec { 18 pname = "sarif-tools"; 19 version = "2.0.0"; 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "microsoft"; 24 repo = "sarif-tools"; 25 rev = "v${version}"; 26 hash = "sha256-80amYGnf7xZdpxzTjBGwgg39YN/jJsEkTm0uAlVbH0w="; 27 }; 28 29 disabled = pythonOlder "3.8"; 30 31 nativeBuildInputs = [ 32 poetry-core 33 pythonRelaxDepsHook 34 ]; 35 36 propagatedBuildInputs = [ 37 jsonpath-ng 38 jinja2 39 python 40 python-docx 41 matplotlib 42 pyyaml 43 ]; 44 45 nativeCheckInputs = [ pytestCheckHook ]; 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 = "A 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/v${version}"; 60 license = lib.licenses.mit; 61 maintainers = with lib.maintainers; [ puzzlewolf ]; 62 mainProgram = "sarif"; 63 }; 64}