d56f44df06
GitOrigin-RevId: bc4b9eef3ce3d5a90d8693e8367c9cbfc9fc1e13
54 lines
982 B
Nix
54 lines
982 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, fetchpatch
|
|
, poetry-core
|
|
, pyparsing
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pyyaml
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "pysigma";
|
|
version = "0.4.4";
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "SigmaHQ";
|
|
repo = "pySigma";
|
|
rev = "v${version}";
|
|
hash = "sha256-eZDPi87wwsM0EriJ/Y1yTSJ9R4BqvJg3YJyJUa2vLqo=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
pyparsing
|
|
pyyaml
|
|
];
|
|
|
|
checkInputs = [
|
|
pytestCheckHook
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace 'pyparsing = "^3.0.7"' 'pyparsing = "*"' \
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"sigma"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Library to parse and convert Sigma rules into queries";
|
|
homepage = "https://github.com/SigmaHQ/pySigma";
|
|
license = with licenses; [ lgpl21Only ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|