1{ stdenv, buildPythonPackage, fetchPypi 2, pytest, mock, oauth2client, flask, requests, urllib3, pytest-localserver, six, pyasn1-modules, cachetools, rsa }: 3 4buildPythonPackage rec { 5 pname = "google-auth"; 6 version = "1.4.1"; 7 8 src = fetchPypi { 9 inherit pname version; 10 sha256 = "9051802d3dae256036cca9e34633a32c0ed1427730d4ebc513dff91ec8b6dd45"; 11 }; 12 13 checkInputs = [ pytest mock oauth2client flask requests urllib3 pytest-localserver ]; 14 propagatedBuildInputs = [ six pyasn1-modules cachetools rsa ]; 15 16 # The removed test tests the working together of google_auth and google's https://pypi.python.org/pypi/oauth2client 17 # but the latter is deprecated. Since it is not currently part of the nixpkgs collection and deprecated it will 18 # probably never be. We just remove the test to make the tests work again. 19 postPatch = ''rm tests/test__oauth2client.py''; 20 21 checkPhase = '' 22 py.test 23 ''; 24 25 meta = with stdenv.lib; { 26 description = "This library simplifies using Googles various server-to-server authentication mechanisms to access Google APIs."; 27 homepage = "https://google-auth.readthedocs.io/en/latest/"; 28 license = licenses.asl20; 29 maintainers = with maintainers; [ vanschelven ]; 30 }; 31}