depot/third_party/nixpkgs/pkgs/tools/security/sigma-cli/default.nix
Default email 3a4df29a92 Project import generated by Copybara.
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
2022-06-16 19:23:12 +02:00

54 lines
1.1 KiB
Nix

{ lib
, fetchFromGitHub
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "sigma-cli";
version = "0.4.3";
format = "pyproject";
src = fetchFromGitHub {
owner = "SigmaHQ";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-3LFakeS3aQaacm7HqeAJPMJhi3Wf8zbJc//SEWUA1Rg=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
click
prettytable
pysigma
pysigma-backend-splunk
pysigma-backend-insightidr
pysigma-pipeline-crowdstrike
pysigma-pipeline-sysmon
pysigma-pipeline-windows
];
checkInputs = with python3.pkgs; [
pytestCheckHook
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'prettytable = "^3.1.1"' 'prettytable = "*"' \
--replace 'pysigma = "^0.5.0"' 'pysigma = "*"'
'';
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 ];
mainProgram = "sigma";
};
}