-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpkgs.nix
138 lines (106 loc) · 3.54 KB
/
pkgs.nix
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{ lib, makeWrapper, python3, fetchFromGitHub, ... }:
let
withPlugins = pluginsFunc:
let plugins = pluginsFunc availablePlugins;
in python3.pkgs.buildPythonPackage {
name = "${taxi.name}-with-plugins";
inherit (taxi) version meta;
format = "other";
nativeBuildInputs = [ makeWrapper ];
propagatedBuildInputs = plugins ++ taxi.propagatedBuildInputs;
installPhase = ''
makeWrapper ${taxi}/bin/taxi $out/bin/taxi \
--prefix PYTHONPATH : "${taxi}/${python3.sitePackages}:$PYTHONPATH"
'';
doCheck = false;
dontUnpack = true;
dontBuild = true;
passthru = taxi.passthru // {
withPlugins = morePlugins: withPlugins (morePlugins ++ plugins);
};
};
taxi = python3.pkgs.buildPythonPackage rec {
pname = "taxi";
version = "6.3.1";
# Using GitHub instead of PyPI because tests are not distributed on the PyPI releases
src = fetchFromGitHub {
owner = "sephii";
repo = pname;
rev = version;
hash = "sha256-QB88RpgzrQy7DGeRdMHC2SV5Esp/r5LZtlaY5C8vJxw=";
};
format = "pyproject";
propagatedBuildInputs =
[ python3.pkgs.click python3.pkgs.appdirs ];
nativeBuildInputs = [ python3.pkgs.flit-core ];
nativeCheckInputs = [ python3.pkgs.pytestCheckHook python3.pkgs.freezegun ];
passthru = { inherit withPlugins; };
meta = {
homepage = "https://github.com/sephii/taxi";
description = "Timesheeting made easy";
license = lib.licenses.wtfpl;
};
};
taxiZebra = python3.pkgs.buildPythonPackage rec {
pname = "taxi_zebra";
version = "4.0.0";
src = fetchFromGitHub {
owner = "liip";
repo = "taxi-zebra";
rev = version;
sha256 = "sha256-syEGpv8CZOD+TLQskylTnwqCKJRPVVImRfyEwP+9Nuc=";
};
buildInputs = [ taxi ];
propagatedBuildInputs = [ python3.pkgs.requests python3.pkgs.click ];
meta = {
homepage = "https://github.com/liip/taxi-zebra";
description = "Zebra backend for the Taxi timesheeting application";
license = lib.licenses.wtfpl;
};
};
taxiClockify = python3.pkgs.buildPythonPackage rec {
pname = "taxi_clockify";
version = "1.5.0";
src = python3.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-ujdacSOw7R0fNAk8ekiERNf90vg1Sk3ti8gbx4YqZFU=";
};
format = "pyproject";
buildInputs = [ taxi ];
nativeBuildInputs = [ python3.pkgs.flit-core ];
propagatedBuildInputs = [ python3.pkgs.requests python3.pkgs.arrow ];
meta = {
homepage = "https://github.com/sephii/taxi-clockify";
description = "Clockify backend for the Taxi timesheeting application";
license = lib.licenses.wtfpl;
};
};
taxiPetzi = python3.pkgs.buildPythonPackage rec {
pname = "taxi_petzi";
version = "1.1.0";
src = python3.pkgs.fetchPypi {
inherit pname version;
hash = "sha256-m76pDp6/noJ05MgNJf+yFxD+TAqoFnTwhFTHSclcLxo=";
};
format = "pyproject";
buildInputs = [ taxi ];
nativeBuildInputs = [ python3.pkgs.flit-core ];
nativeCheckInputs = [ python3.pkgs.pytestCheckHook ];
propagatedBuildInputs = [
python3.pkgs.google-auth-oauthlib
python3.pkgs.google-auth-httplib2
python3.pkgs.google_api_python_client
];
meta = {
homepage = "https://github.com/sephii/taxi-petzi";
description = "Petzi backend for the Taxi timesheeting application";
license = lib.licenses.wtfpl;
};
};
availablePlugins = {
zebra = taxiZebra;
petzi = taxiPetzi;
clockify = taxiClockify;
};
in
taxi