about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2023-11-20 22:37:59 +0100
committerGitHub <noreply@github.com>2023-11-20 22:37:59 +0100
commit32c6832503ed4be47a6c322e9a3187743b409896 (patch)
treef6ada180a3d803da254310e4c36128dd79e8b05e /pkgs/by-name
parentee20cc5e657227c02d75cc2abc1a43e7334e0b84 (diff)
parent5bb41dcaef6e48a93d79402b95c5bdd17d36957a (diff)
Merge pull request #268719 from fabaff/gcp-scanner
gcp-scanner: init at 1.3.0
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/gc/gcp-scanner/package.nix54
1 files changed, 54 insertions, 0 deletions
diff --git a/pkgs/by-name/gc/gcp-scanner/package.nix b/pkgs/by-name/gc/gcp-scanner/package.nix
new file mode 100644
index 0000000000000..1782e0adb017d
--- /dev/null
+++ b/pkgs/by-name/gc/gcp-scanner/package.nix
@@ -0,0 +1,54 @@
+{ lib
+, python3
+, fetchFromGitHub
+}:
+
+python3.pkgs.buildPythonApplication rec {
+  pname = "gcp-scanner";
+  version = "1.3.0";
+  pyproject = true;
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "gcp_scanner";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-mMvAoqwptCA73JiUl8HIhFBO198NnUmvCbf8Rk9dWxA=";
+  };
+
+  nativeBuildInputs = with python3.pkgs; [
+    setuptools
+    setuptools-git-versioning
+  ];
+
+  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 = "A 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";
+  };
+}