about summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2020-04-21 19:23:08 +0200
committerMichael Weiss <dev.primeos@gmail.com>2020-04-21 22:08:50 +0200
commit0d1194704badfe656de207cd287bb3b802593ef5 (patch)
tree05e704e80597f6589111b2669f97866347530db7 /pkgs/development
parentcece19e0d80cffac83e2c8cf2aa1271dc3789d3e (diff)
python3Packages.google_api_python_client: 1.8.0 -> 1.8.1
This contains a fix for the goobook build which would break due to this
update.
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/python-modules/goobook/default.nix3
-rw-r--r--pkgs/development/python-modules/goobook/fix-build.patch32
-rw-r--r--pkgs/development/python-modules/google-api-python-client/default.nix14
3 files changed, 46 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/goobook/default.nix b/pkgs/development/python-modules/goobook/default.nix
index f8daf66c15643..ac658b1940f44 100644
--- a/pkgs/development/python-modules/goobook/default.nix
+++ b/pkgs/development/python-modules/goobook/default.nix
@@ -12,6 +12,9 @@ buildPythonPackage rec {
     sha256 = "089a95s6g9izsy1fzpz48p6pz0wpngcbbrvsillm1n53492gfhjg";
   };
 
+  # Required for a breaking change in google-api-python-client 1.8.1:
+  patches = [ ./fix-build.patch ];
+
   propagatedBuildInputs = [
     google_api_python_client simplejson oauth2client setuptools
   ];
diff --git a/pkgs/development/python-modules/goobook/fix-build.patch b/pkgs/development/python-modules/goobook/fix-build.patch
new file mode 100644
index 0000000000000..1121dbfdcb32d
--- /dev/null
+++ b/pkgs/development/python-modules/goobook/fix-build.patch
@@ -0,0 +1,32 @@
+From 8de09b82c5ac900317043e1c1025f431516b6788 Mon Sep 17 00:00:00 2001
+From: Michael Weiss <dev.primeos@gmail.com>
+Date: Tue, 21 Apr 2020 21:41:04 +0200
+Subject: [PATCH] Switch from the alias apiclient to googleapiclient
+
+This fixes the package after a breaking change / bug in
+google-api-python-client 1.8.1 (see [0] and a lot of duplicate issues).
+
+The module apiclient is just an alias for googleapiclient [1].
+
+[0]: https://github.com/googleapis/google-api-python-client/issues/870
+[1]: https://github.com/googleapis/google-api-python-client/blob/v1.8.1/apiclient/__init__.py
+---
+ goobook/goobook.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/goobook/goobook.py b/goobook/goobook.py
+index 5bcb0b3..a2e25e9 100755
+--- a/goobook/goobook.py
++++ b/goobook/goobook.py
+@@ -31,7 +31,7 @@ import sys
+ import time
+ 
+ import httplib2
+-from apiclient.discovery import build
++from googleapiclient.discovery import build
+ 
+ from goobook.storage import Storage, storageify, unstorageify
+ 
+-- 
+2.26.1
+
diff --git a/pkgs/development/python-modules/google-api-python-client/default.nix b/pkgs/development/python-modules/google-api-python-client/default.nix
index 2d7ae43f7f1e4..5f7d7dd275b8d 100644
--- a/pkgs/development/python-modules/google-api-python-client/default.nix
+++ b/pkgs/development/python-modules/google-api-python-client/default.nix
@@ -1,16 +1,24 @@
-{ lib, buildPythonPackage, fetchPypi
+{ lib, buildPythonPackage, fetchPypi, fetchpatch
 , google_auth, google-auth-httplib2, google_api_core
 , httplib2, six, uritemplate, oauth2client }:
 
 buildPythonPackage rec {
   pname = "google-api-python-client";
-  version = "1.8.0";
+  version = "1.8.1";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "003rgr15r9j080f3n5y2x6ymxsfv652m3r7j83p7sbrd9shl4nqg";
+    sha256 = "14d7719sxl7bqpw3k4hhfwd0l0v98lnpi7qlhdaf8jxw21ivzmpz";
   };
 
+  patches = [
+    # To fix a regression/bug in 1.8.1:
+    (fetchpatch {
+      url = "https://github.com/googleapis/google-api-python-client/commit/1d8ec6874e1c6081893de7cd7cbc86d1f6580320.patch";
+      sha256 = "1nr24jzvbkzaigv9c935fkpzfa36hj6k7yx5bdwxqfhpa3p9i8n9";
+    })
+  ];
+
   # No tests included in archive
   doCheck = false;