mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-29 06:45:54 +03:00
Merge pull request #109426 from poscat0x04/fcitx-update-script
This commit is contained in:
commit
a252b7e7a5
@ -26,13 +26,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libime";
|
||||
version = "1.0.2";
|
||||
version = "1.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "libime";
|
||||
rev = version;
|
||||
sha256 = "hDfxuDIj9qx5d+UFwxDdP2PCboPnUV1n+VVoEIGsucM=";
|
||||
sha256 = "sha256-Ykj4/3yKUqK0BRqW1E2zFYNgeUOXQ1DsotmKU6c8vEg=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xcb-imdkit";
|
||||
version = "1.0.1";
|
||||
version = "1.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "xcb-imdkit";
|
||||
rev = version;
|
||||
sha256 = "dvax+Wj8+tHdiL6txcuugrOlRnxdIW25DYO4iNAYK8M=";
|
||||
sha256 = "sha256-ISaVsMtDsyfhbhsAwDSWkQ7ZcpNtvC7M9NFQsWA5ju8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -41,13 +41,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5";
|
||||
version = "5.0.3";
|
||||
version = "5.0.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5";
|
||||
rev = version;
|
||||
sha256 = "QYMH0WbhHqDKUvpj1VOB8U5sbBD89H6moLFkQBJijZA=";
|
||||
sha256 = "sha256-2KGdR1m70Qatidzf/DZuFK3lc1t8z7sxjyhaxuc0Tqg=";
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
@ -90,6 +90,8 @@ stdenv.mkDerivation rec {
|
||||
libxkbfile
|
||||
];
|
||||
|
||||
passthru.updateScript = ./update.py;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Next generation of fcitx";
|
||||
homepage = "https://github.com/fcitx/fcitx5";
|
||||
|
@ -31,13 +31,13 @@ in
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fcitx5-chinese-addons";
|
||||
version = "5.0.2";
|
||||
version = "5.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-chinese-addons";
|
||||
rev = version;
|
||||
sha256 = "11UIMrwzZqO8nrQx5oubeoQN8hspL1mvHw5Dc9sVOqQ=";
|
||||
sha256 = "sha256-kCihpRUtUXrqqf7FPQp8ZRexiygOuDVOdQwVx7tSn+c=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -6,6 +6,7 @@
|
||||
, fcitx5
|
||||
, fcitx5-qt
|
||||
, qtx11extras
|
||||
, qtquickcontrols2
|
||||
, kwidgetsaddons
|
||||
, kdeclarative
|
||||
, kirigami2
|
||||
@ -18,13 +19,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fcitx5-configtool";
|
||||
version = "5.0.1";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-configtool";
|
||||
rev = version;
|
||||
sha256 = "npSqd0R6bqKc+JxYCGcfVzgNLpuLtnHq6zM58smZ8/I=";
|
||||
sha256 = "sha256-kw0KIbS5SVMf6kR/9xsYiChHXQBM0enSVXyh0QfiiPY=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
@ -40,6 +41,7 @@ mkDerivation rec {
|
||||
fcitx5
|
||||
fcitx5-qt
|
||||
qtx11extras
|
||||
qtquickcontrols2
|
||||
kirigami2
|
||||
isocodes
|
||||
xkeyboardconfig
|
||||
|
@ -24,18 +24,20 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-gtk";
|
||||
version = "5.0.1";
|
||||
version = "5.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-gtk";
|
||||
rev = version;
|
||||
sha256 = "rkusIqMRQMTjcpJR335as1xUQrzD9dLVB/wrLstPXPY=";
|
||||
sha256 = "sha256-+BzXbZyzC3fvLqysufblk0zK9fAg5jslVdm/v3jz4B4=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DGOBJECT_INTROSPECTION_GIRDIR=share/gir-1.0"
|
||||
"-DGOBJECT_INTROSPECTION_TYPELIBDIR=lib/girepository-1.0"
|
||||
# disabled since we currently don't have gtk4 in nixpkgs
|
||||
"-DENABLE_GTK4_IM_MODULE=off"
|
||||
] ++ lib.optional (! withGTK2) "-DENABLE_GTK2_IM_MODULE=off";
|
||||
|
||||
buildInputs = [
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-lua";
|
||||
version = "5.0.1";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-lua";
|
||||
rev = "${version}";
|
||||
sha256 = "OiTk9ldqBqF7WT1KY71hacLD6OQQNO05F7+cSXlli40=";
|
||||
rev = version;
|
||||
sha256 = "sha256-lFlHn2q/kpq1EIKKhYVdJofXqtOHnpLz7PoWuNAhmhE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -12,13 +12,13 @@
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "fcitx5-qt";
|
||||
version = "5.0.1";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-qt";
|
||||
rev = version;
|
||||
sha256 = "BVOumk2xj3vmwmm4KwiktQhWyTuUA2OFwYXNR6HgwyM=";
|
||||
sha256 = "sha256-QylvjhjiIujYGKFtL4bKVXpobkN5t6Q2MGf16dsL24A=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
|
@ -12,13 +12,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-rime";
|
||||
version = "5.0.2";
|
||||
version = "5.0.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-rime";
|
||||
rev = version;
|
||||
sha256 = "cVCTsD1Iw6OtyYFpxff3ix2CubRTnDaBevAYA4I9Ai8=";
|
||||
sha256 = "sha256-mPNZ/B5bpxua+E1T+oz9v2QKAzGraA2cfT8oJacC35U=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-table-extra";
|
||||
version = "5.0.1";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-table-extra";
|
||||
rev = version;
|
||||
sha256 = "UHhiWm2Khh6JBB9jz0ZKFofkAJPlqn6SqHeK9etoaxs=";
|
||||
sha256 = "sha256-Bqxdi/rjiTKqHLvVFVcQMjz/I0xxTiBgUIRkZjLuK+M=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fcitx5-table-other";
|
||||
version = "5.0.1";
|
||||
version = "5.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "fcitx5-table-other";
|
||||
rev = version;
|
||||
sha256 = "hQlrjDPImDof2+3/uOtTdJ27cInevbxH9B+lNwquKbs=";
|
||||
sha256 = "sha256-P+KaUmjAHe1CZ5rNMQAxwKSW5ZMVgQcwkgdlungXTLM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
29
pkgs/tools/inputmethods/fcitx5/update.py
Executable file
29
pkgs/tools/inputmethods/fcitx5/update.py
Executable file
@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i python3 -p nix-prefetch-github python3Packages.requests
|
||||
|
||||
from nix_prefetch_github import *
|
||||
import json
|
||||
import requests
|
||||
import subprocess
|
||||
|
||||
REPOS = [ "libime", "xcb-imdkit", "fcitx5", "fcitx5-gtk", "fcitx5-qt", "fcitx5-configtool", "fcitx5-lua",
|
||||
"fcitx5-rime", "fcitx5-chinese-addons", "fcitx5-table-extra", "fcitx5-table-other" ]
|
||||
|
||||
OWNER = "fcitx"
|
||||
|
||||
def get_latest_tag(repo, owner=OWNER):
|
||||
r = requests.get( 'https://api.github.com/repos/{}/{}/tags'.format(owner,repo)
|
||||
, auth=('poscat', 'db5e6fd16d0eb8c36385d3d944e058a1178b4265'))
|
||||
return r.json()[0].get("name")
|
||||
|
||||
def main():
|
||||
sources = dict()
|
||||
for repo in REPOS:
|
||||
rev = get_latest_tag(repo)
|
||||
if repo == "fcitx5-qt":
|
||||
subprocess.run(["nix-update", "--commit", "--version", rev, "libsForQt5.{}".format(repo)])
|
||||
else:
|
||||
subprocess.run(["nix-update", "--commit", "--version", rev, repo])
|
||||
|
||||
if __name__ == "__main__":
|
||||
main ()
|
Loading…
Reference in New Issue
Block a user