python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / inputmethods / fcitx5 / update.py
blob205705700404c4754569412d0d87125494e26854
1 #!/usr/bin/env nix-shell
2 #!nix-shell -i python3 -p nix-update nix-prefetch-github python3Packages.requests
4 from nix_prefetch_github import *
5 import json
6 import requests
7 import subprocess
9 REPOS = [
10 "libime",
11 "xcb-imdkit",
13 "fcitx5",
14 "fcitx5-chewing",
15 "fcitx5-chinese-addons",
16 "fcitx5-configtool",
17 "fcitx5-gtk",
18 "fcitx5-hangul",
19 "fcitx5-lua",
20 "fcitx5-m17n",
21 "fcitx5-qt",
22 "fcitx5-rime",
23 "fcitx5-table-extra",
24 "fcitx5-table-other",
25 "fcitx5-unikey"
28 OWNER = "fcitx"
30 def get_latest_tag(repo, owner=OWNER):
31 r = requests.get('https://api.github.com/repos/{}/{}/tags'.format(owner,repo))
32 return r.json()[0].get("name")
34 def main():
35 sources = dict()
36 for repo in REPOS:
37 rev = get_latest_tag(repo)
38 if repo == "fcitx5-qt":
39 subprocess.run(["nix-update", "--commit", "--version", rev, "libsForQt5.{}".format(repo)])
40 else:
41 subprocess.run(["nix-update", "--commit", "--version", rev, repo])
43 if __name__ == "__main__":
44 main ()