2022-03-12 11:16:53 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sigma-cli";
|
2022-05-02 17:39:57 +00:00
|
|
|
version = "0.4.3";
|
2022-03-12 11:16:53 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
|
|
|
repo = pname;
|
2022-05-02 17:39:57 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-3LFakeS3aQaacm7HqeAJPMJhi3Wf8zbJc//SEWUA1Rg=";
|
2022-03-12 11:16:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
click
|
|
|
|
prettytable
|
|
|
|
pysigma
|
|
|
|
pysigma-backend-splunk
|
2022-04-14 14:59:39 +00:00
|
|
|
pysigma-backend-insightidr
|
2022-03-12 11:16:53 +00:00
|
|
|
pysigma-pipeline-crowdstrike
|
|
|
|
pysigma-pipeline-sysmon
|
2022-04-14 14:59:39 +00:00
|
|
|
pysigma-pipeline-windows
|
2022-03-12 11:16:53 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = with python3.pkgs; [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace 'prettytable = "^3.1.1"' 'prettytable = "*"'
|
|
|
|
'';
|
|
|
|
|
|
|
|
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-05-02 18:28:30 +00:00
|
|
|
mainProgram = "sigma";
|
2022-03-12 11:16:53 +00:00
|
|
|
};
|
|
|
|
}
|