evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / whispers / default.nix
blobad550eafe5207e6ed8da0a953f3a3333aab8de31
2   lib,
3   astroid,
4   beautifulsoup4,
5   buildPythonPackage,
6   crossplane,
7   fetchFromGitHub,
8   jellyfish,
9   jproperties,
10   luhn,
11   lxml,
12   pytest-mock,
13   pytestCheckHook,
14   pythonOlder,
15   pyyaml,
16   wrapt,
17   semgrep,
18   setuptools,
21 buildPythonPackage rec {
22   pname = "whispers";
23   version = "2.3.0";
24   pyproject = true;
26   disabled = pythonOlder "3.7";
28   src = fetchFromGitHub {
29     owner = "adeptex";
30     repo = "whispers";
31     rev = "refs/tags/${version}";
32     hash = "sha256-tjDog8+oWTNuK1eK5qUEFspiilB0riUSTX5ugTIiP3M=";
33   };
35   postPatch = ''
36     substituteInPlace setup.py \
37       --replace-fail '"pytest-runner"' ""
38   '';
40   pythonRelaxDeps = [
41     "lxml"
42     "pyyaml"
43     "semgrep"
44   ];
46   build-system = [ setuptools ];
48   dependencies = [
49     astroid
50     beautifulsoup4
51     crossplane
52     jellyfish
53     jproperties
54     luhn
55     lxml
56     pyyaml
57     wrapt
58     semgrep
59   ];
61   nativeCheckInputs = [
62     pytest-mock
63     pytestCheckHook
64   ];
66   disabledTestPaths = [
67     # pinning tests highly sensitive to semgrep version
68     "tests/unit/plugins/test_semgrep.py"
69   ];
71   preCheck = ''
72     # pinning test highly sensitive to semgrep version
73     substituteInPlace tests/unit/test_main.py \
74       --replace-fail '("--ast", 421),' ""
76     # Some tests need the binary available in PATH
77     export PATH=$out/bin:$PATH
78   '';
80   pythonImportsCheck = [ "whispers" ];
82   meta = with lib; {
83     description = "Tool to identify hardcoded secrets in static structured text";
84     homepage = "https://github.com/adeptex/whispers";
85     changelog = "https://github.com/adeptex/whispers/releases/tag/${version}";
86     license = with licenses; [ asl20 ];
87     maintainers = with maintainers; [ fab ];
88     mainProgram = "whispers";
89   };