2022-03-30 09:31:56 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sigma-cli";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "0.7.7";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
|
|
|
repo = pname;
|
2022-04-27 09:35:20 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-Qqe9nJZfCb7xh93ERrV3XpqdtfeRECt7RDca9eQU3eQ=";
|
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"
|
|
|
|
];
|
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";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|