1a04744f74
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
72 lines
1.5 KiB
Nix
72 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
gibberish-detector,
|
|
mock,
|
|
pkgs,
|
|
pyahocorasick,
|
|
pytest7CheckHook,
|
|
pyyaml,
|
|
requests,
|
|
responses,
|
|
setuptools,
|
|
unidiff,
|
|
writableTmpDirAsHomeHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "detect-secrets";
|
|
version = "1.5.0";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Yelp";
|
|
repo = "detect-secrets";
|
|
tag = "v${version}";
|
|
hash = "sha256-pNLAZUJhjZ3b01XaltJUJ9O7Blv6/pHQrRvURe7MJ5A=";
|
|
leaveDotGit = true;
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
gibberish-detector
|
|
pyyaml
|
|
pyahocorasick
|
|
requests
|
|
];
|
|
|
|
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_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"
|
|
];
|
|
|
|
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/${src.tag}";
|
|
license = lib.licenses.asl20;
|
|
maintainers = [ ];
|
|
};
|
|
}
|