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 *
15 "fcitx5-chinese-addons",
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")
37 rev
= get_latest_tag(repo
)
38 if repo
== "fcitx5-qt":
39 subprocess
.run(["nix-update", "--commit", "--version", rev
, "libsForQt5.{}".format(repo
)])
41 subprocess
.run(["nix-update", "--commit", "--version", rev
, repo
])
43 if __name__
== "__main__":