nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, fetchFromGitHub
3, python3
4}:
5
6python3.pkgs.buildPythonApplication rec {
7 pname = "sigma-cli";
8 version = "0.7.2";
9 format = "pyproject";
10
11 src = fetchFromGitHub {
12 owner = "SigmaHQ";
13 repo = pname;
14 rev = "refs/tags/v${version}";
15 hash = "sha256-yzo/BotNzTBjdkaXI1lHntpI5AyW5AbpFu3XtkWpHU4=";
16 };
17
18 postPatch = ''
19 substituteInPlace pyproject.toml \
20 --replace '= "^' '= ">='
21 '';
22
23 nativeBuildInputs = with python3.pkgs; [
24 poetry-core
25 ];
26
27 propagatedBuildInputs = with python3.pkgs; [
28 click
29 colorama
30 prettytable
31 pysigma
32 pysigma-backend-elasticsearch
33 pysigma-backend-insightidr
34 pysigma-backend-opensearch
35 pysigma-backend-qradar
36 pysigma-backend-splunk
37 pysigma-pipeline-crowdstrike
38 pysigma-pipeline-sysmon
39 pysigma-pipeline-windows
40 ];
41
42 nativeCheckInputs = with python3.pkgs; [
43 pytestCheckHook
44 ];
45
46 disabledTests = [
47 "test_plugin_list"
48 "test_plugin_list_filtered"
49 "test_plugin_list_search"
50 "test_plugin_install_notexisting"
51 "test_plugin_install"
52 "test_plugin_uninstall"
53 ];
54
55 pythonImportsCheck = [
56 "sigma.cli"
57 ];
58
59 meta = with lib; {
60 description = "Sigma command line interface";
61 homepage = "https://github.com/SigmaHQ/sigma-cli";
62 license = with licenses; [ lgpl21Plus ];
63 maintainers = with maintainers; [ fab ];
64 mainProgram = "sigma";
65 };
66}