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