1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 fetchpatch,
6 setuptools,
7 stups-tokens,
8 stups-cli-support,
9 pytestCheckHook,
10 isPy3k,
11}:
12
13buildPythonPackage rec {
14 pname = "stups-zign";
15 version = "1.2";
16 pyproject = true;
17 disabled = !isPy3k;
18
19 src = fetchFromGitHub {
20 owner = "zalando-stups";
21 repo = "zign";
22 rev = version;
23 sha256 = "1vk6pnprnd5lfx96hc2c1n7kwh99f260r730x4y2h7lamlv82fh4";
24 };
25
26 patches = [
27 # pytest 5 is currently unsupported. Fetch and apply a pr that resolves this.
28 (fetchpatch {
29 url = "https://github.com/zalando-stups/zign/commit/50140720211e547b0e59f7ddb39a732f0cc73ad7.patch";
30 sha256 = "1zmyvg1z1asaqqsmxvsx0srvxd6gkgavppvg3dblxwhkml01awqk";
31 })
32 ];
33
34 build-system = [ setuptools ];
35
36 dependencies = [
37 stups-tokens
38 stups-cli-support
39 ];
40
41 preCheck = "
42 export HOME=$TEMPDIR
43 ";
44
45 nativeCheckInputs = [ pytestCheckHook ];
46
47 meta = with lib; {
48 description = "OAuth2 token management command line utility";
49 homepage = "https://github.com/zalando-stups/zign";
50 license = licenses.asl20;
51 maintainers = [ maintainers.mschuwalow ];
52 };
53}