diff options
author | adisbladis <adisbladis@gmail.com> | 2021-02-25 11:38:20 +0200 |
---|---|---|
committer | adisbladis <adisbladis@gmail.com> | 2021-02-25 12:40:37 +0200 |
commit | 44131d7fc36f93f09e71724890f3d3df6b2101eb (patch) | |
tree | e52b235c240a36d18ce4157a4a7ae368240b3cd2 /pkgs/applications/editors/emacs/macport.nix | |
parent | 73487ea05e6bfe88717ccab2284588571b020004 (diff) | |
download | nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.tar nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.tar.gz nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.tar.bz2 nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.tar.lz nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.tar.xz nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.tar.zst nixpkgs-44131d7fc36f93f09e71724890f3d3df6b2101eb.zip |
emacs: Remove clean-env patch and use substituteInPlace
This approach applies to _all_ RUN_TEMACS calls and successfully removes -dev paths from the closure and reduces the closure size from ~1.4G to just under ~464M. It's also less brittle than having in-tree patches.
Diffstat (limited to 'pkgs/applications/editors/emacs/macport.nix')
-rw-r--r-- | pkgs/applications/editors/emacs/macport.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/applications/editors/emacs/macport.nix b/pkgs/applications/editors/emacs/macport.nix index 3c57d3bc81a..b8fcc678faa 100644 --- a/pkgs/applications/editors/emacs/macport.nix +++ b/pkgs/applications/editors/emacs/macport.nix @@ -26,8 +26,6 @@ stdenv.mkDerivation rec { sha256 = "0f2wzdw2a3ac581322b2y79rlj3c9f33ddrq9allj97r1si6v5xk"; }; - patches = [ ./clean-env.patch ]; - enableParallelBuilding = true; nativeBuildInputs = [ pkg-config autoconf automake ]; @@ -57,6 +55,11 @@ stdenv.mkDerivation rec { # Fix sandbox impurities. substituteInPlace Makefile.in --replace '/bin/pwd' 'pwd' substituteInPlace lib-src/Makefile.in --replace '/bin/pwd' 'pwd' + + + # Reduce closure size by cleaning the environment of the emacs dumper + substituteInPlace src/Makefile.in \ + --replace 'RUN_TEMACS = ./temacs' 'RUN_TEMACS = env -i ./temacs' ''; configureFlags = [ |