2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper, pkg-config, cmake, fcitx, gtk3, isocodes, gnome3 }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "fcitx-configtool-0.4.10";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
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/${name}.tar.xz";
|
|
|
|
sha256 = "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
|
|
|
|
buildInputs = [ fcitx isocodes gtk3 gnome3.adwaita-icon-theme ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# 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";
|
|
|
|
'';
|
|
|
|
}
|