diff --git a/pkgs/development/python-modules/detect-secrets/default.nix b/pkgs/development/python-modules/detect-secrets/default.nix index c4e5d6f7a439..2b5e7229b48e 100644 --- a/pkgs/development/python-modules/detect-secrets/default.nix +++ b/pkgs/development/python-modules/detect-secrets/default.nix @@ -13,6 +13,8 @@ setuptools, unidiff, writableTmpDirAsHomeHook, + withGibberish ? true, + withWordList ? true, }: buildPythonPackage rec { @@ -31,11 +33,20 @@ buildPythonPackage rec { build-system = [ setuptools ]; dependencies = [ - gibberish-detector pyyaml - pyahocorasick requests - ]; + ] + ++ lib.optionals withGibberish optional-dependencies.gibberish + ++ lib.optionals withWordList optional-dependencies.word_list; + + optional-dependencies = { + gibberish = [ + gibberish-detector + ]; + word_list = [ + pyahocorasick + ]; + }; nativeCheckInputs = [ mock @@ -51,11 +62,8 @@ buildPythonPackage rec { "test_basic" "test_handles_each_path_separately" "test_handles_multiple_directories" - "test_load_and_output" "test_make_decisions" - "test_restores_line_numbers" "test_saves_to_baseline" - "test_scan_all_files" "test_start_halfway" ];