1{
2 lib,
3 stdenv,
4 python3,
5 fetchFromGitHub,
6}:
7
8python3.pkgs.buildPythonApplication rec {
9 pname = "deepsecrets";
10 version = "1.0.6";
11 pyproject = true;
12
13 src = fetchFromGitHub {
14 owner = "avito-tech";
15 repo = "deepsecrets";
16 tag = "v${version}";
17 hash = "sha256-VfIsPgStHcIYGbfrOs1mvgoq0ZoVSZwILFVBeMt/5Jc=";
18 };
19
20 pythonRelaxDeps = [
21 "pyyaml"
22 "regex"
23 "mmh3"
24 ];
25
26 build-system = with python3.pkgs; [ poetry-core ];
27
28 dependencies = with python3.pkgs; [
29 dotwiz
30 mmh3
31 ordered-set
32 pydantic_1
33 pygments
34 pyyaml
35 regex
36 ];
37
38 nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];
39
40 disabledTests = [
41 # assumes package is built in /app (docker?), and not /build/${src.name} (nix sandbox)
42 "test_1_cli"
43 "test_config"
44 "test_basic_info"
45 ];
46
47 pythonImportsCheck = [ "deepsecrets" ];
48
49 meta = {
50 description = "Secrets scanner that understands code";
51 homepage = "https://github.com/avito-tech/deepsecrets";
52 changelog = "https://github.com/avito-tech/deepsecrets/releases/tag/v${version}";
53 license = lib.licenses.mit;
54 maintainers = with lib.maintainers; [ fab ];
55 mainProgram = "deepsecrets";
56 broken = stdenv.hostPlatform.isDarwin;
57 };
58}