about summary refs log tree commit diff
path: root/pkgs/development/python-modules/gcs-oauth2-boto-plugin
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2022-11-24 17:26:37 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2022-11-24 17:49:15 +0100
commit7dfe967b9a6352a32a419273761e5c72a21be075 (patch)
treed437ae8bd00c5f2f414a5cd83df0a695ccc1187b /pkgs/development/python-modules/gcs-oauth2-boto-plugin
parent68abb937978c83c1d820afbb5cdd992c6780c449 (diff)
python310Packages.gcs-oauth2-boto-plugin: init at 3.0
Diffstat (limited to 'pkgs/development/python-modules/gcs-oauth2-boto-plugin')
-rw-r--r--pkgs/development/python-modules/gcs-oauth2-boto-plugin/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/gcs-oauth2-boto-plugin/default.nix b/pkgs/development/python-modules/gcs-oauth2-boto-plugin/default.nix
new file mode 100644
index 0000000000000..321a6a1de65d0
--- /dev/null
+++ b/pkgs/development/python-modules/gcs-oauth2-boto-plugin/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, boto
+, buildPythonPackage
+, fasteners
+, fetchFromGitHub
+, freezegun
+, google-reauth
+, httplib2
+, oauth2client
+, pyopenssl
+, pytestCheckHook
+, pythonOlder
+, pythonRelaxDepsHook
+, retry_decorator
+, rsa
+, six
+}:
+
+buildPythonPackage rec {
+  pname = "gcs-oauth2-boto-plugin";
+  version = "3.0";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchFromGitHub {
+    owner = "GoogleCloudPlatform";
+    repo = pname;
+    rev = "refs/tags/v${version}";
+    sha256 = "sha256-slTxh2j9VhLiSyiTmJIFFakzpzH/+mgilDRxx0VqqKQ=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.py \
+      --replace "rsa==4.7.2" "rsa" \
+      --replace "version='2.7'" "version='${version}'"
+  '';
+
+  propagatedBuildInputs = [
+    boto
+    freezegun
+    google-reauth
+    httplib2
+    oauth2client
+    pyopenssl
+    retry_decorator
+    rsa
+    six
+  ];
+
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pythonImportsCheck = [
+    "gcs_oauth2_boto_plugin"
+  ];
+
+  meta = with lib; {
+    description = "Auth plugin allowing use the use of OAuth 2.0 credentials for Google Cloud Storage";
+    homepage = "https://github.com/GoogleCloudPlatform/gcs-oauth2-boto-plugin";
+    changelog = "https://github.com/GoogleCloudPlatform/gcs-oauth2-boto-plugin/releases/tag/v${version}";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ fab ];
+  };
+}