2024-01-02 11:29:13 +00:00
|
|
|
{ lib
|
|
|
|
, python3
|
|
|
|
, fetchFromGitHub
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "gcp-scanner";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "1.4.0";
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "google";
|
|
|
|
repo = "gcp_scanner";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-6bIrSaTqpXQjB64YWAI64DlgQBD2XD+zMvKymMtwpDk=";
|
2024-01-02 11:29:13 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
pythonRelaxDeps = true;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = with python3.pkgs; [
|
|
|
|
setuptools
|
|
|
|
setuptools-git-versioning
|
2024-02-07 01:22:34 +00:00
|
|
|
pythonRelaxDepsHook
|
2024-01-02 11:29:13 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Comprehensive scanner for Google Cloud";
|
2024-01-02 11:29:13 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
}
|