From d1e53ec2239077da96d871900fbb4c6d2d274cc5 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Sat, 28 Nov 2020 13:20:51 +0800 Subject: [PATCH 3/9] gnu: Add fcitx5-lua. * gnu/packages/fcitx5.scm(fcitx5-lua): New variable. --- gnu/packages/fcitx5.scm | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/fcitx5.scm b/gnu/packages/fcitx5.scm index c4ee0c6e3c..c48eafbad5 100644 --- a/gnu/packages/fcitx5.scm +++ b/gnu/packages/fcitx5.scm @@ -145,3 +145,47 @@ client.") (description "Fcitx 5 is a generic input method framework, the successor of Fcitx.") (license license:lgpl2.1+))) + +(define-public fcitx5-lua + (package + (name "fcitx5-lua") + (version "5.0.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://download.fcitx-im.org/fcitx5/fcitx5-lua/fcitx5-lua-" + version ".tar.xz")) + (sha256 + (base32 "0v4kjx5bargmzfm3v2kys1kzfbpkbd8inzw23y9hslc8h5zazj33")))) + (build-system cmake-build-system) + (arguments + `(#:configure-flags + (list + (string-append "-DFEM_INCLUDE_INSTALL_DIR=" %output "/include") + (string-append "-DFEM_LIB_INSTALL_DIR=" %output "/lib")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-install-prefix + (lambda* (#:key outputs #:allow-other-keys) + (for-each + (lambda (x) + (format #t "patch-install-prefix: Fixing install prefix in ~a~%" + x) + (substitute* x + (("\\$\\{FCITX_INSTALL_PKGDATADIR\\}") + (string-append (assoc-ref outputs "out") + "/share/fcitx5")))) + '("src/addonloader/CMakeLists.txt" + "src/imeapi/CMakeLists.txt")) + #t))))) + (inputs + `(("fcitx5" ,fcitx5) + ("lua" ,lua) + ("gettext" ,gettext-minimal) + ("libpthread-stubs" ,libpthread-stubs))) + (native-inputs + `(("extra-cmake-modules" ,extra-cmake-modules))) + (home-page "https://github.com/fcitx/fcitx5-lua") + (synopsis "Lua support for Fcitx 5") + (description "Fcitx5-lua allow user to write Fcitx5 extension in Lua.") + (license license:lgpl2.1+))) -- 2.29.2