From 7b0b3661de614a8d39ee904d08df5eefde5a14ac Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Fri, 14 Apr 2017 23:06:15 +0800 Subject: [PATCH 1/2] gnu: add emacs-xelb * gnu/packages/emacs.scm (emacs-xelb): New variable. --- gnu/packages/emacs.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 976ea31e0..53a9bec0b 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2017 Kyle Meyer ;;; Copyright © 2017 Kei Kebreau ;;; Copyright © 2017 George Clemmer +;;; Copyright © 2017 Feng Shu ;;; ;;; This file is part of GNU Guix. ;;; @@ -4360,3 +4361,47 @@ commands are also offered as part of the AUCTeX package, but it is not the same - CDLaTeX focuses on speediness for inserting LaTeX constructs.") (license license:gpl3+))) + +(define-public emacs-xelb + (package + (name "emacs-xelb") + (version "0.12-3.d1d6b6c") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ch11ng/xelb") + (commit "d1d6b6cb48a6a9562252be20ab49f24708b34335"))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0sxx2n3mi90dz66yi4xya89jrznyixfbmnj8b84l6qbkdp9iwd91")))) + (build-system emacs-build-system) + ;; The following functions and variables needed by emacs-xelb are + ;; 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 + ;; Generate .el files from the XML description of the XCB bindings. + ;; This will be adjusted when xelb developer comment in issue page: + ;; https://github.com/ch11ng/xelb/issues/16 + (modify-phases %standard-phases + (add-after 'unpack 'regenerate-el-files + (lambda* (#:key inputs #:allow-other-keys) + (zero? (system* "make" + (string-append "PROTO_PATH=" + (assoc-ref inputs "xcb-proto") + "/share/xcb") + (string-append "EMACS_BIN=" + (assoc-ref inputs "emacs") + "/bin/emacs -Q")))))))) + (native-inputs `(("xcb-proto" ,xcb-proto))) + (home-page "https://github.com/ch11ng/xelb") + (synopsis "X protocol Emacs Lisp Binding") + (description "@code{emacs-xelb} is a pure Emacs Lisp implementation +of the X11 protocol based on the XML description files from the XCB +project. It features an object-oriented API and permits a certain degree +of concurrency. It should enable you to implement low-level X11 applications.") + (license license:gpl3+))) -- 2.12.2