about summary refs log tree commit diff
path: root/pkgs/by-name/gc/gcp-scanner/package.nix
blob: a577790d16a6eda55cee3993cfa82d89346f3389 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ lib
, python3
, fetchFromGitHub
}:

python3.pkgs.buildPythonApplication rec {
  pname = "gcp-scanner";
  version = "1.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "google";
    repo = "gcp_scanner";
    rev = "refs/tags/v${version}";
    hash = "sha256-6bIrSaTqpXQjB64YWAI64DlgQBD2XD+zMvKymMtwpDk=";
  };

  pythonRelaxDeps = true;

  nativeBuildInputs = with python3.pkgs; [
    setuptools
    setuptools-git-versioning
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = with python3.pkgs; [
    google-api-python-client
    google-cloud-container
    google-cloud-iam
    httplib2
    pyu2f
    requests
  ];

  nativeCheckInputs = with python3.pkgs; [
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "gcp_scanner"
  ];

  disabledTests = [
    # Tests require credentials
    "TestCrawler"
    "test_acceptance"
  ];

  meta = with lib; {
    description = "Comprehensive scanner for Google Cloud";
    homepage = "https://github.com/google/gcp_scanner";
    changelog = "https://github.com/google/gcp_scanner/blob/${version}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ fab ];
    mainProgram = "gcp-scanner";
  };
}