summaryrefslogtreecommitdiffstats
path: root/pkgs/development/tools/detect-secrets
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2018-12-25 18:01:00 -0500
committerMario Rodas <marsam@users.noreply.github.com>2018-12-27 05:23:32 -0500
commit3258b00009e2108ec41d94e84fa49e1a7648d883 (patch)
tree0f2984dccdabe976c0a7c98d33429ca9f8d41823 /pkgs/development/tools/detect-secrets
parent17eb96dabda03c316201104f8203a60e64d03773 (diff)
detect-secrets: init at 0.11.0
Diffstat (limited to 'pkgs/development/tools/detect-secrets')
-rw-r--r--pkgs/development/tools/detect-secrets/default.nix34
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 ];
+ };
+}