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