Merge pull request #104919 from gravndal/git-annex-remote-googledrive

This commit is contained in:
Sandro 2021-04-02 17:28:35 +02:00 committed by GitHub
commit 5a41d751ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 136 additions and 0 deletions

View File

@ -3615,6 +3615,12 @@
githubId = 76716;
name = "Graham Christensen";
};
gravndal = {
email = "gaute.ravndal+nixos@gmail.com";
github = "gravndal";
githubId = 4656860;
name = "Gaute Ravndal";
};
grburst = {
email = "GRBurst@protonmail.com";
github = "GRBurst";

View File

@ -0,0 +1,34 @@
{ lib
, buildPythonApplication
, fetchPypi
, annexremote
, drivelib
, GitPython
, tenacity
, humanfriendly
}:
buildPythonApplication rec {
pname = "git-annex-remote-googledrive";
version = "1.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "118w0fyy6pck8hyj925ym6ak0xxqhkaq2vharnpl9b97nab4mqg8";
};
propagatedBuildInputs = [ annexremote drivelib GitPython tenacity humanfriendly ];
# while git-annex does come with a testremote command that *could* be used,
# testing this special remote obviously depends on authenticating with google
doCheck = false;
pythonImportsCheck = [ "git_annex_remote_googledrive" ];
meta = with lib; {
description = "A git-annex special remote for Google Drive";
homepage = "https://pypi.org/project/git-annex-remote-googledrive/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ gravndal ];
};
}

View File

@ -0,0 +1,37 @@
{ lib
, buildPythonApplication
, fetchPypi
, expiringdict
, google-auth-httplib2
, google-auth-oauthlib
, google-api-python-client
}:
buildPythonApplication rec {
pname = "drivelib";
version = "0.3.0";
src = fetchPypi {
inherit pname version;
sha256 = "1bz3dn6wm9mlm2w8czwjmhvf3ws3iggr57hvd8z8acl1qafr2g4m";
};
propagatedBuildInputs = [
google-api-python-client
google-auth-oauthlib
google-auth-httplib2
expiringdict
];
# tests depend on a google auth token
doCheck = false;
pythonImportsCheck = [ "drivelib" ];
meta = with lib; {
description = "Easy access to the most common Google Drive API calls";
homepage = "https://pypi.org/project/drivelib/";
license = licenses.gpl3Only;
maintainers = with maintainers; [ gravndal ];
};
}

View File

@ -0,0 +1,44 @@
{ lib
, buildPythonApplication
, fetchFromGitHub
, dill
, coverage
, coveralls
, mock
, nose
}:
buildPythonApplication rec {
pname = "expiringdict";
version = "1.2.1";
# use fetchFromGitHub instead of fetchPypi because the test suite of
# the package is not included into the PyPI tarball
src = fetchFromGitHub {
owner = "mailgun";
repo = pname;
rev = "v${version}";
sha256 = "07g1vxznmim78bankfl9brr01s31sksdcpwynq1yryh6xw9ri5xs";
};
checkInputs = [
dill
coverage
coveralls
mock
nose
];
checkPhase = ''
nosetests -v --with-coverage --cover-package=expiringdict
'';
pythonImportsCheck = [ "expiringdict" ];
meta = with lib; {
description = "Dictionary with auto-expiring values for caching purposes";
homepage = "https://pypi.org/project/expiringdict/";
license = licenses.asl20;
maintainers = with maintainers; [ gravndal ];
};
}

View File

@ -4695,6 +4695,17 @@ in
humanfriendly;
};
git-annex-remote-googledrive = callPackage ../applications/version-management/git-and-tools/git-annex-remote-googledrive {
inherit (python3Packages)
buildPythonApplication
fetchPypi
annexremote
drivelib
GitPython
tenacity
humanfriendly;
};
git-annex-remote-rclone = callPackage ../applications/version-management/git-and-tools/git-annex-remote-rclone { };
git-annex-utils = callPackage ../applications/version-management/git-and-tools/git-annex-utils { };

View File

@ -2061,6 +2061,8 @@ in {
drf-yasg = callPackage ../development/python-modules/drf-yasg { };
drivelib = callPackage ../development/python-modules/drivelib { };
drms = callPackage ../development/python-modules/drms { };
dropbox = callPackage ../development/python-modules/dropbox { };
@ -2237,6 +2239,8 @@ in {
exifread = callPackage ../development/python-modules/exifread { };
expiringdict = callPackage ../development/python-modules/expiringdict { };
exrex = callPackage ../development/python-modules/exrex { };
extras = callPackage ../development/python-modules/extras { };