Files
nixpkgs/pkgs/development/python-modules/bc-detect-secrets/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

74 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
gibberish-detector,
mock,
pkgs,
pyahocorasick,
pytestCheckHook,
pyyaml,
requests,
responses,
setuptools,
unidiff,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
pname = "bc-detect-secrets";
version = "1.5.45";
pyproject = true;
src = fetchFromGitHub {
owner = "bridgecrewio";
repo = "detect-secrets";
tag = version;
hash = "sha256-/0VHhKcYcXYXosInjsgBf6eR7kcfLiLSyxFuaIqTbiQ=";
};
build-system = [ setuptools ];
dependencies = [
pyyaml
requests
unidiff
];
optional-dependencies = {
word_list = [ pyahocorasick ];
gibberish = [ gibberish-detector ];
};
nativeCheckInputs = [
mock
pkgs.gitMinimal
pytestCheckHook
responses
writableTmpDirAsHomeHook
]
++ lib.concatAttrValues optional-dependencies;
disabledTests = [
# Tests are failing for various reasons (missing git repo, missing test data, etc.)
"test_baseline_filters_out_known_secrets"
"test_make_decisions"
"test_saves_to_baseline"
"test_start_halfway"
"TestCreate"
"TestDiff"
"TestGetFilesToScan"
"TestLineNumberChanges"
"TestModifiesBaselineFromVersionChange"
];
pythonImportsCheck = [ "detect_secrets" ];
meta = {
description = "Tool to detect secrets in the code";
homepage = "https://github.com/bridgecrewio/detect-secrets";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
}