From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1czV29-0001zj-PG for guix-patches@gnu.org; Sat, 15 Apr 2017 17:15:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1czV26-00056Q-HL for guix-patches@gnu.org; Sat, 15 Apr 2017 17:15:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51245) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1czV26-00056D-83 for guix-patches@gnu.org; Sat, 15 Apr 2017 17:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1czV26-00006T-31 for guix-patches@gnu.org; Sat, 15 Apr 2017 17:15:02 -0400 Subject: bug#26454: [PATCH 2/2] gnu: add emacs-exwm Resent-Message-ID: Message-Id: <370aaae8.AEAAJGDHDFgAAAAAAAAAAAO0QTIAAAACwQwAAAAAAAW9WABY8o0b@mailjet.com> MIME-Version: 1.0 From: Arun Isaac Date: Sun, 16 Apr 2017 02:43:48 +0530 In-reply-to: <87bmrxua4o.fsf@163.com> 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> Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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: Feng Shu Cc: 26454@debbugs.gnu.org Thanks for the updated patches! Could you please add a copyright header for you at the top of the emacs.scm source file? > + ;; The following functions or variables is need by emacs-xelb, > + ;; which is not included in 'emacs-minimal'. Make this comment as follows. 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 binding= s. > + ;; This will be adjusted when xelb developer comment in issue pag= e: > + ;; https://github.com/ch11ng/xelb/issues/16 > + (modify-phases %standard-phases > + (add-after 'unpack 'regenerate-el-files > + (lambda _ > + (let ((xcb-proto-xml-path (string-append (assoc-ref %build-= inputs > + "xcb-pr= oto") > + "/share/xcb")) > + (emacs-path (string-append (assoc-ref %build-= inputs > + "emacs"= ) > + "/bin/emacs"))) > + (substitute* "Makefile" > + (("PROTO_PATH :=3D ../xcb-proto/src") > + (string-append "PROTO_PATH :=3D " xcb-proto-xml-path)) > + (("EMACS_BIN :=3D emacs -Q") > + (string-append "EMACS_BIN :=3D " emacs-path " -Q"))) You should be able to do this just using #:make-flags. See https://www.gnu.org/software/make/manual/html_node/Overriding.html > + (inputs `(("xcb-proto" ,xcb-proto))) xcb-proto is only required during build time, right? Therefore, it is a native input. > + (propagated-inputs > + `(("emacs-xelb" ,emacs-xelb) > + ("xhost" ,xhost) > + ("dbus" ,dbus))) Instead of making xhost and dbus propagated inputs, we should just reference the required executables with their absolute paths. That way, xhost and dbus would become normal inputs. > + ;; The following functions or variables is need by emacs-exwm, > + ;; which is not included in 'emacs-minimal'. Same as mentioned earlier. > + ;; scroll-bar-mode, fringe-mode > + ;; x-display-pixel-width x-display-pixel-height > + (modify-phases %standard-phases > + (add-after 'build 'install-xsession > + (lambda* (#:key outputs #:allow-other-keys) > + (let* ((emacs-path (string-append (assoc-ref %build-inputs > + "emacs") > + "/bin/emacs")) > + (sh-path (string-append (assoc-ref %build-inputs > + "bash") > + "/bin/sh")) > + (xhost-path (string-append (assoc-ref %build-inputs > + "xhost") > + "/bin/xhost")) > + (dbus-launch-path (string-append (assoc-ref %build-i= nputs > + "dbus") > + "/bin/dbus-launch")= ) Use the keyword argument `inputs' here, instead of directly using `%build-i= nputs'. > + (output (assoc-ref outputs "out")) > + (xsessions-dir (string-append output "/share/xsessio= ns")) > + (desktop-file (string-append xsessions-dir "/exwm-de= mo.desktop")) > + (bin-dir (string-append output "/bin")) > + (exwm-demo-file (string-append bin-dir "/exwm-demo-s= ession"))) > + ;; 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=3DExwm-Demo~@ > + Comment=3DDemo of Emacs X Window Manager ~@ > + Exec=3D~a/bin/exwm-demo-session~@ > + TryExec=3D~@*~a/bin/exwm-demo-session~@ > + Icon=3D~@ > + Type=3DApplication~%" > + output))) Let's not call this a "Demo". Better to just use name, synopsis, etc. as done for the xmonad package. > + ;; 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-demo-file > + (lambda _ > + (format #t > + "#!~a ~@ > + export DISPLAY=3D:0 ~@ > + ~a +SI:localuser:$USER ~@ > + exec ~a --exit-with-session ~a -q --eval \"(progn (= require 'exwm)(require 'exwm-config)(exwm-config-default))\" ~%" > + sh-path xhost-path dbus-launch-path emacs-path))) > + (chmod exwm-demo-file #o555) > + #t)))))) Similarly, remove any mention of the word "demo". =