2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pyopenssl
|
|
|
|
, twisted
|
|
|
|
, service-identity
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "txgithub";
|
|
|
|
version = "15.0.0";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "16gbizy8vkxasxylwzj4p66yw8979nvzxdj6csidgmng7gi2k8nx";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ pyopenssl twisted service-identity ];
|
|
|
|
|
|
|
|
# fix python3 issues
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 's/except usage.UsageError, errortext/except usage.UsageError as errortext/' txgithub/scripts/create_token.py
|
|
|
|
sed -i 's/except usage.UsageError, errortext/except usage.UsageError as errortext/' txgithub/scripts/gist.py
|
|
|
|
sed -i 's/print response\[\x27html_url\x27\]/print(response\[\x27html_url\x27\])/' txgithub/scripts/gist.py
|
|
|
|
sed -i '41d' txgithub/scripts/gist.py
|
|
|
|
sed -i '41d' txgithub/scripts/gist.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# No tests distributed
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "GitHub API client implemented using Twisted.";
|
|
|
|
homepage = "https://github.com/tomprince/txgithub";
|
|
|
|
license = licenses.mit;
|
2021-05-20 23:08:51 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|