[bug#34128] add emacs built with xwidgets-support

Message ID 87zhrx4mlu.fsf@web.de
State Accepted
Headers show
Series [bug#34128] add emacs built with xwidgets-support | expand

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Dr. Arne Babenhauserheide Jan. 18, 2019, 10:29 p.m. UTC
* gnu/packages/emacs.scm (emacs-xwidgets): new variable
---
 gnu/packages/emacs.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Ludovic Courtès Jan. 22, 2019, 9:48 p.m. UTC | #1
Hi Arne,

Arne Babenhauserheide <arne_bab@web.de> skribis:

> * gnu/packages/emacs.scm (emacs-xwidgets): new variable

Thanks for the patch!  I wonder why this hadn’t been done before;
Nicolas, Alex, Pierre, thoughts?

The patch LGTM, minor stylistic issues:

> +(define-public emacs-xwidgets
> +  (package (inherit emacs)
> +           (name "emacs-xwidgets")
> +           (synopsis "The extensible, customizable, self-documenting text
> +editor (with xwidgets support)")
> +           (build-system gnu-build-system)
> +           (arguments (append
> +                       (package-arguments emacs)
> +                       `(#:configure-flags
> +                         '("--with-xwidgets"))))
> +           (inputs (append
> +                    (package-inputs emacs)
> +                    `(("webkitgtk" ,webkitgtk)
> +                      ("libxcomposite" ,libxcomposite))))))

Please indent rather along these lines (like in the rest of the file):

  (define-public emacs-xwidgets
    (package
      (inherit emacs)
      (name …) …))

Likewise, for consistency, use unquote-splicing rather than ‘append’:

  (inputs `(("webkitgtk" ,webkitgtk)
            ;; …
            ,@(package-inputs emacs)))

Could you send an updated patch?

Thanks,
Ludo’.

Patch

diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm
index a488289f1..8c3ea1728 100644
--- a/gnu/packages/emacs.scm
+++ b/gnu/packages/emacs.scm
@@ -59,6 +59,7 @@ 
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages webkit)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix utils)
@@ -210,6 +211,21 @@  languages.")
     (native-inputs
      `(("pkg-config" ,pkg-config)))))
 
+(define-public emacs-xwidgets
+  (package (inherit emacs)
+           (name "emacs-xwidgets")
+           (synopsis "The extensible, customizable, self-documenting text
+editor (with xwidgets support)")
+           (build-system gnu-build-system)
+           (arguments (append
+                       (package-arguments emacs)
+                       `(#:configure-flags
+                         '("--with-xwidgets"))))
+           (inputs (append
+                    (package-inputs emacs)
+                    `(("webkitgtk" ,webkitgtk)
+                      ("libxcomposite" ,libxcomposite))))))
+
 (define-public emacs-no-x
   (package (inherit emacs)
     (name "emacs-no-x")