2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchFromGitHub,
|
|
|
|
python3,
|
2022-03-30 09:31:56 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sigma-cli";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.0.2";
|
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-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-/Nciqf8O/Sq2zniaKid1VkYC/H6hgsVzMtOtFy/CiR8=";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
|
2023-04-29 16:46:19 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '= "^' '= ">='
|
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = with python3.pkgs; [ poetry-core ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = with python3.pkgs; [
|
2022-03-30 09:31:56 +00:00
|
|
|
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
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
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
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "sigma.cli" ];
|
2022-03-30 09:31:56 +00:00
|
|
|
|
|
|
|
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}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = licenses.lgpl21Plus;
|
2022-03-30 09:31:56 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "sigma";
|
2022-03-30 09:31:56 +00:00
|
|
|
};
|
|
|
|
}
|