1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 gibberish-detector, 6 mock, 7 pkgs, 8 pyahocorasick, 9 pytest7CheckHook, 10 pythonOlder, 11 pyyaml, 12 requests, 13 responses, 14 setuptools, 15 unidiff, 16 writableTmpDirAsHomeHook, 17}: 18 19buildPythonPackage rec { 20 pname = "detect-secrets"; 21 version = "1.5.0"; 22 pyproject = true; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "Yelp"; 28 repo = "detect-secrets"; 29 tag = "v${version}"; 30 hash = "sha256-pNLAZUJhjZ3b01XaltJUJ9O7Blv6/pHQrRvURe7MJ5A="; 31 leaveDotGit = true; 32 }; 33 34 build-system = [ setuptools ]; 35 36 dependencies = [ 37 gibberish-detector 38 pyyaml 39 pyahocorasick 40 requests 41 ]; 42 43 nativeCheckInputs = [ 44 mock 45 pytest7CheckHook 46 responses 47 unidiff 48 pkgs.gitMinimal 49 writableTmpDirAsHomeHook 50 ]; 51 52 disabledTests = [ 53 # Tests are failing for various reasons. Needs to be adjusted with the next update 54 "test_basic" 55 "test_handles_each_path_separately" 56 "test_handles_multiple_directories" 57 "test_load_and_output" 58 "test_make_decisions" 59 "test_restores_line_numbers" 60 "test_saves_to_baseline" 61 "test_scan_all_files" 62 "test_start_halfway" 63 ]; 64 65 pythonImportsCheck = [ "detect_secrets" ]; 66 67 meta = with lib; { 68 description = "Enterprise friendly way of detecting and preventing secrets in code"; 69 homepage = "https://github.com/Yelp/detect-secrets"; 70 changelog = "https://github.com/Yelp/detect-secrets/releases/tag/${src.tag}"; 71 license = licenses.asl20; 72 maintainers = [ ]; 73 }; 74}