@@ -0,0 +1,52 @@
1+{ lib
2+, fetchFromGitHub
3+, python3
4+}:
5+
6+python3.pkgs.buildPythonApplication rec {
7+ pname = "whispers";
8+ version = "1.5.3";
9+
10+ src = fetchFromGitHub {
11+ owner = "Skyscanner";
12+ repo = pname;
13+ rev = version;
14+ sha256 = "sha256-jruUGyoZCyMu015QKtlvfx5WRMfxo/eYUue9wUIWb6o=";
15+ };
16+
17+ propagatedBuildInputs = with python3.pkgs; [
18+ astroid
19+ beautifulsoup4
20+ jproperties
21+ luhn
22+ lxml
23+ python-Levenshtein
24+ pyyaml
25+ ];
26+
27+ checkInputs = with python3.pkgs; [
28+ pytest-mock
29+ pytestCheckHook
30+ ];
31+
32+ postPatch = ''
33+ substituteInPlace setup.py \
34+ --replace '"pytest-runner"' ""
35+ '';
36+
37+ preCheck = ''
38+ # Some tests need the binary available in PATH
39+ export PATH=$out/bin:$PATH
40+ '';
41+
42+ pythonImportsCheck = [
43+ "whispers"
44+ ];
45+
46+ meta = with lib; {
47+ description = "Tool to identify hardcoded secrets in static structured text";
48+ homepage = "https://github.com/Skyscanner/whispers";
49+ license = with licenses; [ asl20 ];
50+ maintainers = with maintainers; [ fab ];
51+ };
52+}