From 89aa5c2fb50121d0b3815f37f1e510fea652e3ad Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Wed, 25 Nov 2020 21:04:36 +0100 Subject: [PATCH 1/4] maintainers: add gravndal --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index fc41ce36bc2..f37c007b762 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3609,6 +3609,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"; From 59318f5570d69e9149780b38160c63721f779ac3 Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Thu, 1 Apr 2021 23:05:08 +0200 Subject: [PATCH 2/4] python3Packages.expiringdict: init at 1.2.1 --- .../python-modules/expiringdict/default.nix | 44 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/python-modules/expiringdict/default.nix diff --git a/pkgs/development/python-modules/expiringdict/default.nix b/pkgs/development/python-modules/expiringdict/default.nix new file mode 100644 index 00000000000..23ca9c1c3f2 --- /dev/null +++ b/pkgs/development/python-modules/expiringdict/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c5d0dec90a9..f9ad4bb415b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2233,6 +2233,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 { }; From f1e9be8dc00d5abe61500a7db1b8520d573e96d2 Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Thu, 1 Apr 2021 23:05:28 +0200 Subject: [PATCH 3/4] python3Packages.drivelib: init at 0.3.0 --- .../python-modules/drivelib/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/drivelib/default.nix diff --git a/pkgs/development/python-modules/drivelib/default.nix b/pkgs/development/python-modules/drivelib/default.nix new file mode 100644 index 00000000000..526e58d1434 --- /dev/null +++ b/pkgs/development/python-modules/drivelib/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f9ad4bb415b..6385d2bf295 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2059,6 +2059,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 { }; From e9f12cd9dbf6bdfaa14427edb65921dd5a7afc5c Mon Sep 17 00:00:00 2001 From: Gaute Ravndal Date: Thu, 1 Apr 2021 23:05:45 +0200 Subject: [PATCH 4/4] git-annex-remote-googledrive: init at 1.3.0 --- .../git-annex-remote-googledrive/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 11 ++++++ 2 files changed, 45 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/git-annex-remote-googledrive/default.nix diff --git a/pkgs/applications/version-management/git-and-tools/git-annex-remote-googledrive/default.nix b/pkgs/applications/version-management/git-and-tools/git-annex-remote-googledrive/default.nix new file mode 100644 index 00000000000..89b2a5f23b0 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-annex-remote-googledrive/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c21d9efd7dd..686e71244ba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4670,6 +4670,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 { };