uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead

https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948
this can do it nicely.

Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
Anton Arapov 2021-04-03 12:58:10 +02:00 committed by Alan Daniels
commit 56de2bcd43
30691 changed files with 3076956 additions and 0 deletions

View file

@ -0,0 +1,19 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
pname = "anthy";
version = "9100h";
meta = with lib; {
description = "Hiragana text to Kana Kanji mixed text Japanese input method";
homepage = "https://anthy.osdn.jp/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ericsagnes ];
platforms = platforms.unix;
};
src = fetchurl {
url = "mirror://osdn/anthy/37536/anthy-${version}.tar.gz";
sha256 = "0ism4zibcsa5nl77wwi12vdsfjys3waxcphn1p5s7d0qy1sz0mnj";
};
}

View file

@ -0,0 +1,61 @@
{ lib, stdenv, fetchurl, autoPatchelfHook }:
let
srcs = {
x86_64-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-x64"
"https://archive.org/download/videomap/dms-ubuntu-x64"
];
sha256 = "1x7pp6k27lr206a8j2pn0wf4wjb0zi28s0g1g3rb08jmr8fh1jnh";
};
i686-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-x32"
"https://archive.org/download/videomap/dms-ubuntu-x32"
];
sha256 = "1d62d7jz50wzk5rqqm3xab66jdzi9i1j6mwxf7r7nsgm6j5zz8r4";
};
aarch64-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-arm64"
"https://archive.org/download/videomap/dms-ubuntu-arm64"
];
sha256 = "1l1x7iqbxn6zsh3d37yb5x15qsxlwy3cz8g2g8vnzkgaafw9vva0";
};
armv7l-linux = fetchurl {
urls = [
"https://videomap.it/script/dms-ubuntu-arm"
"https://archive.org/download/videomap/dms-ubuntu-arm"
];
sha256 = "1i7q9mylzvbsfydv4xf83nyqkh0nh01612jrqm93q1w6d0k2zvcd";
};
};
in
stdenv.mkDerivation rec {
pname = "droidmote";
version = "3.0.6";
src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
dontUnpack = true;
dontBuild = true;
nativeBuildInputs = [ autoPatchelfHook ];
installPhase = ''
runHook preInstall
install -m755 -D $src $out/bin/droidmote
runHook postInstall
'';
meta = with lib; {
description = "Control your computer from your couch";
homepage = "https://www.videomap.it/";
license = licenses.unfree;
maintainers = with maintainers; [ atila ];
platforms = lib.attrNames srcs;
};
}

View file

