1 { lib, stdenv, fetchurl, makeWrapper, pkg-config, cmake, fcitx, gtk3, isocodes, gnome }:
3 stdenv.mkDerivation rec {
4 pname = "fcitx-configtool";
8 description = "GTK-based config tool for Fcitx";
9 license = licenses.gpl2;
10 platforms = platforms.linux;
11 maintainers = with maintainers; [ cdepillabout ];
15 url = "https://download.fcitx-im.org/fcitx-configtool/fcitx-configtool-${version}.tar.xz";
16 sha256 = "1yyi9jhkwn49lx9a47k1zbvwgazv4y4z72gnqgzdpgdzfrlrgi5w";
19 nativeBuildInputs = [ cmake pkg-config makeWrapper ];
20 buildInputs = [ fcitx isocodes gtk3 gnome.adwaita-icon-theme ];
22 # Patch paths to `fcitx-remote`
24 for f in gtk{3,}/config_widget.c; do
25 substituteInPlace $f \
26 --replace 'EXEC_PREFIX "/bin/fcitx-remote"' '"${fcitx}/bin/fcitx-remote"'
31 wrapProgram $out/bin/fcitx-config-gtk3 \
32 --prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS";