emacs: Add withCompressInstall flag

When enabled (the default), Emacs compresses its files (.c, .el, .info,
and so on) before installing them.

Disabling the option with `withCompressInstall = false` results in the
suppression of that compression step. This increases disk space, but is
slightly faster for some operations; Emacs does not have to decompress
these files on the fly when, for example, jumping to the definition of a
built-in function.
This commit is contained in:
Tony Zorman 2023-11-16 19:27:34 +01:00
parent 0c08ce949a
commit e84c8db9a5

View File

@ -90,6 +90,7 @@
, withXinput2 ? withX && lib.versionAtLeast version "29"
, withXwidgets ? !stdenv.isDarwin && !noGui && (withGTK3 || withPgtk)
, withSmallJaDic ? false
, withCompressInstall ? true
# Options
, siteStart ? ./site-start.el
@ -339,6 +340,7 @@ mkDerivation (finalAttrs: {
++ lib.optional withXinput2 "--with-xinput2"
++ lib.optional withXwidgets "--with-xwidgets"
++ lib.optional withSmallJaDic "--with-small-ja-dic"
++ lib.optional (!withCompressInstall) "--without-compress-install"
;
env = lib.optionalAttrs withNativeCompilation {