1 #!/usr/bin/env nix-shell
2 #!nix-shell -i python3 -p nix-prefetch-github python3Packages.requests
4 from nix_prefetch_github
import *
9 REPOS
= [ "libime", "xcb-imdkit", "fcitx5", "fcitx5-gtk", "fcitx5-qt", "fcitx5-configtool", "fcitx5-lua",
10 "fcitx5-rime", "fcitx5-chinese-addons", "fcitx5-table-extra", "fcitx5-table-other" ]
14 def get_latest_tag(repo
, owner
=OWNER
):
15 r
= requests
.get( 'https://api.github.com/repos/{}/{}/tags'.format(owner
,repo
)
16 , auth
=('poscat', 'db5e6fd16d0eb8c36385d3d944e058a1178b4265'))
17 return r
.json()[0].get("name")
22 rev
= get_latest_tag(repo
)
23 if repo
== "fcitx5-qt":
24 subprocess
.run(["nix-update", "--commit", "--version", rev
, "libsForQt5.{}".format(repo
)])
26 subprocess
.run(["nix-update", "--commit", "--version", rev
, repo
])
28 if __name__
== "__main__":