Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990{ lib, buildPythonPackage, fetchFromGitHub, gibberish-detector, mock, pkgs, pyahocorasick, pytest7CheckHook, pyyaml, requests, responses, setuptools, unidiff, writableTmpDirAsHomeHook, withGibberish ? true, withWordList ? true,}:
buildPythonPackage (finalAttrs: { pname = "detect-secrets"; version = "1.5.0"; pyproject = true;
src = fetchFromGitHub { owner = "Yelp"; repo = "detect-secrets"; tag = "v${finalAttrs.version}"; hash = "sha256-pNLAZUJhjZ3b01XaltJUJ9O7Blv6/pHQrRvURe7MJ5A="; leaveDotGit = true; };
build-system = [ setuptools ];
dependencies = [ pyyaml requests ] ++ lib.optionals withGibberish finalAttrs.passthru.optional-dependencies.gibberish ++ lib.optionals withWordList finalAttrs.passthru.optional-dependencies.word_list;
optional-dependencies = { gibberish = [ gibberish-detector ]; word_list = [ pyahocorasick ]; };
nativeCheckInputs = [ mock pytest7CheckHook responses unidiff pkgs.gitMinimal writableTmpDirAsHomeHook ];
disabledTests = [ # Tests are failing for various reasons. Needs to be adjusted with the next update "test_basic" "test_filename_filters_are_invoked_first" "test_handles_each_path_separately" "test_handles_multiple_directories" "test_make_decisions" "test_saves_to_baseline" "test_start_halfway" "test_success" ] ++ lib.optionals (!withGibberish) [ "test_load_and_output" "test_quit_if_baseline_is_changed_but_not_staged" ];
disabledTestPaths = lib.optionals (!withGibberish) [ "tests/filters/gibberish_filter_test.py" ] ++ lib.optionals (!withWordList) [ "tests/filters/wordlist_filter_test.py" ];
pythonImportsCheck = [ "detect_secrets" ];
meta = { description = "Enterprise friendly way of detecting and preventing secrets in code"; homepage = "https://github.com/Yelp/detect-secrets"; changelog = "https://github.com/Yelp/detect-secrets/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.asl20; maintainers = [ ]; };})