summary refs log tree commit diff
path: root/pkgs/tools/security/sigma-cli
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-03-12 12:16:53 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-03-12 12:16:53 +0100
commit2e0fce9838a21f5e070ac5ac70c8ba10940202ae (patch)
treee3f443347ffbb53ac7da16a657c651059eb70e41 /pkgs/tools/security/sigma-cli
parenta5615d445e24762dbafb467adedb0c51ca3b48d1 (diff)
downloadnixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.tar
nixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.tar.gz
nixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.tar.bz2
nixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.tar.lz
nixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.tar.xz
nixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.tar.zst
nixpkgs-2e0fce9838a21f5e070ac5ac70c8ba10940202ae.zip
sigma-cli: init at 0.3.0
Diffstat (limited to 'pkgs/tools/security/sigma-cli')
-rw-r--r--pkgs/tools/security/sigma-cli/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/security/sigma-cli/default.nix b/pkgs/tools/security/sigma-cli/default.nix
new file mode 100644
index 00000000000..3bf4e788912
--- /dev/null
+++ b/pkgs/tools/security/sigma-cli/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, fetchFromGitHub
+, python3
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "sigma-cli";
+  version = "0.3.0";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "SigmaHQ";
+    repo = pname;
+    rev = "v${version}";
+    hash = "sha256-Nfd78Y35naDTzwodcdvJr/02CptcHxS717VGsR/QOuI=";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [
+    poetry-core
+  ];
+
+  propagatedBuildInputs = with python3.pkgs; [
+    click
+    prettytable
+    pysigma
+    pysigma-backend-splunk
+    pysigma-pipeline-crowdstrike
+    pysigma-pipeline-sysmon
+  ];
+
+  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 ];
+  };
+}