2021-01-23 23:19:12 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, configparser
|
|
|
|
, enum34
|
|
|
|
, fetchFromGitHub
|
|
|
|
, functools32
|
|
|
|
, future
|
|
|
|
, isPy27
|
|
|
|
, mock
|
|
|
|
, pyahocorasick
|
|
|
|
, pytestCheckHook
|
|
|
|
, pyyaml
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
, unidiff
|
|
|
|
}:
|
2018-12-25 23:01:00 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "detect-secrets";
|
2021-01-23 23:19:12 +00:00
|
|
|
version = "0.14.3";
|
|
|
|
disabled = isPy27;
|
2018-12-25 23:01:00 +00:00
|
|
|
|
|
|
|
# PyPI tarball doesn't ship tests
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Yelp";
|
2021-01-23 23:19:12 +00:00
|
|
|
repo = pname;
|
2018-12-25 23:01:00 +00:00
|
|
|
rev = "v${version}";
|
2021-01-23 23:19:12 +00:00
|
|
|
sha256 = "0c4hxih9ljmv0d3izq5idyspk5zci26gdb6lv9klwcshwrfkvxj0";
|
2018-12-25 23:01:00 +00:00
|
|
|
};
|
|
|
|
|
2021-01-23 23:19:12 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyyaml
|
|
|
|
requests
|
|
|
|
];
|
2018-12-25 23:01:00 +00:00
|
|
|
|
2021-01-23 23:19:12 +00:00
|
|
|
checkInputs = [
|
|
|
|
mock
|
|
|
|
pyahocorasick
|
|
|
|
pytestCheckHook
|
|
|
|
responses
|
|
|
|
unidiff
|
|
|
|
];
|
2018-12-25 23:01:00 +00:00
|
|
|
|
2021-01-23 23:19:12 +00:00
|
|
|
disabledTests = [
|
|
|
|
"TestMain"
|
|
|
|
"TestPreCommitHook"
|
|
|
|
"TestInitializeBaseline"
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "detect_secrets" ];
|
2018-12-25 23:01:00 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "An enterprise friendly way of detecting and preventing secrets in code";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/Yelp/detect-secrets";
|
2018-12-25 23:01:00 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|