diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libime')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libime/default.nix | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libime/default.nix b/nixpkgs/pkgs/development/libraries/libime/default.nix new file mode 100644 index 000000000000..ff9301eb9caf --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libime/default.nix @@ -0,0 +1,67 @@ +{ lib +, stdenv +, fetchurl +, fetchFromGitHub +, cmake +, extra-cmake-modules +, boost +, python3 +, fcitx5 +, zstd +}: + +let + tableVer = "20240108"; + table = fetchurl { + url = "https://download.fcitx-im.org/data/table-${tableVer}.tar.gz"; + hash = "sha256-cpxZbYaQfecnx00Pw/0kHEBsXevStMt07v4CI4funa4="; + }; + arpaVer = "20230712"; + arpa = fetchurl { + url = "https://download.fcitx-im.org/data/lm_sc.arpa-${arpaVer}.tar.xz"; + hash = "sha256-ut1iwWxjc3h6D9qPCc1FLRL2DVhohW9lHO7PGge6ujI="; + }; + dictVer = "20230412"; + dict = fetchurl { + url = "https://download.fcitx-im.org/data/dict-${dictVer}.tar.xz"; + hash = "sha256-8F/Mr/loeQCqw9mtWoGyCIi1cyAUA/vNm7x5B9npdQc="; + }; +in +stdenv.mkDerivation rec { + pname = "libime"; + version = "1.1.6"; + + src = fetchFromGitHub { + owner = "fcitx"; + repo = "libime"; + rev = version; + hash = "sha256-PhzJtAGmSkMeXMSe2uR/JKHKlZtL0e3tPDZVoRCvAis="; + fetchSubmodules = true; + }; + + prePatch = '' + ln -s ${table} data/$(stripHash ${table}) + ln -s ${arpa} data/$(stripHash ${arpa}) + ln -s ${dict} data/$(stripHash ${dict}) + ''; + + nativeBuildInputs = [ + cmake + extra-cmake-modules + python3 + ]; + + buildInputs = [ + zstd + boost + fcitx5 + ]; + + meta = with lib; { + description = "A library to support generic input method implementation"; + homepage = "https://github.com/fcitx/libime"; + license = licenses.lgpl21Plus; + maintainers = with maintainers; [ poscat ]; + platforms = platforms.linux; + }; +} |