1{ lib
2, fetchFromGitHub
3, python3
4, python3Packages
5}:
6
7python3Packages.buildPythonApplication rec {
8 pname = "gyb";
9 version = "1.72";
10 format = "other";
11
12 src = fetchFromGitHub {
13 owner = "GAM-team";
14 repo = "got-your-back";
15 rev = "refs/tags/v${version}";
16 sha256 = "sha256-75ZU1qNFdiX9Uhb+tKN0438iHKvY4fuFVGvcgyFFgJo=";
17 };
18
19 propagatedBuildInputs = with python3Packages; [
20 google-api-python-client
21 google-auth
22 google-auth-oauthlib
23 google-auth-httplib2
24 httplib2
25 ];
26
27 installPhase = ''
28 runHook preInstall
29
30 mkdir -p $out/{bin,${python3.sitePackages}}
31 mv gyb.py "$out/bin/gyb"
32 mv *.py "$out/${python3.sitePackages}/"
33
34 runHook postInstall
35 '';
36
37 checkPhase = ''
38 $out/bin/gyb --help > /dev/null
39 '';
40
41 meta = with lib; {
42 description = ''
43 Got Your Back (GYB) is a command line tool for backing up your Gmail
44 messages to your computer using Gmail's API over HTTPS.
45 '';
46 homepage = "https://github.com/GAM-team/got-your-back";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ austinbutler ];
49 };
50}