Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / detect-secrets / default.nix
blobae0e2c4cda2d0b0f2980c7ce0015c40c6d108a4a
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , gibberish-detector
5 , mock
6 , pkgs
7 , pyahocorasick
8 , pytest7CheckHook
9 , pythonOlder
10 , pyyaml
11 , requests
12 , responses
13 , unidiff
16 buildPythonPackage rec {
17   pname = "detect-secrets";
18   version = "1.4.0";
19   format = "setuptools";
21   disabled = pythonOlder "3.7";
23   src = fetchFromGitHub {
24     owner = "Yelp";
25     repo = pname;
26     rev = "v${version}";
27     hash = "sha256-6EmL6XPySqcA3EA+FFkfw7Dkxl5LvyBorIw0hesV5eU=";
28     leaveDotGit = true;
29   };
31   propagatedBuildInputs = [
32     gibberish-detector
33     pyyaml
34     pyahocorasick
35     requests
36   ];
38   nativeCheckInputs = [
39     mock
40     pytest7CheckHook
41     responses
42     unidiff
43     pkgs.gitMinimal
44   ];
46   preCheck = ''
47     export HOME=$(mktemp -d);
48   '';
50   disabledTests = [
51     # Tests are failing for various reasons. Needs to be adjusted with the next update
52     "test_basic"
53     "test_handles_each_path_separately"
54     "test_handles_multiple_directories"
55     "test_load_and_output"
56     "test_make_decisions"
57     "test_restores_line_numbers"
58     "test_saves_to_baseline"
59     "test_scan_all_files"
60     "test_start_halfway"
61   ];
63   pythonImportsCheck = [
64     "detect_secrets"
65   ];
67   meta = with lib; {
68     description = "An enterprise friendly way of detecting and preventing secrets in code";
69     homepage = "https://github.com/Yelp/detect-secrets";
70     license = licenses.asl20;
71     maintainers = with maintainers; [ ];
72   };