@ -0,0 +1,60 @@
{ lib, fetchFromGitHub, python3Packages, wrapGAppsHook, gobject-introspection, gtk3, keybinder3, xdotool, pango, gdk-pixbuf, atk, librsvg }:
python3Packages.buildPythonApplication rec {
pname = "emote";
version = "3.0.3";
src = fetchFromGitHub {
owner = "tom-james-watson";
repo = "Emote";
rev = "v${version}";
sha256 = "mqCSl+EGbnL9AfzZT3aa/Y5Rsx433ZmI31BmK3wkaJk=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "pygobject==3.36.0" "pygobject" \
--replace "manimpango==0.3.0" "manimpango"
substituteInPlace emote/config.py --replace 'os.environ.get("SNAP")' "'$out/share/emote'"
substituteInPlace emote/picker.py --replace 'os.environ.get("SNAP_VERSION", "dev build")' "'$version'"
substituteInPlace snap/gui/emote.desktop --replace "Icon=\''${SNAP}/usr/share/icons/emote.svg" "Icon=emote.svg"
'';
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
keybinder3
pango
gdk-pixbuf
atk
];
propagatedBuildInputs = [
python3Packages.manimpango
python3Packages.pygobject3
gtk3
xdotool
librsvg
];
postInstall = ''
install -D snap/gui/emote.desktop $out/share/applications/emote.desktop
install -D snap/gui/emote.svg $out/share/pixmaps/emote.svg
install -D -t $out/share/emote/static static/{NotoColorEmoji.ttf,emojis.csv,logo.svg,style.css}
'';
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
doCheck = false;
meta = with lib; {
description = "A modern emoji picker for Linux";
homepage = "https://github.com/tom-james-watson/emote";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ emilytrau ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,33 @@
{ lib, fetchFromGitHub, python3Packages }:
python3Packages.buildPythonPackage rec {
pname = "evdevremapkeys";
version = "0.1.0";
src = fetchFromGitHub {
owner = "philipl";
repo = pname;
rev = "68fb618b8142e1b45d7a1e19ea9a5a9bbb206144";
sha256 = "0c9slflakm5jqd8s1zpxm7gmrrk0335m040d7m70hnsak42jvs2f";
};
propagatedBuildInputs = with python3Packages; [
pyyaml
pyxdg
python-daemon
evdev
];
# hase no tests
doCheck = false;
pythonImportsCheck = [ "evdevremapkeys" ];
meta = with lib; {
homepage = "https://github.com/philipl/evdevremapkeys";
description = "Daemon to remap events on linux input devices";
license = licenses.mit;
maintainers = [ maintainers.q3k ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,23 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "evscript";
version = "unstable-2021-06-16";
src = fetchFromGitHub {
owner = "unrelentingtech";
repo = pname;
rev = "25912c0b6446f31b0f64485af3fa4aa8a93b33df";
sha256 = "sha256-apq3kHipEX6zOTNwqpIQR46JqmeE7EKVSOGrNNSkyu8=";
};
cargoSha256 = "sha256-1aR9/fhJQ+keRIxSG2cpY1HTalE6nM+MTb1Za3Tot28=";
meta = with lib; {
homepage = "https://github.com/unrelentingtech/evscript";
description = "A tiny sandboxed Dyon scripting environment for evdev input devices";
license = licenses.unlicense;
maintainers = with maintainers; [ milesbreslin ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,28 @@
{ lib, stdenv, fetchurl, cmake, fcitx, anthy, gettext, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-anthy";
version = "0.2.4";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-anthy/${pname}-${version}.tar.xz";
sha256 = "sha256-Hxhs2RXuFf/bhczcQ3+Zj+gI3+Z4BEfIzMIfUOUNX7M=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx anthy gettext ];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
description = "Fcitx Wrapper for anthy";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, libchewing, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-chewing";
version = "0.2.3";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-chewing/${pname}-${version}.tar.xz";
sha256 = "1w5smp5zvjx681cp1znjypyr9sw5x6v0wnsk8a7ncwxi9q9wf4xk";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx gettext libchewing ];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace data/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-chewing";
downloadPage = "http://download.fcitx-im.org/fcitx-chewing/";
description = "Fcitx engine for chewing";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,29 @@
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, curl }:
stdenv.mkDerivation rec {
pname = "fcitx-cloudpinyin";
version = "0.3.7";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-cloudpinyin/${pname}-${version}.tar.xz";
sha256 = "0ai347wv3qdjzcbh0j9hdjpzwvh2kk57324xbxq37nzagrdgg5x0";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx gettext curl ];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace po/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
description = "A standalone module for fcitx that uses web API to provide better pinyin result";
homepage = "https://github.com/fcitx/fcitx-cloudpinyin";
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,31 @@
{ lib, stdenv, fetchurl, cmake, fcitx, libhangul, gettext, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-hangul";
version = "0.3.1";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-hangul/${pname}-${version}.tar.xz";
sha256 = "0ds4071ljq620w7vnprm2jl8zqqkw7qsxvzbjapqak4jarczvmbd";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx libhangul gettext ];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace data/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-hangul";
downloadPage = "http://download.fcitx-im.org/fcitx-hangul/";
description = "Fcitx Wrapper for hangul";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,16 @@
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -9,12 +9,7 @@ char* FcitxLibPinyinGetSysPath(LIBPINYIN_LANGUAGE_TYPE type)
#ifdef LIBPINYIN_TOOLS_FOUND
if (type == LPLT_Simplified) {
#endif
- /* portable detect here */
- if (getenv("FCITXDIR")) {
- syspath = fcitx_utils_get_fcitx_path_with_filename("datadir", "libpinyin/data");
- } else {
- syspath = strdup(LIBPINYIN_PKGDATADIR "/data");
- }
+ syspath = strdup(LIBPINYIN_PKGDATADIR "/data");
#ifdef LIBPINYIN_TOOLS_FOUND
}
else {

View file

@ -0,0 +1,55 @@
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, gettext, libpinyin, glib, pcre, dbus, qtwebengine, qtbase, fcitx-qt5 }:
stdenv.mkDerivation rec {
pname = "fcitx-libpinyin";
version = "0.5.4";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-libpinyin/${pname}-${version}.tar.xz";
sha256 = "1wvsc21imbgq3chlxfw4aycmkb2vi1bkjj9frvhga2m5b5pq82k5";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx-qt5 qtbase qtwebengine.dev fcitx gettext libpinyin glib pcre dbus ];
# With a typical installation via NixOS option i18n.inputMethod.fcitx.engines,
# the FCITXDIR environment variable is set to $out of fcitx-with-plugins,
# which leads to an incorrect path for pinyin data.
#
# It is impossible or difficult to fix this issue without patching. We want
# FCITXDIR to point into libpinyin, which is currently not symlinked within
# fcitx-with-plugins (only fcitx-libpinyin is symlinked). Also, FCITXDIR
# doesn't accept multiple directories.
patches = [ ./datapath.patch ];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace data/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace dictmanager/cmake_install.cmake \
--replace ${fcitx} $out
'';
preBuild = let
ZHUYIN_DATA_FILE_NAME = "model.text.20161206.tar.gz";
store_path = fetchurl {
url = "https://download.fcitx-im.org/data/${ZHUYIN_DATA_FILE_NAME}";
sha256 = "017p11si1b7bkwx36xaybq5a9icq1pd7x1jbymqw92akfgjj8w2w";
};
in
''
cp -rv ${store_path} $NIX_BUILD_TOP/$name/data/${ZHUYIN_DATA_FILE_NAME}
'';
dontWrapQtApps = true;
meta = with lib; {
isFcitxEngine = true;
description = "Fcitx Wrapper for libpinyin, Library to deal with pinyin";
homepage = "https://github.com/fcitx/fcitx-libpinyin";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ericsagnes ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, m17n_lib, m17n_db, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-m17n";
version = "0.2.4";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-m17n/${pname}-${version}.tar.xz";
sha256 = "15s52h979xz967f8lm0r0qkplig2w3wjck1ymndbg9kvj25ib0ng";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx gettext m17n_lib m17n_db ];
preInstall = ''
substituteInPlace im/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-m17n";
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
description = "Fcitx wrapper for m17n";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,113 @@
{ lib, clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, gyp, which, ninja,
python, pkg-config, protobuf, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese,
fcitx, gettext }:
let
japanese_usage_dictionary = fetchFromGitHub {
owner = "hiroyuki-komatsu";
repo = "japanese-usage-dictionary";
rev = "e5b3425575734c323e1d947009dd74709437b684";
sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
};
icons = fetchurl {
url = "http://download.fcitx-im.org/fcitx-mozc/fcitx-mozc-icon.tar.gz";
sha256 = "10bdjn481jsh32vll7r756l392anz44h6207vjqwby3rplk31np1";
};
in clangStdenv.mkDerivation rec {
pname = "fcitx-mozc";
version = "2.23.2815.102";
src = fetchFromGitHub {
owner = "google";
repo = "mozc";
rev = "afb03ddfe72dde4cf2409863a3bfea160f7a66d8";
sha256 = "0w2dy2j9x5nc7x3g95j17r3m60vbfyn5j617h7js9xryv33yzpgx";
};
nativeBuildInputs = [ gyp which ninja python pkg-config qt5.wrapQtAppsHook ];
buildInputs = [ protobuf gtk2 zinnia qt5.qtbase libxcb fcitx gettext ];
postUnpack = ''
rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/
ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary
tar -xzf ${icons} -C $sourceRoot/src
'';
patch_version = "${version}.1";
patches = [
(fetchpatch rec {
name = "fcitx-mozc-${patch_version}.patch";
url = "https://download.fcitx-im.org/fcitx-mozc/${name}";
sha256 = "0a8q3vzcbai1ccdrl6qdb81gvbw8aby4lqkl6qs9hg68p6zg42hg";
})
# https://github.com/google/mozc/pull/444 - fix for gcc8 STL
(fetchpatch {
url = "https://github.com/google/mozc/commit/82d38f929882a9c62289b179c6fe41efed249987.patch";
sha256 = "07cja1b7qfsd3i76nscf1zwiav74h7d6h2g9g2w4bs3h1mc9jwla";
})
# Support dates after 2019
(fetchpatch {
url = "https://salsa.debian.org/debian/mozc/-/raw/master/debian/patches/add_support_new_japanese_era.patch";
sha256 = "1dsiiglrmm8i8shn2hv0j2b8pv6miysjrimj4569h606j4lwmcw2";
})
];
postPatch = ''
substituteInPlace src/unix/fcitx/mozc.conf \
--replace "/usr/share/fcitx/mozc/icon/mozc.png" "mozc"
'';
configurePhase = ''
export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 use_fcitx5=0 zinnia_model_file=${tegaki-zinnia-japanese}/share/tegaki/models/zinnia/handwriting-ja.model"
cd src && python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc
'';
buildPhase = ''
PYTHONPATH="$PWD:$PYTHONPATH" python build_mozc.py build -c Release \
server/server.gyp:mozc_server \
gui/gui.gyp:mozc_tool \
unix/fcitx/fcitx.gyp:fcitx-mozc
'';
installPhase = ''
install -d $out/share/licenses/fcitx-mozc
head -n 29 server/mozc_server.cc > $out/share/licenses/fcitx-mozc/LICENSE
install -m 644 data/installer/*.html $out/share/licenses/fcitx-mozc/
install -d $out/share/doc/mozc
install -m 644 data/installer/*.html $out/share/doc/mozc/
install -D -m 755 out_linux/Release/mozc_server $out/lib/mozc/mozc_server
install -m 755 out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool
wrapQtApp $out/lib/mozc/mozc_tool
install -D -m 755 out_linux/Release/fcitx-mozc.so $out/lib/fcitx/fcitx-mozc.so
install -D -m 644 unix/fcitx/fcitx-mozc.conf $out/share/fcitx/addon/fcitx-mozc.conf
install -D -m 644 unix/fcitx/mozc.conf $out/share/fcitx/inputmethod/mozc.conf
install -d $out/share/doc/mozc
for mofile in out_linux/Release/gen/unix/fcitx/po/*.mo
do
filename=`basename $mofile`
lang=$filename.mo
install -D -m 644 "$mofile" "$out/share/locale/$lang/LC_MESSAGES/fcitx-mozc.mo"
done
install -d $out/share/fcitx/imicon
install -m 644 fcitx-mozc-icons/mozc.png $out/share/fcitx/imicon/mozc.png
install -d $out/share/fcitx/mozc/icon
install -m 644 fcitx-mozc-icons/*.png $out/share/fcitx/mozc/icon/
'';
meta = with lib; {
isFcitxEngine = true;
description = "Fcitx engine for Google japanese input method";
homepage = "https://github.com/google/mozc";
downloadPage = "http://download.fcitx-im.org/fcitx-mozc/";
license = licenses.free;
platforms = platforms.linux;
maintainers = with maintainers; [ gebner ericsagnes ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl, cmake, pkg-config, fcitx, librime, brise, hicolor-icon-theme }:
stdenv.mkDerivation rec {
pname = "fcitx-rime";
version = "0.3.2";
src = fetchurl {
url = "https://download.fcitx-im.org/fcitx-rime/${pname}-${version}.tar.xz";
sha256 = "0bd8snfa6jr8dhnm0s0z021iryh5pbaf7p15rhkgbigw2pssczpr";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx librime brise hicolor-icon-theme ];
# cmake cannont automatically find our nonstandard brise install location
cmakeFlags = [ "-DRIME_DATA_DIR=${brise}/share/rime-data" ];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace data/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-rime";
downloadPage = "https://download.fcitx-im.org/fcitx-rime/";
description = "Rime support for Fcitx";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ sifmelcara ];
};
}

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, fcitx, libskk, skk-dicts }:
stdenv.mkDerivation {
pname = "fcitx-skk";
version = "0.1.4";
src = fetchFromGitHub {
owner = "fcitx";
repo = "fcitx-skk";
rev = "f66d0f56a40ff833edbfa68a4be4eaa2e93d0e3d";
sha256 = "1yl2syqrk212h26vzzkwl19fyp71inqmsli9411h4n2hbcp6m916";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx libskk skk-dicts ];
cmakeFlags = [ "-DSKK_DEFAULT_PATH=${skk-dicts}/share/SKK-JISYO.combined"
"-DENABLE_QT=FALSE"
];
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace po/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace data/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
description = "A SKK style input method engine for fcitx";
longDescription = ''
Fcitx-skk is an input method engine for fcitx. It is based on libskk and thus
provides basic features of SKK Japanese input method such as kana-to-kanji conversion,
new word registration, completion, numeric conversion, abbrev mode, kuten input,
hankaku-katakana input, and re-conversion.
'';
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ yuriaisaka ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, cmake, fcitx, gettext }:
stdenv.mkDerivation rec {
pname = "fcitx-table-extra";
version = "0.3.8";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-table-extra/${pname}-${version}.tar.xz";
sha256 = "c91bb19c1a7b53c5339bf2f75ae83839020d337990f237a8b9bc0f4416c120ef";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ fcitx gettext ];
preInstall = ''
substituteInPlace tables/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-table-extra";
downloadPage = "http://download.fcitx-im.org/fcitx-table-extra/";
description = "Provides extra table for Fcitx, including Boshiamy, Zhengma, Cangjie, and Quick";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ linc01n ];
};
}

View file

@ -0,0 +1,30 @@
{ lib, stdenv, fetchurl, cmake, fcitx, gettext }:
stdenv.mkDerivation rec {
pname = "fcitx-table-other";
version = "0.2.4";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-table-other/${pname}-${version}.tar.xz";
sha256 = "1di60lr6l5k2sdwi3yrc0hl89j2k0yipayrsn803vd040w1fgfhq";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ fcitx gettext ];
preInstall = ''
substituteInPlace tables/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-table-other";
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
description = "Provides some other tables for Fcitx";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl, cmake, fcitx, gettext, pkg-config }:
stdenv.mkDerivation rec {
pname = "fcitx-unikey";
version = "0.2.5";
src = fetchurl {
url = "http://download.fcitx-im.org/fcitx-unikey/${pname}-${version}.tar.xz";
sha256 = "063vc29v7ycaai98v3z4q319sv9sm91my17pmhblw1vifxnw02wf";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ fcitx gettext ];
NIX_CFLAGS_COMPILE = "-Wno-narrowing";
preInstall = ''
substituteInPlace src/cmake_install.cmake \
--replace ${fcitx} $out
substituteInPlace data/cmake_install.cmake \
--replace ${fcitx} $out
'';
meta = with lib; {
isFcitxEngine = true;
homepage = "https://github.com/fcitx/fcitx-unikey";
downloadPage = "http://download.fcitx-im.org/fcitx-table-other/";
description = "Fcitx wrapper for unikey";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,11 @@
{ callPackage, plugins ? [] }:
let
unwrapped = callPackage ./unwrapped.nix { };
wrapped = callPackage ./wrapper.nix {
plugins = plugins;
fcitx = unwrapped;
};
in if plugins == []
then unwrapped
else wrapped

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl, makeWrapper, pkg-config, cmake, fcitx, gtk3, isocodes, gnome }:
stdenv.mkDerivation rec {
pname = "fcitx-configtool";
version = "0.4.10";
meta = with lib; {
description = "GTK-based config tool for Fcitx";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ cdepillabout ];
};
src = fetchurl {
url = "https://download.fcitx-im.org/fcitx-configtool/fcitx-configtool-${version}.tar.xz";
sha256 = "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w";
};
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
buildInputs = [ fcitx isocodes gtk3 gnome.adwaita-icon-theme ];
# Patch paths to `fcitx-remote`
prePatch = ''
for f in gtk{3,}/config_widget.c; do
substituteInPlace $f \
--replace 'EXEC_PREFIX "/bin/fcitx-remote"' '"${fcitx}/bin/fcitx-remote"'
done
'';
preFixup = ''
wrapProgram $out/bin/fcitx-config-gtk3 \
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS";
'';
}

View file

@ -0,0 +1,38 @@
{ lib, mkDerivation, fetchFromGitLab
, cmake
, extra-cmake-modules
, fcitx
, pkg-config
, qtbase
}:
mkDerivation rec {
pname = "fcitx-qt5";
version = "1.2.3";
src = fetchFromGitLab {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "0860v3rxsh054wkkbawvyin5mk0flp4cwfcpmcpq147lvdm5lq2i";
};
nativeBuildInputs = [ cmake extra-cmake-modules pkg-config ];
buildInputs = [ fcitx qtbase ];
preConfigure = ''
substituteInPlace platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QTPLUGINDIR}" $out/${qtbase.qtPluginPrefix}
substituteInPlace quickphrase-editor/CMakeLists.txt \
--replace \$"{FCITX4_ADDON_INSTALL_DIR}" $out/lib/fcitx
'';
meta = with lib; {
homepage = "https://gitlab.com/fcitx/fcitx-qt5";
description = "Qt5 IM Module for Fcitx";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,42 @@
diff --git a/cmake/FindEnchant.cmake b/cmake/FindEnchant.cmake
index 7c182e6a..5537595e 100644
--- a/cmake/FindEnchant.cmake
+++ b/cmake/FindEnchant.cmake
@@ -16,7 +16,7 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
endif(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
find_package(PkgConfig)
-pkg_check_modules(PC_ENCHANT enchant)
+pkg_check_modules(PC_ENCHANT enchant-2)
find_path(ENCHANT_INCLUDE_DIR
NAMES enchant.h
@@ -24,7 +24,7 @@ find_path(ENCHANT_INCLUDE_DIR
PATH_SUFFIXES "enchant")
find_library(ENCHANT_LIBRARIES
- NAMES enchant
+ NAMES enchant-2
HINTS ${PC_ENCHANT_LIBRARY_DIRS})
if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
@@ -39,7 +39,7 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
- #include <enchant/enchant.h>
+ #include <enchant-2/enchant.h>
EnchantBroker *enchant_broker_init();
char **enchant_dict_suggest(EnchantDict *dict, const char *str,
@@ -78,6 +78,10 @@ if(ENCHANT_INCLUDE_DIR AND ENCHANT_LIBRARIES)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_BACKUP}")
endif()
+if(ENCHANT_API_COMPATIBLE)
+ set(ENCHANT_LIBRARY_FILENAME ${ENCHANT_LIBRARIES})
+endif(ENCHANT_API_COMPATIBLE)
+
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Enchant DEFAULT_MSG ENCHANT_LIBRARIES
ENCHANT_INCLUDE_DIR ENCHANT_API_COMPATIBLE)

View file

@ -0,0 +1,105 @@
{ lib, stdenv, fetchurl, pkg-config, cmake, intltool, gettext
, libxml2, enchant2, isocodes, icu, libpthreadstubs
, pango, cairo, libxkbfile, libXau, libXdmcp, libxkbcommon
, dbus, gtk2, gtk3, qt4, extra-cmake-modules
, xkeyboard_config, pcre, libuuid, xorg, makeWrapper
, withPinyin ? true
, fetchFromGitLab
}:
let
# releases at http://download.fcitx-im.org/fcitx/${name}_dict.tar.xz
# contains all data but if we want to compile from source, we need to
# fetch them ourselves
# to update the urls and where to unpack these, look into the
# src/module/*/data/CMakeLists.txt files
# fcitx_download tgt_name url output)
dicts = let SPELL_EN_DICT_VER="20121020"; in fetchurl {
url = "http://download.fcitx-im.org/data/en_dict-${SPELL_EN_DICT_VER}.tar.gz";
sha256 = "1svcb97sq7nrywp5f2ws57cqvlic8j6p811d9ngflplj8xw5sjn4";
};
table = fetchurl {
url = "http://download.fcitx-im.org/data/table.tar.gz";
sha256 = "1dw7mgbaidv3vqy0sh8dbfv8631d2zwv5mlb7npf69a1f8y0b5k1";
};
pystroke-data = let PY_STROKE_VER="20121124"; in fetchurl {
url = "http://download.fcitx-im.org/data/py_stroke-${PY_STROKE_VER}.tar.gz";
sha256 = "0j72ckmza5d671n2zg0psg7z9iils4gyxz7jgkk54fd4pyljiccf";
};
pytable-data = let PY_TABLE_VER="20121124"; in fetchurl {
url = "http://download.fcitx-im.org/data/py_table-${PY_TABLE_VER}.tar.gz";
sha256 = "011cg7wssssm6hm564cwkrrnck2zj5rxi7p9z5akvhg6gp4nl522";
};
pinyin-data = fetchurl {
url = "http://download.fcitx-im.org/data/pinyin.tar.gz";
sha256 = "1qfq5dy4czvd1lvdnxzyaiir9x8b1m46jjny11y0i33m9ar2jf2q";
};
in
stdenv.mkDerivation rec {
pname = "fcitx";
version = "4.2.9.6";
src = fetchFromGitLab {
owner = "fcitx";
repo = "fcitx";
rev = version;
sha256 = "0j5vaf930lb21gx4h7z6mksh1fazqw32gajjjkyir94wbmml9n3s";
};
# put data at the correct locations else cmake tries to fetch them,
# which fails in sandboxed mode
prePatch = ''
cp ${dicts} src/module/spell/dict/$(stripHash ${dicts})
cp ${table} src/im/table/data/$(stripHash ${table})
''
+ lib.optionalString withPinyin ''
cp ${pystroke-data} src/module/pinyin-enhance/data/$(stripHash ${pystroke-data})
cp ${pytable-data} src/module/pinyin-enhance/data/$(stripHash ${pytable-data})
cp ${pinyin-data} src/im/pinyin/data/$(stripHash ${pinyin-data})
''
;
patches = [ ./find-enchant-lib.patch ];
postPatch = ''
substituteInPlace src/frontend/qt/CMakeLists.txt \
--replace $\{QT_PLUGINS_DIR} $out/lib/qt4/plugins
patchShebangs cmake/
'';
postInstall = ''
wrapProgram $out/bin/fcitx \
--prefix PATH : "${xorg.xmodmap}/bin"
'';
nativeBuildInputs = [ cmake extra-cmake-modules intltool pkg-config pcre makeWrapper ];
buildInputs = [
xkeyboard_config enchant2 gettext isocodes icu libpthreadstubs libXau libXdmcp libxkbfile
libxkbcommon libxml2 dbus cairo gtk2 gtk3 pango qt4 libuuid
];
cmakeFlags = [
"-DENABLE_QT_IM_MODULE=ON"
"-DENABLE_GTK2_IM_MODULE=ON"
"-DENABLE_GTK3_IM_MODULE=ON"
"-DENABLE_GIR=OFF"
"-DENABLE_OPENCC=OFF"
"-DENABLE_PRESAGE=OFF"
"-DENABLE_XDGAUTOSTART=OFF"
"-DENABLE_PINYIN=${if withPinyin then "ON" else "OFF"}"
"-DENABLE_TABLE=ON"
"-DENABLE_SPELL=ON"
"-DENABLE_QT_GUI=ON"
"-DXKB_RULES_XML_FILE='${xkeyboard_config}/share/X11/xkb/rules/evdev.xml'"
];
meta = with lib; {
homepage = "https://github.com/fcitx/fcitx";
description = "A Flexible Input Method Framework";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,14 @@
{ symlinkJoin, fcitx, fcitx-configtool, makeWrapper, plugins, libsForQt5 }:
symlinkJoin {
name = "fcitx-with-plugins-${fcitx.version}";
paths = [ fcitx fcitx-configtool libsForQt5.fcitx-qt5 ] ++ plugins;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/fcitx \
--set FCITXDIR "$out/"
'';
}

View file

@ -0,0 +1,104 @@
{ lib, stdenv
, fetchurl
, fetchFromGitHub
, pkg-config
, cmake
, extra-cmake-modules
, cairo
, cldr-annotations
, pango
, fribidi
, fmt
, wayland
, systemd
, wayland-protocols
, json_c
, isocodes
, xkeyboard_config
, enchant
, gdk-pixbuf
, libGL
, libevent
, libuuid
, libselinux
, libXdmcp
, libsepol
, libxkbcommon
, libthai
, libdatrie
, xcbutilkeysyms
, pcre
, xcbutilwm
, xcb-imdkit
, libxkbfile
}:
let
enDictVer = "20121020";
enDict = fetchurl {
url = "https://download.fcitx-im.org/data/en_dict-${enDictVer}.tar.gz";
sha256 = "1svcb97sq7nrywp5f2ws57cqvlic8j6p811d9ngflplj8xw5sjn4";
};
in
stdenv.mkDerivation rec {
pname = "fcitx5";
version = "5.0.16";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-aSuvYt9UjG6/uVpLRZueq+qFvMQHdIcnO3G/LIE+3pk=";
};
prePatch = ''
ln -s ${enDict} src/modules/spell/dict/$(stripHash ${enDict})
'';
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
];
buildInputs = [
fmt
isocodes
cairo
enchant
pango
libthai
libdatrie
fribidi
systemd
gdk-pixbuf
wayland
wayland-protocols
cldr-annotations
json_c
libGL
libevent
libuuid
libselinux
libsepol
libXdmcp
libxkbcommon
pcre
xcbutilwm
xcbutilkeysyms
xcb-imdkit
xkeyboard_config
libxkbfile
];
cmakeFlags = [ "-DCLDR_DIR=${cldr-annotations}/share/unicode/cldr" ];
passthru.updateScript = ./update.py;
meta = with lib; {
description = "Next generation of fcitx";
homepage = "https://github.com/fcitx/fcitx5";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,40 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, gettext
, fcitx5
, libchewing
}:
stdenv.mkDerivation rec {
pname = "fcitx5-chewing";
version = "5.0.11";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-w5ogK0jjvAEslXiCJvuhsS+z/Afy1KqDG7PzRQ+CMkY=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
gettext
];
buildInputs = [
fcitx5
libchewing
];
meta = with lib; {
description = "Chewing wrapper for Fcitx5";
homepage = "https://github.com/fcitx/fcitx5-chewing";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ xrelkd ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,76 @@
{ lib
, mkDerivation
, fetchurl
, fetchFromGitHub
, cmake
, extra-cmake-modules
, boost
, libime
, fcitx5
, fcitx5-qt
, fcitx5-lua
, qtwebengine
, opencc
, curl
, fmt
, luaSupport ? true
}:
let
pyStrokeVer = "20121124";
pyStroke = fetchurl {
url = "http://download.fcitx-im.org/data/py_stroke-${pyStrokeVer}.tar.gz";
sha256 = "0j72ckmza5d671n2zg0psg7z9iils4gyxz7jgkk54fd4pyljiccf";
};
pyTableVer = "20121124";
pyTable = fetchurl {
url = "http://download.fcitx-im.org/data/py_table-${pyTableVer}.tar.gz";
sha256 = "011cg7wssssm6hm564cwkrrnck2zj5rxi7p9z5akvhg6gp4nl522";
};
in
mkDerivation rec {
pname = "fcitx5-chinese-addons";
version = "5.0.12";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-0+jKBA1IaeqV6epnJBgGwnDdAUxdMH6RyOKGmsw0M/o=";
};
cmakeFlags = [
"-DUSE_WEBKIT=off"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
boost
fcitx5-lua
];
prePatch = ''
ln -s ${pyStroke} modules/pinyinhelper/$(stripHash ${pyStroke})
ln -s ${pyTable} modules/pinyinhelper/$(stripHash ${pyTable})
'';
buildInputs = [
fcitx5
fcitx5-qt
libime
curl
opencc
qtwebengine
fmt
] ++ lib.optional luaSupport fcitx5-lua;
meta = with lib; {
description = "Addons related to Chinese, including IME previous bundled inside fcitx4";
homepage = "https://github.com/fcitx/fcitx5-chinese-addons";
license = with licenses; [ gpl2Plus lgpl21Plus ];
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,62 @@
{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, fcitx5-qt
, qtx11extras
, qtquickcontrols2
, kwidgetsaddons
, kdeclarative
, kirigami2
, isocodes
, xkeyboardconfig
, libxkbfile
, libXdmcp
, kcmSupport ? true
}:
mkDerivation rec {
pname = "fcitx5-configtool";
version = "5.0.13";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-sh3hd4hpqKKHdE8n5jf2v09ch2xUCCmapkp5tkeylKA=";
};
cmakeFlags = [
"-DKDE_INSTALL_USE_QT_SYS_PATHS=ON"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = [
fcitx5
fcitx5-qt
qtx11extras
qtquickcontrols2
kirigami2
isocodes
xkeyboardconfig
libxkbfile
libXdmcp
] ++ lib.optionals kcmSupport [
kdeclarative
kwidgetsaddons
];
meta = with lib; {
description = "Configuration Tool for Fcitx5";
homepage = "https://github.com/fcitx/fcitx5-configtool";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,81 @@
{ lib, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, gobject-introspection
, glib
, gtk2
, gtk3
, gtk4
, fmt
, pcre
, libuuid
, libselinux
, libsepol
, libthai
, libdatrie
, libXdmcp
, libxkbcommon
, libepoxy
, dbus
, at-spi2-core
, libXtst
, withGTK2 ? false
}:
stdenv.mkDerivation rec {
pname = "fcitx5-gtk";
version = "5.0.14";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-sByITVBgOX3YYdJN6EzDYH0+N+FqZcoJlCp70SfkKpY=";
};
cmakeFlags = [
"-DGOBJECT_INTROSPECTION_GIRDIR=share/gir-1.0"
"-DGOBJECT_INTROSPECTION_TYPELIBDIR=lib/girepository-1.0"
] ++ lib.optional (! withGTK2) "-DENABLE_GTK2_IM_MODULE=off";
buildInputs = [
glib
gtk3
gtk4
fmt
gobject-introspection
fcitx5
pcre
libuuid
libselinux
libsepol
libthai
libdatrie
libXdmcp
libxkbcommon
libepoxy
dbus
at-spi2-core
libXtst
] ++ lib.optional withGTK2 gtk2;
NIX_CFLAGS_COMPILE = lib.concatMapStringsSep " " (s: "-isystem ${s}") [
"${glib.dev}/include/gio-unix-2.0"
"${glib.dev}/include/glib-2.0"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
];
meta = with lib; {
description = "Fcitx5 gtk im module and glib based dbus client library";
homepage = "https://github.com/fcitx/fcitx5-gtk";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,40 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, gettext
, fcitx5
, libhangul
}:
stdenv.mkDerivation rec {
pname = "fcitx5-hangul";
version = "5.0.9";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-jT9k5QXW3fdG6s91NjFZ3lrjADy8wxf2SRiVDSnr6So=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
gettext
];
buildInputs = [
fcitx5
libhangul
];
meta = with lib; {
description = "Hangul wrapper for Fcitx5";
homepage = "https://github.com/fcitx/fcitx5-hangul";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ xrelkd ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,40 @@
{ lib, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, lua5_3
, luaPackage ? lua5_3
, gettext
}:
stdenv.mkDerivation rec {
pname = "fcitx5-lua";
version = "5.0.8";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-VHGHKV5KLbfIMWLErLRNl8pOQOkYkc/f6VjZUSqluFk=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = [
fcitx5
luaPackage
gettext
];
meta = with lib; {
description = "Lua support for Fcitx 5";
homepage = "https://github.com/fcitx/fcitx5-lua";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,46 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, pkg-config
, fcitx5
, m17n_lib
, m17n_db
, gettext
, fmt
}:
stdenv.mkDerivation rec {
pname = "fcitx5-m17n";
version = "5.0.9";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-JySEzWyPZqVrvgRA4Hc0ZSGLdS29n8uoSQsFEMK6kbs=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
gettext
];
buildInputs = [
fcitx5
m17n_db
m17n_lib
fmt
];
meta = with lib; {
description = "m17n support for Fcitx5";
homepage = "https://github.com/fcitx/fcitx5-m17n";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ Technical27 ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,106 @@
{ lib, clangStdenv, fetchFromGitHub, fetchurl, fetchpatch, fetchgit
, python3Packages, ninja, pkg-config, protobuf, zinnia, qt5, fcitx5
, jsoncpp, gtest, which, gtk2, unzip, abseil-cpp, breakpad }:
let
inherit (python3Packages) python gyp six;
japanese_usage_dictionary = fetchFromGitHub {
owner = "hiroyuki-komatsu";
repo = "japanese-usage-dictionary";
rev = "e5b3425575734c323e1d947009dd74709437b684";
sha256 = "0pyrpz9c8nxccwpgyr36w314mi8h132cis8ijvlqmmhqxwsi30hm";
};
zipcode_rel = "202011";
jigyosyo = fetchurl {
url = "https://osdn.net/projects/ponsfoot-aur/storage/mozc/jigyosyo-${zipcode_rel}.zip";
sha256 = "j7MkNtd4+QTi91EreVig4/OV0o5y1+KIjEJBEmLK/mY=";
};
x-ken-all = fetchurl {
url =
"https://osdn.net/projects/ponsfoot-aur/storage/mozc/x-ken-all-${zipcode_rel}.zip";
sha256 = "ExS0Cg3rs0I9IOVbZHLt8UEfk8/LmY9oAHPVVlYuTPw=";
};
in clangStdenv.mkDerivation rec {
pname = "fcitx5-mozc";
version = "2.26.4220.102";
src = fetchFromGitHub {
owner = "fcitx";
repo = "mozc";
rev = "1882e33b61673b66d63277f82b4c80ae4e506c10";
sha256 = "R+w0slVFpqtt7PIr1pyupJjRoQsABVZiMdZ9fKGKAqw=";
};
nativeBuildInputs = [ gyp ninja python pkg-config qt5.wrapQtAppsHook six which unzip ];
buildInputs = [ protobuf zinnia qt5.qtbase fcitx5 abseil-cpp jsoncpp gtest gtk2 ];
patches = [
# Support linking system abseil-cpp
(fetchpatch {
url = "https://salsa.debian.org/debian/mozc/-/raw/debian/sid/debian/patches/0007-Update-src-base-absl.gyp.patch";
sha256 = "UiS0UScDKyAusXOhc7Bg8dF8ARQQiVTylEhAOxqaZt8=";
})
];
postUnpack = ''
unzip ${x-ken-all} -d $sourceRoot/src/
unzip ${jigyosyo} -d $sourceRoot/src/
rmdir $sourceRoot/src/third_party/breakpad/
ln -s ${breakpad} $sourceRoot/src/third_party/breakpad
rmdir $sourceRoot/src/third_party/gtest/
ln -s ${gtest} $sourceRoot/src/third_party/gtest
rmdir $sourceRoot/src/third_party/gyp/
ln -s ${gyp} $sourceRoot/src/third_party/gyp
rmdir $sourceRoot/src/third_party/japanese_usage_dictionary/
ln -s ${japanese_usage_dictionary} $sourceRoot/src/third_party/japanese_usage_dictionary
'';
# Copied from https://github.com/archlinux/svntogit-community/blob/packages/fcitx5-mozc/trunk/PKGBUILD
configurePhase = ''
cd src
export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 use_libabseil=1"
# disable fcitx4
rm unix/fcitx/fcitx.gyp
# gen zip code seed
PYTHONPATH="$PWD:$PYTHONPATH" python dictionary/gen_zip_code_seed.py --zip_code="x-ken-all.csv" --jigyosyo="JIGYOSYO.CSV" >> data/dictionary_oss/dictionary09.txt
# use libstdc++ instead of libc++
sed "/stdlib=libc++/d;/-lc++/d" -i gyp/common.gypi
# run gyp
python build_mozc.py gyp --gypdir=${gyp}/bin --server_dir=$out/lib/mozc
'';
buildPhase = ''
python build_mozc.py build -c Release \
server/server.gyp:mozc_server \
gui/gui.gyp:mozc_tool \
unix/fcitx5/fcitx5.gyp:fcitx5-mozc
'';
installPhase = ''
export PREFIX=$out
export _bldtype=Release
../scripts/install_server
install -d $out/share/licenses/fcitx5-mozc
head -n 29 server/mozc_server.cc > $out/share/licenses/fcitx5-mozc/LICENSE
install -m644 data/installer/*.html $out/share/licenses/fcitx5-mozc/
install -d $out/share/fcitx5/addon
install -d $out/share/fcitx5/inputmethod
install -d $out/lib/fcitx5
../scripts/install_fcitx5
'';
meta = with lib; {
description = "Fcitx5 Module of A Japanese Input Method for Chromium OS, Windows, Mac and Linux (the Open Source Edition of Google Japanese Input)";
homepage = "https://github.com/fcitx/mozc";
license = licenses.bsd3;
maintainers = with maintainers; [ berberman ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,53 @@
{ lib
, mkDerivation
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, qtx11extras
, libxcb
, libXdmcp
, qtbase
}:
mkDerivation rec {
pname = "fcitx5-qt";
version = "5.0.12";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-tK/sZa8PX+W8rZd5VH0a9nlxQ619w48//jQMTPytb+0=";
};
preConfigure = ''
substituteInPlace qt5/platforminputcontext/CMakeLists.txt \
--replace \$"{CMAKE_INSTALL_QT5PLUGINDIR}" $out/${qtbase.qtPluginPrefix}
'';
cmakeFlags = [
"-DENABLE_QT4=0"
"-DENABLE_QT6=0"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
];
buildInputs = [
fcitx5
qtx11extras
libxcb
libXdmcp
];
meta = with lib; {
description = "Fcitx5 Qt Library";
homepage = "https://github.com/fcitx/fcitx5-qt";
license = with licenses; [ lgpl21Plus bsd3 ];
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,18 @@
:100644 100644 fac4f53 aed9617 M src/rimeengine.cpp
diff --git a/src/rimeengine.cpp b/src/rimeengine.cpp
index fac4f53..aed9617 100644
--- a/src/rimeengine.cpp
+++ b/src/rimeengine.cpp
@@ -164,7 +164,10 @@ void RimeEngine::rimeStart(bool fullcheck) {
RIME_ERROR() << "Failed to create user directory: " << userDir;
}
}
- const char *sharedDataDir = RIME_DATA_DIR;
+ const char *sharedDataDir = getenv("NIX_RIME_DATA_DIR");
+ if (!sharedDataDir) {
+ sharedDataDir = RIME_DATA_DIR;
+ }
RIME_STRUCT(RimeTraits, fcitx_rime_traits);
fcitx_rime_traits.shared_data_dir = sharedDataDir;

View file

@ -0,0 +1,47 @@
{ lib, stdenv
, fetchFromGitHub
, pkg-config
, cmake
, extra-cmake-modules
, gettext
, fcitx5
, librime
}:
stdenv.mkDerivation rec {
pname = "fcitx5-rime";
version = "5.0.13";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-/oQdBCDV5obSHw7dzdceC+zWHcNve3NDlA50GhvkK8o=";
};
cmakeFlags = [
"-DRIME_DATA_DIR=${placeholder "out"}/share/rime-data"
];
nativeBuildInputs = [
cmake
extra-cmake-modules
pkg-config
gettext
];
buildInputs = [
fcitx5
librime
];
patches = [ ./fcitx5-rime-with-nix-env-variable.patch ];
meta = with lib; {
description = "RIME support for Fcitx5";
homepage = "https://github.com/fcitx/fcitx5-rime";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, gettext
, libime
, boost
, fcitx5
}:
stdenv.mkDerivation rec {
pname = "fcitx5-table-extra";
version = "5.0.10";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-fKT1nCr6kAFJEdacff4qBr3uI5fvIwMDPkHVFGTQf10=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
gettext
libime
boost
fcitx5
];
meta = with lib; {
description = "Extra table for Fcitx, including Boshiamy, Zhengma, Cangjie, and Quick";
homepage = "https://github.com/fcitx/fcitx5-table-extra";
license = licenses.gpl2Only;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, gettext
, libime
, boost
, fcitx5
}:
stdenv.mkDerivation rec {
pname = "fcitx5-table-other";
version = "5.0.9";
src = fetchFromGitHub {
owner = "fcitx";
repo = pname;
rev = version;
sha256 = "sha256-y/OY7m136VQvK75079OTFqLLR2o0NCIc5llljrJ91DU=";
};
nativeBuildInputs = [
cmake
extra-cmake-modules
gettext
libime
boost
fcitx5
];
meta = with lib; {
description = "Some other tables for Fcitx";
homepage = "https://github.com/fcitx/fcitx5-table-other";
license = licenses.gpl3Only;
maintainers = with maintainers; [ poscat ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,34 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, extra-cmake-modules
, fcitx5
, fcitx5-qt
, gettext
, wrapQtAppsHook
}:
stdenv.mkDerivation rec {
pname = "fcitx5-unikey";
version = "5.0.9";
src = fetchFromGitHub {
owner = "fcitx";
repo = "fcitx5-unikey";
rev = version;
sha256 = "sha256-lsWMQygIdHcEuHCEvi5d0PGI1jJ42C+9ji/w0L/eadM=";
};
nativeBuildInputs = [ cmake extra-cmake-modules wrapQtAppsHook ];
buildInputs = [ fcitx5 fcitx5-qt gettext ];
meta = with lib; {
description = "Unikey engine support for Fcitx5";
homepage = "https://github.com/fcitx/fcitx5-unikey";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ berberman ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,44 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p nix-update nix-prefetch-github python3Packages.requests
from nix_prefetch_github import *
import json
import requests
import subprocess
REPOS = [
"libime",
"xcb-imdkit",
"fcitx5",
"fcitx5-chewing",
"fcitx5-chinese-addons",
"fcitx5-configtool",
"fcitx5-gtk",
"fcitx5-hangul",
"fcitx5-lua",
"fcitx5-m17n",
"fcitx5-qt",
"fcitx5-rime",
"fcitx5-table-extra",
"fcitx5-table-other",
"fcitx5-unikey"
]
OWNER = "fcitx"
def get_latest_tag(repo, owner=OWNER):
r = requests.get('https://api.github.com/repos/{}/{}/tags'.format(owner,repo))
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 ()

View file

@ -0,0 +1,26 @@
{ symlinkJoin, makeWrapper, fcitx5, fcitx5-lua, fcitx5-configtool, fcitx5-qt, fcitx5-gtk, addons ? [] }:
symlinkJoin {
name = "fcitx5-with-addons-${fcitx5.version}";
paths = [ fcitx5 fcitx5-configtool fcitx5-lua fcitx5-qt fcitx5-gtk ] ++ addons;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/fcitx5 \
--prefix FCITX_ADDON_DIRS : "$out/lib/fcitx5" \
--suffix XDG_DATA_DIRS : "$out/share" \
--suffix PATH : "$out/bin"
desktop=share/applications/org.fcitx.Fcitx5.desktop
autostart=etc/xdg/autostart/org.fcitx.Fcitx5.desktop
rm $out/$desktop
rm $out/$autostart
cp ${fcitx5}/$desktop $out/$desktop
sed -i $out/$desktop -e "s|^Exec=.*|Exec=$out/bin/fcitx5|g"
ln -s $out/$desktop $out/$autostart
'';
meta = fcitx5.meta;
}

View file

@ -0,0 +1,35 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, hidapi }:
stdenv.mkDerivation {
pname = "footswitch";
version = "unstable-20201-03-17";
src = fetchFromGitHub {
owner = "rgerganov";
repo = "footswitch";
rev = "aa0b10f00d3e76dac27b55b88c8d44c0c406f7f0";
sha256 = "sha256-SikYiBN7jbH5I1x5wPCF+buwFp1dt35cVxAN6lWkTN0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ hidapi ];
postPatch = ''
substituteInPlace Makefile \
--replace /usr/local $out \
--replace /usr/bin/install install \
--replace /etc/udev/rules.d $out/lib/udev/rules.d
'';
preInstall = ''
mkdir -p $out/bin $out/lib/udev/rules.d
'';
meta = with lib; {
description = "Command line utlities for programming PCsensor and Scythe foot switches.";
homepage = "https://github.com/rgerganov/footswitch";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ baloo ];
};
}

View file

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem "fusuma"

View file

@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
fusuma (1.3.0)
PLATFORMS
ruby
DEPENDENCIES
fusuma
BUNDLED WITH
2.1.4

View file

@ -0,0 +1,24 @@
{ lib, bundlerApp, bundlerUpdateScript, makeWrapper, libinput }:
bundlerApp {
pname = "fusuma";
gemdir = ./.;
exes = [ "fusuma" ];
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram "$out/bin/fusuma" \
--prefix PATH : ${lib.makeBinPath [ libinput ]}
'';
passthru.updateScript = bundlerUpdateScript "fusuma";
meta = with lib; {
description = "Multitouch gestures with libinput driver on X11, Linux";
homepage = "https://github.com/iberianpig/fusuma";
license = licenses.mit;
maintainers = with maintainers; [ jfrankenau nicknovitski Br1ght0ne ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,12 @@
{
fusuma = {
groups = ["default"];
platforms = [];
source = {
remotes = ["https://rubygems.org"];
sha256 = "150jc8jyqj3w4k13lf1ihqmm2sld1yawp4jwnf43jixnc9rmzx6f";
type = "gem";
};
version = "1.3.0";
};
}

View file

@ -0,0 +1,25 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, cmake, libinput, zlib }:
stdenv.mkDerivation rec {
pname = "gebaar-libinput";
version = "0.0.5";
src = fetchFromGitHub {
owner = "Coffee2CodeNL";
repo = pname;
rev = "v${version}";
sha256 = "1kqcgwkia1p195xr082838dvj1gqif9d63i8a52jb0lc32zzizh6";
fetchSubmodules = true;
};
nativeBuildInputs = [ pkg-config cmake ];
buildInputs = [ libinput zlib ];
meta = with lib; {
description = "Gebaar, A Super Simple WM Independent Touchpad Gesture Daemon for libinput";
homepage = "https://github.com/Coffee2CodeNL/gebaar-libinput";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ colemickens lovesegfault ];
};
}

View file

@ -0,0 +1,47 @@
{ stdenv
, fetchFromGitHub
, pkg-config
, which
, gtk2
, gtk3
, qt4
, qt5
, libXtst
, lib
, libchewing
, unixtools
, anthy
}:
stdenv.mkDerivation rec {
pname = "hime";
version = "0.9.11";
src = fetchFromGitHub {
repo = pname;
owner = "hime-ime";
rev = "v${version}";
sha256 = "sha256-fCqet+foQjI+LpTQ/6Egup1GzXELlL2hgbh0dCKLwPI=";
};
nativeBuildInputs = [ which pkg-config unixtools.whereis ];
buildInputs = [ libXtst gtk2 gtk3 qt4 qt5.qtbase libchewing anthy ];
preConfigure = "patchShebangs configure";
configureFlags = [ "--disable-lib64" "--disable-qt5-immodule" ];
dontWrapQtApps = true;
postFixup = ''
hime_rpath=$(patchelf --print-rpath $out/bin/hime)
patchelf --set-rpath $out/lib/hime:$hime_rpath $out/bin/hime
'';
meta = with lib; {
homepage = "http://hime-ime.github.io/";
downloadPage = "https://github.com/hime-ime/hime/downloads";
description = "A useful input method engine for Asia region";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ yanganto ];
};
}

View file

@ -0,0 +1,57 @@
{ lib, stdenv
, fetchurl
, gettext
, pkg-config
, wrapGAppsHook
, anthy
, ibus
, glib
, gobject-introspection
, gtk3
, python3
}:
stdenv.mkDerivation rec {
pname = "ibus-anthy";
version = "1.5.14";
src = fetchurl {
url = "https://github.com/ibus/ibus-anthy/releases/download/${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-yGlNoY0LiRpI9NdaDezjfsvKbRsay2QQGnqEytEEbZs=";
};
buildInputs = [
anthy
glib
gtk3
ibus
(python3.withPackages (ps: [
ps.pygobject3
(ps.toPythonModule ibus)
]))
];
nativeBuildInputs = [
gettext
gobject-introspection
pkg-config
wrapGAppsHook
];
configureFlags = [
"--with-anthy-zipcode=${anthy}/share/anthy/zipcode.t"
];
postFixup = ''
substituteInPlace $out/share/ibus/component/anthy.xml --replace \$\{exec_prefix\} $out
'';
meta = with lib; {
isIbusEngine = true;
description = "IBus interface to the anthy input method";
homepage = "https://github.com/fujiwarat/ibus-anthy";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ gebner ericsagnes ];
};
}

View file

@ -0,0 +1,58 @@
{ lib, stdenv
, fetchFromGitHub
, glib
, gettext
, xorg
, pkg-config
, wrapGAppsHook
, ibus
, gtk3
, go
}:
stdenv.mkDerivation rec {
pname = "ibus-bamboo";
version = "0.7.7";
src = fetchFromGitHub {
owner = "BambooEngine";
repo = pname;
rev = "v${version}";
sha256 = "1qdkimq4n9bxqjlnd00dggvx09cf4wqwk0kpgj01jd0i6ahggns1";
};
nativeBuildInputs = [
gettext
pkg-config
wrapGAppsHook
go
];
buildInputs = [
glib
gtk3
xorg.libX11
xorg.xorgproto
xorg.libXtst
xorg.libXi
];
preConfigure = ''
export GOCACHE="$TMPDIR/go-cache"
sed -i "s,/usr,$out," bamboo.xml
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
];
meta = with lib; {
isIbusEngine = true;
description = "A Vietnamese IME for IBus";
homepage = "https://github.com/BambooEngine/ibus-bamboo";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ superbo ];
};
}

View file

@ -0,0 +1,55 @@
{ lib, stdenv
, fetchurl
, substituteAll
, appstream-glib
, gettext
, pkg-config
, wrapGAppsHook
, gtk3
, ibus
, libhangul
, python3
}:
stdenv.mkDerivation rec {
pname = "ibus-hangul";
version = "1.5.4";
src = fetchurl {
url = "https://github.com/choehwanjin/ibus-hangul/releases/download/${version}/${pname}-${version}.tar.gz";
sha256 = "1q6g2pnrn5gqn9jqnm3975v9hh60hc5gn9x3zbrdjgy0n3wpxwm9";
};
patches = [
(substituteAll {
src = ./fix-paths.patch;
libhangul = "${libhangul}/lib/libhangul.so.1";
})
];
nativeBuildInputs = [
appstream-glib
gettext
pkg-config
wrapGAppsHook
];
buildInputs = [
gtk3
ibus
libhangul
(python3.withPackages (pypkgs: with pypkgs; [
pygobject3
(toPythonModule ibus)
]))
];
meta = with lib; {
isIbusEngine = true;
description = "Ibus Hangul engine";
homepage = "https://github.com/choehwanjin/ibus-hangul";
license = licenses.gpl2;
maintainers = with maintainers; [ ericsagnes ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/setup/main.py b/setup/main.py
index 8d581cd..2ac47b9 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -37,7 +37,7 @@
def get_hangul_keyboard_list():
from ctypes import CDLL, c_int, c_char_p
- libhangul = CDLL('libhangul.so.1')
+ libhangul = CDLL('@libhangul@')
libhangul.hangul_ic_get_n_keyboards.argtypes = []
libhangul.hangul_ic_get_n_keyboards.restype = c_int
libhangul.hangul_ic_get_keyboard_id.argtypes = [c_int]

View file

@ -0,0 +1,34 @@
{ lib, stdenv, fetchurl
, vala, intltool, pkg-config
, libkkc, ibus, skk-dicts
, gtk3
}:
stdenv.mkDerivation rec {
pname = "ibus-kkc";
version = "1.5.22";
src = fetchurl {
url = "${meta.homepage}/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "1kj74c9zy9yxkjx7pz96mzqc13cf10yfmlgprr8sfd4ay192bzi2";
};
nativeBuildInputs = [
vala intltool pkg-config
];
buildInputs = [ libkkc ibus skk-dicts gtk3 ];
postInstall = ''
ln -s ${skk-dicts}/share $out/share/skk
'';
meta = with lib; {
isIbusEngine = true;
description = "libkkc (Japanese Kana Kanji input method) engine for ibus";
homepage = "https://github.com/ueno/ibus-kkc";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ vanzef ];
};
}

View file

@ -0,0 +1,68 @@
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, gettext
, pkg-config
, wrapGAppsHook
, sqlite
, libpinyin
, db
, ibus
, glib
, gtk3
, python3
, lua
, opencc
, libsoup
, json-glib
}:
stdenv.mkDerivation rec {
pname = "ibus-libpinyin";
version = "1.12.1";
src = fetchFromGitHub {
owner = "libpinyin";
repo = "ibus-libpinyin";
rev = version;
sha256 = "sha256-tSbH4twU+paCZdmzVQMSSg3AzBNkK4nnmOfbvUzvZTk=";
};
nativeBuildInputs = [
autoreconfHook
gettext
pkg-config
wrapGAppsHook
];
configureFlags = [
"--enable-cloud-input-mode"
"--enable-opencc"
];
buildInputs = [
ibus
glib
sqlite
libpinyin
(python3.withPackages (pypkgs: with pypkgs; [
pygobject3
(toPythonModule ibus)
]))
gtk3
db
lua
opencc
libsoup
json-glib
];
meta = with lib; {
isIbusEngine = true;
description = "IBus interface to the libpinyin input method";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ericsagnes ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchurl, makeWrapper, pkg-config, ibus, gtk3, libthai }:
stdenv.mkDerivation rec {
pname = "ibus-libthai";
version = "0.1.5";
src = fetchurl {
url = "https://linux.thai.net/pub/ThaiLinux/software/libthai/ibus-libthai-${version}.tar.xz";
sha256 = "sha256-egAxttjwuKiDoIuJluoOTJdotFZJe6ZOmJgdiFCAwx0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk3 ibus libthai ];
meta = with lib; {
isIbusEngine = true;
homepage = "https://linux.thai.net/projects/ibus-libthai";
description = "Thai input method engine for IBus";
license = licenses.lgpl21Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ SuperSandro2000 ];
};
}

View file

@ -0,0 +1,55 @@
{ lib, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, ibus
, gtk3
, m17n_lib
, m17n_db
, gettext
, python3
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "ibus-m17n";
version = "1.4.9";
src = fetchFromGitHub {
owner = "ibus";
repo = "ibus-m17n";
rev = version;
sha256 = "sha256-N9hzyu2etbxlJPD2yUc2T0jxAfhEhshQ8X5R27JBg1E=";
};
nativeBuildInputs = [
autoreconfHook
gettext
pkg-config
wrapGAppsHook
];
buildInputs = [
ibus
gtk3
m17n_lib
m17n_db
(python3.withPackages (ps: [
ps.pygobject3
(ps.toPythonModule ibus)
]))
];
configureFlags = [
"--with-gtk=3.0"
];
meta = with lib; {
isIbusEngine = true;
description = "m17n engine for ibus";
homepage = "https://github.com/ibus/ibus-m17n";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ericsagnes ];
};
}

View file

@ -0,0 +1,89 @@
{ lib, stdenv, fetchFromGitHub, which, ninja, pkg-config, protobuf
, ibus, gtk2, zinnia, qt5, libxcb, tegaki-zinnia-japanese, python3Packages }:
stdenv.mkDerivation rec {
pname = "ibus-mozc";
version = "2.26.4660.102";
src = fetchFromGitHub {
owner = "google";
repo = "mozc";
rev = "063c41f1d7c1a877f44c1f8caad6be1897350336";
sha256 = "sha256-sgsfJZALpPHFB5bXu4OkRssViRDaPcgLfEyGhbqvJbI=";
fetchSubmodules = true;
};
nativeBuildInputs = [
which ninja python3Packages.python python3Packages.six
python3Packages.gyp pkg-config qt5.wrapQtAppsHook
];
buildInputs = [ protobuf ibus gtk2 zinnia qt5.qtbase libxcb ];
postUnpack = lib.optionalString stdenv.isLinux ''
sed -i 's/-lc++/-lstdc++/g' $sourceRoot/src/gyp/common.gypi
'';
configurePhase = ''
runHook preConfigure
export GYP_DEFINES="document_dir=$out/share/doc/mozc use_libzinnia=1 use_libprotobuf=1 ibus_mozc_path=$out/lib/ibus-mozc/ibus-engine-mozc zinnia_model_file=${tegaki-zinnia-japanese}/share/tegaki/models/zinnia/handwriting-ja.model"
cd src && python build_mozc.py gyp --gypdir=${python3Packages.gyp}/bin --server_dir=$out/lib/mozc
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
PYTHONPATH="$PWD:$PYTHONPATH" python build_mozc.py build -c Release \
unix/ibus/ibus.gyp:ibus_mozc \
unix/emacs/emacs.gyp:mozc_emacs_helper \
server/server.gyp:mozc_server \
gui/gui.gyp:mozc_tool \
renderer/renderer.gyp:mozc_renderer
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -d $out/share/licenses/mozc
head -n 29 server/mozc_server.cc > $out/share/licenses/mozc/LICENSE
install -m 644 data/installer/*.html $out/share/licenses/mozc/
install -D -m 755 out_linux/Release/mozc_server $out/lib/mozc/mozc_server
install -m 755 out_linux/Release/mozc_tool $out/lib/mozc/mozc_tool
wrapQtApp $out/lib/mozc/mozc_tool
install -d $out/share/doc/mozc
install -m 644 data/installer/*.html $out/share/doc/mozc/
install -D -m 755 out_linux/Release/ibus_mozc $out/lib/ibus-mozc/ibus-engine-mozc
install -D -m 644 out_linux/Release/gen/unix/ibus/mozc.xml $out/share/ibus/component/mozc.xml
install -D -m 644 data/images/unix/ime_product_icon_opensource-32.png $out/share/ibus-mozc/product_icon.png
install -m 644 data/images/unix/ui-tool.png $out/share/ibus-mozc/tool.png
install -m 644 data/images/unix/ui-properties.png $out/share/ibus-mozc/properties.png
install -m 644 data/images/unix/ui-dictionary.png $out/share/ibus-mozc/dictionary.png
install -m 644 data/images/unix/ui-direct.png $out/share/ibus-mozc/direct.png
install -m 644 data/images/unix/ui-hiragana.png $out/share/ibus-mozc/hiragana.png
install -m 644 data/images/unix/ui-katakana_half.png $out/share/ibus-mozc/katakana_half.png
install -m 644 data/images/unix/ui-katakana_full.png $out/share/ibus-mozc/katakana_full.png
install -m 644 data/images/unix/ui-alpha_half.png $out/share/ibus-mozc/alpha_half.png
install -m 644 data/images/unix/ui-alpha_full.png $out/share/ibus-mozc/alpha_full.png
install -D -m 755 out_linux/Release/mozc_renderer $out/lib/mozc/mozc_renderer
install -D -m 755 out_linux/Release/mozc_emacs_helper $out/lib/mozc/mozc_emacs_helper
runHook postInstall
'';
meta = with lib; {
isIbusEngine = true;
description = "Japanese input method from Google";
homepage = "https://github.com/google/mozc";
license = licenses.free;
platforms = platforms.linux;
maintainers = with maintainers; [ gebner ericsagnes ];
};
}

View file

@ -0,0 +1,44 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gdk-pixbuf
, glib
, ibus
, libnotify
, librime
, pkg-config
, rime-data
}:
stdenv.mkDerivation rec {
pname = "ibus-rime";
version = "1.5.0";
src = fetchFromGitHub {
owner = "rime";
repo = "ibus-rime";
rev = version;
sha256 = "0gdxg6ia0i31jn3cvh1nrsjga1j31hf8a2zfgg8rzn25chrfr319";
};
buildInputs = [ gdk-pixbuf glib ibus libnotify librime rime-data ];
nativeBuildInputs = [ cmake pkg-config ];
cmakeFlags = [ "-DRIME_DATA_DIR=${rime-data}/share/rime-data" ];
prePatch = ''
substituteInPlace CMakeLists.txt \
--replace 'DESTINATION "''${RIME_DATA_DIR}"' \
'DESTINATION "''${CMAKE_INSTALL_DATADIR}/rime-data"'
'';
meta = with lib; {
isIbusEngine = true;
description = "Rime input method engine for IBus";
homepage = "https://rime.im/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ pmy ];
};
}

View file

@ -0,0 +1,65 @@
{ lib, stdenv, fetchgit, fetchFromGitHub, pkg-config, ibus, ibus-table, python3, cmake }:
let
src = fetchFromGitHub {
owner = "definite";
repo = "ibus-table-chinese";
rev = "f1f6a3384f021caa3b84c517e2495086f9c34507";
sha256 = "14wpw3pvyrrqvg7al37jk2dxqfj9r4zf88j8k2n2lmdc50f3xs7k";
};
cmakeFedoraSrc = fetchgit {
url = "https://pagure.io/cmake-fedora.git";
rev = "7d5297759aef4cd086bdfa30cf6d4b2ad9446992";
sha256 = "0mx9jvxpiva9v2ffaqlyny48iqr073h84yw8ln43z2avv11ipr7n";
};
in stdenv.mkDerivation {
pname = "ibus-table-chinese";
version = "1.8.2";
srcs = [ src cmakeFedoraSrc ];
sourceRoot = src.name;
postUnpack = ''
chmod u+w -R ${cmakeFedoraSrc.name}
mv ${cmakeFedoraSrc.name}/* source/cmake-fedora
'';
preConfigure = ''
# cmake script needs ./Modules folder to link to cmake-fedora
ln -s cmake-fedora/Modules ./
'';
# Fails when writing to /prj_info.cmake in https://pagure.io/cmake-fedora/blob/master/f/Modules/ManageVersion.cmake
cmakeFlags = [ "-DPRJ_INFO_CMAKE_FILE=/dev/null" "-DPRJ_DOC_DIR=REPLACE" "-DDATA_DIR=share" ];
# Must replace PRJ_DOC_DIR with actual share/ folder for ibus-table-chinese
# Otherwise it tries to write to /ibus-table-chinese if not defined (!)
postConfigure = ''
substituteInPlace cmake_install.cmake --replace '/build/source/REPLACE' $out/share/ibus-table-chinese
'';
# Fails otherwise with "no such file or directory: <table>.txt"
dontUseCmakeBuildDir = true;
# Fails otherwise sometimes with
# FileExistsError: [Errno 17] File exists: '/build/tmp.BfVAUM4llr/ibus-table-chinese/.local/share/ibus-table'
enableParallelBuilding = false;
preBuild = ''
export HOME=$(mktemp -d)/ibus-table-chinese
'';
postFixup = ''
rm -rf $HOME
'';
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ ibus ibus-table python3 ];
meta = with lib; {
isIbusEngine = true;
description = "Chinese tables for IBus-Table";
homepage = "https://github.com/definite/ibus-table-chinese";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ pneumaticat ];
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchurl, ibus, ibus-table, pkg-config, python3 }:
stdenv.mkDerivation rec {
pname = "ibus-table-others";
version = "1.3.13";
src = fetchurl {
url = "https://github.com/moebiuscurve/ibus-table-others/releases/download/${version}/${pname}-${version}.tar.gz";
sha256 = "sha256-XN11iOShWyzRzmo/Ke+1Qh//o4ZhsmJWimgA1by2VZo=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ibus ibus-table python3 ];
preBuild = ''
export HOME=$TMPDIR
'';
meta = with lib; {
isIbusEngine = true;
description = "Various table-based input methods for IBus";
homepage = "https://github.com/moebiuscurve/ibus-table-others";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ mudri ];
};
}

View file

@ -0,0 +1,67 @@
{ lib, stdenv, fetchFromGitHub
, autoreconfHook, docbook2x, pkg-config
, gtk3, dconf, gobject-introspection
, ibus, python3, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "ibus-table";
version = "1.16.7";
src = fetchFromGitHub {
owner = "kaio";
repo = "ibus-table";
rev = version;
sha256 = "sha256-rejYxuRhzNmtx11NH3BZe3ODjU5OyZ9sgk6GWnBBXAo=";
};
postPatch = ''
# Data paths will be set at run-time.
sed -e "/export IBUS_TABLE_LIB_LOCATION=/ s/^.*$//" \
-e "/export IBUS_TABLE_LOCATION=/ s/^.*$//" \
-i "engine/ibus-engine-table.in"
sed -e "/export IBUS_TABLE_BIN_PATH=/ s/^.*$//" \
-e "/export IBUS_TABLE_DATA_DIR=/ s/^.*$//" \
-i "engine/ibus-table-createdb.in"
sed -e "/export IBUS_PREFIX=/ s/^.*$//" \
-e "/export IBUS_DATAROOTDIR=/ s/^.$//" \
-e "/export IBUS_LOCALEDIR=/ s/^.$//" \
-i "setup/ibus-setup-table.in"
substituteInPlace engine/tabcreatedb.py --replace '/usr/share/ibus-table' $out/share/ibus-table
substituteInPlace engine/ibus_table_location.py \
--replace '/usr/libexec' $out/libexec \
--replace '/usr/share/ibus-table/' $out/share/ibus-table/
'';
buildInputs = [
dconf
gtk3
ibus
(python3.withPackages (pypkgs: with pypkgs; [
dbus-python
pygobject3
(toPythonModule ibus)
]))
];
nativeBuildInputs = [
autoreconfHook
docbook2x
pkg-config
gobject-introspection
wrapGAppsHook
];
postUnpack = ''
substituteInPlace $sourceRoot/engine/Makefile.am \
--replace "docbook2man" "docbook2man --sgml"
'';
meta = with lib; {
isIbusEngine = true;
description = "An IBus framework for table-based input methods";
homepage = "https://github.com/kaio/ibus-table/wiki";
license = licenses.lgpl21;
platforms = platforms.linux;
maintainers = with maintainers; [ mudri ];
};
}

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, python3, ibus, pkg-config, gtk3, m17n_lib
, wrapGAppsHook, gobject-introspection
}:
let
python = python3.withPackages (ps: with ps; [
pygobject3
dbus-python
]);
in
stdenv.mkDerivation rec {
pname = "ibus-typing-booster";
version = "2.7.5";
src = fetchFromGitHub {
owner = "mike-fabian";
repo = "ibus-typing-booster";
rev = version;
sha256 = "072mi8r10v78sfs81zxdwfabf87fp872c99c5iral1ywwa4iynpl";
};
patches = [ ./hunspell-dirs.patch ];
nativeBuildInputs = [ autoreconfHook pkg-config wrapGAppsHook gobject-introspection ];
buildInputs = [ python ibus gtk3 m17n_lib ];
preFixup = ''
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${m17n_lib}/lib")
'';
meta = with lib; {
homepage = "https://mike-fabian.github.io/ibus-typing-booster/";
license = licenses.gpl3Plus;
description = "A typing booster engine for the IBus platform";
maintainers = with maintainers; [ ];
isIbusEngine = true;
};
}

View file

@ -0,0 +1,31 @@
diff --git a/engine/itb_util.py b/engine/itb_util.py
index ded236a..633525a 100755
--- a/engine/itb_util.py
+++ b/engine/itb_util.py
@@ -1876,14 +1876,18 @@ def find_hunspell_dictionary(language):
If no dictionary can be found for the requested language,
the return value is ('', '').
'''
- dirnames = [
- '/usr/share/hunspell',
- '/usr/share/myspell',
- '/usr/share/myspell/dicts',
- '/usr/local/share/hunspell', # On FreeBSD the dictionaries are here
- '/usr/local/share/myspell',
- '/usr/local/share/myspell/dicts',
- ]
+
+ if "NIX_HUNSPELL_DIRS" in os.environ:
+ dirnames = os.environ["NIX_HUNSPELL_DIRS"].split(":")
+ else: # fallback to the original behavior
+ dirnames = [
+ '/usr/share/hunspell',
+ '/usr/share/myspell',
+ '/usr/share/myspell/dicts',
+ '/usr/local/share/hunspell', # On FreeBSD the dictionaries are here
+ '/usr/local/share/myspell',
+ '/usr/local/share/myspell/dicts',
+ ]
dic_path = ''
aff_path = ''
for language in expand_languages([language]):

View file

@ -0,0 +1,30 @@
{ typing-booster, symlinkJoin, hunspellDicts, lib, makeWrapper
, langs ? [ "de-de" "en-us" "es-es" "fr-moderne" "it-it" "sv-se" "sv-fi" ]
}:
let
hunspellDirs = with lib; makeSearchPath ":" (flatten (forEach langs (lang: [
"${hunspellDicts.${lang}}/share/hunspell"
"${hunspellDicts.${lang}}/share/myspell"
"${hunspellDicts.${lang}}/share/myspell/dicts"
])));
in
symlinkJoin {
name = "${typing-booster.name}-with-hunspell";
paths = [ typing-booster ];
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
for i in bin/emoji-picker libexec/ibus-{setup,engine}-typing-booster; do
wrapProgram "$out/$i" \
--prefix NIX_HUNSPELL_DIRS : ${lib.escapeShellArg hunspellDirs}
done
sed -i -e "s,${typing-booster},$out," $out/share/ibus/component/typing-booster.xml
'';
inherit (typing-booster) meta;
}

View file

@ -0,0 +1,13 @@
diff --git a/uniemoji.xml.in b/uniemoji.xml.in
index 5fbfd0f..6fb8ad3 100644
--- a/uniemoji.xml.in
+++ b/uniemoji.xml.in
@@ -7,7 +7,7 @@
<license>GPL</license>
<author>Lalo Martins &lt;lalo.martins@gmail.com&gt;</author>
<homepage>https://github.com/salty-horse/ibus-uniemoji</homepage>
- <exec>@PYTHON@ @DATADIR@/ibus-uniemoji/uniemoji.py --ibus</exec>
+ <exec>@DATADIR@/ibus-uniemoji/uniemoji.py --ibus</exec>
<textdomain>uniemoji</textdomain>
<engines>
<engine>

View file

@ -0,0 +1,62 @@
{ lib, stdenv
, fetchFromGitHub
, gobject-introspection
, wrapGAppsHook
, python3
, ibus
}:
let
python = python3.withPackages (ps: with ps; [
pygobject3
(toPythonModule ibus)
pyxdg
python-Levenshtein
]);
in stdenv.mkDerivation rec {
pname = "ibus-uniemoji";
version = "0.6.0";
src = fetchFromGitHub {
owner = "salty-horse";
repo = "ibus-uniemoji";
rev = "v${version}";
sha256 = "121zh3q0li1k537fcvbd4ns4jgl9bbb9gm9ihy8cfxgirv38lcfa";
};
patches = [
# Do not run wrapper script with Python,
# the wrapped script will have Python in shebang anyway.
./allow-wrapping.patch
];
nativeBuildInputs = [
wrapGAppsHook
gobject-introspection
];
buildInputs = [
python
ibus
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"SYSCONFDIR=${placeholder "out"}/etc"
"PYTHON=${python.interpreter}"
];
postFixup = ''
wrapGApp $out/share/ibus-uniemoji/uniemoji.py
'';
meta = with lib; {
isIbusEngine = true;
description = "Input method (ibus) for entering unicode symbols and emoji by name";
homepage = "https://github.com/salty-horse/ibus-uniemoji";
license = with licenses; [ gpl3 mit ];
platforms = platforms.linux;
maintainers = with maintainers; [ aske ];
};
}

View file

@ -0,0 +1,183 @@
{ lib, stdenv
, substituteAll
, fetchurl
, fetchpatch
, fetchFromGitHub
, autoreconfHook
, gettext
, makeWrapper
, pkg-config
, vala
, wrapGAppsHook
, dbus
, systemd
, dconf ? null
, glib
, gdk-pixbuf
, gobject-introspection
, gtk2
, gtk3
, gtk4
, gtk-doc
, runCommand
, isocodes
, cldr-annotations
, unicode-character-database
, unicode-emoji
, python3
, json-glib
, libnotify ? null
, enableUI ? true
, withWayland ? false
, libxkbcommon ? null
, wayland ? null
, buildPackages
, runtimeShell
, nixosTests
}:
assert withWayland -> wayland != null && libxkbcommon != null;
with lib;
let
python3Runtime = python3.withPackages (ps: with ps; [ pygobject3 ]);
python3BuildEnv = python3.buildEnv.override {
# ImportError: No module named site
postBuild = ''
makeWrapper ${glib.dev}/bin/gdbus-codegen $out/bin/gdbus-codegen --unset PYTHONPATH
makeWrapper ${glib.dev}/bin/glib-genmarshal $out/bin/glib-genmarshal --unset PYTHONPATH
makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
'';
};
# make-dconf-override-db.sh needs to execute dbus-launch in the sandbox,
# it will fail to read /etc/dbus-1/session.conf unless we add this flag
dbus-launch = runCommand "sandbox-dbus-launch" {
nativeBuildInputs = [ makeWrapper ];
} ''
makeWrapper ${dbus}/bin/dbus-launch $out/bin/dbus-launch \
--add-flags --config-file=${dbus.daemon}/share/dbus-1/session.conf
'';
in
stdenv.mkDerivation rec {
pname = "ibus";
version = "1.5.26";
src = fetchFromGitHub {
owner = "ibus";
repo = "ibus";
rev = version;
sha256 = "7Vuj4Gyd+dLUoCkR4SPkfGPwVQPRo2pHk0pRAsmtjxc=";
};
patches = [
# Fixes systemd unit installation path https://github.com/ibus/ibus/pull/2388
(fetchpatch {
url = "https://github.com/ibus/ibus/commit/33b4b3932bfea476a841f8df99e20049b83f4b0e.patch";
sha256 = "kh8SBR+cqsov/B0A2YXLJVq1F171qoSRUKbBPHjPRHI=";
})
(substituteAll {
src = ./fix-paths.patch;
pythonInterpreter = python3Runtime.interpreter;
pythonSitePackages = python3.sitePackages;
})
];
outputs = [ "out" "dev" "installedTests" ];
postPatch = ''
patchShebangs --build data/dconf/make-dconf-override-db.sh
cp ${buildPackages.gtk-doc}/share/gtk-doc/data/gtk-doc.make .
'';
preAutoreconf = "touch ChangeLog";
configureFlags = [
"--disable-memconf"
(enableFeature (dconf != null) "dconf")
(enableFeature (libnotify != null) "libnotify")
(enableFeature withWayland "wayland")
(enableFeature enableUI "ui")
"--enable-gtk4"
"--enable-install-tests"
"--with-unicode-emoji-dir=${unicode-emoji}/share/unicode/emoji"
"--with-emoji-annotation-dir=${cldr-annotations}/share/unicode/cldr/common/annotations"
"--with-ucd-dir=${unicode-character-database}/share/unicode"
];
makeFlags = [
"test_execsdir=${placeholder "installedTests"}/libexec/installed-tests/ibus"
"test_sourcesdir=${placeholder "installedTests"}/share/installed-tests/ibus"
];
nativeBuildInputs = [
autoreconfHook
gtk-doc
gettext
makeWrapper
pkg-config
python3BuildEnv
vala
wrapGAppsHook
dbus-launch
];
propagatedBuildInputs = [
glib
];
buildInputs = [
dbus
systemd
dconf
gdk-pixbuf
gobject-introspection
python3.pkgs.pygobject3 # for pygobject overrides
gtk2
gtk3
gtk4
isocodes
json-glib
libnotify
] ++ optionals withWayland [
libxkbcommon
wayland
];
enableParallelBuilding = true;
doCheck = false; # requires X11 daemon
doInstallCheck = true;
installCheckPhase = ''
$out/bin/ibus version
'';
postInstall = ''
# It has some hardcoded FHS paths and also we do not use it
# since we set up the environment in NixOS tests anyway.
moveToOutput "bin/ibus-desktop-testing-runner" "$installedTests"
'';
postFixup = ''
# set necessary environment also for tests
for f in $installedTests/libexec/installed-tests/ibus/*; do
wrapGApp $f
done
'';
passthru = {
tests = {
installed-tests = nixosTests.installed-tests.ibus;
};
};
meta = {
homepage = "https://github.com/ibus/ibus";
description = "Intelligent Input Bus, input method framework";
license = licenses.lgpl21Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ ttuegel yana ];
};
}

View file

@ -0,0 +1,51 @@
diff --git a/configure.ac b/configure.ac
index a3cdb2da..cade9466 100644
--- a/configure.ac
+++ b/configure.ac
@@ -469,11 +469,11 @@ PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
if test "x$enable_pygobject" = "xyes"; then
PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
- pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
+ pyoverridesdir="$prefix/@pythonSitePackages@/gi/overrides"
AC_SUBST(pyoverridesdir)
if test x"$enable_python2" = x"yes"; then
- py2overridesdir=`$PYTHON2 -c "import gi; print(gi._overridesdir)"`
+ py2overridesdir="$prefix/@pythonSitePackages@/gi/overrides"
AC_SUBST(py2overridesdir)
fi
fi
@@ -502,7 +502,7 @@ if test x"$enable_python_library" = x"yes"; then
PYTHON2_VERSION=`$PYTHON2 -c "import sys; sys.stdout.write(sys.version[[:3]])"`
PYTHON2_LIBDIR="$PYTHON2_PREFIX/lib/python$PYTHON2_VERSION"
python2dir="$PYTHON2_LIBDIR/site-packages"
- pkgpython2dir="$python2dir/ibus"
+ pkgpython2dir="$prefix/@pythonSitePackages@/ibus"
AC_SUBST(pkgpython2dir)
else
enable_python_library="no (disabled, use --enable-python-library to enable)"
diff --git a/data/dconf/Makefile.am b/data/dconf/Makefile.am
index 5360f033..6d5e726f 100644
--- a/data/dconf/Makefile.am
+++ b/data/dconf/Makefile.am
@@ -50,7 +50,7 @@ man_5dir = $(mandir)/man5
install-data-hook:
if test -z "$(DESTDIR)"; then \
- dconf update; \
+ true; \
fi
EXTRA_DIST = \
diff --git a/setup/ibus-setup.in b/setup/ibus-setup.in
index 474ce8a8..ee30808e 100644
--- a/setup/ibus-setup.in
+++ b/setup/ibus-setup.in
@@ -27,5 +27,5 @@ export IBUS_PREFIX=@prefix@
export IBUS_DATAROOTDIR=@datarootdir@
export IBUS_LOCALEDIR=@localedir@
export IBUS_LIBEXECDIR=${libexecdir}
-exec ${PYTHON:-@PYTHON@} @prefix@/share/ibus/setup/main.py "$@"
+exec @pythonInterpreter@ @prefix@/share/ibus/setup/main.py "$@"

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchurl, ibus, cmake, pkg-config, qt4, icu, doxygen }:
stdenv.mkDerivation rec {
pname = "ibus-qt";
version = "1.3.3";
src = fetchurl {
url = "https://github.com/ibus/ibus-qt/releases/download/${version}/${pname}-${version}-Source.tar.gz";
sha256 = "1q9g7qghpcf07valc2ni7yf994xqx2pmdffknj7scxfidav6p19g";
};
nativeBuildInputs = [ cmake pkg-config doxygen ];
buildInputs = [ ibus qt4 icu ];
cmakeFlags = [ "-DQT_PLUGINS_DIR=lib/qt4/plugins" ];
meta = with lib; {
homepage = "https://github.com/ibus/ibus-qt/";
description = "Qt4 interface to the ibus input method";
platforms = platforms.linux;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ gebner ];
};
}

View file

@ -0,0 +1,64 @@
{ lib, runCommand, makeWrapper, lndir
, dconf, hicolor-icon-theme, ibus, librsvg, plugins ? []
}:
let
name = "ibus-with-plugins-" + lib.getVersion ibus;
env = {
buildInputs = [ ibus ] ++ plugins;
nativeBuildInputs = [ lndir makeWrapper ];
propagatedUserEnvPackages = [ hicolor-icon-theme ];
paths = [ ibus ] ++ plugins;
inherit (ibus) meta;
};
command = ''
for dir in bin etc lib libexec share; do
mkdir -p "$out/$dir"
for pkg in $paths; do
if [ -d "$pkg/$dir" ]; then
lndir -silent "$pkg/$dir" "$out/$dir"
fi
done
done
for prog in ibus; do
wrapProgram "$out/bin/$prog" \
--set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
--set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
--set IBUS_DATAROOTDIR "$out/share" \
--set IBUS_LIBEXECDIR "$out/libexec" \
--set IBUS_LOCALEDIR "$out/share/locale" \
--set IBUS_PREFIX "$out" \
--set IBUS_TABLE_BIN_PATH "$out/bin" \
--set IBUS_TABLE_DATA_DIR "$out/share" \
--set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
--set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share"
done
for prog in ibus-daemon; do
wrapProgram "$out/bin/$prog" \
--set GDK_PIXBUF_MODULE_FILE ${librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH:$out/lib/girepository-1.0" \
--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
--set IBUS_COMPONENT_PATH "$out/share/ibus/component/" \
--set IBUS_DATAROOTDIR "$out/share" \
--set IBUS_LIBEXECDIR "$out/libexec" \
--set IBUS_LOCALEDIR "$out/share/locale" \
--set IBUS_PREFIX "$out" \
--set IBUS_TABLE_BIN_PATH "$out/bin" \
--set IBUS_TABLE_DATA_DIR "$out/share" \
--set IBUS_TABLE_LIB_LOCATION "$out/libexec" \
--set IBUS_TABLE_LOCATION "$out/share/ibus-table" \
--prefix PYTHONPATH : "$PYTHONPATH" \
--prefix XDG_DATA_DIRS : "$out/share:$GSETTINGS_SCHEMAS_PATH" \
--suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
--add-flags "--cache=refresh"
done
'';
in
runCommand name env command

View file

@ -0,0 +1,164 @@
{ lib
, python3
, pkgconfig
, wrapGAppsHook
, gettext
, gtk3
, glib
, dbus
, gobject-introspection
, xmodmap
, pygobject3
, setuptools
, evdev
, pydantic
, pydbus
, psutil
, fetchFromGitHub
, buildPythonApplication
, procps
, gtksourceview4
, nixosTests
# Change the default log level to debug for easier debugging of package issues
, withDebugLogLevel ? false
# Xmodmap is an optional dependency
# If you use Xmodmap to set keyboard mappings (or your DE does)
# it is required to correctly map keys
, withXmodmap ? true
# Some tests are flakey under high CPU load and could cause intermittent
# failures when building. Override this to true to run tests anyway
# See upstream issue: https://github.com/sezanzeb/input-remapper/issues/306
, withDoCheck ? false
# Version and rev and hash are package arguments to allow overriding
# while ensuring the values in prePatch and src match
# https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293/7
# The names are prefixed with input_remapper to avoid potential
# collisions with package names
, input_remapper_version ? "1.4.2"
, input_remapper_src_rev ? "af20f87a1298153e765b840a2164ba63b9ef937a"
, input_remapper_src_hash ? "sha256-eG4Fx1z74Bq1HrfmzOuULQLziGdWnHLax8y2dymjWsI="
}:
let
maybeXmodmap = lib.optional withXmodmap xmodmap;
in
buildPythonApplication {
pname = "input-remapper";
version = input_remapper_version;
src = fetchFromGitHub {
rev = input_remapper_src_rev;
owner = "sezanzeb";
repo = "input-remapper";
hash = input_remapper_src_hash;
};
# Fixes error
# Couldnt recognize the image file format for file "*.svg"
# at startup, see https://github.com/NixOS/nixpkgs/issues/56943
strictDeps = false;
prePatch = ''
# set revision for --version output
echo "COMMIT_HASH = '${input_remapper_src_rev}'" > inputremapper/commit_hash.py
# fix FHS paths
substituteInPlace inputremapper/configs/data.py \
--replace "/usr/share/input-remapper" "$out/usr/share/input-remapper"
'' + (lib.optionalString (withDebugLogLevel) ''
# if debugging
substituteInPlace inputremapper/logger.py --replace "logger.setLevel(logging.INFO)" "logger.setLevel(logging.DEBUG)"
'');
doCheck = withDoCheck;
checkInputs = [
psutil
];
pythonImportsCheck = [
"evdev"
"inputremapper"
];
# Custom test script, can't use plain pytest / pytestCheckHook
# We only run tests in the unit folder, integration tests require UI
# To allow tests which access the system and session DBUS to run, we start a dbus session
# and bind it to both the system and session buses
installCheckPhase = ''
echo "<busconfig>
<type>session</type>
<listen>unix:tmpdir=$TMPDIR</listen>
<listen>unix:path=/build/system_bus_socket</listen>
<standard_session_servicedirs/>
<policy context=\"default\">
<!-- Allow everything to be sent -->
<allow send_destination=\"*\" eavesdrop=\"true\"/>
<!-- Allow everything to be received -->
<allow eavesdrop=\"true\"/>
<!-- Allow anyone to own anything -->
<allow own=\"*\"/>
</policy>
</busconfig>" > dbus.cfg
PATH=${lib.makeBinPath ([ dbus procps ] ++ maybeXmodmap)}:$PATH \
USER="$(id -u -n)" \
DBUS_SYSTEM_BUS_ADDRESS=unix:path=/build/system_bus_socket \
${dbus}/bin/dbus-run-session --config-file dbus.cfg \
python tests/test.py --start-dir unit
'';
# Nixpkgs 15.9.4.3. When using wrapGAppsHook with special derivers you can end up with double wrapped binaries.
dontWrapGApps = true;
preFixup = ''
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
--prefix PATH : "${lib.makeBinPath maybeXmodmap}"
)
'';
nativeBuildInputs = [
wrapGAppsHook
gettext # needed to build translations
gtk3
glib
gobject-introspection
pygobject3
] ++ maybeXmodmap;
propagatedBuildInputs = [
setuptools # needs pkg_resources
pygobject3
evdev
pkgconfig
pydantic
pydbus
gtksourceview4
];
postInstall = ''
sed -r "s#RUN\+\=\"/bin/input-remapper-control#RUN\+\=\"$out/bin/input-remapper-control#g" -i data/99-input-remapper.rules
sed -r "s#ExecStart\=/usr/bin/input-remapper-service#ExecStart\=$out/bin/input-remapper-service#g" -i data/input-remapper.service
chmod +x data/*.desktop
install -D -t $out/share/applications/ data/*.desktop
install -D -t $out/share/polkit-1/actions/ data/input-remapper.policy
install -D data/99-input-remapper.rules $out/etc/udev/rules.d/99-input-remapper.rules
install -D data/input-remapper.service $out/lib/systemd/system/input-remapper.service
install -D data/input-remapper.policy $out/share/polkit-1/actions/input-remapper.policy
install -D data/inputremapper.Control.conf $out/etc/dbus-1/system.d/inputremapper.Control.conf
install -D -t $out/usr/share/input-remapper/ data/*
# Only install input-remapper prefixed binaries, we don't care about deprecated key-mapper ones
install -m755 -D -t $out/bin/ bin/input-remapper*
'';
passthru.tests = nixosTests.input-remapper;
meta = with lib; {
description = "An easy to use tool to change the mapping of your input device buttons";
homepage = "https://github.com/sezanzeb/input-remapper";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ LunNova ];
mainProgram = "input-remapper-gtk";
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitLab, cmake }:
stdenv.mkDerivation rec {
pname = "caps2esc";
version = "0.3.2";
src = fetchFromGitLab {
group = "interception";
owner = "linux/plugins";
repo = pname;
rev = "v${version}";
sha256 = "sha256-gPFElAixiDTTwcl2XKM7MbTkpRrg8ToO5K7H8kz3DHk=";
};
nativeBuildInputs = [ cmake ];
meta = with lib; {
homepage = "https://gitlab.com/interception/linux/plugins/caps2esc";
description = "Transforming the most useless key ever into the most useful one";
license = licenses.mit;
maintainers = [ maintainers.vyp ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,24 @@
{ lib, stdenv, fetchFromGitLab, pkg-config, cmake, libyamlcpp,
libevdev, udev, boost }:
stdenv.mkDerivation rec {
pname = "interception-tools";
version = "0.6.8";
src = fetchFromGitLab {
owner = "interception/linux";
repo = "tools";
rev = "v${version}";
sha256 = "sha256-jhdgfCWbkF+jD/iXsJ+fYKOtPymxcC46Q4w0aqpvcek=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ libevdev udev libyamlcpp boost ];
meta = {
description = "A minimal composable infrastructure on top of libudev and libevdev";
homepage = "https://gitlab.com/interception/linux/tools";
license = lib.licenses.gpl3Only;
maintainers = [ lib.maintainers.vyp ];
platforms = lib.platforms.linux;
};
}

View file

@ -0,0 +1,34 @@
{ stdenv, lib, fetchFromGitLab, pkg-config, libyamlcpp, libevdev }:
stdenv.mkDerivation rec {
pname = "dual-function-keys";
version = "1.4.0";
src = fetchFromGitLab {
group = "interception";
owner = "linux/plugins";
repo = pname;
rev = version;
sha256 = "sha256-xlplbkeptXMBlRnSsc5NgGJfT8aoZxTRgTwTOd7aiWg=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libevdev libyamlcpp ];
prePatch = ''
substituteInPlace config.mk --replace \
'/usr/include/libevdev-1.0' \
"$(pkg-config --cflags libevdev | cut -c 3-)"
'';
installFlags = [ "DESTDIR=$(out)" "PREFIX=" ];
meta = with lib; {
homepage = "https://gitlab.com/interception/linux/plugins/dual-function-keys";
description = "Tap for one key, hold for another.";
license = licenses.mit;
maintainers = with maintainers; [ svend ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,21 @@
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation {
pname = "keyfuzz";
version = "0.2";
meta = with lib; {
description = "Manipulate the scancode/keycode translation tables of keyboard drivers";
homepage = "http://0pointer.de/lennart/projects/keyfuzz/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ mboes ];
};
src = fetchurl {
url = "http://0pointer.de/lennart/projects/keyfuzz/keyfuzz-0.2.tar.gz";
sha256 = "0xv9ymivp8fnyc5xcyh1vamxnx90bzw66wlld813fvm6q2gsiknk";
};
configureFlags = [ "--without-initdir" "--disable-lynx" ];
}

View file

@ -0,0 +1,113 @@
{ lib, stdenv, rustPlatform, rustc, cargo, fetchFromGitHub, pkg-config, cmake, extra-cmake-modules, llvmPackages
, withWayland ? true
, withIndicator ? true, dbus, libdbusmenu
, withXim ? true, xorg, cairo
, withGtk2 ? true, gtk2
, withGtk3 ? true, gtk3
, withQt5 ? true, qt5
}:
let
cmake_args = lib.optionals withGtk2 ["-DENABLE_GTK2=ON"]
++ lib.optionals withGtk3 ["-DENABLE_GTK3=ON"]
++ lib.optionals withQt5 ["-DENABLE_QT5=ON"];
optFlag = w: (if w then "1" else "0");
in
stdenv.mkDerivation rec {
pname = "kime";
version = "2.5.6";
src = fetchFromGitHub {
owner = "Riey";
repo = pname;
rev = "v${version}";
sha256 = "sha256-r5luI6B4IjNTbh2tzpqabokgwkmbyXrA61+F2HDEWuo=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
sha256 = "sha256-GvBnNPY51RPt+I73oet5tB/EE2UsEPKbelJZkSY3xNw=";
};
# Replace autostart path
postPatch = ''
substituteInPlace res/kime.desktop --replace "/usr/bin/kime" "$out/bin/kime"
'';
dontUseCmakeConfigure = true;
dontWrapQtApps = true;
buildPhase = ''
runHook preBuild
export KIME_BUILD_CHECK=1
export KIME_BUILD_INDICATOR=${optFlag withIndicator}
export KIME_BUILD_XIM=${optFlag withXim}
export KIME_BUILD_WAYLAND=${optFlag withWayland}
export KIME_BUILD_KIME=1
export KIME_CARGO_ARGS="-j$NIX_BUILD_CORES --frozen"
export KIME_MAKE_ARGS="-j$NIX_BUILD_CORES"
export KIME_CMAKE_ARGS="${lib.concatStringsSep " " cmake_args}"
bash scripts/build.sh -r
runHook postBuild
'';
doCheck = true;
checkPhase = ''
runHook preCheck
cargo test --release --frozen
runHook postCheck
'';
installPhase = ''
runHook preInstall
export KIME_BIN_DIR=bin
export KIME_INSTALL_HEADER=1
export KIME_INSTALL_DOC=1
export KIME_INCLUDE_DIR=include
export KIME_DOC_DIR=share/doc/kime
export KIME_ICON_DIR=share/icons
export KIME_LIB_DIR=lib
export KIME_QT5_DIR=lib/qt-${qt5.qtbase.version}
bash scripts/install.sh "$out"
runHook postInstall
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
# Don't pipe output to head directly it will cause broken pipe error https://github.com/rust-lang/rust/issues/46016
kimeVersion=$(echo "$($out/bin/kime --version)" | head -n1)
echo "'kime --version | head -n1' returns: $kimeVersion"
[[ "$kimeVersion" == "kime ${version}" ]]
runHook postInstallCheck
'';
buildInputs = lib.optionals withIndicator [ dbus libdbusmenu ]
++ lib.optionals withXim [ xorg.libxcb cairo ]
++ lib.optionals withGtk2 [ gtk2 ]
++ lib.optionals withGtk3 [ gtk3 ]
++ lib.optionals withQt5 [ qt5.qtbase ];
nativeBuildInputs = [
pkg-config
llvmPackages.clang
llvmPackages.libclang
llvmPackages.bintools
cmake
extra-cmake-modules
rustPlatform.cargoSetupHook
rustc
cargo
];
RUST_BACKTRACE = 1;
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
meta = with lib; {
homepage = "https://github.com/Riey/kime";
description = "Korean IME";
license = licenses.gpl3Plus;
maintainers = [ maintainers.riey ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/libinput-gestures b/libinput-gestures
index 78c7c28..da04007 100755
--- a/libinput-gestures
+++ b/libinput-gestures
@@ -27,7 +27,7 @@ except ImportError:
session_locked = False
-PROGPATH = Path(sys.argv[0])
+PROGPATH = Path("libinput-gestures")
PROGNAME = PROGPATH.stem
# Conf file containing gesture commands.

View file

@ -0,0 +1,34 @@
diff --git a/libinput-gestures b/libinput-gestures
index 78c7c28..1a2c965 100755
--- a/libinput-gestures
+++ b/libinput-gestures
@@ -87,11 +87,11 @@ def get_libinput_vers():
'Return the libinput installed version number string'
# Try to use newer libinput interface then fall back to old
# (depreciated) interface.
- res = run(('libinput', '--version'), check=False)
+ res = run(('@libinput@', '--version'), check=False)
if res:
return res.strip(), True
- res = run(('libinput-list-devices', '--version'), check=False)
+ res = run(('@libinput-list-devices@', '--version'), check=False)
return res and res.strip(), False
def get_devices_list(cmd_list_devices, device_list):
@@ -694,11 +694,11 @@ def main():
sys.exit('libinput helper tools do not seem to be installed?')
if has_subcmd:
- cmd_debug_events = 'libinput debug-events'
- cmd_list_devices = 'libinput list-devices'
+ cmd_debug_events = '@libinput@ debug-events'
+ cmd_list_devices = '@libinput@ list-devices'
else:
- cmd_debug_events = 'libinput-debug-events'
- cmd_list_devices = 'libinput-list-devices'
+ cmd_debug_events = '@libinput@-debug-events'
+ cmd_list_devices = '@libinput@-list-devices'
if args.verbose:
# Output various info/version info

View file

@ -0,0 +1,54 @@
{ lib, stdenv, fetchFromGitHub, makeWrapper,
libinput, wmctrl, python3,
coreutils, xdotool ? null,
extraUtilsPath ? lib.optional (xdotool != null) xdotool
}:
stdenv.mkDerivation rec {
pname = "libinput-gestures";
version = "2.72";
src = fetchFromGitHub {
owner = "bulletmark";
repo = "libinput-gestures";
rev = version;
sha256 = "sha256-si94aKyiJtRwg+JS0PazqRjGrA/zUwN8CCIKI5KLJNw=";
};
patches = [
./0001-hardcode-name.patch
./0002-paths.patch
];
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ python3 ];
postPatch =
''
substituteInPlace libinput-gestures-setup --replace /usr/ /
substituteInPlace libinput-gestures \
--replace /etc "$out/etc" \
--subst-var-by libinput "${libinput}/bin/libinput" \
--subst-var-by wmctrl "${wmctrl}/bin/wmctrl"
'';
installPhase =
''
runHook preInstall
${stdenv.shell} libinput-gestures-setup -d "$out" install
runHook postInstall
'';
postFixup =
''
rm "$out/bin/libinput-gestures-setup"
substituteInPlace "$out/share/applications/libinput-gestures.desktop" --replace "/usr" "$out"
chmod +x "$out/share/applications/libinput-gestures.desktop"
wrapProgram "$out/bin/libinput-gestures" --prefix PATH : "${lib.makeBinPath ([coreutils] ++ extraUtilsPath)}"
'';
meta = with lib; {
homepage = "https://github.com/bulletmark/libinput-gestures";
description = "Gesture mapper for libinput";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ teozkr ];
};
}

View file

@ -0,0 +1,38 @@
{ lib, stdenv, fetchurl
, vala, gobject-introspection, intltool, python2Packages, glib
, pkg-config
, libgee, json-glib, marisa, libkkc-data
}:
stdenv.mkDerivation rec {
pname = "libkkc";
version = "0.3.5";
src = fetchurl {
url = "${meta.homepage}/releases/download/v${version}/${pname}-${version}.tar.gz";
sha256 = "89b07b042dae5726d306aaa1296d1695cb75c4516f4b4879bc3781fe52f62aef";
};
nativeBuildInputs = [
vala gobject-introspection
python2Packages.python python2Packages.marisa
intltool glib pkg-config
];
buildInputs = [ marisa libkkc-data ];
enableParallelBuilding = true;
propagatedBuildInputs = [ libgee json-glib ];
postInstall = ''
ln -s ${libkkc-data}/lib/libkkc/models $out/share/libkkc/models
'';
meta = with lib; {
description = "Japanese Kana Kanji conversion input method library";
homepage = "https://github.com/ueno/libkkc";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ vanzef ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,51 @@
{ lib
, stdenv
, fetchFromSourcehut
, writeText
, libinput
, libX11
, wayland
, conf ? null
, patches ? [ ]
}:
stdenv.mkDerivation rec {
pname = "lisgd";
version = "0.3.4";
src = fetchFromSourcehut {
owner = "~mil";
repo = "lisgd";
rev = version;
hash = "sha256-ZzPdIwN4/G5Te51gJpbNcHVkG4Rplcaa8yHDJr58oyk=";
};
inherit patches;
postPatch = let
configFile = if lib.isDerivation conf || lib.isPath conf then
conf
else
writeText "config.def.h" conf;
in lib.optionalString (conf != null) ''
cp ${configFile} config.def.h
'';
buildInputs = [
libinput
libX11
wayland
];
makeFlags = [
"PREFIX=${placeholder "out"}"
];
meta = with lib; {
description = "Bind gestures via libinput touch events";
homepage = "https://git.sr.ht/~mil/lisgd";
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ dotlambda ];
};
}

View file

@ -0,0 +1,27 @@
{ lib, stdenv, fetchurl, gettext, gawk, bash }:
stdenv.mkDerivation rec {
pname = "m17n-db";
version = "1.8.0";
src = fetchurl {
url = "https://download.savannah.gnu.org/releases/m17n/m17n-db-${version}.tar.gz";
sha256 = "0vfw7z9i2s9np6nmx1d4dlsywm044rkaqarn7akffmb6bf1j6zv5";
};
nativeBuildInputs = [ gettext ];
buildInputs = [ gettext gawk bash ];
strictDeps = true;
configureFlags = [ "--with-charmaps=${stdenv.cc.libc}/share/i18n/charmaps" ]
;
meta = {
homepage = "https://www.nongnu.org/m17n/";
description = "Multilingual text processing library (database)";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ astsmtl ];
};
}

View file

@ -0,0 +1,32 @@
{ lib, stdenv, fetchurl, m17n_db, autoreconfHook, pkg-config }:
stdenv.mkDerivation rec {
pname = "m17n-lib";
version = "1.8.0";
src = fetchurl {
url = "https://download.savannah.gnu.org/releases/m17n/m17n-lib-${version}.tar.gz";
sha256 = "0jp61y09xqj10mclpip48qlfhniw8gwy8b28cbzxy8hq8pkwmfkq";
};
strictDeps = true;
# reconf needed to sucesfully cross-compile
nativeBuildInputs = [
autoreconfHook pkg-config
# requires m17n-db tool at build time
m17n_db
];
# Fails parallel build due to missing intra-package depends:
# https://savannah.nongnu.org/bugs/index.php?61377
# make[2]: *** No rule to make target '../src/libm17n-core.la', needed by 'libm17n.la'. Stop.
enableParallelBuilding = false;
meta = {
homepage = "https://www.nongnu.org/m17n/";
description = "Multilingual text processing library (runtime)";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ astsmtl ];
};
}

View file

@ -0,0 +1,52 @@
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, autoreconfHook, libXaw, freetype }:
stdenv.mkDerivation rec {
pname = "libotf";
version = "0.9.16";
src = fetchurl {
url = "https://download.savannah.gnu.org/releases/m17n/${pname}-${version}.tar.gz";
sha256 = "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8";
};
patches = [
# https://salsa.debian.org/debian/libotf/-/tree/master/debian/patches
# Fix cross-compilation
(fetchpatch {
url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0002-use-pkg-config-not-freetype-config.patch";
sha256 = "sha256-VV9iGoNWIEie6UiLLTJBD+zxpvj0acgqkcBeAN1V6Kc=";
})
# these 2 are required by the above patch
(fetchpatch {
url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-do-not-add-flags-for-required-packages-to-pc-file.patch";
sha256 = "sha256-3kzqNPAHNVJQ1F4fyifq3AqLdChWli/k7wOq+ha+iDs=";
})
(fetchpatch {
url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-libotf-config-modify-to-support-multi-arch.patch";
sha256 = "sha256-SUlI87h+MtYWWtrAegzAnSds8JhxZwTJltDcj/se/Qc=";
})
];
strictDeps = true;
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ libXaw freetype ];
outputs = [ "out" "dev" ];
postInstall = ''
mkdir -p $dev/bin
mv $out/bin/libotf-config $dev/bin/
substituteInPlace $dev/bin/libotf-config \
--replace "pkg-config" "${pkg-config}/bin/pkg-config"
'';
meta = {
homepage = "https://www.nongnu.org/m17n/";
description = "Multilingual text processing library (libotf)";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ bendlas ];
};
}

View file

@ -0,0 +1,22 @@
{ lib, stdenv, fetchurl, pkg-config, gtk2, libhangul }:
stdenv.mkDerivation rec {
pname = "nabi";
version = "1.0.0";
src = fetchurl {
url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/nabi/nabi-${version}.tar.gz";
sha256 = "0craa24pw7b70sh253arv9bg9sy4q3mhsjwfss3bnv5nf0xwnncw";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gtk2 libhangul ];
meta = with lib; {
description = "The Easy Hangul XIM";
homepage = "https://github.com/choehwanjin/nabi";
license = licenses.gpl2;
maintainers = [ maintainers.ianwookim ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,41 @@
{ lib, stdenv, fetchFromGitHub, docutils, installShellFiles }:
stdenv.mkDerivation {
pname = "netevent";
version = "20201018";
src = fetchFromGitHub {
owner = "Blub";
repo = "netevent";
rev = "ddd330f0dc956a95a111c58ad10546071058e4c1";
sha256 = "0myk91pmim0m51h4b8hplkbxvns0icvfmv0401r0hw8md828nh5c";
};
buildInputs = [ docutils ];
nativeBuildInputs = [ installShellFiles ];
outputs = [ "out" "doc" "man" ];
configurePhase = ''
export RST2MAN=rst2man
./configure
'';
installPhase = ''
mkdir -p $out/bin
install -m 0755 netevent $out/bin/
installManPage doc/netevent.1
mkdir -p $doc/share/doc/netevent
cp doc/netevent.rst $doc/share/doc/netevent/netevent.rst
'';
meta = with lib; {
description = "Share linux event devices with other machines";
homepage = "https://github.com/Blub/netevent";
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = with maintainers; [ rgrunbla ];
};
}

View file

@ -0,0 +1,33 @@
{ buildGoModule
, fetchFromGitHub
, lib
, libX11
, libXi
, libXt
, libXtst
}:
buildGoModule rec {
pname = "remote-touchpad";
version = "1.2.0";
src = fetchFromGitHub {
owner = "unrud";
repo = pname;
rev = "v${version}";
sha256 = "sha256-GjXcQyv55yJSAFeNNB+YeCVWav7vMGo/d1FCPoujYjA=";
};
buildInputs = [ libX11 libXi libXt libXtst ];
tags = [ "portal,x11" ];
vendorSha256 = "sha256-WG8OjtfVemtmHkrMg4O0oofsjtFKmIvcmCn9AYAGIrc=";
meta = with lib; {
description = "Control mouse and keyboard from the webbrowser of a smartphone.";
homepage = "https://github.com/unrud/remote-touchpad";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ schnusch ];
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,80 @@
{ lib, stdenv, fetchurl, buildPackages, libiconv, skktools }:
let
# kana to kanji
small = fetchurl {
url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.S";
sha256 = "11cjrc8m99hj4xpl2nvzxanlswpapi92vmgk9d6yimdz0jidb6cq";
};
medium = fetchurl {
url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.M";
sha256 = "0pwjp9qjmn9sq6zc0k6632l7dc2dbjn45585ibckvvl9iwfqqxdp";
};
large = fetchurl {
url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.L";
sha256 = "0ps0a7sbkryd6hxvphq14i7g5wci4gvr0vraac8ia2ww67a2xbyc";
};
# english to japanese
edict = fetchurl {
url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.edict";
sha256 = "1vrwnq0vvjn61nijbln6wfinqg93802d2a8d4ad82n692v83b1li";
};
# misc
assoc = fetchurl {
url = "https://raw.githubusercontent.com/skk-dev/dict/8b35d07a7d2044d48b063d2774d9f9d00bb7cb48/SKK-JISYO.assoc";
sha256 = "1smcbyv6srrhnpl7ic9nqds9nz3g2dgqngmhzkrdlwmvcpvakp1v";
};
iconvBin = if stdenv.isDarwin then libiconv else buildPackages.stdenv.cc.libc;
in
stdenv.mkDerivation {
pname = "skk-dicts-unstable";
version = "2020-03-24";
srcs = [ small medium large edict assoc ];
nativeBuildInputs = [ skktools ] ++ lib.optional stdenv.isDarwin libiconv;
strictDeps = true;
dontUnpack = true;
installPhase = ''
function dictname() {
src=$1
name=$(basename $src) # remove dir name
dict=$(echo $name | cut -b34-) # remove sha256 prefix
echo $dict
}
mkdir -p $out/share
for src in $srcs; do
dst=$out/share/$(dictname $src)
echo ";;; -*- coding: utf-8 -*-" > $dst # libskk requires this on the first line
${lib.getBin iconvBin}/bin/iconv \
-f EUC-JP -t UTF-8 $src | skkdic-expr2 >> $dst
done
# combine .L .edict and .assoc for convenience
dst=$out/share/SKK-JISYO.combined
echo ";;; -*- coding: utf-8 -*-" > $dst
skkdic-expr2 \
$out/share/$(dictname ${large}) + \
$out/share/$(dictname ${edict}) + \
$out/share/$(dictname ${assoc}) >> $dst
'';
enableParallelBuilding = true;
meta = with lib; {
description = "A collection of standard SKK dictionaries";
longDescription = ''
This package provides a collection of standard kana-to-kanji
dictionaries for the SKK Japanese input method.
'';
homepage = "https://github.com/skk-dev/dict";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ yuriaisaka ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,45 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, gdbm, glib }:
# Note (2017-10-24, yuriaisaka):
# - Version 1.3.3 dates from Jul. 19, 2013.
# - The latest commit to the github repo dates from Mar. 05, 2017
# - The repo since appears to have become a kitchen sink place to keep
# misc tools to handle SKK dictionaries, and these tools have runtime
# dependencies on a Ruby interpreter etc.
# - We for the moment do not package them to keep the dependencies slim.
# Probably, shall package the newer tools as skktools-extra in the future.
stdenv.mkDerivation rec {
pname = "skktools";
version = "1.3.4";
src = fetchFromGitHub {
owner = "skk-dev";
repo = "skktools";
rev = "skktools-${lib.replaceStrings ["."] ["_"] version}";
sha256 = "1zway8jsm18279xq8zlpr84iqiw373x3v0ysay74n9bjqxbl234a";
};
# # See "12.2. Package naming"
# name = "skktools-unstable-${version}";
# version = "2017-03-05";
# src = fetchFromGitHub {
# owner = "skk-dev";
# repo = "skktools";
# rev = "e14d98e734d2fdff611385c7df65826e94d929db";
# sha256 = "1k9zxqybl1l5h0a8px2awc920qrdyp1qls50h3kfrj3g65d08aq2";
# };
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gdbm glib ];
meta = {
description = "A collection of tools to edit SKK dictionaries";
longDescription = ''
This package provides a collection of tools to manipulate
(merge, sort etc.) the dictionaries formatted for SKK Japanese
input method.
'';
homepage = "https://github.com/skk-dev/skktools";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ yuriaisaka ];
platforms = with lib.platforms; linux ++ darwin;
};
}

View file

@ -0,0 +1,23 @@
{ lib, stdenv, fetchurl, unzip }:
stdenv.mkDerivation {
pname = "tegaki-zinnia-japanese";
version = "0.3";
src = fetchurl {
url = "http://www.tegaki.org/releases/0.3/models/tegaki-zinnia-japanese-0.3.zip";
sha256 = "1nmg9acxhcqly9gwkyb9m0hpy76fll91ywk4b1q4xms0ajxip1h7";
};
meta = with lib; {
description = "Japanese handwriting model for the Zinnia engine";
homepage = "http://tegaki.org/";
license = licenses.lgpl21;
platforms = platforms.unix;
maintainers = [ maintainers.gebner ];
};
nativeBuildInputs = [ unzip ];
makeFlags = [ "installpath=$(out)/share/tegaki/models/zinnia/" ];
}

View file

@ -0,0 +1,76 @@
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, nix-update-script
, systemd
, libinput
, pugixml
, cairo
, xorg
, gtk3-x11
, pcre
, pkg-config
, cmake
, pantheon
, withPantheon ? false
}:
stdenv.mkDerivation rec {
pname = "touchegg";
version = "2.0.14";
src = fetchFromGitHub {
owner = "JoseExposito";
repo = pname;
rev = version;
sha256 = "sha256-2ZuFZ2PHhbxNTmGdlZONgPfEJC7lI5Rc6dgiBj7VG2o=";
};
patches = lib.optionals withPantheon [
# Disable per-application gesture by default to make sure the default
# config does not conflict with Pantheon switchboard settings.
(fetchpatch {
url = "https://github.com/elementary/os-patches/commit/7d9b133e02132d7f13cf2fe850b2fe4c015c3c5e.patch";
sha256 = "sha256-ZOGVkxiXoTORXC6doz5r9IObAbYjhsDjgg3HtzlTSUc=";
})
];
nativeBuildInputs = [
pkg-config
cmake
];
buildInputs = [
systemd
libinput
pugixml
cairo
gtk3-x11
pcre
] ++ (with xorg; [
libX11
libXtst
libXrandr
libXi
libXdmcp
libpthreadstubs
libxcb
]);
PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system";
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
homepage = "https://github.com/JoseExposito/touchegg";
description = "Linux multi-touch gesture recognizer";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.pantheon.members;
};
}

View file

@ -0,0 +1,36 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, perl, systemd }:
stdenv.mkDerivation rec {
pname = "triggerhappy";
version = "0.5.0";
src = fetchFromGitHub {
owner = "wertarbyte";
repo = "triggerhappy";
rev = "release/${version}";
sha256 = "0gb1qhrxwq7i5abd408d01a2dpf28nr1fph1fg7w7n0i5i1nnk90";
};
nativeBuildInputs = [ pkg-config perl ];
buildInputs = [ systemd ];
makeFlags = [ "PREFIX=$(out)" "BINDIR=$(out)/bin" ];
postInstall = ''
install -D -m 644 -t "$out/etc/triggerhappy/triggers.d" "triggerhappy.conf.examples"
'';
meta = with lib; {
description = "A lightweight hotkey daemon";
longDescription = ''
Triggerhappy is a hotkey daemon developed with small and embedded systems in
mind, e.g. linux based routers. It attaches to the input device files and
interprets the event data received and executes scripts configured in its
configuration.
'';
homepage = "https://github.com/wertarbyte/triggerhappy/";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ jfrankenau taha ];
};
}

View file

@ -0,0 +1,38 @@
--- a/gtk2/immodule/Makefile.in 2015-11-24 16:21:08.967087208 +0900
+++ b/gtk2/immodule/Makefile.in 2015-11-24 16:22:53.316095150 +0900
@@ -928,7 +928,6 @@
install-data-am: install-moduleLTLIBRARIES
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
@@ -993,7 +992,7 @@
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
- install-data-hook install-dvi install-dvi-am install-exec \
+ install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-moduleLTLIBRARIES \
install-pdf install-pdf-am install-ps install-ps-am \
--- a/gtk3/immodule/Makefile.in 2015-11-24 16:21:08.971087209 +0900
+++ b/gtk3/immodule/Makefile.in 2015-11-24 16:23:28.251097832 +0900
@@ -896,7 +896,6 @@
install-data-am: install-moduleLTLIBRARIES
@$(NORMAL_INSTALL)
- $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
@@ -959,7 +958,7 @@
cscopelist-am ctags ctags-am distclean distclean-compile \
distclean-generic distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-data-hook install-dvi \
+ install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-moduleLTLIBRARIES install-pdf install-pdf-am \

View file

@ -0,0 +1,146 @@
{ lib, stdenv, fetchFromGitHub, shared-mime-info
, autoconf, automake, intltool, libtool, pkg-config, cmake
, ruby, librsvg
, ncurses, m17n_lib, m17n_db, expat
, withAnthy ? true, anthy ? null
, withGtk ? true
, withGtk2 ? withGtk, gtk2 ? null
, withGtk3 ? withGtk, gtk3 ? null
, withQt ? true
, withQt4 ? withQt, qt4 ? null
, withQt5 ? false, qt5 ? null
, withLibnotify ? true, libnotify ? null
, withSqlite ? true, sqlite ? null
, withNetworking ? true, curl ? null, openssl ? null
, withFFI ? true, libffi ? null
# Things that are clearly an overkill to be enabled by default
, withMisc ? false, libeb ? null
}:
with lib;
assert withGtk2 -> gtk2 != null;
assert withGtk3 -> gtk3 != null;
# TODO(@oxij): ./configure can't find both qmakes at the same time
# this can be fixed by adding an alias qmake -> qmaka${version} in qmake derivation
assert withQt4 -> !withQt5 && qt4 != null;
assert withQt5 -> !withQt4 && qt5 != null;
assert !withQt5; # fails to build with "Makefile.qmake: No such file or directory"
assert withAnthy -> anthy != null;
assert withLibnotify -> libnotify != null;
assert withSqlite -> sqlite != null;
assert withNetworking -> curl != null && openssl != null;
assert withFFI -> libffi != null;
assert withMisc -> libeb != null;
stdenv.mkDerivation rec {
version = "1.8.8";
pname = "uim";
src = fetchFromGitHub {
owner = "uim";
repo = "uim";
rev = "2c0958c9c505a87e70e344c2192e2e5123c71ea5";
fetchSubmodules = true;
sha256 = "1hkjxi5r49gcna37m3jvykny5hz9ram4y8a3q7lw4qzr52mz9pdp";
};
nativeBuildInputs = [
autoconf automake intltool libtool pkg-config cmake
ruby # used by sigscheme build to generate function tables
librsvg # used by uim build to generate png pixmaps from svg
];
buildInputs = [
ncurses m17n_lib m17n_db expat
]
++ optional withAnthy anthy
++ optional withGtk2 gtk2
++ optional withGtk3 gtk3
++ optional withQt4 qt4
++ optionals withQt5 [ qt5.qtbase.bin qt5.qtbase.dev ]
++ optional withLibnotify libnotify
++ optional withSqlite sqlite
++ optionals withNetworking [
curl openssl
]
++ optional withFFI libffi
++ optional withMisc libeb;
prePatch = ''
patchShebangs *.sh */*.sh */*/*.sh
# configure sigscheme in maintainer mode or else some function tables won't get autogenerated
substituteInPlace configure.ac \
--replace "--with-master-pkg=uim --enable-conf=uim" \
"--enable-maintainer-mode --with-master-pkg=uim --enable-conf=uim"
# generate ./configure files
(cd sigscheme/libgcroots; ./autogen.sh)
(cd sigscheme; ./autogen.sh)
./autogen.sh
'';
patches = [ ./data-hook.patch ];
configureFlags = [
# configure in maintainer mode or else some pixmaps won't get autogenerated
# this should imply the above `--enable-maintainer-mode`, but it does not
"--enable-maintainer-mode"
"--enable-pref"
"--with-skk"
"--with-x"
"--with-xft"
"--with-expat=${expat.dev}"
]
++ optional withAnthy "--with-anthy-utf8"
++ optional withGtk2 "--with-gtk2"
++ optional withGtk3 "--with-gtk3"
++ optionals withQt4 [
"--with-qt4"
"--with-qt4-immodule"
]
++ optionals withQt5 [
"--with-qt5"
"--with-qt5-immodule"
]
++ optional withLibnotify "--enable-notify=libnotify"
++ optional withSqlite "--with-sqlite3"
++ optionals withNetworking [
"--with-curl"
"--with-openssl-dir=${openssl.dev}"
]
++ optional withFFI "--with-ffi"
++ optional withMisc "--with-eb";
# TODO: things in `./configure --help`, but not in nixpkgs
#--with-canna Use Canna [default=no]
#--with-wnn Build with libwnn [default=no]
#--with-mana Build a plugin for Mana [default=yes]
#--with-prime Build a plugin for PRIME [default=yes]
#--with-sj3 Use SJ3 [default=no]
#--with-osx-dcs Build with OS X Dictionary Services [default=no]
# TODO: fix this in librsvg/glib later
# https://github.com/NixOS/nixpkgs/pull/57027#issuecomment-475461733
preBuild = ''
export XDG_DATA_DIRS="${shared-mime-info}/share"
'';
dontUseCmakeConfigure = true;
meta = with lib; {
homepage = src.meta.homepage;
description = "A multilingual input method framework";
license = licenses.bsd3;
platforms = platforms.unix;
broken = stdenv.hostPlatform.isAarch64; # fails to build libgcroots (not supported on aarch64)
maintainers = with maintainers; [ ericsagnes oxij ];
};
}

View file

@ -0,0 +1,25 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation {
pname = "zinnia";
version = "2016-08-28";
src = fetchFromGitHub {
owner = "taku910";
repo = "zinnia";
rev = "fd74d8c8680bb3df8692279151ea6339ab68e32b";
sha256 = "1izjy5qw6swg0rs2ym2i72zndb90mwrfbd1iv8xbpwckbm4899lg";
};
setSourceRoot = ''
sourceRoot=$(echo */zinnia)
'';
meta = with lib; {
description = "Online hand recognition system with machine learning";
homepage = "http://taku910.github.io/zinnia/";
license = licenses.bsd2;
platforms = platforms.unix;
maintainers = [ maintainers.gebner ];
};
}