Subject: [PATCH 1/2] gnu: add emacs-xelb
From: Feng Shu <[email-masked]>
To: [email-masked]
Cc: Feng Shu <[email-masked]>
Date: Wed, 12 Apr 2017 06:58:02 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/emacs.scm (emacs-xelb): New variable
---
 gnu/packages/emacs.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index ff33daf71..9b907a212 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -4137,3 +4137,38 @@ abbreviation of the mode line displays (lighters) of minor modes.")
 configuration in your @file{.emacs} file in a way that is both
 performance-oriented and tidy.")
     (license license:gpl2+)))
+
+(define-public emacs-xelb
+  (package
+    (name "emacs-xelb")
+    (version "0.12")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://elpa.gnu.org/packages/xelb-"
+                           version ".tar"))
+       (file-name (string-append name "-" version ".tar"))
+       (sha256
+        (base32
+         "0i9n0f3ibj4a5pwcsvwrah9m0fz32m0x6a9wsmjn3li20v8pcb81"))))
+    (build-system emacs-build-system)
+    ;; The following functions or variables is need by emacs-xelb,
+    ;; which is not included in 'emacs-minimal'.
+    ;; x-display-screens x-keysym-table x-alt-keysym x-meta-keysym
+    ;; x-hyper-keysym x-super-keysym libxml-parse-xml-region
+    ;; x-display-pixel-width x-display-pixel-height
+    (arguments
+     `(#:emacs ,emacs
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'delete-pkg-file
+           (lambda _
+             (delete-file "xelb-pkg.el") #t)))))
+    (home-page "https://github.com/ch11ng/xelb")
+    (synopsis "X protocol Emacs Lisp Binding")
+    (description "XELB (X protocol Emacs Lisp Binding) is a pure Elisp
+implementation of X11 protocol based on the XML description files from
+XCB project.  It features an object-oriented API and permits a certain
+degree of concurrency.  It should enable you to implement some low-level
+X11 applications.")
+    (license license:gpl3+)))
-- 
2.12.2