summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-01-24 00:19:12 +0100
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-01-23 19:07:20 -0800
commit3117287a11484e876af07213fd4e90981f0daa22 (patch)
treeb368086224b67f4f3dc73dcc021279dc2168f414
parent04eab02b16a1d4631113e8de9c4b22a1f36ae446 (diff)
downloadnixpkgs-3117287a11484e876af07213fd4e90981f0daa22.tar
nixpkgs-3117287a11484e876af07213fd4e90981f0daa22.tar.gz
nixpkgs-3117287a11484e876af07213fd4e90981f0daa22.tar.bz2
nixpkgs-3117287a11484e876af07213fd4e90981f0daa22.tar.lz
nixpkgs-3117287a11484e876af07213fd4e90981f0daa22.tar.xz
nixpkgs-3117287a11484e876af07213fd4e90981f0daa22.tar.zst
nixpkgs-3117287a11484e876af07213fd4e90981f0daa22.zip
detect-secrets: 0.12.4 -> 0.14.3
-rw-r--r--pkgs/development/tools/detect-secrets/default.nix52
1 files changed, 38 insertions, 14 deletions
diff --git a/pkgs/development/tools/detect-secrets/default.nix b/pkgs/development/tools/detect-secrets/default.nix
index 1e42a32f7ca..f0dddf66ff4 100644
--- a/pkgs/development/tools/detect-secrets/default.nix
+++ b/pkgs/development/tools/detect-secrets/default.nix
@@ -1,29 +1,53 @@
-{ lib, buildPythonApplication, fetchFromGitHub, isPy27, pyyaml, unidiff, configparser, enum34, future, functools32, mock, pytest }:
+{ lib
+, buildPythonApplication
+, configparser
+, enum34
+, fetchFromGitHub
+, functools32
+, future
+, isPy27
+, mock
+, pyahocorasick
+, pytestCheckHook
+, pyyaml
+, requests
+, responses
+, unidiff
+}:
 
 buildPythonApplication rec {
   pname = "detect-secrets";
-  version = "0.12.4";
+  version = "0.14.3";
+  disabled = isPy27;
 
   # PyPI tarball doesn't ship tests
   src = fetchFromGitHub {
     owner = "Yelp";
-    repo = "detect-secrets";
+    repo = pname;
     rev = "v${version}";
-    sha256 = "01y5xd0irxxib4wnf5834gwa7ibb81h5y4dl8b26gyzgvm5zfpk1";
+    sha256 = "0c4hxih9ljmv0d3izq5idyspk5zci26gdb6lv9klwcshwrfkvxj0";
   };
 
-  propagatedBuildInputs = [ pyyaml ]
-    ++ lib.optionals isPy27 [ configparser enum34 future functools32 ];
+  propagatedBuildInputs = [
+    pyyaml
+    requests
+  ];
 
-  checkInputs = [ mock pytest unidiff ];
+  checkInputs = [
+    mock
+    pyahocorasick
+    pytestCheckHook
+    responses
+    unidiff
+  ];
 
-  # 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
-  '';
+  disabledTests = [
+    "TestMain"
+    "TestPreCommitHook"
+    "TestInitializeBaseline"
+  ];
+
+  pythonImportsCheck = [ "detect_secrets" ];
 
   meta = with lib; {
     description = "An enterprise friendly way of detecting and preventing secrets in code";