unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Lightweight Emacs (or "GTK+ minimal)
@ 2020-06-08  9:45 Pierre Neidhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2020-06-08  9:45 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 551 bytes --]

Hi Guix!

I'm working on reducing some package closures.
Looking at Emacs, it drags:

- llvm
- mesa
- guile
- cups / ghostscript / hplip
- wayland

Turns out that it seems to be all because of GTK+ (to be confirmed).

1. Does anyone have a recipe for Emacs without GTK+ (that can also
   display pictures)?

2. Can we make a GTK+-minimal?
   At first glance, we could strip some 300 MiB from the the 700 MiB
   GTK+ closure size.
   Also I wonder why guile is in there.

Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Lightweight Emacs (or "GTK+ minimal)
@ 2020-06-08 15:59 Leo Prikler
  2020-06-08 16:45 ` philippe.brochard
  0 siblings, 1 reply; 7+ messages in thread
From: Leo Prikler @ 2020-06-08 15:59 UTC (permalink / raw)
  To: mail; +Cc: guix-devel

Hello, Pierre

> Also I wonder why guile is in there.
According to guix graph, guile is pulled by gnutls.

> 1. Does anyone have a recipe for Emacs without GTK+ (that can also
>    display pictures)?
Not directly, but you could try building it with motif (package
lesstif) or Lucid/Athena (requires at least libxaw, not sure if all
dependencies for that are packaged).

> 2. Can we make a GTK+-minimal?
>    At first glance, we could strip some 300 MiB from the the 700 MiB
>    GTK+ closure size.
What features of GTK+ would this minimal variant include/exclude
respectively?

Regards,
Leo



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Lightweight Emacs (or "GTK+ minimal)
  2020-06-08 15:59 Lightweight Emacs (or "GTK+ minimal) Leo Prikler
@ 2020-06-08 16:45 ` philippe.brochard
  2020-06-08 17:25   ` Pierre Neidhardt
  0 siblings, 1 reply; 7+ messages in thread
From: philippe.brochard @ 2020-06-08 16:45 UTC (permalink / raw)
  To: Leo Prikler, mail; +Cc: guix-devel

Leo Prikler <leo.prikler@student.tugraz.at> writes:

> Hello, Pierre
>
Hi,

>> Also I wonder why guile is in there.
> According to guix graph, guile is pulled by gnutls.
>
>> 1. Does anyone have a recipe for Emacs without GTK+ (that can also
>>    display pictures)?
> Not directly, but you could try building it with motif (package
> lesstif) or Lucid/Athena (requires at least libxaw, not sure if all
> dependencies for that are packaged).
>
I managed to build Emacs with Lucid with the following definition:

---8<-----------------------------------------------------------------------
(define-module (gnu packages emacs-lucid)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system glib-or-gtk)
  #:use-module (gnu packages)
  #:use-module (gnu packages acl)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages base)
  #:use-module (gnu packages compression)
  #:use-module (gnu packages fontutils)
  #:use-module (gnu packages fribidi)
  #:use-module (gnu packages gd)
  #:use-module (gnu packages gettext)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome) ; for librsvg
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages guile)
  #:use-module (gnu packages image)
  #:use-module (gnu packages imagemagick)
  #:use-module (gnu packages linux) ; alsa-lib
  #:use-module (gnu packages ncurses)
  #: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)
  #:use-module (srfi srfi-1)
  #:use-module (gnu packages emacs))

(define-public emacs-lucid
  (package
    (inherit emacs)
    (name "emacs-lucid")
    (synopsis "The extensible, customizable, self-documenting text
editor (with lucid support)")
    (build-system gnu-build-system)
    (arguments
     (substitute-keyword-arguments (package-arguments emacs)
       ((#:configure-flags flags ''())
        `(cons "--with-x-toolkit=lucid" ,flags))))
    (inputs
     `(("libxaw" ,libxaw)
	   ,@(package-inputs emacs)))))

emacs-lucid
---8<-----------------------------------------------------------------------

Surely need more work to be polished.

Best regards,

Philippe


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Lightweight Emacs (or "GTK+ minimal)
  2020-06-08 16:45 ` philippe.brochard
@ 2020-06-08 17:25   ` Pierre Neidhardt
  2020-06-08 17:54     ` Pierre Neidhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Neidhardt @ 2020-06-08 17:25 UTC (permalink / raw)
  To: philippe.brochard, Leo Prikler; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

Thanks for sharing!

emacs-lucid closure size is 783.7 MiB.
emacs is 1181.3 MiB.

The difference really shines when building EXWM against emacs-lucid: it
makes for a much lighter Guix System.

Most Emacs packages don't have "emacs" in their closure.
So if we add emacs-lucid, one of the few extra packages we would have to
add beside it would be emacs-lucid-exwm (or emacs-exwm-lucid).

Thoughts?

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Lightweight Emacs (or "GTK+ minimal)
  2020-06-08 17:25   ` Pierre Neidhardt
@ 2020-06-08 17:54     ` Pierre Neidhardt
  2020-06-08 18:02       ` zimoun
  0 siblings, 1 reply; 7+ messages in thread
From: Pierre Neidhardt @ 2020-06-08 17:54 UTC (permalink / raw)
  To: philippe.brochard, Leo Prikler; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 166 bytes --]

We could also make emacs-lucid the default compiler for Emacs packages:
GTK is never needed there as far as I know.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Lightweight Emacs (or "GTK+ minimal)
  2020-06-08 17:54     ` Pierre Neidhardt
@ 2020-06-08 18:02       ` zimoun
  2020-06-08 18:17         ` Pierre Neidhardt
  0 siblings, 1 reply; 7+ messages in thread
From: zimoun @ 2020-06-08 18:02 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: Guix Devel, Leo Prikler

Hi Pierre,

On Mon, 8 Jun 2020 at 19:54, Pierre Neidhardt <mail@ambrevar.xyz> wrote:
>
> We could also make emacs-lucid the default compiler for Emacs packages:
> GTK is never needed there as far as I know.

AFAIK, 'emacs-mininal' is used by the Emacs build system.  And I do
not think this minimal package comes with GTK+ support; even not any X
support, I guess.

BTW, here [1] you can find a patch to change the byte-compiler on-the-fly.

[1] http://issues.guix.gnu.org/41732#7

Cheers,
simon


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Lightweight Emacs (or "GTK+ minimal)
  2020-06-08 18:02       ` zimoun
@ 2020-06-08 18:17         ` Pierre Neidhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2020-06-08 18:17 UTC (permalink / raw)
  To: zimoun; +Cc: Guix Devel, Leo Prikler

[-- Attachment #1: Type: text/plain, Size: 413 bytes --]

Oh, didn't know that, indeed, that even much better than emacs-lucid!

That said, the question still stands to have an full-fledged Emacs /
EXWM without GTK.

> BTW, here [1] you can find a patch to change the byte-compiler on-the-fly.
>
> [1] http://issues.guix.gnu.org/41732#7

This is a great idea!  Emacs package are fast enough to compile after all.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-06-08 18:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-08 15:59 Lightweight Emacs (or "GTK+ minimal) Leo Prikler
2020-06-08 16:45 ` philippe.brochard
2020-06-08 17:25   ` Pierre Neidhardt
2020-06-08 17:54     ` Pierre Neidhardt
2020-06-08 18:02       ` zimoun
2020-06-08 18:17         ` Pierre Neidhardt
  -- strict thread matches above, loose matches on Subject: below --
2020-06-08  9:45 Pierre Neidhardt

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).