2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sigma-cli";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.0.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
2023-11-16 04:20:00 +00:00
|
|
|
repo = "sigma-cli";
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-+6+xTc9XGsPxK3OsiA4dj2ORgC0PQtZsZ5a6STwmfcg=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '= "^' '= ">='
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
click
|
2023-04-29 16:46:19 +00:00
|
|
|
colorama
|
2022-03-30 09:31:56 +00:00
|
|
|
prettytable
|
|
|
|
pysigma
|
2022-08-12 12:06:08 +00:00
|
|
|
pysigma-backend-elasticsearch
|
2022-04-15 01:41:22 +00:00
|
|
|
pysigma-backend-insightidr
|
2022-08-12 12:06:08 +00:00
|
|
|
pysigma-backend-opensearch
|
|
|
|
pysigma-backend-qradar
|
|
|
|
pysigma-backend-splunk
|
2022-03-30 09:31:56 +00:00
|
|
|
pysigma-pipeline-crowdstrike
|
|
|
|
pysigma-pipeline-sysmon
|
2022-04-15 01:41:22 +00:00
|
|
|
pysigma-pipeline-windows
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2022-03-30 09:31:56 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_plugin_list"
|
|
|
|
"test_plugin_list_filtered"
|
|
|
|
"test_plugin_list_search"
|
|
|
|
"test_plugin_install_notexisting"
|
|
|
|
"test_plugin_install"
|
|
|
|
"test_plugin_uninstall"
|
2023-11-16 04:20:00 +00:00
|
|
|
# Tests require network access
|
|
|
|
"test_check_with_issues"
|
|
|
|
"test_plugin_show_identifier"
|
|
|
|
"test_plugin_show_nonexisting"
|
|
|
|
"test_plugin_show_uuid"
|
2024-01-02 11:29:13 +00:00
|
|
|
# Tests compare STDOUT results
|
|
|
|
"test_check_valid"
|
|
|
|
"test_check_stdin"
|
|
|
|
"test_check_exclude"
|
2023-04-29 16:46:19 +00:00
|
|
|
];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"sigma.cli"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Sigma command line interface";
|
|
|
|
homepage = "https://github.com/SigmaHQ/sigma-cli";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/SigmaHQ/sigma-cli/releases/tag/v${version}";
|
2022-03-30 09:31:56 +00:00
|
|
|
license = with licenses; [ lgpl21Plus ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "sigma";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|