From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czXKP-0001Sa-N4 for guix-patches@gnu.org; Sat, 15 Apr 2017 19:42:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czXKM-0006x2-IW for guix-patches@gnu.org; Sat, 15 Apr 2017 19:42:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51314) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czXKM-0006wi-8r for guix-patches@gnu.org; Sat, 15 Apr 2017 19:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1czXKM-0003Zf-0D for guix-patches@gnu.org; Sat, 15 Apr 2017 19:42:02 -0400 Subject: bug#26454: [PATCH 2/2] gnu: add emacs-exwm Resent-Message-ID: From: "Feng Shu" References: <20170411225803.2420-1-tumashu@163.com> <20170411225803.2420-2-tumashu@163.com> <87inm9sdcs.fsf@gmail.com> <60b3e50e.AEEAJadpHi4AAAAAAAAAAAO0QTIAAAACwQwAAAAAAAW9WABY7oh5@mailjet.com> <67fed3f6.1a3b.15b64e00dfd.Coremail.tumashu@163.com> <87mvbj6w72.fsf@163.com> <4d35676d.AEUAI-hEBJAAAAAAAAAAAAO0QTIAAAACwQwAAAAAAAW9WABY8M5G@mailjet.com> <87zifjm39e.fsf@163.com> <4f5081b4.AEAAJDrf7PAAAAAAAAAAAAO0QTIAAAACwQwAAAAAAAW9WABY8QX9@mailjet.com> <33802c56.135f.15b6f79595f.Coremail.tumashu@163.com> <87bmrxua4o.fsf@163.com> Date: Sun, 16 Apr 2017 07:41:30 +0800 In-Reply-To: (Arun Isaac's message of "Sun, 16 Apr 2017 02:43:48 +0530") Message-ID: <87k26ldys5.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 26454@debbugs.gnu.org --=-=-= Content-Type: text/plain Arun Isaac writes: > You should be able to do this just using #:make-flags. See > https://www.gnu.org/software/make/manual/html_node/Overriding.html emacs-build-system seem to have no #:make-flags, I just use "make var1=var1 all" instead. the rest have been fixed, thanks! the below is new patch: --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: inline; filename=0001-gnu-add-emacs-xelb.patch Content-Transfer-Encoding: quoted-printable >From 8d5157658cee4419c4b81fda1185637c5cd5b5c4 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 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 71058136a..658e4ee00 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -24,6 +24,7 @@ ;;; Copyright =A9 2017 Kyle Meyer ;;; Copyright =A9 2017 Kei Kebreau ;;; Copyright =A9 2017 George Clemmer +;;; Copyright =A9 2017 Feng Shu ;;; ;;; This file is part of GNU Guix. ;;; @@ -4348,3 +4349,48 @@ commands are also offered as part of the AUCTeX pack= age, 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=3D" + (assoc-ref inputs "xcb-proto") + "/share/xcb") + (string-append "EMACS_BIN=3D" + (assoc-ref inputs "emacs") + "/bin/emacs -Q") + "all"))))))) + (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 applicatio= ns.") + (license license:gpl3+))) --=20 2.12.2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-add-emacs-exwm.patch >From 8c8cc9684a672f85e07a4cefd665abe43ee3fa6c Mon Sep 17 00:00:00 2001 From: Feng Shu Date: Sat, 15 Apr 2017 20:23:10 +0800 Subject: [PATCH 2/2] gnu: add emacs-exwm * gnu/packages/emacs.scm (emacs-exwm): New variable --- gnu/packages/emacs.scm | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 658e4ee00..75d24fb1f 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -4394,3 +4394,88 @@ 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+))) + +(define-public emacs-exwm + (package + (name "emacs-exwm") + (version "0.13-3.7a5bb11") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ch11ng/exwm") + (commit "7a5bb1156d07848e465f55fd31f8ec755b52aa01"))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0cbaq2ls8pivz4h8hwgn9ldvg16pwlisdf047civvilqiqczw31w")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-xelb" ,emacs-xelb))) + (inputs + `(("xhost" ,xhost) + ("dbus" ,dbus))) + ;; The following functions and variables needed by emacs-exwm are + ;; not included in emacs-minimal: + ;; scroll-bar-mode, fringe-mode + ;; 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 'build 'install-xsession + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((emacs-path (string-append (assoc-ref inputs "emacs") + "/bin/emacs")) + (sh-path (string-append (assoc-ref inputs "bash") + "/bin/sh")) + (xhost-path (string-append (assoc-ref inputs "xhost") + "/bin/xhost")) + (dbus-launch-path (string-append (assoc-ref inputs "dbus") + "/bin/dbus-launch")) + (output (assoc-ref outputs "out")) + (xsessions-dir (string-append output "/share/xsessions")) + (desktop-file (string-append xsessions-dir "/exwm.desktop")) + (bin-dir (string-append output "/bin")) + (exwm-default-session (string-append bin-dir "/exwm-default-session"))) + ;; Add a .desktop file to xsessions. + (mkdir-p xsessions-dir) + (mkdir-p bin-dir) + (with-output-to-file desktop-file + (lambda _ + (format #t + "[Desktop Entry]~@ + Name=Exwm~@ + Comment=Emacs X Window Manager ~@ + Exec=~a/bin/exwm-default-session~@ + TryExec=~@*~a/bin/exwm-default-session~@ + Type=Application~%" + output))) + ;; Add a shell wrap file to bin directory. + ;; Fixup: Set DISPLAY variable for the reason: + ;; https://github.com/ch11ng/exwm/issues/213 + (with-output-to-file exwm-default-session + (lambda _ + (format #t + "#!~a ~@ + export DISPLAY=:0 ~@ + ~a +SI:localuser:$USER ~@ + exec ~a --exit-with-session ~a -q --eval \"~a\" ~%" + sh-path xhost-path dbus-launch-path emacs-path + (string-append + "(if (file-exists-p \\\"~/.exwm.el\\\")" + "(load \\\"~/.exwm.el\\\")" + "(require 'exwm)" + "(require 'exwm-config)" + "(exwm-config-default)" + "(message \\\"EXWM: ~/.exwm.el is not exist. use exwm fallback configure.\\\")" + ")")))) + (chmod exwm-default-session #o555) + #t)))))) + (home-page "https://github.com/ch11ng/exwm") + (synopsis "Emacs X Window Manager") + (description "EXWM (Emacs X Window Manager) is a full-featured +tiling X window manager for Emacs built on top of XELB.") + (license license:gpl3+))) -- 2.12.2 --=-=-= Content-Type: text/plain -- --=-=-=--