at 24.11-pre 71 lines 1.7 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3, 5}: 6 7python3.pkgs.buildPythonApplication rec { 8 pname = "sigma-cli"; 9 version = "1.0.2"; 10 pyproject = true; 11 12 src = fetchFromGitHub { 13 owner = "SigmaHQ"; 14 repo = "sigma-cli"; 15 rev = "refs/tags/v${version}"; 16 hash = "sha256-/Nciqf8O/Sq2zniaKid1VkYC/H6hgsVzMtOtFy/CiR8="; 17 }; 18 19 postPatch = '' 20 substituteInPlace pyproject.toml \ 21 --replace '= "^' '= ">=' 22 ''; 23 24 build-system = with python3.pkgs; [ poetry-core ]; 25 26 dependencies = with python3.pkgs; [ 27 click 28 colorama 29 prettytable 30 pysigma 31 pysigma-backend-elasticsearch 32 pysigma-backend-insightidr 33 pysigma-backend-opensearch 34 pysigma-backend-qradar 35 pysigma-backend-splunk 36 pysigma-pipeline-crowdstrike 37 pysigma-pipeline-sysmon 38 pysigma-pipeline-windows 39 ]; 40 41 nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ]; 42 43 disabledTests = [ 44 "test_plugin_list" 45 "test_plugin_list_filtered" 46 "test_plugin_list_search" 47 "test_plugin_install_notexisting" 48 "test_plugin_install" 49 "test_plugin_uninstall" 50 # Tests require network access 51 "test_check_with_issues" 52 "test_plugin_show_identifier" 53 "test_plugin_show_nonexisting" 54 "test_plugin_show_uuid" 55 # Tests compare STDOUT results 56 "test_check_valid" 57 "test_check_stdin" 58 "test_check_exclude" 59 ]; 60 61 pythonImportsCheck = [ "sigma.cli" ]; 62 63 meta = with lib; { 64 description = "Sigma command line interface"; 65 homepage = "https://github.com/SigmaHQ/sigma-cli"; 66 changelog = "https://github.com/SigmaHQ/sigma-cli/releases/tag/v${version}"; 67 license = licenses.lgpl21Plus; 68 maintainers = with maintainers; [ fab ]; 69 mainProgram = "sigma"; 70 }; 71}