1{ lib
2, astroid
3, beautifulsoup4
4, buildPythonPackage
5, crossplane
6, fetchFromGitHub
7, jellyfish
8, jproperties
9, luhn
10, lxml
11, pytest-mock
12, pytestCheckHook
13, pythonOlder
14, pyyaml
15}:
16
17buildPythonPackage rec {
18 pname = "whispers";
19 version = "2.2.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchFromGitHub {
25 owner = "adeptex";
26 repo = pname;
27 rev = "refs/tags/${version}";
28 hash = "sha256-9vXku8BWJtlf+lmAcQ8a7qTisRNc+xVw0T0Eunc4lt4=";
29 };
30
31 propagatedBuildInputs = [
32 astroid
33 beautifulsoup4
34 crossplane
35 jellyfish
36 jproperties
37 luhn
38 lxml
39 pyyaml
40 ];
41
42 nativeCheckInputs = [
43 pytest-mock
44 pytestCheckHook
45 ];
46
47 postPatch = ''
48 substituteInPlace setup.py \
49 --replace '"pytest-runner"' ""
50 '';
51
52 preCheck = ''
53 # Some tests need the binary available in PATH
54 export PATH=$out/bin:$PATH
55 '';
56
57 pythonImportsCheck = [
58 "whispers"
59 ];
60
61 meta = with lib; {
62 description = "Tool to identify hardcoded secrets in static structured text";
63 homepage = "https://github.com/Skyscanner/whispers";
64 license = with licenses; [ asl20 ];
65 maintainers = with maintainers; [ fab ];
66 };
67}