summary refs log tree commit diff
path: root/gnu/packages/emacs-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/emacs-xyz.scm')
-rw-r--r--gnu/packages/emacs-xyz.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 2b28680dbb..00df763fca 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -31363,6 +31363,47 @@ REPL appropriate to the current major mode.")
      "Rime is an Emacs input method built upon Rime input method engine.")
     (license license:gpl3+)))
 
+(define-public emacs-liberime
+  (let ((commit "cc9eb9812fd6f68e78ed6a0c0a85da7a18765753")
+        (revision "0")
+        (version "0.0.6"))
+    (package
+      (name "emacs-liberime")
+      (version (git-version (string-append "v" version) revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/merrickluo/liberime")
+               (commit commit)))
+         (sha256
+          (base32
+           "11c2wj00wwbdxqkzl60sd77cp43rja5v8hrvhrvhg75v62kawva2"))
+         (file-name (git-file-name name version))))
+      (build-system emacs-build-system)
+      (arguments
+       (list
+        #:include #~(cons "^src/liberime-core.so$" %default-include)
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'delete-files-and-patch-paths
+              (lambda* (#:key inputs #:allow-other-keys)
+                (delete-file-recursively "emacs-module")
+                (emacs-substitute-variables "liberime.el"
+                  ("liberime-module-file"
+                   (string-append #$output "/src/liberime-core.so"))
+                  ("liberime-shared-data-dir"
+                   (search-input-directory inputs "share/rime-data")))))
+            (add-before 'install 'build-emacs-module
+              (lambda _
+                (invoke "make"))))))
+      (inputs (list librime rime-data))
+      (home-page "https://github.com/merrickluo/liberime")
+      (synopsis "Librime Emacs Lisp binding")
+      (description
+       "Liberime is an Emacs dynamic module provide librime bindings.")
+      (license license:gpl3+))))
+
 (define-public emacs-bison-mode
   (package
     (name "emacs-bison-mode")