summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/drivelib/default.nix
blob: ae459762e0e9a723667bf02f700a62a67e2b6604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{
  lib,
  buildPythonPackage,
  expiringdict,
  fetchPypi,
  google-api-python-client,
  google-auth,
  google-auth-httplib2,
  google-auth-oauthlib,
  oauth2client,
  setuptools,
  versioneer,
}:

buildPythonPackage rec {
  pname = "drivelib";
  version = "0.3.0";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-lTyRncKBMoU+ahuekt+LQ/PhNqySf4a4qLSmyo1t468=";
  };

  postPatch = ''
    # Remove vendorized versioneer.py
    rm versioneer.py
  '';

  build-system = [
    setuptools
    versioneer
  ];

  dependencies = [
    expiringdict
    google-api-python-client
    google-auth
    google-auth-httplib2
    google-auth-oauthlib
    oauth2client
  ];

  # Tests depend on a google auth token
  doCheck = false;

  pythonImportsCheck = [ "drivelib" ];

  meta = {
    description = "Easy access to the most common Google Drive API calls";
    homepage = "https://github.com/Lykos153/python-drivelib";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ gravndal ];
  };
}