2022-03-12 11:16:53 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "sigma-cli";
|
2022-05-02 18:39:57 +01:00
|
|
|
version = "0.4.3";
|
2022-03-12 11:16:53 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "SigmaHQ";
|
|
|
|
repo = pname;
|
2022-05-02 18:39:57 +01: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 15:59:39 +01:00
|
|
|
pysigma-backend-insightidr
|
2022-03-12 11:16:53 +00:00
|
|
|
pysigma-pipeline-crowdstrike
|
|
|
|
pysigma-pipeline-sysmon
|
2022-04-14 15:59:39 +01: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 19:28:30 +01:00
|
|
|
mainProgram = "sigma";
|
2022-03-12 11:16:53 +00:00
|
|
|
};
|
|
|
|
}
|