Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 fetchFromGitHub, 4 python3, 5}: 6 7python3.pkgs.buildPythonApplication rec { 8 pname = "sigma-cli"; 9 version = "1.0.6"; 10 pyproject = true; 11 12 src = fetchFromGitHub { 13 owner = "SigmaHQ"; 14 repo = "sigma-cli"; 15 tag = "v${version}"; 16 hash = "sha256-BINKEptzdfEJPJAfPoYWiDXdmVnG7NYVaQar7dz4Ptk="; 17 }; 18 19 postPatch = '' 20 substituteInPlace pyproject.toml \ 21 --replace '= "^' '= ">=' 22 ''; 23 24 build-system = with python3.pkgs; [ poetry-core ]; 25 26 dependencies = with python3.pkgs; [ 27 click 28 colorama 29 prettytable 30 pysigma 31 pysigma-backend-elasticsearch 32 pysigma-backend-insightidr 33 pysigma-backend-opensearch 34 pysigma-backend-qradar 35 pysigma-backend-splunk 36 pysigma-backend-loki 37 pysigma-pipeline-crowdstrike 38 pysigma-pipeline-sysmon 39 pysigma-pipeline-windows 40 ]; 41 42 nativeCheckInputs = with python3.pkgs; [ 43 pytest-cov-stub 44 pytestCheckHook 45 ]; 46 47 disabledTests = [ 48 "test_plugin_list" 49 "test_plugin_list_filtered" 50 "test_plugin_list_search" 51 "test_plugin_install_notexisting" 52 "test_plugin_install" 53 "test_plugin_uninstall" 54 "test_backend_option_unknown_by_backend" 55 # Tests require network access 56 "test_check_with_issues" 57 "test_plugin_show_identifier" 58 "test_plugin_show_nonexisting" 59 "test_plugin_show_uuid" 60 # Tests compare STDOUT results 61 "test_check_valid" 62 "test_check_stdin" 63 "test_check_exclude" 64 ]; 65 66 pythonImportsCheck = [ "sigma.cli" ]; 67 68 meta = with lib; { 69 description = "Sigma command line interface"; 70 homepage = "https://github.com/SigmaHQ/sigma-cli"; 71 changelog = "https://github.com/SigmaHQ/sigma-cli/releases/tag/${src.tag}"; 72 license = licenses.lgpl21Plus; 73 maintainers = with maintainers; [ fab ]; 74 mainProgram = "sigma"; 75 }; 76}