Skip to content

Commit

Permalink
emacs: Remove references from emacs.pdmp
Browse files Browse the repository at this point in the history
This reduces the Emacs closure size from 1324 MiB to 424 MiB.

Fixes #98755.
  • Loading branch information
edolstra committed Oct 1, 2020
1 parent 0982f4c commit 8e13d34
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkgs/applications/editors/emacs/generic.nix
Expand Up @@ -11,7 +11,7 @@
, libtiff, librsvg, gconf, libxml2, imagemagick, gnutls, libselinux
, alsaLib, cairo, acl, gpm, AppKit, GSS, ImageIO, m17n_lib, libotf
, jansson, harfbuzz
, libgccjit, targetPlatform, makeWrapper # native-comp params
, libgccjit, targetPlatform, makeWrapper, nukeReferences # native-comp params
, systemd ? null
, withX ? !stdenv.isDarwin
, withNS ? stdenv.isDarwin
Expand Down Expand Up @@ -91,7 +91,7 @@ in stdenv.mkDerivation {

LIBRARY_PATH = if nativeComp then "${lib.getLib stdenv.cc.libc}/lib" else "";

nativeBuildInputs = [ pkgconfig makeWrapper ]
nativeBuildInputs = [ pkgconfig makeWrapper nukeReferences ]
++ lib.optionals srcRepo [ autoreconfHook texinfo ]
++ lib.optional (withX && (withGTK3 || withXwidgets)) wrapGAppsHook;

Expand Down Expand Up @@ -140,6 +140,9 @@ in stdenv.mkDerivation {
rm -rf $out/var
rm -rf $siteVersionDir
nuke-refs $out/libexec/emacs/*/*/emacs.pdmp
'' + lib.optionalString withCsrc ''
for srcdir in src lisp lwlib ; do
dstdir=$siteVersionDir/$srcdir
Expand Down

0 comments on commit 8e13d34

Please sign in to comment.