diff options
author | Mario Rodas <marsam@users.noreply.github.com> | 2018-12-25 18:01:00 -0500 |
---|---|---|
committer | Mario Rodas <marsam@users.noreply.github.com> | 2018-12-27 05:23:32 -0500 |
commit | 3258b00009e2108ec41d94e84fa49e1a7648d883 (patch) | |
tree | 0f2984dccdabe976c0a7c98d33429ca9f8d41823 /pkgs/development | |
parent | 17eb96dabda03c316201104f8203a60e64d03773 (diff) | |
download | nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.tar nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.tar.gz nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.tar.bz2 nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.tar.lz nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.tar.xz nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.tar.zst nixlib-3258b00009e2108ec41d94e84fa49e1a7648d883.zip |
detect-secrets: init at 0.11.0
Diffstat (limited to 'pkgs/development')
-rw-r--r-- | pkgs/development/tools/detect-secrets/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/tools/detect-secrets/default.nix b/pkgs/development/tools/detect-secrets/default.nix new file mode 100644 index 000000000000..c341e2eb7101 --- /dev/null +++ b/pkgs/development/tools/detect-secrets/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonApplication, fetchFromGitHub, isPy27, pyyaml, unidiff, configparser, enum34, future, functools32, mock, pytest }: + +buildPythonApplication rec { + pname = "detect-secrets"; + version = "0.11.0"; + + # PyPI tarball doesn't ship tests + src = fetchFromGitHub { + owner = "Yelp"; + repo = "detect-secrets"; + rev = "v${version}"; + sha256 = "11r11q6d8aajqqnhhz4lsa93qf1x745331kl9jd3z4y4w91l4gdz"; + }; + + propagatedBuildInputs = [ pyyaml unidiff ] + ++ lib.optionals isPy27 [ configparser enum34 future functools32 ]; + + checkInputs = [ mock pytest ]; + + # deselect tests which require git setup + checkPhase = '' + PYTHONPATH=$PWD:$PYTHONPATH pytest \ + --deselect tests/main_test.py::TestMain \ + --deselect tests/pre_commit_hook_test.py::TestPreCommitHook \ + --deselect tests/core/baseline_test.py::TestInitializeBaseline + ''; + + meta = with lib; { + description = "An enterprise friendly way of detecting and preventing secrets in code"; + homepage = https://github.com/Yelp/detect-secrets; + license = licenses.asl20; + maintainers = [ maintainers.marsam ]; + }; +} |